|Re: Using an Xtext editor for maninpulating an Ecore model [message #804290 is a reply to message #803529]
||Wed, 22 February 2012 12:36
| Jan Koehnlein
Registered: July 2009
Sounds like you're looking for an executable language referring to your |
Short answer: Yes you can build such a language with Xtext, because it
allows to refer to other EMF based models.
- You may want to import your language's ecore in the Xtext grammar and
make cross-references to model elements.
- You might to have to adapt the scoping of your language to access the
right elements using specific names.
- You will have to build an interpreter or compiler to execute your
language on a given input model.
- You may want to use Xbase to evaluate expressions involving your model
elements. There's a generator and an interpreter for Xbase, so this will
also help you in the actual execution.
I suggest looking at the example and reading the Xtext docs a bit, as
your question is pretty vague.
Am 21.02.12 14:03, schrieb Hugo Garcia:
> On 02/21/2012 11:51 AM, Gerald Preissler wrote:
>> Ed Mercks has started XCore, an XText-based DSL for ECore models. I
>> can't post links right now, but the tutorial is at
>> wiki.eclipse.org/Xcore - maybe this is what you're looking for?
> Not sure... since we would like to develop a specific DSL that defines
> how to interact with a predefined Ecore model.
> Here is another example and work flow:
> * Create a model of a graph (just Vertices and Edges) and persist it
> using Ecore. (Maybe use XCore??)
> * Create a script to interact with the model. (Using a Xtext edtior??).
> [The script (DSL) knows about the model and is meant to use the model
> but not necessarily modify it.]
> Example would instructions on how to navigate the graph.
> * Save the script.
> * Run the script using some other program. This program loads the model
> and the script and executes the scripts based on the model.
> We are still new to Xtext and are not sure if we can achieve the above
> as our basic use case.
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Get professional support from the Xtext committers at www.typefox.io
Powered by FUDForum
. Page generated in 0.02333 seconds