JPanel () { DefaultActionGroup group = new DefaultActionGroup(); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("KeymapEdit", group, true); toolbar.setTargetComponent(myActionsTree.getTree()); final CommonActionsManager commonActionsManager = CommonActionsManager.getInstance(); final TreeExpander treeExpander = createTreeExpander(myActionsTree); group.add(commonActionsManager.createExpandAllAction(treeExpander, myActionsTree.getTree())); group.add(commonActionsManager.createCollapseAllAction(treeExpander, myActionsTree.getTree())); group.add(new EditShortcutAction()); myShowOnlyConflictsButton = new ToggleActionButton(KeyMapBundle.messagePointer("keymap.show.system.conflicts"), AllIcons.General.ShowWarning) { @Override public boolean isSelected(AnActionEvent e) { return myShowOnlyConflicts; } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } @Override public void setSelected(AnActionEvent e, boolean state) { myShowOnlyConflicts = state; myActionsTree.setBaseFilter(myShowOnlyConflicts ? SystemShortcuts.getInstance().createKeymapConflictsActionFilter() : null); myActionsTree.filter(null, myQuickLists); final JTree tree = myActionsTree.getTree(); if (myShowOnlyConflicts) { TreeUtil.expandAll(tree); } else { TreeUtil.collapseAll(tree, 0); } } }; group.add(myShowOnlyConflictsButton); group = new DefaultActionGroup(); ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("Keymap", group, true); actionToolbar.setTargetComponent(myActionsTree.getTree()); actionToolbar.setReservePlaceAutoPopupIcon(false); final JComponent searchToolbar = actionToolbar.getComponent(); final Alarm alarm = new Alarm(); myFilterComponent = new FilterComponent("KEYMAP", 5) { @Override public void filter() { alarm.cancelAllRequests(); alarm.addRequest(() -> { if (!myFilterComponent.isShowing()) return; myTreeExpansionMonitor.freeze(); myFilteringPanel.setShortcut(null); final String filter = getFilter(); myActionsTree.filter(filter, myQuickLists); final JTree tree = myActionsTree.getTree(); TreeUtil.expandAll(tree); if (filter == null || filter.length() == 0) { TreeUtil.collapseAll(tree, 0); myTreeExpansionMonitor.restore(); } else { myTreeExpansionMonitor.unfreeze(); } }, 300); } }; myFilterComponent.reset(); group.add(new FindByShortcutAction(searchToolbar)); group.add(new ClearFilteringAction()); JPanel panel = new JPanel(new GridLayout(1, 2)); panel.add(toolbar.getComponent()); panel.add(new BorderLayoutPanel().addToCenter(myFilterComponent).addToRight(searchToolbar)); return panel; }