void (@NotNull final GuiEditor editor, final ArrayList<? extends RadComponent> input, final AnActionEvent e) { List<RadComponent> selection = FormEditingUtil.remapToActionTargets(input); RadContainer selectionParent = FormEditingUtil.getSelectionParent(selection); Palette palette = Palette.getInstance(editor.getProject()); e.getPresentation().setEnabled(palette.getItem(myComponentClass) != null && (selectionParent != null && ((!selectionParent.getLayoutManager().isGrid() && selection.size() == 1) || isSelectionContiguous(selectionParent, selection)) && canWrapSelection(selection))); }