Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Master/slave model: how to replicate changes?
Master/slave model: how to replicate changes? [message #690851] Thu, 30 June 2011 10:25 Go to next message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

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 16:07 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: (no subject) [message #691457 is a reply to message #691062] Fri, 01 July 2011 13:47 Go to previous message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

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: Wed Apr 24 22:11:07 GMT 2024

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

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

Back to the top