public interface ICallHierarchyNode
extends org.eclipse.core.runtime.IAdaptable
Modifier and Type | Field and Description |
---|---|
static org.eclipse.ui.model.IWorkbenchAdapter |
DEFAULT_WORKBENCH_ADAPTER
A default workbench adapter for call hierarchy nodes.
|
Modifier and Type | Method and Description |
---|---|
default <T> T |
getAdapter(java.lang.Class<T> adapter) |
ICallLocation[] |
getCallLocations()
Returns the call locations associated with this node.
|
ICallHierarchyNode[] |
getChildren(org.eclipse.core.runtime.IProgressMonitor monitor)
Returns the immediate child nodes of this node.
|
java.lang.Object |
getElement()
Returns the underlying model element of this node (e.g., an element
representing a method declaration).
|
CallHierarchyKind |
getKind()
Returns the call hierarchy kind for this node.
|
ICallHierarchyNode |
getParent()
Returns the parent node of this node.
|
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 boolean |
mayHaveChildren()
Returns whether this node may have child nodes.
|
default void |
refresh()
Informs this node that it is about to be refreshed in a structured
viewer.
|
static final org.eclipse.ui.model.IWorkbenchAdapter DEFAULT_WORKBENCH_ADAPTER
default <T> T getAdapter(java.lang.Class<T> adapter)
Default implementation of this method in ICallHierarchyNode
returns the underlying model element
if it is an
instance of the given class. Otherwise, if an IWorkbenchAdapter
is requested, it returns the DEFAULT_WORKBENCH_ADAPTER
.
As a fallback, it delegates to the Platform's adapter manager.
getAdapter
in interface org.eclipse.core.runtime.IAdaptable
CallHierarchyKind getKind()
null
)java.lang.Object getElement()
null
)ICallHierarchyNode getParent()
null
if this is a root nodeICallLocation[] getCallLocations()
null
, may be empty).
Clients must not modify the returned array.default boolean isRecursive()
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, false
is returned.
true
if the node is recursive,
and false
otherwisedefault boolean mayHaveChildren()
Default implementation returns false
if this node
is recursive
.
true
if this node may have child nodes,
and false
otherwiseICallHierarchyNode[] getChildren(org.eclipse.core.runtime.IProgressMonitor monitor)
mayHaveChildren()
returns false
for
this node. The returned nodes must correspond to the call hierarchy
kind
.monitor
- a progress monitor, or null
if progress reporting is not desired. The caller must not rely on
IProgressMonitor.done()
having been called by the receivernull
,
may be empty). Clients must not modify the returned array.default void refresh()
Default implementation does nothing.
StructuredViewer.refresh(Object)
Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0