public class UsageProjectTreeNode extends ProjectViewNodeWithChildrenList<UsageInfo>
PresentableNodeDescriptor.ColoredFragment
NodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>
myChildren
LOG
DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProject
EMPTY_ROOTS
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
UsageProjectTreeNode(Project project,
UsageInfo usage,
ViewSettings viewSettings) |
Modifier and Type | Method and Description |
---|---|
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).
|
boolean |
contains(VirtualFile file)
Checks if this node or one of its children represents the specified virtual file.
|
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
java.lang.String |
toString() |
protected void |
update(PresentationData presentation) |
static void |
updatePresentationWithTextChunks(PresentationData presentation,
TextChunk[] text) |
addChild, getChildren
canHaveChildrenMatching, createTreeNode, getDefaultRootsFor, getManualOrderKey, getQualifiedNameSortKey, getRoots, getSettings, getSortKey, getTitle, getTypeSortKey, getTypeSortWeight, getVirtualFile, hasProblemFileBeneath, isSortByFirstChild, isValidating, shouldApply, shouldDrillDownOnEmptyElement, shouldPostprocess, someChildContainsFile, someChildContainsFile, validate, wrap
apply, canRepresent, equals, getChildToHighlightAt, getElement, getEqualityObject, getFileStatus, getFileStatusColor, getLeafState, getName, getNullValueSetTrace, getParent, getParentDescriptor, getParentValue, getTestPresentation, getToolTip, getValue, hashCode, isAlwaysExpand, isAlwaysLeaf, isAlwaysShowPlus, postprocess, setParent, setValue, shouldUpdateData, toTestString, valueIsCut
apply, apply, applyFrom, createPresentation, getHighlightColor, getPresentation, getTemplatePresentation, isAncestorOrSelf, isContentHighlighted, isHighlightableContentNode, isParentOf, update
expandOnDoubleClick, getChildrenSortingStamp, getClosedIcon, getColor, getIcon, getIndex, getOpenIcon, getProject, getUpdateCount, getWeight, isWasDeclaredAlwaysLeaf, setChildrenSortingStamp, setIcon, setIndex, setUpdateCount, setWasDeclaredAlwaysLeaf
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPresentation
public UsageProjectTreeNode(Project project, UsageInfo usage, ViewSettings viewSettings)
public boolean contains(VirtualFile file)
ProjectViewNode
contains
in class ProjectViewNode<UsageInfo>
file
- the file to check for.public java.lang.String toString()
toString
in class NodeDescriptor<AbstractTreeNode<UsageInfo>>
protected void update(PresentationData presentation)
update
in class PresentableNodeDescriptor<AbstractTreeNode<UsageInfo>>
public static void updatePresentationWithTextChunks(PresentationData presentation, TextChunk[] text)
public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
navigate
in class AbstractTreeNode<UsageInfo>
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
canNavigate
in class AbstractTreeNode<UsageInfo>
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
canNavigateToSource
in class AbstractTreeNode<UsageInfo>
false
if navigation to source is not possible for any reason.