|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmodesteditor.core.ModestContentProvider
public class ModestContentProvider
This class provides the outline page's internal tree viewer with information about the actual model tree. The tree viewer expects to be given arbitrary Objects as input, so it depends on a content provider to find out the nodes in the tree. In our case, the viewer is given a ModestSimulation, and calls getElements on it to get the top-level elements in the tree, then getChildren on them to find their children, and so on.
Constructor Summary | |
---|---|
ModestContentProvider()
|
Method Summary | |
---|---|
void |
dispose()
|
java.lang.Object[] |
getChildren(java.lang.Object element)
Returns the children models of the given Model (only processes can have children). |
java.lang.Object[] |
getElements(java.lang.Object inputElement)
Returns the top-level models of the given program (which is conceptually the root of the tree, but is not displayed in the view). |
java.lang.Object |
getParent(java.lang.Object element)
Returns the parent model of the given model. |
boolean |
hasChildren(java.lang.Object element)
Returns whether the given model has any children. |
void |
inputChanged(org.eclipse.jface.viewers.Viewer viewer,
java.lang.Object oldInput,
java.lang.Object newInput)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModestContentProvider()
Method Detail |
---|
public java.lang.Object[] getChildren(java.lang.Object element)
getChildren
in interface org.eclipse.jface.viewers.ITreeContentProvider
public java.lang.Object getParent(java.lang.Object element)
getParent
in interface org.eclipse.jface.viewers.ITreeContentProvider
public boolean hasChildren(java.lang.Object element)
hasChildren
in interface org.eclipse.jface.viewers.ITreeContentProvider
public java.lang.Object[] getElements(java.lang.Object inputElement)
getElements
in interface org.eclipse.jface.viewers.IStructuredContentProvider
public void dispose()
dispose
in interface org.eclipse.jface.viewers.IContentProvider
public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, java.lang.Object oldInput, java.lang.Object newInput)
inputChanged
in interface org.eclipse.jface.viewers.IContentProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |