Bug 52257 NPE in org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getSignedSelection
I'm editing Java and doing CVS. A dialog box comes up: File Changed The File has been changed on the file system. Do you want to load the changes? I saw yes, then these error come out: !ENTRY org.eclipse.core.filebuffers 4 0 Feb 17, 2004 23:40:36.778 !MESSAGE Exception when synchronizing !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getSignedSelection(JavaEditor.java:3034) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$RememberedSelection.remember(CompilationUnitEditor.java:658) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.rememberSelection(CompilationUnitEditor.java:1540) at org.eclipse.ui.texteditor.AbstractTextEditor$3.run(AbstractTextEditor.java:282) at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.execute(AbstractTextEditor.java:385) at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.elementContentAboutToBeReplaced(AbstractTextEditor.java:286) at org.eclipse.ui.editors.text.TextFileDocumentProvider$FileBufferListener.bufferContentAboutToBeReplaced(TextFileDocumentProvider.java:200) at org.eclipse.core.internal.filebuffers.TextFileBufferManager.fireBufferContentAboutToBeReplaced(TextFileBufferManager.java:234) at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.handleFileContentChanged(ResourceTextFileBuffer.java:271) at org.eclipse.core.internal.filebuffers.ResourceFileBuffer$1.execute(ResourceFileBuffer.java:142) at org.eclipse.core.internal.filebuffers.ResourceFileBuffer$SafeFileChange.run(ResourceFileBuffer.java:76) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:102) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2325) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2033) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1550) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1526) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:265) 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.runtime.PlatformActivator$1.run(PlatformActivator.java:257) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581) !ENTRY org.eclipse.core.runtime 4 2 Feb 17, 2004 23:54:26.138 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime". !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.getSignedSelection(JavaEditor.java:3034) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$RememberedSelection.remember(CompilationUnitEditor.java:658) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.rememberSelection(CompilationUnitEditor.java:1540) at org.eclipse.ui.texteditor.AbstractTextEditor$3.run(AbstractTextEditor.java:282) at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.execute(AbstractTextEditor.java:385) at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.elementContentAboutToBeReplaced(AbstractTextEditor.java:286) at org.eclipse.ui.editors.text.TextFileDocumentProvider$FileBufferListener.bufferContentAboutToBeReplaced(TextFileDocumentProvider.java:200) at org.eclipse.core.internal.filebuffers.TextFileBufferManager.fireBufferContentAboutToBeReplaced(TextFileBufferManager.java:234) at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.revert(ResourceTextFileBuffer.java:159) at org.eclipse.ui.editors.text.TextFileDocumentProvider$5.execute(TextFileDocumentProvider.java:873) at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:93) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:67) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:91) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1567) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:105) at org.eclipse.ui.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:72) at org.eclipse.ui.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:62) at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:391) at org.eclipse.ui.editors.text.TextFileDocumentProvider.synchronize(TextFileDocumentProvider.java:885) at org.eclipse.ui.texteditor.AbstractTextEditor.handleEditorInputChanged(AbstractTextEditor.java:2782) at org.eclipse.ui.texteditor.AbstractTextEditor.sanityCheckState(AbstractTextEditor.java:2901) at org.eclipse.ui.texteditor.StatusTextEditor.sanityCheckState(StatusTextEditor.java:193) at org.eclipse.ui.texteditor.AbstractTextEditor.safelySanityCheckState(AbstractTextEditor.java:2879) at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.handleActivation(AbstractTextEditor.java:711) at org.eclipse.ui.texteditor.AbstractTextEditor$ActivationListener.partActivated(AbstractTextEditor.java:657) at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerList.java:49) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:819) at org.eclipse.core.runtime.Platform.run(Platform.java:493) at org.eclipse.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:47) at org.eclipse.ui.internal.WWinPartService$1.partActivated(WWinPartService.java:27) at org.eclipse.ui.internal.PartListenerList2$1.run(PartListenerList2.java:45) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:819) at org.eclipse.core.runtime.Platform.run(Platform.java:493) at org.eclipse.ui.internal.PartListenerList2.firePartActivated(PartListenerList2.java:43) at org.eclipse.ui.internal.WorkbenchPage.firePartActivated(WorkbenchPage.java:1277) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:2565) at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:455) at org.eclipse.ui.internal.WorkbenchPage.showEditor(WorkbenchPage.java:2146) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2084) at org.eclipse.ui.internal.WorkbenchPage.access$6(WorkbenchPage.java:2042) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2029) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2024) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:265) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:134) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:112) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:158) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:147) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:212) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:329) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$5.open(PackageExplorerPart.java:303) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:406) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:819) at org.eclipse.core.runtime.Platform.run(Platform.java:493) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:404) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:614) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:703) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:209) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:204) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:233) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2348) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2029) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1550) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1526) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:265) 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.runtime.PlatformActivator$1.run(PlatformActivator.java:257) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581) Build: 200402122000 Windows 2003 Enterprise (Evaluation) Sun JDK 1.4.2_03
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
document.removePositionUpdater(fUpdater);
							try {
								document.removePositionCategory(CATEGORY);
							} catch (BadPositionCategoryException e) {
							}
						}
					}
	
				});
			}
		}
		/*
		 * @see org.eclipse.jdt.internal.ui.text.link2.LinkedEnvironment.ILinkedListener#suspend(org.eclipse.jdt.internal.ui.text.link2.LinkedEnvironment)
		 */
		public void suspend(LinkedEnvironment environment) {
		}
		/*
		 * @see org.eclipse.jdt.internal.ui.text.link2.LinkedEnvironment.ILinkedListener#resume(org.eclipse.jdt.internal.ui.text.link2.LinkedEnvironment, int)
		 */
		public void resume(LinkedEnvironment environment, int flags) {
		}
	}
	
	/**
	 * Remembers data related to the current selection to be able to
	 * restore it later.
	 * 
	 * @since 3.0
	 */
	private class RememberedSelection {