|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.jsdt.ui.StandardJavaScriptElementContentProvider
public class StandardJavaScriptElementContentProvider
A base content provider for JavaScriptelements. It provides access to the JavaScriptelement hierarchy without listening to changes in the JavaScriptmodel. If updating the presentation on JavaScript model change is required than clients have to subclass, listen to JavaScript model changes and have to update the UI using corresponding methods provided by the JFace viewers or their own UI presentation.
The following JavaScript element hierarchy is surfaced by this content provider:
JavaScript model (IJavaScriptModel
) JavaScript project (IJavaScriptProject
) package fragment root (IPackageFragmentRoot
) package fragment (IPackageFragment
) compilation unit (IJavaScriptUnit
) binary class file (IClassFile
)
Note that when the entire JavaScript project is declared to be package fragment root, the corresponding package fragment root element that normally appears between the JavaScript project and the package fragments is automatically filtered out.
Constructor Summary | |
---|---|
StandardJavaScriptElementContentProvider()
Creates a new content provider. |
|
StandardJavaScriptElementContentProvider(boolean provideMembers)
Creates a new StandardJavaScriptElementContentProvider . |
Method Summary | |
---|---|
void |
dispose()
|
java.lang.Object[] |
getChildren(java.lang.Object element)
|
java.lang.Object[] |
getElements(java.lang.Object parent)
|
java.lang.Object |
getParent(java.lang.Object element)
|
boolean |
getProvideMembers()
Returns whether members are provided when asking for a compilation units or class file for its children. |
boolean |
getProvideWorkingCopy()
Deprecated. Since 3.0 compilation unit children are always provided as working copies. The JavaScript model does not support the 'original' mode anymore. |
boolean |
hasChildren(java.lang.Object element)
|
void |
inputChanged(Viewer viewer,
java.lang.Object oldInput,
java.lang.Object newInput)
|
boolean |
providesWorkingCopies()
Returns true if the content provider returns working
copy elements; otherwise false is returned. |
void |
setProvideMembers(boolean b)
Sets whether the content provider is supposed to return members when asking a compilation unit or class file for its children. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardJavaScriptElementContentProvider()
public StandardJavaScriptElementContentProvider(boolean provideMembers)
StandardJavaScriptElementContentProvider
.
provideMembers
- if true
members below compilation units
and class files are provided.Method Detail |
---|
public boolean getProvideMembers()
true
if the content provider provides members;
otherwise false
is returnedpublic void setProvideMembers(boolean b)
b
- if true
then members are provided.
If false
compilation units and class files are the
leaves provided by this content provider.public boolean getProvideWorkingCopy()
public boolean providesWorkingCopies()
IWorkingCopyProvider
true
if the content provider returns working
copy elements; otherwise false
is returned.
providesWorkingCopies
in interface IWorkingCopyProvider
public java.lang.Object[] getElements(java.lang.Object parent)
public void inputChanged(Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
public void dispose()
public java.lang.Object[] getChildren(java.lang.Object element)
public boolean hasChildren(java.lang.Object element)
public java.lang.Object getParent(java.lang.Object element)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |