Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Defining elements to draw from the ecore metamodel
Defining elements to draw from the ecore metamodel [message #1058233] Mon, 13 May 2013 09:56 Go to next message
Luca Salemio is currently offline Luca Salemio
Messages: 14
Registered: May 2013
Junior Member
Hi Everyone,
I am trying to develop a graphical editor with GMF starting from an ecore model.
This is my simple ecore model index.php/fa/14762/0/.

I would like to have as elements to draw just blocks and connections (links between blocks) and at the same time while drawing such elements defining input and output interfaces. The problem is that with this metamodel i cannot connect blocks with connections without also drawing interfaces.

Furthermore i tried also to define a link directly between blocks and connections to have the possibility to draw them with the editor, so i added two new EReferences as you can see from the image index.php/fa/14763/0/ but in this way the xml file I want to have doesn't create any interfaces definition.

Can anyone help me to resolve my problem ?

Thank you very much,
Luca.
  • Attachment: xml.png
    (Size: 34.90KB, Downloaded 170 times)
  • Attachment: xml.png
    (Size: 35.98KB, Downloaded 181 times)
Re: Defining elements to draw from the ecore metamodel [message #1058456 is a reply to message #1058233] Tue, 14 May 2013 08:20 Go to previous messageGo to next message
Luca Salemio is currently offline Luca Salemio
Messages: 14
Registered: May 2013
Junior Member
Can anyone give me some advices ?
I am stuck and I don't know how to go ahead with that, every tip could be useful for me.

Thanks,
Luca.
Re: Defining elements to draw from the ecore metamodel [message #1059240 is a reply to message #1058456] Fri, 17 May 2013 12:55 Go to previous messageGo to next message
Dan Tololoi is currently offline Dan Tololoi
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

Move the EReferences from the OutputInterface and InputInterface to the abstract EClass ( Interface) . So Interface would have two EReferecence with EOpposite : hasSource + isSource ; hasTarget + isTarget. In this way I assume you don't have to draw the InputInterface and OutputInterface figures, just Blocks and Connection between blocks.
Re: Defining elements to draw from the ecore metamodel [message #1059766 is a reply to message #1059240] Tue, 21 May 2013 14:34 Go to previous message
Luca Salemio is currently offline Luca Salemio
Messages: 14
Registered: May 2013
Junior Member
Dear Dan Tololoi, thank you very much for your answer.
I tried to do what you advised as you can see from the image index.php/fa/14991/0/, but it that way i couldn't even draw connections between blocks anymore.

Are you sure it's possible to set EReferences to or from my EClass Interface ?
Interface has "is Abstract" property set to true.

I really don't know how to go on with that.

Luca.
  • Attachment: xml (2).png
    (Size: 36.73KB, Downloaded 114 times)
Previous Topic:Calling method
Next Topic:Auto save Diagram
Goto Forum:
  


Current Time: Fri Sep 19 04:08:45 GMT 2014

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

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