Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Creating Diagrams for a subset of objects in the Ecore Model
Creating Diagrams for a subset of objects in the Ecore Model [message #929535] Mon, 01 October 2012 10:48 Go to next message
Ranjith Chungath is currently offline Ranjith Chungath
Messages: 15
Registered: July 2009
Junior Member
Hi,

I have an Ecore file which has more than 100 EClasses. Now, I want to create a diagram only with a subset of objects(Max 5). Just wanted to know what would be the easiest way to do that.

The problem is, whenever you create a Diagram, in the dialog, you can only select the EPackage and not a list of EClasses under the package, and so it creates the diagram with all the EClasses in that package.

I don't want to generate the complete diagram and filter the rest of the objects Razz .

Thanks,
Ranjith
Re: Creating Diagrams for a subset of objects in the Ecore Model [message #949197 is a reply to message #929535] Thu, 18 October 2012 15:56 Go to previous messageGo to next message
David Rees is currently offline David Rees
Messages: 47
Registered: September 2012
Member
You may know this, but in case it helps here are two key things to note that I missed at first:

You can have multiple diagrams in a single ecorediag. For some reason diagrams are a bit hidden in the outline so they are hard to miss- they are under the top-level package and after all the elements.

You can add drag elements from the outline onto the canvas.

So to create a diagram with just a few elements I would do the following:
"Initialize Ecore Diagram" from the ecore normally
Then select the package in the outline and choose "New Digram"
Then select the elements you want and drag them on to the diagram

I do the above steps all the time when exploring the model with "Navigate > Restore Related Elements" to explore a subset of elements.

d

Re: Creating Diagrams for a subset of objects in the Ecore Model [message #955897 is a reply to message #929535] Wed, 24 October 2012 00:57 Go to previous messageGo to next message
Ranjith Chungath is currently offline Ranjith Chungath
Messages: 15
Registered: July 2009
Junior Member
That was exactly what I was looking for......

Thanks,
Ranjith
Re: Creating Diagrams for a subset of objects in the Ecore Model [message #956439 is a reply to message #955897] Wed, 24 October 2012 10:06 Go to previous messageGo to next message
David Rees is currently offline David Rees
Messages: 47
Registered: September 2012
Member
Glad to be of help. As long as I am sharing, be sure to check out the New_and_Noteworthy. That seems to be "the documentation" for EMF Tools Diagrams. I updated the wiki to make that more clear, but since you have been using it for a while you have missed it as I did at first.

d
Re: Creating Diagrams for a subset of objects in the Ecore Model [message #1384679 is a reply to message #956439] Fri, 30 May 2014 06:13 Go to previous messageGo to next message
Wenjing Yuan is currently offline Wenjing Yuan
Messages: 7
Registered: May 2014
Junior Member
Hi!

I have a follow up question about this. The drag and drop to new ecorediagram works fine, but the problem is all the elements don't reflect in its ecore which I need for later GMF. So is there a way to synchronize the changes to ecore or create a new ecore based on this diagram? Any hint is appreciated.
Re: Creating Diagrams for a subset of objects in the Ecore Model [message #1385433 is a reply to message #1384679] Fri, 06 June 2014 08:23 Go to previous message
Cedric Brun is currently offline Cedric Brun
Messages: 359
Registered: July 2009
Senior Member
Could you be more specific or send sample model to reproduce your problem ? It should work fine as there is no "synchronization" involved, the diagram editor directly changes the Ecore model instances.
Previous Topic:What means setGenerateCustomClasses in org.eclipse.emf.mwe2.ecore.EcoreGenerator
Next Topic:Error in xcore file in eclipse kepler
Goto Forum:
  


Current Time: Wed Jul 30 07:16:32 EDT 2014

Powered by FUDForum. Page generated in 0.01770 seconds