protected CompoundRegion[] getOutsideRegions(IStructuredDocument model, IRegion reg) {
   CompoundRegion[] ret = new CompoundRegion[2];
   RegionIterator it = new RegionIterator(model, reg.getOffset());
   it.prev();
   if (it.hasPrev()) {
     ITextRegion textRegion = it.prev();
     IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
     ret[0] = new CompoundRegion(documentRegion, textRegion);
   } else {
     ret[0] = null;
   }
   it.reset(model, reg.getOffset() + reg.getLength());
   if (it.hasNext()) {
     ITextRegion textRegion = it.next();
     IStructuredDocumentRegion documentRegion = it.getStructuredDocumentRegion();
     ret[1] = new CompoundRegion(documentRegion, textRegion);
   } else {
     ret[1] = null;
   }
   return ret;
 }
 public RegionIterator(IStructuredDocumentRegion flatNode, ITextRegion region) {
   super();
   reset(flatNode, region);
 }
  public RegionIterator(IStructuredDocument structuredDocument, int index) {
    super();

    reset(structuredDocument, index);
  }