ActionGroup (DesignerEditorPanel designer) { final DefaultActionGroup group = DefaultActionGroup.createPopupGroup(() -> DesignerBundle.message("action.select.text")); AnAction selectParent = new AnAction(UIBundle.messagePointer("action.DesignerActionPanel.Anonymous.text.select.parent"), UIBundle.messagePointer("action.DesignerActionPanel.Anonymous.description.select.parent")) { @Override public void actionPerformed(@NotNull AnActionEvent e) { myDesigner.getToolProvider().processKeyEvent(new KeyEvent(myDesigner.getSurfaceArea().getNativeComponent(), KeyEvent.KEY_PRESSED, 0, 0, KeyEvent.VK_ESCAPE, (char)KeyEvent.VK_ESCAPE), myDesigner.getSurfaceArea() ); } }; selectParent.registerCustomShortcutSet(KeyEvent.VK_ESCAPE, 0, null); EditableArea area = designer.getSurfaceArea(); AnAction selectSiblings = new SelectSiblingsAction(area); AnAction selectSameType = new SelectSameTypeAction(area); AnAction deselectAllAction = new DeselectAllAction(area); AnAction selectAllAction = createSelectAllAction(area); registerAction(selectAllAction, "$SelectAll"); group.add(selectParent); group.add(selectSiblings); group.add(selectSameType); group.addSeparator(); group.add(selectAllAction); group.add(deselectAllAction); return group; }