question: 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 ) ; } }
target:  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.