private IRegion createRegion(){
  if (fDeleteOffset == -1) {
    if (fStartOffset == -1 || fEndOffset == -1)     return null;
    return new Region(fStartOffset,fEndOffset - fStartOffset);
  }
 else   if (fStartOffset == -1 || fEndOffset == -1) {
    return new Region(fDeleteOffset,0);
  }
 else {
    int offset=Math.min(fDeleteOffset,fStartOffset);
    int endOffset=Math.max(fDeleteOffset,fEndOffset);
    return new Region(offset,endOffset - offset);
  }
}

private IRegion createRegion ( ) { if ( fDeleteOffset == - 1 ) { if ( fStartOffset == - 1 || fEndOffset == - 1 ) return null ; return new Region ( fStartOffset , fEndOffset - fStartOffset ) ; } else if ( fStartOffset == - 1 || fEndOffset == - 1 ) { return new Region ( fDeleteOffset , 0 ) ; } else { int offset = Math . min ( fDeleteOffset , fStartOffset ) ; int endOffset = Math . max ( fDeleteOffset , fEndOffset ) ; return new Region ( offset , endOffset - offset ) ; } }
creates the minimal region containing all partition changes using the remembered offset , end offset , and deletion offset . this is the value returned by documentchanged2 . added by ll on 14 aug 2012 : given what the value of fdeleteoffset equals , i don ' t understand its use in this method . it seems that one should remember both the largest and smallest offsets of deleted partitions and use them in the obvious way .
