Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369358 - [xtext][standalone] XyzStandaloneSetupGenerated should initialize EPackages earlier
Summary: [xtext][standalone] XyzStandaloneSetupGenerated should initialize EPackages e...
Status: RESOLVED WONTFIX
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext Backlog (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 03:14 EST by Knut Wannheden CLA
Modified: 2016-08-15 08:27 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 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.