Project: JDT
Bug 162867 Open Type opens type that does not exist
Reported: 2006-10-31 04:46:27 | Status: verified fixed

I20061030-1704 When a JAR is removed outside the workspace (or while not running and then started) and the Java project not refreshed then open type still finds types from that JAR. That is the same behavior as in 3.2.x BUT: in 3.2.x a dialog tells that the type cannot be opened. In I20061030-1704 the dialog goes ahead and opens the editor which of course shows an error. In addition a log entry is created. Steps: 1. start fresh workspace 2. import org.eclipse.text (or any other project) as binary project 3. exit 4. delete the JAR from the workspace 5. start 6. Ctrl+Shift+T 7. type "ADoc*" ==> AbstractDocument is listed 8. select it The .log entry: !SESSION 2006-10-31 10:43:35.773 ----------------------------------------------- eclipse.buildId=I20061030-1704 java.version=1.5.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH Framework arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation Command-line arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation -data c:\eclipse\workspaces\tmp !ENTRY org.eclipse.ui 4 0 2006-10-31 10:44:01.334 !MESSAGE Unable to create editor ID org.eclipse.jdt.ui.ClassFileEditor: I/O exception !STACK 0 java.util.zip.ZipException: The system cannot find the file specified at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:203) at java.util.zip.ZipFile.<init>(ZipFile.java:234) at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:1836) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:161) at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.computeChildren(JarPackageFragmentRoot.java:78) at org.eclipse.jdt.internal.core.PackageFragmentRoot.buildStructure(PackageFragmentRoot.java:170) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:229) at org.eclipse.jdt.internal.core.JarPackageFragment.generateInfos(JarPackageFragment.java:115) at org.eclipse.jdt.internal.core.Openable.openParent(Openable.java:420) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:218) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:505) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:249) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:235) at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:255) at org.eclipse.jdt.internal.core.ClassFile.getBuffer(ClassFile.java:311) at org.eclipse.jdt.internal.core.ClassFile.getSourceRange(ClassFile.java:470) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.probeInputForSource(ClassFileEditor.java:691) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:620) at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:2604) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:767) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:764) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2280) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:2622) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:2649) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:838) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:583) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:372) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1156) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1109) at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1335) at org.eclipse.ui.internal.PartStack.add(PartStack.java:458) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:102) at org.eclipse.ui.internal.PartStack.add(PartStack.java:444) at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:111) at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:61) at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:217) at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:207) at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:818) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:717) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:678) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2569) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2504) at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPage.java:2496) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2481) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2476) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2461) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:295) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:169) at org.eclipse.jdt.ui.JavaUI.openInEditor(JavaUI.java:670) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:65) at org.eclipse.jdt.internal.ui.actions.OpenTypeAction.run(OpenTypeAction.java:75) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441) 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:3463) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3077) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1924) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1888) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:348) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:165) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:341) at org.eclipse.core.launcher.Main.basicRun(Main.java:285) at org.eclipse.core.launcher.Main.run(Main.java:987) at org.eclipse.core.launcher.Main.main(Main.java:962)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/TypeSelectionDialog2.java