Value
- Value of node descriptorpublic abstract class AbstractPsiBasedNode<Value> extends ProjectViewNode<Value> implements ValidateableNode, StatePreservingNavigatable
PresentableNodeDescriptor.ColoredFragment
NodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>
DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProject
EMPTY_ROOTS
EMPTY_NAVIGATION_ITEM_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
AbstractPsiBasedNode(Project project,
Value value,
ViewSettings viewSettings) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
calcTooltip() |
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).
|
protected static FileStatus |
computeFileStatus(VirtualFile virtualFile,
Project project) |
boolean |
contains(VirtualFile file)
Checks if this node or one of its children represents the specified virtual file.
|
protected abstract PsiElement |
extractPsiFromValue() |
java.util.Collection<? extends AbstractTreeNode<?>> |
getChildren() |
protected abstract java.util.Collection<AbstractTreeNode<?>> |
getChildrenImpl() |
FileStatus |
getFileStatus() |
protected int |
getIconableFlags() |
NavigationItem |
getNavigationItem() |
protected boolean |
isDeprecated() |
protected boolean |
isMarkReadOnly() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
void |
navigate(boolean requestFocus,
boolean preserveState) |
static javax.swing.Icon |
patchIcon(Project project,
javax.swing.Icon original,
VirtualFile file) |
void |
update(PresentationData data) |
protected abstract void |
updateImpl(PresentationData data) |
boolean |
validate() |
canHaveChildrenMatching, createTreeNode, getDefaultRootsFor, getManualOrderKey, getQualifiedNameSortKey, getRoots, getSettings, getSortKey, getTitle, getTypeSortKey, getTypeSortWeight, getVirtualFile, hasProblemFileBeneath, isSortByFirstChild, isValidating, shouldApply, shouldDrillDownOnEmptyElement, shouldPostprocess, someChildContainsFile, someChildContainsFile, wrap
apply, canRepresent, equals, getChildToHighlightAt, getElement, getEqualityObject, 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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPresentation
protected AbstractPsiBasedNode(Project project, Value value, ViewSettings viewSettings)
protected abstract PsiElement extractPsiFromValue()
protected abstract java.util.Collection<AbstractTreeNode<?>> getChildrenImpl()
protected abstract void updateImpl(PresentationData data)
public final java.util.Collection<? extends AbstractTreeNode<?>> getChildren()
getChildren
in class AbstractTreeNode<Value>
public boolean isValid()
isValid
in interface ValidateableNode
protected boolean isMarkReadOnly()
public FileStatus getFileStatus()
getFileStatus
in class AbstractTreeNode<Value>
protected static FileStatus computeFileStatus(VirtualFile virtualFile, Project project)
public void update(PresentationData data)
update
in class PresentableNodeDescriptor<AbstractTreeNode<Value>>
protected int getIconableFlags()
public static javax.swing.Icon patchIcon(Project project, javax.swing.Icon original, VirtualFile file)
protected boolean isDeprecated()
public boolean contains(VirtualFile file)
ProjectViewNode
contains
in class ProjectViewNode<Value>
file
- the file to check for.public NavigationItem getNavigationItem()
public void navigate(boolean requestFocus, boolean preserveState)
navigate
in interface StatePreservingNavigatable
public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
navigate
in class AbstractTreeNode<Value>
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<Value>
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<Value>
false
if navigation to source is not possible for any reason.protected java.lang.String calcTooltip()
public boolean validate()
validate
in class ProjectViewNode<Value>