Project: JDT
Bug 132494 JavaModelException opening up class file in non java project
Reported: 2006-03-19 22:59:13 | Status: verified fixed

Version: 3.2.0 Build id: I20060223-1656 1. Create a new simple project 2. Copy a class file into the project 3. Attempt to open the class file 4. Observe: A dialog box should pop up and the following shoudl appear in the log The editor looks ok, but the source attachment section is empty (which is as much as you would expect to get) Java Model Exception: Java Model Status [Reports does not exist] at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:483) at org.eclipse.jdt.internal.core.JavaModelManager.getPerProjectInfoCheckExistence(JavaModelManager.java:1406) at org.eclipse.jdt.internal.core.JavaProject.getPerProjectInfo(JavaProject.java:1902) at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2040) at org.eclipse.jdt.internal.core.PackageFragmentRoot.getRawClasspathEntry(PackageFragmentRoot.java:587) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$SourceAttachmentForm.createSourceAttachmentControls(ClassFileEditor.java:222) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor$SourceAttachmentForm.createControl(ClassFileEditor.java:197) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.verifyInput(ClassFileEditor.java:700) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.createPartControl(ClassFileEditor.java:657) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:591) 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:2283) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:384) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:347) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:275) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:139) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:49) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:181) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:165) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:267) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:296) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:650) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:780) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:816) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:778) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1009) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1108) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:244) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:239) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:278) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3287) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2907) 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)

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