private static void movePathInActionsTree(@NotNull JTree tree, @NotNull ActionUrl url) {
    TreePath treePath = CustomizationUtil.getTreePath(tree, url);
    Object pathComponent = treePath == null ? null : treePath.getLastPathComponent();
    DefaultMutableTreeNode parent = pathComponent instanceof DefaultMutableTreeNode o ? o : null;
    if (parent == null) return;
    int absolutePosition = url.getAbsolutePosition();
    int initialPosition = url.getInitialPosition();
    Object component = url.getComponent();
    if (parent.getChildCount() > absolutePosition && absolutePosition >= 0) {
      if (parent.getChildCount() > initialPosition && initialPosition >= 0) {
        final DefaultMutableTreeNode child = (DefaultMutableTreeNode)parent.getChildAt(initialPosition);
        Object userObj = child.getUserObject();
        if (component != null && component.equals(userObj instanceof Pair<?, ?> pair ? pair.first : userObj)) {
          parent.remove(child);
          parent.insert(child, absolutePosition);
        }
      }
    }
  }
private static void movePathInActionsTree(@NotNull JTree tree, @NotNull ActionUrl url)