|
Re: Multiple DSLs - Single EMF Model? [message #639129 is a reply to message #639063] |
Mon, 15 November 2010 11:58 |
|
Quote: |
Do I require one or more XText projects?
|
This is optional. You could have several several Xtext grammars in one project integrated or decide to split that into seperate Xtext projects. If you have a look at the sources of the org.eclipse.xtext.xbase plugin then you can see an example for the first alternative.
Quote: |
Do I require one or more EMF models?
|
No, you could map all of them to a single (likely manual maintained) Ecore model. Search the Xtext User Guide for the "returns" keyword.
Quote: |
If just a single model, how do I share the model between .xtext files?
|
This would be done from Xtext automagically through the Index.
Quote: |
My detail level DSL can override model elements that can also be defined in the top-level DSL (but written in a different format), is it possible to describe the same entity in multiple DSLs referencing the same model?
|
Basically yes. This would mean mapping the concepts to the same type in your common Ecore metamodel.
Quote: |
How do I share the model between multiple projects or multiple files?
|
Also here the Xtext Index would do that for you. Therefore the projects need to have the Xtext Nature activated. Also you might need to implement Scoping for your project needs.
Quote: | A link to an xtext project that supports multiple file formats across a single or multiple models would exactly suit my requirements here.
|
You could search the projects listed in Bug#328477 for candidates. The sources of Xbase (part of Xtext development) and B3 I would investigate first.
HTH,
~Karsten
Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
|
|
|
Powered by
FUDForum. Page generated in 0.02832 seconds