public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements NavigatableWithText
PresentableNodeDescriptor.ColoredFragmentNodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProjectEMPTY_ROOTSEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
PsiDirectoryNode(Project project,
PsiDirectory value,
ViewSettings viewSettings) |
PsiDirectoryNode(Project project,
PsiDirectory value,
ViewSettings viewSettings,
PsiFileSystemItemFilter filter) |
| 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 |
canRepresent(java.lang.Object element) |
boolean |
contains(VirtualFile file)
Checks if this node or one of its children represents the specified virtual file.
|
java.util.Collection<AbstractTreeNode<?>> |
getChildrenImpl() |
PsiFileSystemItemFilter |
getFilter() |
java.lang.String |
getNavigateActionText(boolean focusEditor) |
java.lang.String |
getQualifiedNameSortKey() |
java.lang.Comparable |
getSortKey()
When nodes aren't sorted by type all objects with same weigh will be sorted using
some common algorithm (e.g alpha comparator).
|
java.lang.String |
getTestPresentation() |
java.lang.String |
getTitle() |
java.lang.Comparable |
getTypeSortKey()
When nodes are sorted by type all objects with same weigh will be sorted using
some common algorithm (e.g alpha comparator).
|
int |
getTypeSortWeight(boolean sortByType) |
int |
getWeight() |
boolean |
isAlwaysShowPlus() |
boolean |
isFQNameShown() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
protected void |
setupIcon(PresentationData data,
PsiDirectory psiDirectory) |
boolean |
shouldDrillDownOnEmptyElement() |
protected boolean |
shouldShowModuleName() |
protected boolean |
shouldShowSourcesRoot() |
protected void |
updateImpl(PresentationData data) |
extractPsiFromValue, getFileStatus, getVirtualFilecalcTooltip, computeFileStatus, getChildren, getIconableFlags, getNavigationItem, isDeprecated, isMarkReadOnly, navigate, patchIcon, update, validatecanHaveChildrenMatching, createTreeNode, getDefaultRootsFor, getManualOrderKey, getRoots, getSettings, hasProblemFileBeneath, isSortByFirstChild, isValidating, shouldApply, shouldPostprocess, someChildContainsFile, someChildContainsFile, wrapapply, equals, getChildToHighlightAt, getElement, getEqualityObject, getFileStatusColor, getLeafState, getName, getNullValueSetTrace, getParent, getParentDescriptor, getParentValue, getToolTip, getValue, hashCode, isAlwaysExpand, isAlwaysLeaf, 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, waitgetPresentationpublic PsiDirectoryNode(Project project, PsiDirectory value, ViewSettings viewSettings)
public PsiDirectoryNode(Project project, PsiDirectory value, ViewSettings viewSettings, PsiFileSystemItemFilter filter)
public PsiFileSystemItemFilter getFilter()
protected boolean shouldShowModuleName()
protected boolean shouldShowSourcesRoot()
protected void updateImpl(PresentationData data)
updateImpl in class AbstractPsiBasedNode<PsiDirectory>protected void setupIcon(PresentationData data, PsiDirectory psiDirectory)
public java.util.Collection<AbstractTreeNode<?>> getChildrenImpl()
getChildrenImpl in class AbstractPsiBasedNode<PsiDirectory>public java.lang.String getTestPresentation()
getTestPresentation in class AbstractTreeNode<PsiDirectory>public boolean isFQNameShown()
public boolean contains(VirtualFile file)
ProjectViewNodecontains in class AbstractPsiBasedNode<PsiDirectory>file - the file to check for.public boolean canRepresent(java.lang.Object element)
canRepresent in class AbstractTreeNode<PsiDirectory>public boolean isValid()
isValid in interface ValidateableNodeisValid in class AbstractPsiBasedNode<PsiDirectory>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<PsiDirectory>false if navigation is not possible for any reason.public boolean canNavigateToSource()
Navigatablefalse.
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 NavigatablecanNavigateToSource in class AbstractPsiBasedNode<PsiDirectory>false if navigation to source is not possible for any reason.public void navigate(boolean requestFocus)
Navigatablenavigate in interface Navigatablenavigate in class AbstractPsiBasedNode<PsiDirectory>requestFocus - true if focus requesting is necessarypublic java.lang.String getNavigateActionText(boolean focusEditor)
getNavigateActionText in interface NavigatableWithTextpublic int getWeight()
getWeight in class NodeDescriptor<AbstractTreeNode<PsiDirectory>>public java.lang.String getTitle()
getTitle in class ProjectViewNode<PsiDirectory>public java.lang.Comparable getSortKey()
ProjectViewNodegetSortKey in class ProjectViewNode<PsiDirectory>public java.lang.Comparable getTypeSortKey()
ProjectViewNodegetTypeSortKey in class ProjectViewNode<PsiDirectory>public java.lang.String getQualifiedNameSortKey()
getQualifiedNameSortKey in class ProjectViewNode<PsiDirectory>public int getTypeSortWeight(boolean sortByType)
getTypeSortWeight in class ProjectViewNode<PsiDirectory>public boolean shouldDrillDownOnEmptyElement()
shouldDrillDownOnEmptyElement in class ProjectViewNode<PsiDirectory>public boolean isAlwaysShowPlus()
isAlwaysShowPlus in class AbstractTreeNode<PsiDirectory>