Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EGL M2T Transformation and Xtext
EGL M2T Transformation and Xtext [message #1271958] Sun, 16 March 2014 18:24 Go to next message
Luca Gherardi is currently offline Luca Gherardi
Messages: 60
Registered: November 2010
Hi all,

I have a simple Ecore Meta-Model which models a library that contains books (it's just a simple example). Both, library and books are characterized by a name.

I wrote a DSL that allows me to do something like this:

SelectedBook BookA
SelectedBook BookB

Where BookA and BookB are books defined in an instance of the ecore meta-model.

I followed this tutorial and I was able to implement the aforementioned DSL. Hence I can import books name for an Ecore model.

Now I need to write a model-to-text transformation that transform the DSL in java code. I'm using Epsilon EGL.
However when I try to access the books within the transformation, the content of their fields (e.g. the string name) is null.

Do you have any idea on how it is possible to fix the problem?
Please let me know if you need further information.

I asked the question in the Xtext forum:

They helped me in having a solution for reading the ecore elements in a standalone program. But they don't know how to do the same with Epsilon.

Re: EGL M2T Transformation and Xtext [message #1272448 is a reply to message #1271958] Mon, 17 March 2014 23:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 883
Registered: July 2009
Senior Member


Could you please provide a minimal example [1] we can use to reproduce this?


Re: EGL M2T Transformation and Xtext [message #1272839 is a reply to message #1272448] Tue, 18 March 2014 22:38 Go to previous message
Luca Gherardi is currently offline Luca Gherardi
Messages: 60
Registered: November 2010
Hi Dimitris,

I made the simple example, I tried to keep it as simple as possible.
You can download it form this link:

You will find the following projects

Library Metamodel and editor:

  • org.library.model
  • org.library.model.edit
  • org.library.model.editor
  • org.library.model.tests

Xtext DSL
Library Metamodel and editor:

  • org.library.xtext.dsl
  • org.library.xtext.dsl.sdk
  • org.library.xtext.dsl.tests
  • org.library.xtext.dsl.ui

Xtext support for importing elements defined in the ecore meta-model (see

  • org.library.xtext
  • org.library.xtext.ui

Support for the Epsilon transformation: org.librart.xtext.m2t

Epsilon transformation: org.library.transform.service

More in details the transformation is defined in the file 'Epsilon/Library.egl'.

You can run it form the menu 'Library'. It works only if the opened file is a '*.librarydsl'.

For convenience here you can find a project including 2 dummy models (one conforms to ecore and the other to the DSL):

As you can see when you run the transformation, the generated file shows that the proxy is not resolved (first line of each book) and for this reason I cannot access its fields (second line of each book).

This is the Epsilon version: Epsilon Core

Let me know if you need further information.

Thanks in advance,

Previous Topic:Modellink - reproducing screencast problem
Next Topic:How to refer to UML profile within ETL module
Goto Forum:

Current Time: Thu Oct 23 06:06:31 GMT 2014

Powered by FUDForum. Page generated in 0.24756 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software