private static void setupEditorDefault(EditorEx editor) {
    ConsoleViewUtil.setupConsoleEditor(editor, false, false);
    editor.getContentComponent().setFocusCycleRoot(false);
    editor.setHorizontalScrollbarVisible(false);
    editor.setVerticalScrollbarVisible(true);
    editor.setBorder(null);

    final EditorSettings editorSettings = editor.getSettings();
    editorSettings.setAdditionalLinesCount(0);
    editorSettings.setAdditionalColumnsCount(1);
    editorSettings.setRightMarginShown(false);
  }
  private Editor createLogEditor() {
    Project project = myProjectModel.getProject();
    final Editor editor = ConsoleViewUtil.setupConsoleEditor(project, false, false);
    myProjectModel
        .getProject()
        .getMessageBus()
        .connect()
        .subscribe(
            ProjectManager.TOPIC,
            new ProjectManagerAdapter() {
              @Override
              public void projectClosed(Project project) {
                if (project == myProjectModel.getProject()) {
                  EditorFactory.getInstance().releaseEditor(editor);
                }
              }
            });

    ((EditorMarkupModel) editor.getMarkupModel()).setErrorStripeVisible(true);

    final ClearLogAction clearLog = new ClearLogAction(this);
    clearLog.registerCustomShortcutSet(
        ActionManager.getInstance().getAction(IdeActions.CONSOLE_CLEAR_ALL).getShortcutSet(),
        editor.getContentComponent());

    editor.addEditorMouseListener(
        new EditorPopupHandler() {
          public void invokePopup(final EditorMouseEvent event) {
            final ActionManager actionManager = ActionManager.getInstance();
            final ActionPopupMenu menu =
                actionManager.createActionPopupMenu(
                    ActionPlaces.EDITOR_POPUP, createPopupActions(actionManager, clearLog));
            final MouseEvent mouseEvent = event.getMouseEvent();
            menu.getComponent()
                .show(mouseEvent.getComponent(), mouseEvent.getX(), mouseEvent.getY());
          }
        });
    return editor;
  }
 private static void setupEditor(@NotNull final EditorEx editor) {
   if (!UIUtil.isUnderDarcula()) editor.setBackgroundColor(Gray._247);
   noScrolling(editor);
   editor.getScrollPane().setBorder(null);
   ConsoleViewUtil.setupConsoleEditor(editor, false, false);
 }