void (@NotNull final AnActionEvent e) { final GuiEditor editor = FormEditingUtil.getEditorFromContext(e.getDataContext()); assert editor != null; final SelectionState selectionState = editor.getSelectionState(); selectionState.setInsideChange(true); ComponentTreeBuilder builder = DesignerToolWindowManager.getInstance(editor).getComponentTreeBuilder(); builder.beginUpdateSelection(); try{ final Stack<ComponentPtr[]> history = selectionState.getSelectionHistory(); history.pop(); SelectionState.restoreSelection(editor, history.peek()); } finally { builder.endUpdateSelection(); selectionState.setInsideChange(false); } }