private static ActionToolbar createToolbarFromGroupId(final String groupId) { final ActionManager actionManager = ActionManager.getInstance(); if (!actionManager.isGroup(groupId)) { throw new IllegalStateException(groupId + " should have been a group"); } final ActionGroup group = ((ActionGroup)actionManager.getAction(groupId)); final ActionToolbarImpl editorToolbar = ((ActionToolbarImpl)actionManager.createActionToolbar(ActionPlaces.EDITOR_TOOLBAR, group, true)); editorToolbar.setOpaque(false); editorToolbar.setBorder(new JBEmptyBorder(0, 2, 0, 2)); return editorToolbar; }