if (fIsActive) JavaPlugin.log(new Status(IStatus.WARNING, JavaPlugin.getPluginId(), IStatus.OK, "LinkedPositionUI is already active: "+fPositionCategoryName, new IllegalStateException())); else { fIsActive= true;  }
	public void enter() {		// track final caret		IDocument document= fViewer.getDocument();		document.addPositionCategory(fPositionCategoryName);		document.addPositionUpdater(fUpdater);		try {			if (fFinalCaretOffset != -1) {				fFinalCaretPosition= new Position(fFinalCaretOffset);				document.addPosition(fPositionCategoryName, fFinalCaretPosition);			}		} catch (BadLocationException e) {			handleException(fViewer.getTextWidget().getShell(), e);		} catch (BadPositionCategoryException e) {			JavaPlugin.log(e);			Assert.isTrue(false);		}		fViewer.addTextInputListener(this);		fViewer.addTextListener(this);						ITextViewerExtension extension= (ITextViewerExtension) fViewer;		extension.prependVerifyKeyListener(this);		StyledText text= fViewer.getTextWidget();					text.addVerifyListener(this);		text.addModifyListener(this);		text.addPaintListener(this);		text.showSelection();		Shell shell= text.getShell();		shell.addShellListener(this);				fFramePosition= (fInitialOffset == -1) ? fManager.getFirstPosition() : fManager.getPosition(fInitialOffset);		if (fFramePosition == null) {			leave(UNINSTALL | COMMIT | UPDATE_CARET);			return;		}		fgStore.addPropertyChangeListener(this);		try {			fContentType= TextUtilities.getContentType(document, IJavaPartitions.JAVA_PARTITIONING, fFramePosition.offset);			if (fViewer instanceof ITextViewerExtension2) {				((ITextViewerExtension2) fViewer).prependAutoEditStrategy(fManager, fContentType);			} else {				Assert.isTrue(false);			}		} catch (BadLocationException e) {			handleException(fViewer.getTextWidget().getShell(), e);		}		selectRegion();		triggerContentAssist();	}