Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Multiple diagrams and generated xxxDocumentProvider synchronization code
Multiple diagrams and generated xxxDocumentProvider synchronization code [message #100499] Fri, 02 February 2007 07:51 Go to next message
Eclipse UserFriend
Originally posted by: thomas.forster.iese.fhg.de

Hi all,
my data model has recursive structures and on certain elements I can
open sub diagrams so I can continue modelling there.
However I came across a problem: Whenever I create and open a new sub
diagram on an element, the DocumentProviders handleResourcesChanged
method gets called (to synchronize the resources in the resource set, I
guess)
A side effect of this call is that all resources in the ResourceSet (I
have only one, because I use the extension point
org.eclipse.emf.transaction.editingDomains) that have to do with my
diagrams business model and notation model get unloaded and reloaded
again. The reload creates a completely new model instance. Any
references to the former model instance are of no value because the
actual model instance of the editor has changed. (Moreover all adapters
get removed from the model).
As a workaround I excluded the domain model resource from the reload in
the DocumentProviders handleResourceChange - Method. So far this seems
to work.
Does anybody know what the side effects might be? Is there a reason why
all resources are reloaded on a resource change?

Regards Thomas
Re: Multiple diagrams and generated xxxDocumentProvider synchronization code [message #100558 is a reply to message #100499] Fri, 02 February 2007 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Hello Thomas,

> Does anybody know what the side effects might be? Is there a reason
> why
> all resources are reloaded on a resource change?
Sure. It was done to load changes made on another diagram in a separate EditingDomain.
Cince you are using shared editing domain for both diagrams, reloading process
is not so important for you but if somebody changes model resource in EMf
editor you will never get these changes propagated to your diagram until
editor reopening.

-----------------
Alex Shatalin
Re: Multiple diagrams and generated xxxDocumentProvider synchronization code [message #100710 is a reply to message #100558] Fri, 02 February 2007 11:15 Go to previous message
Eclipse UserFriend
Originally posted by: thomas.forster.iese.fhg.de

Alex Shatalin schrieb:
> Hello Thomas,
>
>> Does anybody know what the side effects might be? Is there a reason
>> why
>> all resources are reloaded on a resource change?
> Sure. It was done to load changes made on another diagram in a separate
> EditingDomain. Cince you are using shared editing domain for both
> diagrams, reloading process is not so important for you but if somebody
> changes model resource in EMf editor you will never get these changes
> propagated to your diagram until editor reopening.
>
> -----------------
> Alex Shatalin
>
>
Hello Alex,
thanks for your reply, I don't plan to use separate EditingDomains, so
the approach will work for me.

Thomas
Previous Topic:Plug-in visualization using GMF
Next Topic:ecore properties
Goto Forum:
  


Current Time: Sat Jun 07 22:01:45 EDT 2025

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

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

Back to the top