public void setErrorStripeVisible(boolean val) {
   if (val) {
     myEditor.getVerticalScrollBar().setPersistentUI(new MyErrorPanel());
   } else {
     myEditor.getVerticalScrollBar().setPersistentUI(ButtonlessScrollBarUI.createNormal());
   }
 }
  void repaint(int startOffset, int endOffset) {
    markDirtied();

    ProperTextRange range = offsetToYPosition(startOffset, endOffset);

    myEditor
        .getVerticalScrollBar()
        .repaint(0, range.getStartOffset(), PREFERRED_WIDTH, range.getLength() + getMinHeight());
  }
  public void setErrorStripeRenderer(ErrorStripeRenderer renderer) {
    assertIsDispatchThread();
    myErrorStripeRenderer = renderer;
    // try to not cancel tooltips here, since it is being called after every writeAction, even to
    // the console
    // HintManager.getInstance().getTooltipController().cancelTooltips();

    myEditor.getVerticalScrollBar().repaint();
  }
  private void recalcEditorDimensions() {
    EditorImpl.MyScrollBar scrollBar = myEditor.getVerticalScrollBar();
    int scrollBarHeight = scrollBar.getSize().height;

    myEditorScrollbarTop = scrollBar.getDecScrollButtonHeight() /* + 1*/;
    int editorScrollbarBottom = scrollBar.getIncScrollButtonHeight();
    myEditorTargetHeight = scrollBarHeight - myEditorScrollbarTop - editorScrollbarBottom;
    myEditorSourceHeight = myEditor.getPreferredHeight();
  }
 private MyErrorPanel getErrorPanel() {
   ScrollBarUI ui = myEditor.getVerticalScrollBar().getUI();
   return ui instanceof MyErrorPanel ? (MyErrorPanel) ui : null;
 }