if (fRememberedPosition != null && !fRememberedPosition.isDeleted()) { event.getDocument().removePosition(fRememberedPosition); fActiveRegion= new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength()); } fRememberedPosition= null;  ISourceViewer viewer= getSourceViewer(); if (viewer != null) { StyledText widget= viewer.getTextWidget(); if (widget != null && !widget.isDisposed()) { widget.getDisplay().asyncExec(new Runnable() { public void run() { deactivate();
if (fRememberedPosition != null) { if (!fRememberedPosition.isDeleted()) {  event.getDocument().removePosition(fRememberedPosition); fActiveRegion= new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength()); fRememberedPosition= null;  ISourceViewer viewer= getSourceViewer(); if (viewer != null) { StyledText widget= viewer.getTextWidget(); if (widget != null && !widget.isDisposed()) { widget.getDisplay().asyncExec(new Runnable() { public void run() { deactivate(); } });
		public void documentChanged(DocumentEvent event) {			if (fRememberedPosition != null && !fRememberedPosition.isDeleted()) {				event.getDocument().removePosition(fRememberedPosition);				fActiveRegion= new Region(fRememberedPosition.getOffset(), fRememberedPosition.getLength());			}			fRememberedPosition= null;			ISourceViewer viewer= getSourceViewer();			if (viewer != null) {				StyledText widget= viewer.getTextWidget();				if (widget != null && !widget.isDisposed()) {					widget.getDisplay().asyncExec(new Runnable() {						public void run() {							deactivate();						}					});				}			}		}