Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » How Can I draw just one of two opposite reference?(Eugenia )
How Can I draw just one of two opposite reference? [message #1749495] Wed, 07 December 2016 11:52 Go to next message
Julio Sandobalin is currently offline Julio SandobalinFriend
Messages: 12
Registered: August 2013
Junior Member
Hi everyone,

I am working in build a DSL using Eugenia to make a graphical modeler. I need to use a opposite reference in the abstract metamodelo (below you can see the excerpt code):

@gmf.node
class Group {
  @gmf.link(target.decoration="none", style="solid")
  ref machine[*]#groups machines;
} 

@gmf.node
class Machine  {
  @gmf.link(target.decoration="none", style="solid")
  ref group[+]#machines groups;
}


I can model a machine and group and then I make the link(reference) between them (I can use either "ref machine[*]#groups machines" or "ref group[+]#machines groups"). Due to I am using opposite references when I just make a reference and after I close and re-open the model, then automatically the other reference is drawn. I just need to draw a reference regardless of whether there are two oposite references in the metamodel. Do you know how can I do it?

In advance thank you for your help

Greetings,

Julio Sandobalin
Re: How Can I draw just one of two opposite reference? [message #1749499 is a reply to message #1749495] Wed, 07 December 2016 12:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Julio,

Would removing the second @gmf.link annotation do the trick?

Cheers,
Dimitris
Re: How Can I draw just one of two opposite reference? [message #1749517 is a reply to message #1749499] Wed, 07 December 2016 16:55 Go to previous messageGo to next message
Julio Sandobalin is currently offline Julio SandobalinFriend
Messages: 12
Registered: August 2013
Junior Member
Hi Dimitris,
Thanks for your reply. I have tried to use only one reference (instead of two opposite reference) but I need to put these two reference to accomplish requirements that I want to achieve with my DSL. I have tried with EOL files. However, I do not know how can I draw these two opposite references like if they were a single reference on the diagram. Moreover, on the diagram this is useful for the usability because I can to make a link between nodes in two ways (e.g. from Group to Machine and from Machine to Group). I do not know whether it is possible.

Greetings,
Julio.
Re: How Can I draw just one of two opposite reference? [message #1749522 is a reply to message #1749517] Wed, 07 December 2016 17:38 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Julio,

I'm not suggesting that you remove the second reference; just its @gmf.link annotation.

Cheers,
Dimitris
Previous Topic:Why node element changes when downloading from svn
Next Topic:Type casting in EOL?
Goto Forum:
  


Current Time: Fri Apr 26 20:11:59 GMT 2024

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

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

Back to the top