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

Bug 326997

Summary: [Grammar, Refactoring] Generated packages should be contained in the grammar
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: moritz.eysholdt, sven.efftinge
Version: 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on:    
Bug Blocks: 284837, 309820    

Description Sebastian Zarnekow CLA 2010-10-05 07:50:48 EDT
We should evaluate whether this reduces the necessary complexity for the generator fragments and other parts of the code base.
Comment 1 Sven Efftinge CLA 2010-10-05 08:27:38 EDT
The idea is to have a URI to any generated EPackages, so that one can refer to generated EPackages, just like to other EPackages in a rest-like manner.
Comment 2 Moritz Eysholdt CLA 2010-10-05 14:44:46 EDT
I like the idea to have a .ecore file in the src-gen folder for each EPackage that is derived from the grammar. This way, 
- one can easily move this file to src when switching from "generate" to "import"
- people can open the .ecore file in their favorite .ecore editor to understand how Xtext derives EPackages. When I introduce people to Xtext I usually ask them to do this step.
Comment 3 Sven Efftinge CLA 2010-10-06 02:58:14 EDT
(In reply to comment #2)
> I like the idea to have a .ecore file in the src-gen folder for each EPackage
> that is derived from the grammar. 

Generating a clone of the EPackage isn't a problem. But wouldn't it be even nicer, if one could open the Xtext file with a reflective editor and see (and copy & paste) the EPackage in it?
Comment 4 Sven Efftinge CLA 2012-11-09 09:14:48 EST
Not worth the effort.