ActionToolbar (@NotNull Editor editor, @NotNull List<? extends AnAction> actions, @NotNull Disposable parentDisposable) { JComponent editorComponent = editor.getComponent(); for (AnAction action : actions) { DiffUtil.registerAction(action, editorComponent); } Disposer.register(parentDisposable, () -> ActionUtil.getActions(editorComponent).removeAll(actions)); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.TOOLBAR, new DefaultActionGroup(actions), true); toolbar.setReservePlaceAutoPopupIcon(false); return toolbar; }