public class ModuleNode extends PackageDependenciesNode implements NavigatableWithText
myColor, myProject, NOT_CHANGED
Constructor and Description |
---|
ModuleNode(Module module,
ModuleGrouper moduleGrouper) |
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 |
equals(java.lang.Object o) |
void |
fillFiles(java.util.Set<? super PsiFile> set,
boolean recursively) |
javax.swing.Icon |
getIcon() |
Module |
getModule() |
java.lang.String |
getModuleName() |
java.lang.String |
getNavigateActionText(boolean focusEditor) |
int |
getWeight() |
int |
hashCode() |
boolean |
isValid() |
void |
navigate(boolean focus)
Open editor and select/navigate to the object there if possible.
|
java.lang.String |
toString() |
add, addFile, canSelectInLeftTree, getColor, getComment, getContainingFiles, getPresentableFilesCount, getPsiElement, getRegisteredFiles, getUserObject, hasMarked, hasUnmarked, isEquals, isSorted, setEquals, setSorted, sortChildren, updateColor
breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
public ModuleNode(Module module, ModuleGrouper moduleGrouper)
public void fillFiles(java.util.Set<? super PsiFile> set, boolean recursively)
fillFiles
in class PackageDependenciesNode
public 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 PackageDependenciesNode
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 PackageDependenciesNode
false
if navigation to source is not possible for any reason.public void navigate(boolean focus)
Navigatable
navigate
in interface Navigatable
navigate
in class PackageDependenciesNode
focus
- true
if focus requesting is necessarypublic javax.swing.Icon getIcon()
getIcon
in class PackageDependenciesNode
public java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String getModuleName()
public Module getModule()
public int getWeight()
getWeight
in class PackageDependenciesNode
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isValid()
isValid
in class PackageDependenciesNode
public java.lang.String getNavigateActionText(boolean focusEditor)
getNavigateActionText
in interface NavigatableWithText