Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » unsynchronized editors on the same model
unsynchronized editors on the same model [message #490493] Thu, 08 October 2009 20:02 Go to next message
RefuX Zanzeebarr is currently offline RefuX ZanzeebarrFriend
Messages: 51
Registered: July 2009
Member
My setup:
I have one type of editor and one model. In the gmfgen file the editor
is set as unsynchronized.

This enables me to do what I want which is have a bunch of (the same
type) of editors giving a view into the same model.

I run into trouble when I edit something in Editor A then switch to
Editor B edit something and save in Editor B and switch back to Editor A.
Editor A complains about 'the file has been changed on the file system'
and having to load the changes, which then wipe out my changes in Editor A.

From the research I have done, it seems when I switch to an different
Editor, the diagram data is loaded, this diagram data has references to
my model, the model object is then asked for its resource, which results
in the entire model being reloaded off disk. The upshot of this is that
if I have 10 editor windows open, I will have 10x instances of my model
objects.
This also causes the synchronization issues since every editor is
working off different model objects.

I must admit I haven't thought through all issues that can occur if all
the editors work off the same model instances, but it seems to me, that
is what I would want to do.
I assume this is how a tool like RSA functions, where there are many
diagrams referencing the same model...


Any advice on how I can get the behavior I would like to achieve would
be wonderful!
Re: unsynchronized editors on the same model [message #490522 is a reply to message #490493] Thu, 08 October 2009 22:47 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I think that you need to share your editing domain :

http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams

regards,

Aurelien Pupier


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: unsynchronized editors on the same model [message #490717 is a reply to message #490522] Fri, 09 October 2009 19:14 Go to previous message
RefuX Zanzeebarr is currently offline RefuX ZanzeebarrFriend
Messages: 51
Registered: July 2009
Member
Aurelien Pupier wrote:
> Hi,
>
> I think that you need to share your editing domain :
>
> http://wiki.eclipse.org/GMF_Tips#Sharing_single_EditingDomai n_instance_across_several_diagrams
>
>
> regards,
>
> Aurelien Pupier

Thanks for getting me heading in the right direction.

This caused me to stumble onto the 'gmftools' project:
http://code.google.com/p/gmftools/

They have a page discussing this problem:
http://code.google.com/p/gmftools/wiki/SharedEditingDomain

And even have some custom templates they use to patch the current GMF
code to enable shared editing domains across multiple editors:
http://gmftools.googlecode.com/svn/trunk/plugins/de.itemis.g mf.runtime.extensions/templates-3.5/sharedEditingDomain/aspe cts/xpt/
Previous Topic:Weird connection behaviour
Next Topic:Missing .diagram Help!!!!!
Goto Forum:
  


Current Time: Thu Apr 25 08:19:47 GMT 2024

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

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

Back to the top