Project: Eclipse_Platform_UI
Bug 14335 Switching from Resources to Java Perspective causes NPE
Reported: 2002-04-22 12:10:37 | Status: resolved fixed

Build 04182002 plus current UI code in the repository. Run an inner eclipse on a workspace that has some projects. Go to resources perspective. Go to Java Perspective. I get the following NPE: java.lang.NullPointerException at org.eclipse.ui.actions.RetargetAction.partActivated (RetargetAction.java:89) at org.eclipse.ui.internal.WWinPluginAction.<init> (WWinPluginAction.java:75) at org.eclipse.ui.internal.ActionDescriptor.createAction (ActionDescriptor.java:160) at org.eclipse.ui.internal.ActionDescriptor.<init> (ActionDescriptor.java:119) at org.eclipse.ui.internal.PluginActionSetBuilder.createActionDescriptor (PluginActionSetBuilder.java:56) at org.eclipse.ui.internal.PluginActionBuilder.readElement (PluginActionBuilder.java:314) at org.eclipse.ui.internal.PluginActionSetBuilder.readElement (PluginActionSetBuilder.java:159) at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:119) at org.eclipse.ui.internal.registry.RegistryReader.readElementChildren (RegistryReader.java:109) at org.eclipse.ui.internal.PluginActionSetBuilder.readElement (PluginActionSetBuilder.java:156) at org.eclipse.ui.internal.registry.RegistryReader.readElements (RegistryReader.java:119) at org.eclipse.ui.internal.PluginActionSetBuilder.readActionExtensions (PluginActionSetBuilder.java:142) at org.eclipse.ui.internal.PluginActionSet.init(PluginActionSet.java:73) at org.eclipse.ui.internal.ActionPresentation.addActionSet (ActionPresentation.java:47) at org.eclipse.ui.internal.ActionPresentation.setActionSets (ActionPresentation.java:111) at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets (WorkbenchWindow.java:1233) at org.eclipse.ui.internal.WorkbenchPage.setPerspective (WorkbenchPage.java:2000) at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective (WorkbenchPage.java:523) at org.eclipse.ui.internal.WorkbenchPage.access$11 (WorkbenchPage.java:507) at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2035) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.WorkbenchPage.setPerspective (WorkbenchPage.java:2033) at org.eclipse.ui.internal.SetPagePerspectiveAction.run (SetPagePerspectiveAction.java:66) at org.eclipse.jface.action.Action.runWithEvent(Action.java:590) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:361) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:352) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:47) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:637) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1412) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1208) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:833) at org.eclipse.ui.internal.Workbench.run(Workbench.java:816) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:643) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319) at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:16)

Files changed in fix:
bundles/org.eclipse.ui/Eclipse UI/org/eclipse/ui/internal/WWinPluginAction.java