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, updateNotifyadd, 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.DefaultMutableTreeNodepublic java.lang.String tree2string(int indent,
java.lang.String lineSeparator)
Nodetree2string in class Nodepublic int compareTo(UsageNode usageNode)
compareTo in interface java.lang.Comparable<UsageNode>public Usage getUsage()
public void navigate(boolean requestFocus)
Navigatablenavigate in interface NavigatablerequestFocus - true if focus requesting is necessarypublic 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 Navigatablefalse 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 Navigatablefalse if navigation to source is not possible for any reason.protected boolean isDataValid()
NodeNode.update(UsageView, Consumer))
to be compared later with cached data stored in Node.myCachedFlags and Node.myCachedTextHashisDataValid in class Nodeprotected boolean isDataReadOnly()
isDataReadOnly in class Nodeprotected boolean isDataExcluded()
isDataExcluded in class Nodeprotected void updateCachedPresentation()
updateCachedPresentation in class Node