Bug 129467 [implementation] CompilationUnitDocumentProvider#createFakeCompiltationUnit should check for null path
Version: 3.2.0 Build id: I20060217-1115 The annotate view in subclipse was broken by the addition of fake working copies in the comilation unit editor. Our implementation of IStorage#getFullPath was always returning null (as is allowed by the spec). Would it be possible to update CompilationUnitDocumentProvider#createFakeCompiltationUnit to return null if the full path of the IStorage is null? We are also going to update our IStorage implementation to return a valid path to take advantage of the fake working copies. org.eclipse.jface.text.Assert$AssertionFailedException: null argument; at org.eclipse.jface.text.Assert.isNotNull(Assert.java:157) at org.eclipse.jface.text.Assert.isNotNull(Assert.java:133) at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connect(TextFileBufferManager.java:93) at org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.initialize(DocumentAdapter.java:187) at org.eclipse.jdt.internal.ui.javaeditor.DocumentAdapter.<init>(DocumentAdapter.java:169) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$2.createBuffer(CompilationUnitDocumentProvider.java:964) at org.eclipse.jdt.internal.core.CompilationUnit.openBuffer(CompilationUnit.java:1010) at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:87) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:229) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:503) at org.eclipse.jdt.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:38) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:779) at org.eclipse.jdt.internal.core.CompilationUnit.becomeWorkingCopy(CompilationUnit.java:66) at org.eclipse.jdt.core.WorkingCopyOwner.newWorkingCopy(WorkingCopyOwner.java:104) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.createFakeCompiltationUnit(CompilationUnitDocumentProvider.java:976) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.connect(CompilationUnitDocumentProvider.java:1061) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:3064) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:173) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1463) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2236) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2209) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1483) at org.eclipse.ui.texteditor.AbstractTextEditor$17.run(AbstractTextEditor.java:2397) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:360) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:305) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:739) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:736) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2215) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2415) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2442) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:825) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:578) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:367) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:555) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:212) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2392) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2325) at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2317) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2303) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2298) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2275) at org.tigris.subversion.subclipse.ui.annotations.AnnotateView.openEditor(AnnotateView.java:356) at org.tigris.subversion.subclipse.ui.annotations.AnnotateView.showAnnotations(AnnotateView.java:161) at org.tigris.subversion.subclipse.ui.annotations.AnnotateView.showAnnotations(AnnotateView.java:122) at org.tigris.subversion.subclipse.ui.operations.ShowAnnotationOperation$1.run(ShowAnnotationOperation.java:88) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3264) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2910) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1899) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:417) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:99) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
throw x;
			} catch (RuntimeException x) {
				
				fireElementStateChangeFailed(element);
				throw x;
			} finally {
				fIsAboutToSave= false;
				subMonitor3.done();
			}
			
			
			if (info.fModel instanceof AbstractMarkerAnnotationModel) {
				AbstractMarkerAnnotationModel model= (AbstractMarkerAnnotationModel) info.fModel;
				model.updateMarkers(document);
			}
			if (fSavePolicy != null) {
				ICompilationUnit unit= fSavePolicy.postSave(info.fCopy);
				if (unit != null && info.fModel instanceof AbstractMarkerAnnotationModel) {
					IResource r= unit.getResource();
					IMarker[] markers= r.findMarkers(IMarker.MARKER, true, IResource.DEPTH_ZERO);
					if (markers != null && markers.length > 0) {
						AbstractMarkerAnnotationModel model= (AbstractMarkerAnnotationModel) info.fModel;
						for (int i= 0; i < markers.length; i++)
							model.updateMarker(document, markers[i], null);
					}
				}
			}
		} finally {
			monitor.done();
		}