Skip to main content



      Home
Home » Modeling » EMF » Master/slave model: how to replicate changes?
Master/slave model: how to replicate changes? [message #690851] Thu, 30 June 2011 06:25 Go to next message
Eclipse UserFriend
Hi,

I've developed a product that is made from different GMF plugins: each of these contributes a specialized editor that displays different part of the (unique) EMF underlying model. Now I have to implement the following requirement: every time the user adds a node on the "master" diagram, copy of the same node has to be added on every "slave" diagram, open or not; moreover, every considerable change applied on "master" node properties has to be replicated on "slaves". First step is obviously to implement this feature at EMF level in an automatic manner, like itemProvider, adapters and so on.

Anyone can suggest me the best way to do this? Or point me to a working example of the same feature?

Thanks, regards

Giovanni
(no subject) [message #691062 is a reply to message #690851] Thu, 30 June 2011 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Giovanni,

A ChangeRecorder can be attached to listen to changes and can produce a
ChangeDescription, i.e., a delta. This unit test might be a useful example:

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.emf/org.eclipse.emf/tests/org.eclipse.emf.test.core/src/org/eclipse/emf/test/core/change/ChangeDescriptionReverseTest.java?view=markup&revision=1.1&root=Modeling_Project


On 30/06/2011 3:25 AM, Giovanni De Sossi wrote:
> Hi,
>
> I've developed a product that is made from different GMF plugins: each
> of these contributes a specialized editor that displays different part
> of the (unique) EMF underlying model. Now I have to implement the
> following requirement: every time the user adds a node on the "master"
> diagram, copy of the same node has to be added on every "slave"
> diagram, open or not; moreover, every considerable change applied on
> "master" node properties has to be replicated on "slaves". First step
> is obviously to implement this feature at EMF level in an automatic
> manner, like itemProvider, adapters and so on.
>
> Anyone can suggest me the best way to do this? Or point me to a
> working example of the same feature?
>
> Thanks, regards
>
> Giovanni
Re: (no subject) [message #691457 is a reply to message #691062] Fri, 01 July 2011 09:47 Go to previous message
Eclipse UserFriend
Hi Ed,

thank you for your quick response and for the example code, I'm trying it.

Regards,

Giovanni
Previous Topic:Implementing EMF Query2 Indexing
Next Topic:OCL typecheck in dynamic instance
Goto Forum:
  


Current Time: Tue Jul 08 06:03:01 EDT 2025

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

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

Back to the top