@Nullable private List<UsageInfo> getSelectedUsageInfos() { TreePath[] paths = myTree.getSelectionPaths(); if (paths == null) return null; final ArrayList<UsageInfo> result = new ArrayList<UsageInfo>(); for (TreePath path : paths) { SliceNode sliceNode = fromPath(path); if (sliceNode != null) { result.add(sliceNode.getValue().getUsageInfo()); } } if (result.isEmpty()) return null; return result; }
@Override public final void actionPerformed(final AnActionEvent e) { SliceNode rootNode = (SliceNode) myBuilder.getRootNode().getUserObject(); rootNode.setChanged(); myBuilder.addSubtreeToUpdate(myBuilder.getRootNode()); }