public class UsageNode extends Node implements java.lang.Comparable<UsageNode>, Navigatable
Constructor and Description |
---|
UsageNode(Node parent,
Usage usage) |
UsageNode(Usage usage,
UsageViewTreeModelBuilder model)
Deprecated.
use
UsageNode(Node, Usage) instead |
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).
|
int |
compareTo(UsageNode usageNode) |
protected java.lang.String |
getText(UsageView view) |
Usage |
getUsage() |
protected boolean |
isDataExcluded() |
protected boolean |
isDataReadOnly() |
protected boolean |
isDataValid()
isDataXXX methods perform actual (expensive) data computation.
|
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
java.lang.String |
toString() |
java.lang.String |
tree2string(int indent,
java.lang.String lineSeparator)
debug method for producing string tree presentation
|
protected void |
updateCachedPresentation() |
isExcluded, isReadOnly, isValid, updateNotify
add, 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, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
@Deprecated public UsageNode(Usage usage, UsageViewTreeModelBuilder model)
UsageNode(Node, Usage)
insteadpublic java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public java.lang.String tree2string(int indent, java.lang.String lineSeparator)
Node
tree2string
in class Node
public int compareTo(UsageNode usageNode)
compareTo
in interface java.lang.Comparable<UsageNode>
public Usage getUsage()
public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
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
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.protected boolean isDataValid()
Node
Node.update(UsageView, Consumer)
)
to be compared later with cached data stored in Node.myCachedFlags
and Node.myCachedTextHash
isDataValid
in class Node
protected boolean isDataReadOnly()
isDataReadOnly
in class Node
protected boolean isDataExcluded()
isDataExcluded
in class Node
protected void updateCachedPresentation()
updateCachedPresentation
in class Node