コード例 #1
0
    private void repaint(final Graphics g, final int width, Rectangle clipBounds) {
      Document document = myEditor.getDocument();
      int startOffset = yPositionToOffset(clipBounds.y, true);
      int endOffset = yPositionToOffset(clipBounds.y + clipBounds.height, false);

      drawMarkup(g, width, startOffset, endOffset, EditorMarkupModelImpl.this);
      drawMarkup(
          g,
          width,
          startOffset,
          endOffset,
          (MarkupModelEx) document.getMarkupModel(myEditor.getProject()));
    }
コード例 #2
0
  @Nullable
  protected static RunToCursorBreakpoint create(
      Project project, Document document, int lineIndex, boolean restoreBreakpoints) {
    VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document);
    if (virtualFile == null) {
      return null;
    }

    RunToCursorBreakpoint breakpoint =
        new RunToCursorBreakpoint(
            project, createHighlighter(project, document, lineIndex), restoreBreakpoints);
    document.getMarkupModel(project).removeHighlighter(breakpoint.getHighlighter());

    return (RunToCursorBreakpoint) breakpoint.init();
  }