Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369820 - NPE while searching for contribution class
Summary: NPE while searching for contribution class
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 11:01 EST by Remy Suen CLA
Modified: 2012-08-27 14:57 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2012-01-26 11:01:36 EST
I get NPEs while trying to type and search for the contribution class from the model editor.

java.lang.NullPointerException
	at org.eclipse.pde.internal.core.util.PDEJavaHelper.getNonJRERoots(PDEJavaHelper.java:114)
	at org.eclipse.pde.internal.core.util.PDEJavaHelper.getSearchScope(PDEJavaHelper.java:104)
	at org.eclipse.pde.internal.core.util.PDEJavaHelper.getSearchScope(PDEJavaHelper.java:108)
	at org.eclipse.e4.tools.emf.editor3x.PDEClassContributionProvider.findContribution(PDEClassContributionProvider.java:39)
	at org.eclipse.e4.tools.emf.ui.internal.common.ClassContributionCollector.findContributions(ClassContributionCollector.java:43)
	at org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog$4.modifyText(ContributionClassDialog.java:153)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
	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.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2609)
	at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4531)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985)
	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2439)
	at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
	at org.eclipse.swt.widgets.Text.windowProc(Text.java:2253)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2545)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.e4.tools.emf.ui.internal.common.component.HandlerEditor$3.widgetSelected(HandlerEditor.java:204)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
Comment 1 Brian de Alwis CLA 2012-01-27 10:00:51 EST
Remy: I'm unable to reproduce this myself, but looking at the code, it seems to assume that the active project will have a java nature.  Is it possible you were using a non-Java project?
Comment 2 Remy Suen CLA 2012-01-27 10:13:31 EST
(In reply to comment #1)
> Remy: I'm unable to reproduce this myself, but looking at the code, it seems to
> assume that the active project will have a java nature.  Is it possible you
> were using a non-Java project?

I don't think I had a single project around because I was in a new workspace.
Comment 3 Brian de Alwis CLA 2012-01-27 10:17:05 EST
Remy said this arises from using the *live* editor.  I've been able to reproduce this.
Comment 4 Nobody - feel free to take it CLA 2012-08-27 14:57:24 EDT
There's a null check now.