public class SliceNode extends AbstractTreeNode<SliceUsage> implements DuplicateNodeRenderer.DuplicatableNode<SliceNode>, MyColoredTreeCellRenderer
PresentableNodeDescriptor.ColoredFragment
NodeDescriptor.NodeComparator<T extends NodeDescriptor<?>>
Modifier and Type | Field and Description |
---|---|
protected boolean |
changed |
protected SliceNode |
duplicate |
protected java.util.List<SliceNode> |
myCachedChildren |
DuplicateMap |
targetEqualUsages |
DEFAULT_WEIGHT, EMPTY_ARRAY, myClosedIcon, myColor, myName, myOpenIcon, myProject
EMPTY_NAVIGATION_ITEM_ARRAY
Modifier | Constructor and Description |
---|---|
protected |
SliceNode(Project project,
SliceUsage sliceUsage,
DuplicateMap targetEqualUsages) |
Modifier and Type | Method and Description |
---|---|
void |
calculateDupNode() |
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).
|
SliceNode |
copy() |
protected PresentationData |
createPresentation() |
void |
customizeCellRenderer(SliceUsageCellRendererBase renderer,
javax.swing.JTree tree,
java.lang.Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) |
boolean |
expandOnDoubleClick() |
java.util.List<SliceNode> |
getCachedChildren() |
java.util.Collection<SliceNode> |
getChildren() |
SliceNode |
getDuplicate() |
java.lang.String |
getNodeText() |
SliceLanguageSupportProvider |
getProvider() |
boolean |
isValid() |
void |
navigate(boolean requestFocus)
Open editor and select/navigate to the object there if possible.
|
void |
setChanged() |
java.lang.String |
toString() |
protected void |
update(PresentationData presentation) |
apply, canRepresent, equals, getChildToHighlightAt, getElement, getEqualityObject, getFileStatus, getFileStatusColor, getLeafState, getName, getNullValueSetTrace, getParent, getParentDescriptor, getParentValue, getTestPresentation, getToolTip, getValue, getVirtualFile, hashCode, hasProblemFileBeneath, isAlwaysExpand, isAlwaysLeaf, isAlwaysShowPlus, postprocess, setParent, setValue, shouldUpdateData, toTestString, valueIsCut
apply, apply, applyFrom, getHighlightColor, getPresentation, getTemplatePresentation, isAncestorOrSelf, isContentHighlighted, isHighlightableContentNode, isParentOf, shouldApply, shouldPostprocess, update
getChildrenSortingStamp, getClosedIcon, getColor, getIcon, getIndex, getOpenIcon, getProject, getUpdateCount, getWeight, isWasDeclaredAlwaysLeaf, setChildrenSortingStamp, setIcon, setIndex, setUpdateCount, setWasDeclaredAlwaysLeaf
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPresentation
protected java.util.List<SliceNode> myCachedChildren
protected SliceNode duplicate
public final DuplicateMap targetEqualUsages
protected boolean changed
protected SliceNode(Project project, SliceUsage sliceUsage, DuplicateMap targetEqualUsages)
public SliceNode copy()
public java.util.Collection<SliceNode> getChildren()
getChildren
in class AbstractTreeNode<SliceUsage>
public java.util.List<SliceNode> getCachedChildren()
protected PresentationData createPresentation()
createPresentation
in class PresentableNodeDescriptor<AbstractTreeNode<SliceUsage>>
protected void update(PresentationData presentation)
update
in class PresentableNodeDescriptor<AbstractTreeNode<SliceUsage>>
public void calculateDupNode()
public SliceNode getDuplicate()
getDuplicate
in interface DuplicateNodeRenderer.DuplicatableNode<SliceNode>
public void navigate(boolean requestFocus)
Navigatable
navigate
in interface Navigatable
navigate
in class AbstractTreeNode<SliceUsage>
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
canNavigate
in class AbstractTreeNode<SliceUsage>
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 AbstractTreeNode<SliceUsage>
false
if navigation to source is not possible for any reason.public boolean isValid()
public boolean expandOnDoubleClick()
expandOnDoubleClick
in class NodeDescriptor<AbstractTreeNode<SliceUsage>>
public void customizeCellRenderer(SliceUsageCellRendererBase renderer, javax.swing.JTree tree, java.lang.Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
customizeCellRenderer
in interface MyColoredTreeCellRenderer
public void setChanged()
public SliceLanguageSupportProvider getProvider()
public java.lang.String getNodeText()
public java.lang.String toString()
toString
in class NodeDescriptor<AbstractTreeNode<SliceUsage>>