ActionToolbar (@Nullable AnAction showInFindToolWindowAction) { DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.addAction(new ActionGroup() { @Override public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) { if (e == null || mySelectedTab == null) return EMPTY_ARRAY; return mySelectedTab.actions.toArray(EMPTY_ARRAY); } }); if (showInFindToolWindowAction != null) { actionGroup.addAction(showInFindToolWindowAction); } ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("search.everywhere.toolbar", actionGroup, true); toolbar.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY); JComponent toolbarComponent = toolbar.getComponent(); toolbarComponent.setOpaque(false); toolbarComponent.setBorder(JBUI.Borders.empty(2, 18, 2, 9)); return toolbar; }