void (@NotNull final AnActionEvent e) { final Presentation presentation = e.getPresentation(); final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext()); if (editor == null) { presentation.setEnabled(false); return; } final Stack<ComponentPtr[]> history = editor.getSelectionState().getSelectionHistory(); presentation.setEnabled(history.size() > 1); }