Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Keep EMF model editor and GMF editor in sync
Keep EMF model editor and GMF editor in sync [message #98416] Mon, 29 January 2007 19:34 Go to next message
Eclipse UserFriend
I would like to have both the EMF generated editor and the GMF editor
active concurrently, how can I keep the models in sync.
Re: Keep EMF model editor and GMF editor in sync [message #98618 is a reply to message #98416] Tue, 30 January 2007 06:54 Go to previous messageGo to next message
Eclipse UserFriend
Hello John,

you have two options:
1. Use both editors to modify the model, second editor contents will be updated
on saving the first one. This functionality will be generated for you by
latest GMF 2.0 builds. This option could lead you to synchronization problems
if both editors was modified simultaneously and was not saved.
2. Use shared editing domain for both editors ( http://wiki.eclipse.org/index.php/GMF_Tips#Sharing_single_Ed itingDomain_instance_across_several_diagrams).
In this case I suggest you to implement mutlipage editor and place GMF +
EMF -generated editors on separate pages.

-----------------
Alex Shatalin
Re: Keep EMF model editor and GMF editor in sync [message #98834 is a reply to message #98618] Tue, 30 January 2007 09:09 Go to previous messageGo to next message
Eclipse UserFriend
Has anyone figured out how to share domain with the EMF .editor?

On 2007-01-30 06:54:29 -0500, Alex Shatalin <vano@borland.com> said:

> Hello John,
>
> you have two options:
> 1. Use both editors to modify the model, second editor contents will be
> updated on saving the first one. This functionality will be generated
> for you by latest GMF 2.0 builds. This option could lead you to
> synchronization problems if both editors was modified simultaneously
> and was not saved.
> 2. Use shared editing domain for both editors
> ( http://wiki.eclipse.org/index.php/GMF+AF8-Tips+ACM-Sharing+A F8-single+AF8-EditingDomain+AF8-instance+AF8-across+AF8-seve ral+AF8-diagrams).
> In this case I suggest you to implement mutlipage editor and place GMF
> +- EMF -generated editors on separate pages.
>
> -----------------
> Alex Shatalin
Re: Keep EMF model editor and GMF editor in sync [message #98927 is a reply to message #98834] Tue, 30 January 2007 09:44 Go to previous messageGo to next message
Eclipse UserFriend
Hello Miles,

> Has anyone figured out how to share domain with the EMF .editor?
It should be similar - just take a look on EMF-generated editor and make
it using the same editing domain...

-----------------
Alex Shatalin
Re: Keep EMF model editor and GMF editor in sync [message #99016 is a reply to message #98618] Tue, 30 January 2007 10:48 Go to previous messageGo to next message
Eclipse UserFriend
Alex Shatalin wrote:
> Hello John,
>
> you have two options:
> 1. Use both editors to modify the model, second editor contents will be
> updated on saving the first one. This functionality will be generated
> for you by latest GMF 2.0 builds. This option could lead you to
> synchronization problems if both editors was modified simultaneously and
> was not saved.
> 2. Use shared editing domain for both editors
> ( http://wiki.eclipse.org/index.php/GMF_Tips#Sharing_single_Ed itingDomain_instance_across_several_diagrams).
> In this case I suggest you to implement mutlipage editor and place GMF
> EMF -generated editors on separate pages.
>
> -----------------
> Alex Shatalin
>
>
Alex,

Thanks, I've have opened both editors and tried the editing and saving
(#1), but I don't see the results in the other editor unless I close it
and reopen it. Is there something I'm not doing or configuring?

also I had another question about custom property sheet editors and
where do you hook those in? ("Custom property sheet editors").
Re: Keep EMF model editor and GMF editor in sync [message #99045 is a reply to message #99016] Tue, 30 January 2007 11:34 Go to previous messageGo to next message
Eclipse UserFriend
Hello John,

> Thanks, I've have opened both editors and tried the editing and saving
> (#1), but I don't see the results in the other editor unless I close
> it and reopen it. Is there something I'm not doing or configuring?
Did you use GMF 2.0 M4 or later for generating diagram code?

> also I had another question about custom property sheet editors and
> where do you hook those in? ("Custom property sheet editors").
AFAIK you can add "GenCustomPropertyTab" into GenPropertySheet in .gmfgen
model then modify generated code to implement your custom property tab. In
addition you can remove all the other property tabs from .gmfgen model..

-----------------
Alex Shatalin
Re: Keep EMF model editor and GMF editor in sync [message #99165 is a reply to message #99045] Tue, 30 January 2007 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Alex Shatalin wrote:
> Hello John,
>
>> Thanks, I've have opened both editors and tried the editing and saving
>> (#1), but I don't see the results in the other editor unless I close
>> it and reopen it. Is there something I'm not doing or configuring?
> Did you use GMF 2.0 M4 or later for generating diagram code?
>
>> also I had another question about custom property sheet editors and
>> where do you hook those in? ("Custom property sheet editors").
> AFAIK you can add "GenCustomPropertyTab" into GenPropertySheet in
> .gmfgen model then modify generated code to implement your custom
> property tab. In addition you can remove all the other property tabs
> from .gmfgen model..
>
> -----------------
> Alex Shatalin
>
>
Alex, Yes I'm using GMF 2.0 M4. I open the model in the EMF editor and
open/create a diagram from the model file. Then I make changes in the
EMF editor and save them. Switch to the diagram editor and the changes
don't show up, on the diagram or in the property sheet. If I close the
diagram editor and reopen then they do.
Re: Keep EMF model editor and GMF editor in sync [message #99457 is a reply to message #99165] Wed, 31 January 2007 06:38 Go to previous messageGo to next message
Eclipse UserFriend
Hello John,

Looks like a bug. I've just checked this situation for ecore diagram editor
from CVS and it works.. Are you sure openned diagram editor is not in the
dirty state?..

I can suggest you to debug the generated code. ???DocumentProvider is responsible
for handling notifications from eclipse resources subsystem and refreshing
the diagram..

-----------------
Alex Shatalin
Re: Keep EMF model editor and GMF editor in sync (GMF bug found!) [message #104755 is a reply to message #99457] Fri, 16 February 2007 19:58 Go to previous messageGo to next message
Eclipse UserFriend
Alex Shatalin wrote:
> Hello John,
>
> Looks like a bug. I've just checked this situation for ecore diagram
> editor from CVS and it works.. Are you sure openned diagram editor is
> not in the dirty state?..
>
> I can suggest you to debug the generated code. ???DocumentProvider is
> responsible for handling notifications from eclipse resources subsystem
> and refreshing the diagram..
>
> -----------------
> Alex Shatalin
>
>
Alex,

Finally found the bug, the problem was that the Project where the model
and diagram files where located had a SPACE in the name.

The line

Resource resource =
myInfo.getResourceSet().getResource(URI.createURI(delta.getF ullPath(.toString()),
false);

(in the visit method of ResourceDeltaVisitor class)

return null for the file changed because the
"delta.getFullPath(.toString())" returned the URI with a SPACE and the
resourceSet had the URI with the SPACE escaped.

When I removed the SPACE from the name the synchronization worked great!

THIS IS PROBABLY A BUG IN THE GMF CODE.
Re: Keep EMF model editor and GMF editor in sync (GMF bug found!) [message #105439 is a reply to message #104755] Tue, 20 February 2007 10:18 Go to previous message
Eclipse UserFriend
Hello John,

> THIS IS PROBABLY A BUG IN THE GMF CODE.

Sure! Can you please file a bugzilla entry for it (Component == gerneration)?

-----------------
Alex Shatalin
Previous Topic:children feature for link Mapping in gmfmap
Next Topic:Disabling animation of collapse/expand compartment
Goto Forum:
  


Current Time: Thu Jul 17 14:41:11 EDT 2025

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

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

Back to the top