Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] get referencing objects to self
[Acceleo] get referencing objects to self [message #677392] Wed, 08 June 2011 07:42 Go to next message
Eclipse UserFriend
Hello,
i have the following problem:
In the model that is passed to me, there are two classes (just for this example):
"Implementation" and "Entity",
An implementation references to the entity it implements. On the other hand, the entity does not know its implementations.
My template generates for entities, but now i want to list all implementations of an entity. So my question is if there is a way to get all objects, that are referencing to an entity object. "Implementation" and "Entity" do not share a root, and changing the model is out of the question unfortunately.

Thanks for any help Smile

[Updated on: Wed, 08 June 2011 07:42] by Moderator

Re: [Acceleo] get referencing objects to self [message #677443 is a reply to message #677392] Wed, 08 June 2011 10:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

That is the role of the eInverse operation : [entity.eInverse()/] will print out all objects referencing 'entity'. [entity.eInverse(Implementation)/] will print out all objects of type "Implementation" referencing entity.

Laurent Goubet
Obeo
Re: [Acceleo] get referencing objects to self [message #677464 is a reply to message #677443] Wed, 08 June 2011 11:26 Go to previous message
Eclipse UserFriend
!!!!!!
OMG

Thanks a lot Smile
I feel so incredibly dumb not reading through the operations reference :\
I'm a total noob to java/eclipse/acceleo and i just ended up writing a class that iterates over a resource passed by an acceleo invoke, finding implementations referencing to entities and returning them Very Happy

I guess i deserve the punishment of having lost two hours^^ (although i learned quite a bit)


Again, thanks Smile

[Updated on: Wed, 08 June 2011 11:26] by Moderator

Previous Topic:[Acceleo] creating something similar to a JET custom tag with acceleo
Next Topic:[Acceleo] failed to convert MT to MTL project
Goto Forum:
  


Current Time: Fri Jun 20 10:43:56 EDT 2025

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

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

Back to the top