Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320131 - NPE in ModelEditor.setFocus
Summary: NPE in ModelEditor.setFocus
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: 1.0 RC3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-16 13:09 EDT by Reto Urfer CLA
Modified: 2010-07-16 18:09 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 Reto Urfer CLA 2010-07-16 13:09:56 EDT
If you open an Application.e4xmi within the SimpleIDE example application a NPE is thrown.

Caused by: java.lang.NullPointerException
	at org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor.setFocus(ModelEditor.java:660)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:47)
	... 29 more


The reason seem to be the clipboardService which is defined
	@Inject
	@Optional
	private IClipboardService clipboardService;

but there is no null check in the setFocus method.
Comment 1 Thomas Schindl CLA 2010-07-16 18:09:13 EDT
fixed in head