Master/slave model: how to replicate changes? [message #690851] |
Thu, 30 June 2011 10:25 |
|
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 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02391 seconds