void (@NotNull AnActionEvent e) { final List<TreePath> expandedPaths = TreeUtil.collectExpandedPaths(myActionsTree); final TreePath selectionPath = myActionsTree.getLeadSelectionPath(); if (selectionPath != null) { EditIconDialog dlg = new EditIconDialog(selectionPath); if (dlg.showAndGet()) { myActionsTree.repaint(); } } TreeUtil.restoreExpandedPaths(myActionsTree, expandedPaths); }