Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340028 - [grammar] Quickfix/Suggestion: Switch to imported Xcore
Summary: [grammar] Quickfix/Suggestion: Switch to imported Xcore
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 10:20 EDT by Ed Willink CLA
Modified: 2013-08-23 07:08 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 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.