Interface ICallHierarchyNode
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Implementing Classes:
CallHierarchyNode,XtextCallHierarchyNode
public interface ICallHierarchyNode
extends org.eclipse.core.runtime.IAdaptable
Represents a call hierarchy node.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.ui.model.IWorkbenchAdapterA default workbench adapter for call hierarchy nodes. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> TgetAdapter(Class<T> adapter) Returns the call locations associated with this node.getChildren(org.eclipse.core.runtime.IProgressMonitor monitor) Returns the immediate child nodes of this node.Returns the underlying model element of this node (e.g., an element representing a method declaration).getKind()Returns the call hierarchy kind for this node.Returns the parent node of this node.default booleanReturns whether this node is recursive (i.e., whether there is an ancestor node containing the same element as this node).default booleanReturns whether this node may have child nodes.default voidrefresh()Informs this node that it is about to be refreshed in a structured viewer.
-
Field Details
-
DEFAULT_WORKBENCH_ADAPTER
static final org.eclipse.ui.model.IWorkbenchAdapter DEFAULT_WORKBENCH_ADAPTERA default workbench adapter for call hierarchy nodes.
-
-
Method Details
-
getAdapter
Default implementation of this method in
ICallHierarchyNodereturns the underlying modelelementif it is an instance of the given class. Otherwise, if anIWorkbenchAdapteris requested, it returns theDEFAULT_WORKBENCH_ADAPTER. As a fallback, it delegates to the Platform's adapter manager.- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-
getKind
CallHierarchyKind getKind()Returns the call hierarchy kind for this node. The kind does not change over the lifetime of the node.- Returns:
- the call hierarchy kind (never
null)
-
getElement
Object getElement()Returns the underlying model element of this node (e.g., an element representing a method declaration). The association does not change over the lifetime of the node.- Returns:
- the underlying model element (never
null)
-
getParent
ICallHierarchyNode getParent()Returns the parent node of this node. The association does not change over the lifetime of the node.- Returns:
- the parent node, or
nullif this is a root node
-
getCallLocations
ICallLocation[] getCallLocations()Returns the call locations associated with this node.- Returns:
- the call locations (never
null, may be empty). Clients must not modify the returned array.
-
isRecursive
default boolean isRecursive()Returns whether this node is recursive (i.e., whether there is an ancestor node containing the same element as this node).Default implementation traverses the parent chain from this node up through the root node until a node containing the same element as this node is found, in which case it returns
true. If no such node can be found,falseis returned.- Returns:
trueif the node is recursive, andfalseotherwise
-
mayHaveChildren
default boolean mayHaveChildren()Returns whether this node may have child nodes.Default implementation returns
falseif this node isrecursive.- Returns:
trueif this node may have child nodes, andfalseotherwise
-
getChildren
Returns the immediate child nodes of this node. Returns a zero-length array ifmayHaveChildren()returnsfalsefor this node. The returned nodes must correspond to the call hierarchykind.- Parameters:
monitor- a progress monitor, ornullif progress reporting is not desired. The caller must not rely onIProgressMonitor.done()having been called by the receiver- Returns:
- the immediate child nodes of this node (never
null, may be empty). Clients must not modify the returned array.
-
refresh
default void refresh()Informs this node that it is about to be refreshed in a structured viewer.Default implementation does nothing.
- See Also:
-
StructuredViewer.refresh(Object)
-