private void updateChanges(DocumentEvent event,StringBuilder oldText){
  int i=findIndex(event.getOffset());
  int endOffset=event.getOffset() + event.getNewLength();
  TextChangeImpl change=new TextChangeImpl(oldText,event.getOffset(),endOffset);
  if (i < 0) {
    myChanges.add(change);
  }
 else {
    myChanges.add(i,change);
  }
}

private void updateChanges ( DocumentEvent event , StringBuilder oldText ) { int i = findIndex ( event . getOffset ( ) ) ; int endOffset = event . getOffset ( ) + event . getNewLength ( ) ; TextChangeImpl change = new TextChangeImpl ( oldText , event . getOffset ( ) , endOffset ) ; if ( i < 0 ) { myChanges . add ( change ) ; } else { myChanges . add ( i , change ) ; } }
updates current object ' s state on the basis of the given event assuming that there are no stored change ranges that start after offset denoted by the given event .
