public SliceRootNode( @NotNull Project project, @NotNull DuplicateMap targetEqualUsages, final SliceUsage rootUsage) { super( project, new SliceUsage(rootUsage.getElement().getContainingFile(), rootUsage.params), targetEqualUsages); myRootUsage = rootUsage; }
@Override public void customizeCellRenderer( @NotNull SliceUsageCellRenderer renderer, @NotNull JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { renderer.setIcon(getPresentation().getIcon(expanded)); if (isValid()) { SliceUsage sliceUsage = getValue(); renderer.customizeCellRendererFor(sliceUsage); renderer.setToolTipText(sliceUsage.getPresentation().getTooltipText()); } else { renderer.append( UsageViewBundle.message("node.invalid") + " ", SliceUsageCellRenderer.ourInvalidAttributes); } }
@Override public void navigate(boolean requestFocus) { SliceUsage sliceUsage = getValue(); sliceUsage.navigate(requestFocus); }