Ejemplo n.º 1
0
 void textLayoutPerformed(int startOffset, int endOffset) {
   if (myDocument.isInBulkUpdate()) return;
   if (myEditor.getFoldingModel().isInBatchFoldingOperation()) {
     myDeferredRanges.add(new TextRange(startOffset, endOffset));
   } else {
     onTextLayoutPerformed(startOffset, endOffset);
   }
 }
Ejemplo n.º 2
0
  @Override
  public void onFoldProcessingEnd() {
    if (myDocument.isInBulkUpdate()) return;
    if (myFoldingChangeStartOffset <= myFoldingChangeEndOffset) {
      doInvalidateRange(myFoldingChangeStartOffset, myFoldingChangeEndOffset);
    }
    myFoldingChangeStartOffset = Integer.MAX_VALUE;
    myFoldingChangeEndOffset = Integer.MIN_VALUE;

    for (TextRange range : myDeferredRanges) {
      onTextLayoutPerformed(range.getStartOffset(), range.getEndOffset());
    }
    myDeferredRanges.clear();
    assertValidState();
  }