if (!position.equals(fPreviousPosition) && fHasOpenCompoundChange) { target.endCompoundChange(); fHasOpenCompoundChange= false; }  if (!fHasOpenCompoundChange) { target.beginCompoundChange(); fHasOpenCompoundChange= true; }
beginCompoundChange();
		private boolean controlUndoBehavior(int offset, int length) {			LinkedPosition position= fEnvironment.findPosition(new LinkedPosition(fCurrentTarget.getViewer().getDocument(), offset, length, LinkedPositionGroup.NO_STOP));			if (position != null) {				ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();				IRewriteTarget target= extension.getRewriteTarget();				// if the last position is not the same and there is an open change: close it.				if (!position.equals(fPreviousPosition) && fHasOpenCompoundChange) {					target.endCompoundChange();					fHasOpenCompoundChange= false;				}				// we are editing - if there is no open change: open one				if (!fHasOpenCompoundChange) {					target.beginCompoundChange();					fHasOpenCompoundChange= true;				}			}			fPreviousPosition= position;			return fPreviousPosition != null;		}