fgStore.removePropertyChangeListener(this);  if (fFrameColor != null) { fFrameColor.dispose(); fFrameColor= null; }
	private void leave(int flags) {		if ((flags & UNINSTALL) != 0)			fManager.uninstall((flags & COMMIT) != 0);				StyledText text= fViewer.getTextWidget();			text.removePaintListener(this);		text.removeModifyListener(this);		text.removeVerifyListener(this);		ITextViewerExtension extension= (ITextViewerExtension) fViewer;		extension.removeVerifyKeyListener(this);		fViewer.removeTextInputListener(this);				try {			IRegion region= fViewer.getVisibleRegion();			IDocument document= fViewer.getDocument();			if (((flags & COMMIT) != 0) &&				((flags & DOCUMENT_CHANGED) == 0) &&				((flags & UPDATE_CARET) != 0))			{				Position[] positions= document.getPositions(CARET_POSITION);				if ((positions != null) && (positions.length != 0)) {					int offset= positions[0].getOffset() - region.getOffset();							if ((offset >= 0) && (offset <= region.getLength()))						text.setSelection(offset, offset);				}			}			document.removePositionUpdater(fgUpdater);			document.removePositionCategory(CARET_POSITION);						if (fExitListener != null)				fExitListener.exit(					((flags & COMMIT) != 0) ||					((flags & DOCUMENT_CHANGED) != 0));		} catch (BadPositionCategoryException e) {			JavaPlugin.log(e);			Assert.isTrue(false);		}		if ((flags & DOCUMENT_CHANGED) == 0)			text.redraw();	}