void (@NotNull AnActionEvent e) { final List<TreePath> expandedPaths = TreeUtil.collectExpandedPaths(myActionsTree); final TreePath[] selectionPath = myActionsTree.getSelectionPaths(); if (selectionPath != null) { for (int i = selectionPath.length - 1; i >= 0; i--) { TreePath treePath = selectionPath[i]; final ActionUrl url = CustomizationUtil.getActionUrl(treePath, MOVE); final int absolutePosition = url.getAbsolutePosition(); url.setInitialPosition(absolutePosition); url.setAbsolutePosition(absolutePosition + 1); changePathInActionsTree(myActionsTree, url); addCustomizedAction(url); } ((DefaultTreeModel)myActionsTree.getModel()).reload(); TreeUtil.restoreExpandedPaths(myActionsTree, expandedPaths); for (TreePath path : selectionPath) { myActionsTree.addSelectionPath(path); } } }