boolean (@NotNull AnAction action, @NotNull Constraints constraint, @NotNull ActionManager actionManager) { int index = findIndex(constraint.myRelativeToActionId, mySortedChildren, actionManager); if (index == -1) { return false; } if (constraint.myAnchor == Anchor.BEFORE) { mySortedChildren.add(index, action); } else { mySortedChildren.add(index + 1, action); } return true; }