Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 14335 - Switching from Resources to Java Perspective causes NPE
Summary: Switching from Resources to Java Perspective causes NPE
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Randy Giffen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-22 12:10 EDT by Lynne Kues CLA
Modified: 2002-04-22 15:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lynne Kues CLA 2002-04-22 12:10:37 EDT
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)
Comment 1 Nick Edgar CLA 2002-04-22 13:23:47 EDT
Which version of RetargetAction do you have loaded?
Some checks were added recently.
Comment 2 Lynne Kues CLA 2002-04-22 13:35:08 EDT
1.4 version of RetargetAction.  I replaced with UI project repository contents, 
then ran an inner Eclipse using my previous runtime workspace.  Not sure if 
that matters...
Comment 3 Randy Giffen CLA 2002-04-22 15:48:17 EDT
Fixed in WWinPluginAction