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

Bug 340028

Summary: [grammar] Quickfix/Suggestion: Switch to imported Xcore
Product: [Modeling] TMF Reporter: Ed Willink <ed>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: jan, moritz.eysholdt
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Ed Willink CLA 2011-03-15 10:20:40 EDT
When developing a DSL with Xtext, it is initially convenient to use an auto-generated Ecore, but there often comes a point when it is appropriate to freeze the Ecore and import it thereafter.

This is not easy. I always need to make significant use of direct XMI text editing.

It would be helpful to have a refactoring that rewrites the generate statement as an import and moves the *.ecore and *.genmodel from src-gen to model and fixed up the internal references so that thereafter GenModel works, possibly automatically as part of the MWE2 script.
Comment 1 Jan Koehnlein CLA 2011-03-15 10:23:37 EDT
I understand you'll have to change all fragment URIs from the src-gen path to the new path. Is there anything else you have to adjust manually?
Comment 2 Ed Willink CLA 2011-03-15 12:47:38 EDT
build.properties needs a models folder.
plugin.xml needs a different genmodel path.

These are pretty easy. It's the ecore/genmodel/xtext URIs that are non-trivial.
Comment 3 Sven Efftinge CLA 2012-11-21 01:42:00 EST
We should generate an Xcore file instead of an Ecore.
Comment 4 Ed Willink CLA 2012-11-21 04:04:52 EST
(In reply to comment #3)
> We should generate an Xcore file instead of an Ecore.

That's a different but also useful option. So long as manually maintained Ecore import is supported, the suggested refactoring would be useful.