Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318821

Summary: If DS is not included in the launch config a warning should be issued
Product: [Eclipse Project] e4 Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Thomas Schindl <tom.schindl>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, cso, john.arthorne, kai.toedter, Lars.Vogel, ob1.eclipse, pwebster, remy.suen, tom.schindl
Version: unspecified   
Target Milestone: 1.0 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch none

Description Lars Vogel CLA 2010-07-04 16:32:19 EDT
If the ds bundle is not in the launch config a NPE is created the first time a service is used. 

Tom Schindl suggested on the e4 mailing list that the existance of the ds bundles should be checked at start time and a warning should be written if they are not included in the launch config.
Comment 1 Kai Toedter CLA 2010-07-05 02:38:46 EDT
This would definitely help!
Comment 2 Lars Vogel CLA 2010-07-05 07:46:36 EDT
*** Bug 318838 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Schindl CLA 2010-07-13 08:26:04 EDT
Created attachment 174134 [details]
patch

This patch simply checks for one of our core services which is contributed through DS (org.eclipse.e4.ui.workbench.modeling.EModelService) and throws an exception with a meaningful error message.

"Core services not available. Please check if a declarative service implementation like org.equinox.ds is in the launch configuration and all dependencies are resolved!"
Comment 4 Oleg Besedin CLA 2010-07-13 10:51:04 EDT
A bit low-tech but it will work :-). 

I would change the error message a bit:
- it's "org.eclipse.equinox.ds";
- "Please make sure that a declarative service implementation (such as the bundle "org.eclipse.equinox.ds") is available."
(In my mind the "launch configuration" only applies to debugging.)

+1.
Comment 5 Thomas Schindl CLA 2010-07-13 13:29:05 EDT
released with proposed rewording from oleg to head