JComponent (@Nullable final AnAction action) { if (action == null) return null; ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("DiffSplitter", new DefaultActionGroup(action), true); toolbar.setTargetComponent(toolbar.getComponent()); toolbar.setReservePlaceAutoPopupIcon(false); toolbar.getComponent().setCursor(Cursor.getDefaultCursor()); return toolbar.getComponent(); }