Project: JDT
Bug 332034 [breadcrumb] Java Model Exceptions in log when opening Java Editor for nonexistent file
Reported: 2010-12-07 10:42:00 | Status: verified fixed

I20101206-1800, has probably been like this for a long time - create a Java class - show breadcrumb - delete the .java file - Navigate > Back => status editor opens with message "Resource .../C.java does not exist" => at the same time and shortly after, I get about 4 exceptions like the one below in the log Expected: Nothing in log !ENTRY org.eclipse.jdt.ui 4 10001 2010-12-07 16:35:38.507 !MESSAGE Internal Error !STACK 1 Java Model Exception: Java Model Status [C.java [in <default> [in src [in P]]] does not exist] at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:502) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:515) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:252) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:238) at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:193) at org.eclipse.jdt.internal.core.JavaElement.getSourceElementAt(JavaElement.java:367) at org.eclipse.jdt.internal.core.CompilationUnit.getElementAt(CompilationUnit.java:701) at org.eclipse.jdt.internal.ui.actions.SelectionConverter.getElementAtOffset(SelectionConverter.java:285) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorBreadcrumb.getCurrentInput(JavaEditorBreadcrumb.java:791) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditorBreadcrumb.setInput(JavaEditorBreadcrumb.java:763) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.setBreadcrumbInput(JavaEditor.java:1985) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.selectionChanged(JavaEditor.java:2241) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EditorSelectionChangedListener.selectionChanged(JavaEditor.java:298) at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2746) at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2694) at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2673) at org.eclipse.swt.widgets.Display.runTimers(Display.java:3933) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3445) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) !SUBENTRY 1 org.eclipse.jdt.core 4 969 2010-12-07 16:35:38.507 !MESSAGE C.java [in <default> [in src [in P]]] does not exist

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorBreadcrumb.java