public final class CallHierarchyNodeDescriptor extends HierarchyNodeDescriptor implements Navigatable
NodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>
myHighlightedText, myIsBase
DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProject
Constructor and Description |
---|
CallHierarchyNodeDescriptor(Project project,
HierarchyNodeDescriptor parentDescriptor,
PsiElement element,
boolean isBase,
boolean navigateToReference) |
Modifier and Type | Method and Description |
---|---|
void |
addReference(PsiReference reference) |
boolean |
canNavigate()
Indicates whether this instance supports navigation of any kind.
|
boolean |
canNavigateToSource()
Indicates whether this instance supports navigation to source (that means some kind of editor).
|
PsiMember |
getEnclosingElement() |
static PsiMember |
getEnclosingElement(PsiElement element) |
PsiElement |
getTargetElement()
Element for OpenFileDescriptor
|
boolean |
hasReference(PsiReference reference) |
void |
incrementUsageCount() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
boolean |
update()
Make sure the descriptor is up to date with its content
|
expandOnDoubleClick, getBaseMarkerIcon, getCachedChildren, getContainingFile, getElement, getHighlightedText, getInvalidPrefixAttributes, getPackageNameAttributes, getUsageCountPrefixAttributes, installIcon, installIcon, installIcon, invalidElement, isMarkModified, isMarkReadOnly, setCachedChildren
getIcon, getPsiElement
applyFrom, getChildrenSortingStamp, getClosedIcon, getColor, getIcon, getIndex, getOpenIcon, getParentDescriptor, getProject, getUpdateCount, getWeight, isWasDeclaredAlwaysLeaf, setChildrenSortingStamp, setIcon, setIndex, setUpdateCount, setWasDeclaredAlwaysLeaf, toString
public CallHierarchyNodeDescriptor(Project project, HierarchyNodeDescriptor parentDescriptor, PsiElement element, boolean isBase, boolean navigateToReference)
public final PsiMember getEnclosingElement()
public static PsiMember getEnclosingElement(PsiElement element)
public final void incrementUsageCount()
public final PsiElement getTargetElement()
public final boolean isValid()
isValid
in class HierarchyNodeDescriptor
public final boolean update()
NodeDescriptor
update
in class SmartElementDescriptor
public void addReference(PsiReference reference)
public boolean hasReference(PsiReference reference)
public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
requestFocus
- true
if focus requesting is necessarypublic boolean canNavigate()
Navigatable
Navigatable.canNavigateToSource()
returns true
.
We assume that this method should return true
in such case,
so implement this method respectively.canNavigate
in interface Navigatable
false
if navigation is not possible for any reason.public boolean canNavigateToSource()
Navigatable
false
.
In such cases it is not recommended to do batch navigation for all navigatables
available via CommonDataKeys.NAVIGATABLE_ARRAY
,
because it may lead to opening several modal dialogs.
Use OpenSourceUtil.navigate(com.intellij.pom.Navigatable...)
to process such arrays correctly.canNavigateToSource
in interface Navigatable
false
if navigation to source is not possible for any reason.