Project: JDT
Bug 12955 Problem with Type Dialog and HierarchyScopes - build 20020214
Reported: 2002-04-07 07:38:49 | Status: resolved fixed

Ok I've checked that archives and this isn't there... tried posting to eclipse.tools, no response. Can't get the type dialog to work right in some cases when using a scope obtained by calling SearchEngine.createHierarchyScope. Some code: IJavaSearchScope scope = SearchEngine.createHierarchyScope(myIType); SelectionDialog dialog = JavaUI.createTypeDialog( getShell(), new ProgressMonitorDialog(getShell()), scope(), IJavaElementSearchConstants.CONSIDER_CLASSES, false); if (dialog.open .. yada yada. The shown dialog does whats its supposed to as it own shows classes in the hierachy scope. But when I select one thats found in a Jar in project classpath, I get an error: "Could not uniquely map the type name to a type." and the exception: java.lang.NullPointerException at com.iw.plugins.spindle.ui.TypeDialogCellEditor.openDialogBox(TypeDialogCellE ditor.java:108) at com.iw.plugins.spindle.ui.EditableDialogCellEditor$2.widgetSelected(Editable DialogCellEditor.java:146) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:85) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:74) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1413) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1205) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:788) at org.eclipse.ui.internal.Workbench.run(Workbench.java:771) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav a:777) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:502) at org.eclipse.core.launcher.Main.main(Main.java:362) If the class is found in my source directories, no problem everything works ok. This does not happen when I launch my plugin from within Eclipse (i.e launch another workspace), but when the plugin is installed in another instance of eclipse by putting it in the plugins directory - then the error happens every time. We tried using a class and an interface as "myIType" above -> the problem appears as described regardless. Geoff

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfo.java