Class DefaultHierarchyNode
- java.lang.Object
-
- org.eclipse.xtext.ide.editor.hierarchy.DefaultHierarchyNode
-
- All Implemented Interfaces:
IHierarchyNode,INavigatable
public class DefaultHierarchyNode extends java.lang.Object implements IHierarchyNode
- Since:
- 2.10
-
-
Constructor Summary
Constructors Constructor Description DefaultHierarchyNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.xtext.resource.IEObjectDescriptiongetElement()java.lang.ObjectgetNavigationElement()Returns an instance containing enough information to identify an editor that should be opened and a region that should be revealed.IHierarchyNodegetParent()java.util.List<IHierarchyNodeReference>getReferences()protected booleaninternalIsRecursive()booleanisRecursive()booleanmayHaveChildren()voidsetElement(org.eclipse.xtext.resource.IEObjectDescription element)voidsetMayHaveChildren(boolean mayHaveChildren)voidsetParent(IHierarchyNode parent)
-
-
-
Method Detail
-
getNavigationElement
public java.lang.Object getNavigationElement()
Description copied from interface:INavigatableReturns an instance containing enough information to identify an editor that should be opened and a region that should be revealed.
Typical navigation elements are resource, object and reference descriptions.
Avoid usage of resource sets, resources and eobjects as navigation elements, since it can lead to memory leaks.
- Specified by:
getNavigationElementin interfaceINavigatable
-
isRecursive
public boolean isRecursive()
- Specified by:
isRecursivein interfaceIHierarchyNode- Returns:
- whether there is a parent (can be transitive) containing the same element as the node
-
internalIsRecursive
protected boolean internalIsRecursive()
-
mayHaveChildren
public boolean mayHaveChildren()
- Specified by:
mayHaveChildrenin interfaceIHierarchyNode- Returns:
- whether the node may have children; e.g. a recursive node cannot have children
-
getParent
public IHierarchyNode getParent()
- Specified by:
getParentin interfaceIHierarchyNode- Returns:
- a parent;
nullif the node is a root
-
setParent
public void setParent(IHierarchyNode parent)
-
setMayHaveChildren
public void setMayHaveChildren(boolean mayHaveChildren)
-
getElement
public org.eclipse.xtext.resource.IEObjectDescription getElement()
- Specified by:
getElementin interfaceIHierarchyNode- Returns:
- an associated element that is used to build child nodes
-
setElement
public void setElement(org.eclipse.xtext.resource.IEObjectDescription element)
-
getReferences
public java.util.List<IHierarchyNodeReference> getReferences()
- Specified by:
getReferencesin interfaceIHierarchyNode- Returns:
- references used to reach the node from a parent; empty if the node is a root
-
-