Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Ecore Diagram Editor - how to have split diagram files
Ecore Diagram Editor - how to have split diagram files [message #1015252] Wed, 27 February 2013 21:40 Go to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
I've got a .ecorediag (and corresponding .ecore file autogenerated by diagram editor) that has quite a few common EClass's that I use in multiple projects. I've been coping the same .ecorediag from one project to the next in the spirit of getting the new project done fast.

What I'd like to do is have a common.ecorediag and common.ecore file that has my base (common) EClass's in it. Then have a project specific model.ecorediag and model.ecore that contains project specific EClass's which includes referencing EClass's in common.ecore[diag]. For example, common.ecore[diag] might contain an Address EClass and a project's model.ecore[diag] might contain an EClass called Astronaut which has an ERef to Address from common.ecore[diag].

I still want to be able to use Diagram Editor to edit both common.ecorediag and a project specific model.ecorediag.

Can I do this? If so, how? I can't seem to find anything in Diagram Editor that would let me reference another diagram.
Re: Ecore Diagram Editor - how to have split diagram files [message #1015287 is a reply to message #1015252] Thu, 28 February 2013 04:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Mike,

You can use Load Resource... in the outline of the diagram editor (much
like you can in the Sample Ecore editor, to load other Ecore models
which you can then reference in that diagram and by models displayed in
that diagram.


On 27/02/2013 10:40 PM, Mike Cooper wrote:
> I've got a .ecorediag (and corresponding .ecore file autogenerated by
> diagram editor) that has quite a few common EClass's that I use in
> multiple projects. I've been coping the same .ecorediag from one
> project to the next in the spirit of getting the new project done fast.
>
> What I'd like to do is have a common.ecorediag and common.ecore file
> that has my base (common) EClass's in it. Then have a project
> specific model.ecorediag and model.ecore that contains project
> specific EClass's which includes referencing EClass's in
> common.ecore[diag]. For example, common.ecore[diag] might contain an
> Address EClass and a project's model.ecore[diag] might contain an
> EClass called Astronaut which has an ERef to Address from
> common.ecore[diag].
>
> I still want to be able to use Diagram Editor to edit both
> common.ecorediag and a project specific model.ecorediag.
>
> Can I do this? If so, how? I can't seem to find anything in Diagram
> Editor that would let me reference another diagram.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore Diagram Editor - how to have split diagram files [message #1015496 is a reply to message #1015287] Thu, 28 February 2013 19:36 Go to previous messageGo to next message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Ed,

Thanks for the pointer.

I found "Load Resource..." by clicking on the background of my project .ecorediag and then loaded the common.ecorediag. Or was I suppose to load common.ecore? I tried both. I don't see any visual difference. Am I suppose to see any visual differences?

In my project.ecorediag editor I created a new EAttribute and tried to set the EType in the popup menu to an EType from common.ecore[diag] but it was not listed.

I also tried to create an EReference in project.ecorediag to an EType in common.ecore[diag] but again nothing from common.ecore[diag] was in the popup menu for EType's.

If there is some kind of doc/tutorial on this I'd be happy to get pointed at such. Smile

Thanks again.

Re: Ecore Diagram Editor - how to have split diagram files [message #1015520 is a reply to message #1015496] Fri, 01 March 2013 04:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Mike,

Comments below.

On 28/02/2013 8:36 PM, Mike Cooper wrote:
> Ed,
>
> Thanks for the pointer.
>
> I found "Load Resource..." by clicking on the background of my project
> .ecorediag and then loaded the common.ecorediag.
I'm not sure that helps. Does it appear in the outline?
> Or was I suppose to load common.ecore?
Yes.
> I tried both. I don't see any visual difference. Am I suppose to see
> any visual differences?
It should appear in the outline and in general you can drag things from
the outline onto the canvas.
> In my project.ecorediag editor I created a new EAttribute and tried to
> set the EType in the popup menu to an EType from common.ecore[diag]
> but it was not listed.
I've never tried loading another diagram but in general diagrams don't
reference other diagrams they only reference other Ecore models.
>
> I also tried to create an EReference in project.ecorediag to an EType
> in common.ecore[diag] but again nothing from common.ecore[diag] was in
> the popup menu for EType's.
>
> If there is some kind of doc/tutorial on this I'd be happy to get
> pointed at such. :)
Such things are in short supply...
>
> Thanks again.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Ecore Diagram Editor - how to have split diagram files [message #1015869 is a reply to message #1015520] Mon, 04 March 2013 02:14 Go to previous message
Mike Cooper is currently offline Mike CooperFriend
Messages: 60
Registered: February 2011
Member
Ed,

A million thanks! That info is what I needed to get going!

mike
Previous Topic:Virtual Nodes in TreeViewer based on EMF
Next Topic:Custom PropertySheetPage based on selected EObject
Goto Forum:
  


Current Time: Fri Apr 19 23:18:16 GMT 2024

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

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

Back to the top