Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Generate figures on canvas automaticlly
icon11.gif  Generate figures on canvas automaticlly [message #938576] Tue, 09 October 2012 21:30 Go to next message
xia chao is currently offline xia chao
Messages: 3
Registered: October 2012
Junior Member
hello,
dear all! In our e core files, there are 3 domain models, which named M1、M2、M3. And in Palette , we have configured three Creation tools named T1、T2、T3,which are corresponding to the three domain models. The relationship among the three domain models can be described as: M1 contains M2 and M2 contains M3.

Actually we have configured M1 as the Top Node and M2 as the child reference of M1 and M3 as the child reference of M2 in .gmfmap file, and draw out the figures on canvas by clicking the tool on palette and clicking on the editor.

But the result is not what we expect, because users have to click the T2 to drag into the containerT1, and click T3 to drag into the container T2. Now we want to realize this: click T1 and draw the M1 on the canvas, then automatically generate the M2 and M3,and the figure of M2 、M3 are hidden automatically, just display the figure of M1. We have tried many ways but failed. So could you please give some useful advice ?We will appreciate your help so much.
Re: Generate figures on canvas automaticlly [message #940003 is a reply to message #938576] Thu, 11 October 2012 04:15 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

looks like you are doing some kind of multi-level modeling. You could take a look on this http://code.google.com/a/eclipselabs.org/p/melanie/ .

You can create model elements quite easyly by using CreateUnspecifiedTypeRequest (http://publib.boulder.ibm.com/infocenter/rsmhelp/v7r0m0/index.jsp?topic=/org.eclipse.gmf.doc/reference/api/runtime/org/eclipse/gmf/runtime/diagram/ui/requests/CreateUnspecifiedTypeRequest.html) . This executes the same code as creating an element from palette. For M2 and M3 you can set their views visible attribute to false.

Ralph
Re: Generate figures on canvas automaticlly [message #940048 is a reply to message #940003] Thu, 11 October 2012 05:08 Go to previous messageGo to next message
xia chao is currently offline xia chao
Messages: 3
Registered: October 2012
Junior Member

hi,
dear Ralph[/quote]
First we are so thanksful for your reply,and that helps us a lot.As we are fresh learner of GMF,so could you please tell a little more detail for how to modify the view visiable attribute of the model?
Re: Generate figures on canvas automaticlly [message #940052 is a reply to message #940003] Thu, 11 October 2012 05:09 Go to previous message
xia chao is currently offline xia chao
Messages: 3
Registered: October 2012
Junior Member
hi,
dear Ralph
First we are so thanksful for your reply,and that helps us a lot.As we are fresh learner of GMF,so could you please tell a little more detail for how to modify the view visiable attribute of the model?
Previous Topic:Infer EReference from a CompartmentEditPart
Next Topic:How to enable the "show/hide all compartments" feature?
Goto Forum:
  


Current Time: Mon Jul 28 00:17:36 EDT 2014

Powered by FUDForum. Page generated in 0.02256 seconds