ArrayList<AnAction> (final boolean fromPopup) { final ArrayList<AnAction> result = new ArrayList<>(); result.add(new MyAddAction(fromPopup)); result.add(new MyDeleteAction(forAll(o -> { if (o instanceof MyNode) { final NamedConfigurable namedConfigurable = ((MyNode)o).getConfigurable(); final Object editableObject = namedConfigurable != null ? namedConfigurable.getEditableObject() : null; return editableObject instanceof NamedScope; } return false; }))); result.add(new MyCopyAction()); result.add(new MySaveAsAction()); result.add(new MyMoveAction(ExecutionBundle.message("move.up.action.name"), IconUtil.getMoveUpIcon(), -1)); result.add(new MyMoveAction(ExecutionBundle.message("move.down.action.name"), IconUtil.getMoveDownIcon(), 1)); return result; }