Bug 46821 NPE in LinkedPositionUI
Build: N-20031116 I'm not sure what provoked this NPE. But I know that I was unable to do anything afterwards. I had to shut down my workbench. Error Nov 17, 2003 23:40:33.872 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.leave (LinkedPositionUI.java:365) at org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.shellClosed (LinkedPositionUI.java:824) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:158) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:871) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:856) at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1390) at org.eclipse.swt.widgets.Shell.WM_CLOSE(Shell.java:1282) at org.eclipse.swt.widgets.Control.windowProc(Control.java:2936) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:2712) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1355) at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:397) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3014) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:2712) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:1355) at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:397) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3014) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1334) at org.eclipse.swt.widgets.Display.windowProc(Display.java:2712) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1360) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1875) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1378) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:234) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:767) at org.eclipse.core.launcher.Main.main(Main.java:601)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedPositionUI.java
else {
			fIsActive= true;
			
		}
		
		
		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();