Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Generating a new ecore model + diagram from existing one(Best way to generate a new model and diagram from an existing one)
Generating a new ecore model + diagram from existing one [message #1064903] Fri, 21 June 2013 15:01 Go to next message
Julian Johnson is currently offline Julian JohnsonFriend
Messages: 20
Registered: March 2013
Junior Member
I have a need to produce various (meta)models/diagrams, which togethe model a domain that is too large to comfortably work on a single diagram. Having created from model+diagram, I thought: I'll copy the .ecore to a new file, rename the file to something different, then generate a new diagram to that new file.

I note that the generated diagram file (apart from the expected need to lay it out differently to the auto-layout), is being viewed in the project explorer differently. It's not using the icon for Ecore diagram like my manually created ones, but an icon that I can't find in the 'New...' icon list.
Attached are jpg screen dumps for the Project Explorer view for the original file/diag (complements.x)and the copied file and autogenerated diagram file (verificationandtrades.x).

Q1 What is that new filetype (icon looks like a 'd')?
Q2 essentially I wanted to start with the content (diag + model) I had (in the files complement.x) but rename the model area (complement -> verificationandtrades) before I proceed; how is the best way to achieve that (without manually recreating the whole model + diagram)?

Thanks Julian.
Re: Generating a new ecore model + diagram from existing one [message #1065016 is a reply to message #1064903] Sun, 23 June 2013 12:32 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Julian,

Q1: Rather confusingly, there are actually two Ecore diagram editors in Eclipse. I suspect that when you right-clicked your copy you selected "Initialize ecore_diagram diagram file" instead of "Initialize Ecore Diagram File...", which then created a diagram compatible with the 2nd Ecore diagram editor.

Q2: Suppose you have foo.ecore and foo.ecorediag and you want to duplicate them to bar.ecore and bar.ecorediag. You'll need to follow the steps below:
- Copy foo.ecore -> bar.ecore
- Copy foo.ecorediag -> bar.ecorediag
- Open bar.ecorediag with a text editor and replace href="foo.ecore#..." -> href="bar.ecore#..."
- Save bar.ecorediag
- Open bar.ecore and change the nsURI of its root package (each Ecore metamodel should have a unique nsURI)

Regards,
Dimitris
Re: Generating a new ecore model + diagram from existing one [message #1065085 is a reply to message #1065016] Mon, 24 June 2013 09:46 Go to previous messageGo to next message
Julian Johnson is currently offline Julian JohnsonFriend
Messages: 20
Registered: March 2013
Junior Member
Q1 Thanks for pointing that out, I had not realised there were two...Is one preferred over the other? What are the differences (or point me to explanation)?

Q2 Great, thanks, that will help significantly...

Cheers Julian.
Re: Generating a new ecore model + diagram from existing one [message #1065104 is a reply to message #1065085] Mon, 24 June 2013 11:39 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 918
Registered: July 2009
Senior Member
Hi Julian,

I'm not sure why the .ecore_diagram editor is still around given that the .ecorediag one is much better across the board.

Cheers,
Dimitris
Previous Topic:Running Workflows from the command line
Next Topic:[ETL] Specify metamodels in transformation for content assist/validation
Goto Forum:
  


Current Time: Thu Dec 18 14:42:02 GMT 2014

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

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