public class PackageDependenciesNode extends javax.swing.tree.DefaultMutableTreeNode implements Navigatable
Modifier and Type | Field and Description |
---|---|
protected java.awt.Color |
myColor |
protected Project |
myProject |
protected static java.awt.Color |
NOT_CHANGED |
Constructor and Description |
---|
PackageDependenciesNode(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
add(javax.swing.tree.MutableTreeNode newChild) |
void |
addFile(VirtualFile file,
boolean isMarked) |
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 |
canSelectInLeftTree(java.util.Map<PsiFile,java.util.Set<PsiFile>> deps) |
void |
fillFiles(java.util.Set<? super PsiFile> set,
boolean recursively) |
java.awt.Color |
getColor() |
java.lang.String |
getComment() |
int |
getContainingFiles() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getPresentableFilesCount() |
PsiElement |
getPsiElement() |
java.util.Set<VirtualFile> |
getRegisteredFiles() |
java.lang.Object |
getUserObject() |
int |
getWeight() |
boolean |
hasMarked() |
boolean |
hasUnmarked() |
boolean |
isEquals() |
boolean |
isSorted() |
boolean |
isValid() |
void |
navigate(boolean focus)
Open editor and select/navigate to the object there if possible.
|
void |
setEquals(boolean equals) |
void |
setSorted(boolean sorted) |
void |
sortChildren() |
void |
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, toString
protected java.awt.Color myColor
protected static final java.awt.Color NOT_CHANGED
protected Project myProject
public PackageDependenciesNode(Project project)
public void setEquals(boolean equals)
public boolean isEquals()
public void fillFiles(java.util.Set<? super PsiFile> set, boolean recursively)
public void addFile(VirtualFile file, boolean isMarked)
public javax.swing.Icon getIcon()
public int getWeight()
public boolean hasUnmarked()
public boolean hasMarked()
public PsiElement getPsiElement()
public java.awt.Color getColor()
public void updateColor()
public int getContainingFiles()
public java.lang.String getPresentableFilesCount()
public void add(javax.swing.tree.MutableTreeNode newChild)
add
in class javax.swing.tree.DefaultMutableTreeNode
public void navigate(boolean focus)
Navigatable
navigate
in interface Navigatable
focus
- 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
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
false
if navigation to source is not possible for any reason.public java.lang.Object getUserObject()
getUserObject
in class javax.swing.tree.DefaultMutableTreeNode
public boolean isValid()
public java.util.Set<VirtualFile> getRegisteredFiles()
public java.lang.String getComment()
public boolean canSelectInLeftTree(java.util.Map<PsiFile,java.util.Set<PsiFile>> deps)
public boolean isSorted()
public void setSorted(boolean sorted)
public void sortChildren()