public class PsiFileNode extends BasePsiNode<PsiFile> implements NavigatableWithText
| Modifier and Type | Class and Description |
|---|---|
static class |
PsiFileNode.ExtensionSortKey |
PresentableNodeDescriptor.ColoredFragmentNodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProjectEMPTY_ROOTSEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
PsiFileNode(Project project,
PsiFile value,
ViewSettings viewSettings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canNavigate()
Indicates whether this instance supports navigation of any kind.
|
boolean |
canRepresent(java.lang.Object element) |
boolean |
contains(VirtualFile file)
Checks if this node or one of its children represents the specified virtual file.
|
static java.lang.String |
extension(PsiFile file) |
java.util.Collection<AbstractTreeNode<?>> |
getChildrenImpl() |
java.lang.String |
getNavigateActionText(boolean focusEditor) |
java.lang.String |
getTitle() |
java.lang.Comparable<PsiFileNode.ExtensionSortKey> |
getTypeSortKey()
When nodes are sorted by type all objects with same weigh will be sorted using
some common algorithm (e.g alpha comparator).
|
int |
getWeight() |
protected boolean |
isMarkReadOnly() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
boolean |
shouldDrillDownOnEmptyElement() |
protected void |
updateImpl(PresentationData data) |
extractPsiFromValue, getFileStatus, getVirtualFilecalcTooltip, canNavigateToSource, computeFileStatus, getChildren, getIconableFlags, getNavigationItem, isDeprecated, isValid, navigate, patchIcon, update, validatecanHaveChildrenMatching, createTreeNode, getDefaultRootsFor, getManualOrderKey, getQualifiedNameSortKey, getRoots, getSettings, getSortKey, getTypeSortWeight, hasProblemFileBeneath, isSortByFirstChild, isValidating, shouldApply, shouldPostprocess, someChildContainsFile, someChildContainsFile, wrapapply, equals, getChildToHighlightAt, getElement, getEqualityObject, getFileStatusColor, getLeafState, getName, getNullValueSetTrace, getParent, getParentDescriptor, getParentValue, getTestPresentation, getToolTip, getValue, hashCode, isAlwaysExpand, isAlwaysLeaf, isAlwaysShowPlus, postprocess, setParent, setValue, shouldUpdateData, toTestString, valueIsCutapply, apply, applyFrom, createPresentation, getHighlightColor, getPresentation, getTemplatePresentation, isAncestorOrSelf, isContentHighlighted, isHighlightableContentNode, isParentOf, updateexpandOnDoubleClick, getChildrenSortingStamp, getClosedIcon, getColor, getIcon, getIndex, getOpenIcon, getProject, getUpdateCount, isWasDeclaredAlwaysLeaf, setChildrenSortingStamp, setIcon, setIndex, setUpdateCount, setWasDeclaredAlwaysLeaf, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanNavigateToSourcegetPresentationpublic PsiFileNode(Project project, PsiFile value, ViewSettings viewSettings)
public java.util.Collection<AbstractTreeNode<?>> getChildrenImpl()
getChildrenImpl in class AbstractPsiBasedNode<PsiFile>protected void updateImpl(PresentationData data)
updateImpl in class AbstractPsiBasedNode<PsiFile>public boolean canNavigate()
NavigatableNavigatable.canNavigateToSource() returns true.
We assume that this method should return true in such case,
so implement this method respectively.canNavigate in interface NavigatablecanNavigate in class AbstractPsiBasedNode<PsiFile>false if navigation is not possible for any reason.public void navigate(boolean requestFocus)
Navigatablenavigate in interface Navigatablenavigate in class AbstractPsiBasedNode<PsiFile>requestFocus - true if focus requesting is necessarypublic java.lang.String getNavigateActionText(boolean focusEditor)
getNavigateActionText in interface NavigatableWithTextpublic int getWeight()
getWeight in class NodeDescriptor<AbstractTreeNode<PsiFile>>public java.lang.String getTitle()
getTitle in class ProjectViewNode<PsiFile>protected boolean isMarkReadOnly()
isMarkReadOnly in class AbstractPsiBasedNode<PsiFile>public java.lang.Comparable<PsiFileNode.ExtensionSortKey> getTypeSortKey()
ProjectViewNodegetTypeSortKey in class ProjectViewNode<PsiFile>public static java.lang.String extension(PsiFile file)
public boolean shouldDrillDownOnEmptyElement()
shouldDrillDownOnEmptyElement in class ProjectViewNode<PsiFile>public boolean canRepresent(java.lang.Object element)
canRepresent in class AbstractTreeNode<PsiFile>public boolean contains(VirtualFile file)
ProjectViewNodecontains in class AbstractPsiBasedNode<PsiFile>file - the file to check for.