public abstract class CallHierarchyNode extends java.lang.Object implements ICallHierarchyNode
ICallHierarchyNode.DEFAULT_WORKBENCH_ADAPTER| Modifier | Constructor and Description |
|---|---|
protected |
CallHierarchyNode(ICallHierarchyNode parent,
java.lang.Object element)
Creates a new call hierarchy node.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCallLocation(ICallLocation callLocation)
Appends the given call location to the end of the list of call locations
of this node.
|
protected abstract ICallHierarchyNode[] |
computeChildren(org.eclipse.core.runtime.IProgressMonitor monitor)
Computes and returns the immediate child nodes for this node.
|
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).
|
ICallHierarchyNode |
getParent()
Returns the parent node of this node.
|
boolean |
isRecursive()
Returns whether this node is recursive (i.e., whether there is an
ancestor node containing the same element as this node).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdapter, getKind, mayHaveChildren, refreshprotected CallHierarchyNode(ICallHierarchyNode parent, java.lang.Object element)
parent - the parent node, or null if this is a root nodeelement - the underlying model element (not null)public final java.lang.Object getElement()
ICallHierarchyNodegetElement in interface ICallHierarchyNodenull)public final ICallHierarchyNode getParent()
ICallHierarchyNodegetParent in interface ICallHierarchyNodenull if this is a root nodepublic final ICallLocation[] getCallLocations()
ICallHierarchyNodegetCallLocations in interface ICallHierarchyNodenull, may be empty).
Clients must not modify the returned array.addCallLocation(ICallLocation)public void addCallLocation(ICallLocation callLocation)
This implementation imposes no restrictions on the call location,
except that it must not be null.
callLocation - not nullpublic final 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.
This implementation returns the value determined and cached at the construction time.
isRecursive in interface ICallHierarchyNodetrue if the node is recursive,
and false otherwisepublic final ICallHierarchyNode[] getChildren(org.eclipse.core.runtime.IProgressMonitor monitor)
ICallHierarchyNode.mayHaveChildren() returns false for
this node. The returned nodes must correspond to the call hierarchy
kind.
This implementation delegates to computeChildren(IProgressMonitor)
if this node may have children. Otherwise, a zero-length array is returned.
getChildren in interface ICallHierarchyNodemonitor - 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.protected abstract ICallHierarchyNode[] computeChildren(org.eclipse.core.runtime.IProgressMonitor monitor)
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.getChildren(IProgressMonitor)Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0