protected JComponent createActionsToolbar(final Editor editor, final int lineNumber) { final JComponent editorComponent = editor.getComponent(); final DefaultActionGroup group = new DefaultActionGroup(); final GotoPreviousCoveredLineAction prevAction = new GotoPreviousCoveredLineAction(editor, lineNumber); final GotoNextCoveredLineAction nextAction = new GotoNextCoveredLineAction(editor, lineNumber); group.add(prevAction); group.add(nextAction); prevAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)), editorComponent); nextAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_MASK|InputEvent.SHIFT_MASK)), editorComponent); final LineData lineData = getLineData(lineNumber); if (myCoverageByTestApplicable) { group.add(new ShowCoveringTestsAction(myClassName, lineData)); } final AnAction byteCodeViewAction = ActionManager.getInstance().getAction("ByteCodeViewer"); if (byteCodeViewAction != null) { group.add(byteCodeViewAction); } group.add(new EditCoverageColorsAction(editor, lineNumber)); group.add(new HideCoverageInfoAction()); final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.FILEHISTORY_VIEW_TOOLBAR, group, true); final JComponent toolbarComponent = toolbar.getComponent(); final Color background = ((EditorEx)editor).getBackgroundColor(); final Color foreground = editor.getColorsScheme().getColor(EditorColors.CARET_COLOR); toolbarComponent.setBackground(background); toolbarComponent.setBorder(new ColoredSideBorder(foreground, foreground, lineData == null || lineData.getStatus() == LineCoverage.NONE || mySubCoverageActive ? foreground : null, foreground, 1)); toolbar.updateActionsImmediately(); return toolbarComponent; }