Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Does EuGENia support EMF generics?
Does EuGENia support EMF generics? [message #872125] Tue, 15 May 2012 10:02 Go to next message
Stefan W├╝lfrath
Messages: 18
Registered: February 2012
Junior Member
Hi,

I want to develop an editor with EuGENia.

Does EuGENia support EMF generics?

In Emfatic they look like the following code snippet:
class MyClass<T extends MySecondClass> {...}

Thank you for your help in advance!

Stefan
Re: Does EuGENia support EMF generics? [message #872622 is a reply to message #872125] Wed, 16 May 2012 09:33 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 303
Registered: January 2010
Senior Member
In theory, we support anything that Emfatic supports Smile. Eugenia doesn't have any special logic for EMF generics.

I've tried to set up an example project using generics: I have attached it to this post. I had to add an intermediate EOL transformation to fix the ECore metamodel generated by Emfatic, which didn't have the appropriate type parameters for the Apple and Orange EClass objects.

I have run into issues with the GenModel -> EMF code step in Eugenia as well. For some reason, it's not picking up the type parameters of the GenModel. However, the EMF2Java Ant task and generating the code from the .genmodel manually seem to work, so it must be something in the way we load the GenModel. I'm not sure what it could be, though.

After all these workarounds, everything seems to compile and run just fine, but I can still place an Apple in an OrangeBasket, so there might be something missing. Still, it's a good start.

If you manage to find why we can put Apples in OrangeBaskets, it'd be a great help Smile.
Previous Topic:Model caching problem
Next Topic:[SOLVED] Transforming an element twice (or more)
Goto Forum:
  


Current Time: Thu Apr 17 11:37:09 EDT 2014

Powered by FUDForum. Page generated in 0.03385 seconds