public void documentChanged(DocumentEvent event) {
   if (((DocumentEx) event.getDocument()).isInBulkUpdate()) {
     myFoldTree.clear();
   } else {
     updateCachedOffsets();
   }
 }
 public void doClearFoldRegions() {
   myGroups.clear();
   myFoldTree.clear();
 }
 public void dispose() {
   myGroups.clear();
   myFoldTree.clear();
 }