Skip to main content



      Home
Home » Modeling » Epsilon » EGL M2T Transformation and Xtext
EGL M2T Transformation and Xtext [message #1271958] Sun, 16 March 2014 14:24 Go to next message
Eclipse UserFriend
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: http://www.eclipse.org/forums/index.php/f/22/

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.

Thanks,
Luca
Re: EGL M2T Transformation and Xtext [message #1272448 is a reply to message #1271958] Mon, 17 March 2014 19:57 Go to previous messageGo to next message
Eclipse UserFriend

Hi,

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

Cheers,
Dimitris

[1] http://eclipse.org/epsilon/doc/articles/minimal-examples/
Re: EGL M2T Transformation and Xtext [message #1272839 is a reply to message #1272448] Tue, 18 March 2014 18:38 Go to previous message
Eclipse UserFriend
Hi Dimitris,

I made the simple example, I tried to keep it as simple as possible.
You can download it form this link: https://www.dropbox.com/s/jhvo33118le17f2/Archive.zip

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 http://christiandietrich.wordpress.com/2011/07/17/xtext-2-0-and-uml/)

  • 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): https://www.dropbox.com/s/19watg3sfvv2yba/runtime-EclipseXtext.zip

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 1.1.0.201309101707

Let me know if you need further information.

Thanks in advance,
Luca



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


Current Time: Thu Jul 17 06:21:09 EDT 2025

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

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

Back to the top