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

Bug 369358

Summary: [xtext][standalone] XyzStandaloneSetupGenerated should initialize EPackages earlier
Product: [Modeling] TMF Reporter: Knut Wannheden <knut.wannheden>
Component: Xtext BacklogAssignee: Project Inbox <tmf.xtext-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, sven.efftinge
Version: 2.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Knut Wannheden CLA 2012-01-23 03:14:23 EST
The generated standalone setup class (e.g. XyzStandaloneSetupGenerated) should register the generated EPackages before creating the injector. This may be necessary as there may be eager bindings in the injector which access the EPackage registry.

This is actually even the case for a language's validator which is typically registered as an eager singleton by the JavaValidatorFragment generator fragment. But it turns out not to be a problem because the validator typically accesses the EPackage using the eINSTANCE field which will then actually perform the EPackage registration.
Comment 1 Sven Efftinge CLA 2013-10-23 02:11:58 EDT
(In reply to Knut Wannheden from comment #0)
> But it turns out not to be a problem because the validator
> typically accesses the EPackage using the eINSTANCE field which will then
> actually perform the EPackage registration.

Isn't that than a viable solution in any case?
I'm afraid we break clients if we change the order of initialization.
Comment 2 Karsten Thoms CLA 2016-08-15 08:27:58 EDT
Closing as WONTFIX for now, since breaking clients is not acceptable at this time. Moving to Backlog.