Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355109 - NPE searching for references to extension point
Summary: NPE searching for references to extension point
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M2   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 11:57 EDT by John Arthorne CLA
Modified: 2011-09-14 14:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-08-18 11:57:03 EDT
I20110727-1100

1) Open a plugin.xml file, go to Extensions tab
2) Select an extension (org.eclipse.ui.menus in my case)
3) Click "Find declaring extension point"
4) Right-click on the search result and select "Find References"

-> NPE occurs


java.lang.NullPointerException
	at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
	at org.osgi.framework.Version.<init>(Version.java:126)
	at org.eclipse.pde.internal.ui.search.FindReferencesAction.createSearchQuery(FindReferencesAction.java:52)
	at org.eclipse.pde.internal.ui.search.BaseSearchAction.run(BaseSearchAction.java:28)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:969)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:885)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:89)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:539)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:519)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
Comment 1 Curtis Windatt CLA 2011-08-18 15:18:11 EDT
Fixed in HEAD, see FindReferencesAction.java.  The getSchemaVersion method may return null if it does not have a backing workspace file, so we need to check for this case.
Comment 2 Curtis Windatt CLA 2011-09-14 14:46:26 EDT
Verified in I20110913-2000