Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Combining two domain models into one application
Combining two domain models into one application [message #195837] Sat, 05 July 2008 16:25 Go to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

I have one domain model for which I've done GMF-based application. Now, I
need to create another GMF application which will use some of the domain
model elements from the first application, where those elements should be
edited in the first application (when called from the second, of course).
But, also those domain model elements of the first application should be
possible to create in the second application.

I hope that it is not too complicated to explain. Just like that the first
application is UML Class diagram editor, and the second is UML Activity
diagram editor, where the Activity diagram editor use classes defined in
the UML Class diagram editor.

How can I do this with GMF ? Any tutorial on this ?

--
Thank you in advance, Milan Milanovic
Re: Combining two domain models into one application [message #195846 is a reply to message #195837] Sat, 05 July 2008 21:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zippo29.hotmail.fr

hello!

I think you should use reference child property in the gmfmap.

Regards
Re: Combining two domain models into one application [message #195871 is a reply to message #195846] Sun, 06 July 2008 21:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

just it ? But, when user click on the model element in first application,
how second application will open for editing that element ? I actually
need that those two GMF plugins work together in the same Eclipse
installation.

--
Thx, Milan

Mous wrote:

> hello!

> I think you should use reference child property in the gmfmap.

> Regards
Re: Combining two domain models into one application [message #195943 is a reply to message #195837] Mon, 07 July 2008 10:37 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Milan,

AFAIU you have to create two diagram editors able to work with same root
element (like package/class in UML2). In this case you can simply define
two independend diagram editors working with the same domain model and then
try to solve existing synchronization issues. For example - you can edit
domain model on one diagram, save it and open another diagram - content of
the second diagram will be automatically updated. You can modify second diagram
annd save it - first one will load all changes from the saved domain model
file. The problem is: is you have to modicy both domain diagrams in teh same
time without saving it.. In this case you should share EditingDomain (+ResourceSet)
instance across these two edtiros and then you'll get synchronization problem
fixed.

-----------------
Alex Shatalin
Re: Combining two domain models into one application [message #196125 is a reply to message #195943] Tue, 08 July 2008 18:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi,

thank you.

No, I actually need to edit in one editor, to save it and then to double
click it and open in another editor. The main thing here is that certain
element (let say circle) in the first editor will have some connections
with elements in the first diagram, and in the second editor it will have
some (other) connections with those elements.

--
Thx, Milan

Alex Shatalin wrote:

> Hello Milan,

> AFAIU you have to create two diagram editors able to work with same root
> element (like package/class in UML2). In this case you can simply define
> two independend diagram editors working with the same domain model and then
> try to solve existing synchronization issues. For example - you can edit
> domain model on one diagram, save it and open another diagram - content of
> the second diagram will be automatically updated. You can modify second
diagram
> annd save it - first one will load all changes from the saved domain model
> file. The problem is: is you have to modicy both domain diagrams in teh same
> time without saving it.. In this case you should share EditingDomain
(+ResourceSet)
> instance across these two edtiros and then you'll get synchronization
problem
> fixed.

> -----------------
> Alex Shatalin
Re: Combining two domain models into one application [message #196196 is a reply to message #196125] Wed, 09 July 2008 09:19 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Milan,

Then it should not be a problem. See Ecore diagram editor as an example -
you can open diagram and create package and class in it. Then you can save,
double-click on the package and see package diagram with class represented
as top-level node with possibility to draw links. Looks like your use case
is the same with only one difference - "second" diagram openned by double-clicking
to the element will be a diagram of different type (in Ecore example it is
same type of diagram - ecore diagram), but it should not be a problem to
use different diagram type here - the rest will work in a same way..

-----------------
Alex Shatalin
Re: Combining two domain models into one application [message #196398 is a reply to message #196196] Wed, 09 July 2008 21:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Hi Alex,

good, thank you.

One more thing, what technique can I use to maintain traceability links
between those two domain models ?

--
Best regards, Milan Milanovic

Alex Shatalin wrote:

> Hello Milan,

> Then it should not be a problem. See Ecore diagram editor as an example -
> you can open diagram and create package and class in it. Then you can save,
> double-click on the package and see package diagram with class represented
> as top-level node with possibility to draw links. Looks like your use case
> is the same with only one difference - "second" diagram openned by
double-clicking
> to the element will be a diagram of different type (in Ecore example it is
> same type of diagram - ecore diagram), but it should not be a problem to
> use different diagram type here - the rest will work in a same way..

> -----------------
> Alex Shatalin
Re: Combining two domain models into one application [message #196445 is a reply to message #196398] Thu, 10 July 2008 09:32 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Milan,

> One more thing, what technique can I use to maintain traceability
> links between those two domain models ?
Generated code will create DiagramLinkStyle instance pointing to the diagram
associated with this diagram node and attach this style to the corresponding
org.eclipse.gmf.runtime.notation.Node.

-----------------
Alex Shatalin
Re: Combining two domain models into one application [message #196556 is a reply to message #196196] Thu, 10 July 2008 20:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Dear Alex,

I forgot to ask, what if one GMF application is done in GMF 1.0 and the
second in 2.0 (will be created) ?

--
Thx, Milan

Alex Shatalin wrote:

> Hello Milan,

> Then it should not be a problem. See Ecore diagram editor as an example -
> you can open diagram and create package and class in it. Then you can save,
> double-click on the package and see package diagram with class represented
> as top-level node with possibility to draw links. Looks like your use case
> is the same with only one difference - "second" diagram openned by
double-clicking
> to the element will be a diagram of different type (in Ecore example it is
> same type of diagram - ecore diagram), but it should not be a problem to
> use different diagram type here - the rest will work in a same way..

> -----------------
> Alex Shatalin
Re: Combining two domain models into one application [message #196581 is a reply to message #196556] Fri, 11 July 2008 08:45 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Milan,

The possibility to open sub-diagram by double-clicking on an element was
added in GMF 2.0 ( http://wiki.eclipse.org/GMF_2.0_New_and_Noteworthy#Basic_sup port_for_diagram_partitioning)
so I suggest you to migrate both applications to be generated by latest GMF
(2.1)

-----------------
Alex Shatalin
Re: Combining two domain models into one application [message #196605 is a reply to message #196581] Fri, 11 July 2008 09:57 Go to previous message
Eclipse UserFriend
Originally posted by: milan.milanovic.org

Dear Alex,

O.K. I'll do that. Thanks.

--
Regards, Milan Milanovic

Alex Shatalin wrote:

> Hello Milan,

> The possibility to open sub-diagram by double-clicking on an element was
> added in GMF 2.0
( http://wiki.eclipse.org/GMF_2.0_New_and_Noteworthy#Basic_sup port_for_diagram_partitioning)
> so I suggest you to migrate both applications to be generated by latest GMF
> (2.1)

> -----------------
> Alex Shatalin
Previous Topic:Double click to open problem caused by label
Next Topic:DnD in GMF
Goto Forum:
  


Current Time: Sat Jun 06 11:49:47 GMT 2020

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

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

Back to the top