@Override
 public void onFoldProcessingEnd() {
   if (foldingChangeStartOffset <= foldingChangeEndOffset) {
     invalidateRange(foldingChangeStartOffset, foldingChangeEndOffset);
   }
   foldingChangeStartOffset = Integer.MAX_VALUE;
   foldingChangeEndOffset = Integer.MIN_VALUE;
 }
 @Override
 public void documentChanged(DocumentEvent event) {
   invalidateRange(event.getOffset(), event.getOffset() + event.getNewLength());
 }
 void reset() {
   invalidateRange(0, myDocument.getTextLength());
 }
 private void onSoftWrapRecalculationEnd(IncrementalCacheUpdateEvent event) {
   invalidateRange(event.getStartOffset(), event.getActualEndOffset());
 }