Java Code Examples for com.intellij.openapi.util.ProperTextRange#getEndOffset()

The following examples show how to use com.intellij.openapi.util.ProperTextRange#getEndOffset() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopEditorErrorPanel.java    From consulo with Apache License 2.0 6 votes vote down vote up
public void markDirtied(@Nonnull ProperTextRange yPositions) {
  ProperTextRange dirtyYPositions = getUI().getDirtyYPositions();

  if (dirtyYPositions != DesktopEditorErrorPanelUI.WHOLE_DOCUMENT) {
    int start = Math.max(0, yPositions.getStartOffset() - myEditor.getLineHeight());
    int end = myEditorScrollbarTop + myEditorTargetHeight == 0
              ? yPositions.getEndOffset() + myEditor.getLineHeight()
              : Math.min(myEditorScrollbarTop + myEditorTargetHeight, yPositions.getEndOffset() + myEditor.getLineHeight());
    ProperTextRange adj = new ProperTextRange(start, Math.max(end, start));

    getUI().setDirtyYPositions(dirtyYPositions == null ? adj : dirtyYPositions.union(adj));
  }

  myEditorScrollbarTop = 0;
  myEditorSourceHeight = 0;
  myEditorTargetHeight = 0;
  dimensionsAreValid = false;
}
 
Example 2
Source File: ChameleonSyntaxHighlightingPass.java    From consulo with Apache License 2.0 5 votes vote down vote up
private ChameleonSyntaxHighlightingPass(@Nonnull Project project,
                                        @Nonnull PsiFile file,
                                        @Nonnull Document document,
                                        @Nonnull ProperTextRange restrictRange,
                                        @Nonnull ProperTextRange priorityRange,
                                        @Nullable Editor editor,
                                        @Nonnull HighlightInfoProcessor highlightInfoProcessor) {
  super(project, file, document, restrictRange.getStartOffset(), restrictRange.getEndOffset(), true, priorityRange, editor, highlightInfoProcessor);
}