Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » A proposal for improving the WorkspaceSynchronizer.
A proposal for improving the WorkspaceSynchronizer. [message #440626] Fri, 31 July 2009 08:52 Go to next message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
When deleting a resource from workspace, the workspace synchronizer will
fire handleResourceChanged events events on all resources though they
havent been changed.

This is because in the workspace synchronizer in the processDelta
operation in the IResourceDelta.CHANGED case does not check if the
contents actually have been changed.

I find this a bit myself esoteric but it seems thats the eay how
resource change events work with eclipse: When a resource is deleted the
ResourcePlugin puts the entire workspace into the resource delta one is
required to visit in order to figure out in what the actual change
consists in.

To check if a resource has actualy changed on has the check

if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) [1]

This would avoid a lot of unload and reload operations, especialy when
it comes to GMF after a diagram is deleted and this events ripples
through all editing domains with their attached resource sets causing
the lag



[1]
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
Re: A proposal for improving the WorkspaceSynchronizer. [message #441304 is a reply to message #440626] Fri, 31 July 2009 10:30 Go to previous messageGo to next message
Boris Gruschko is currently offline Boris GruschkoFriend
Messages: 14
Registered: July 2009
Junior Member
Hi Juergen,

could you please file a bug on EMF Transaction.

I'll have to evaluate the impact of the proposed change.

Thanks,
Boris

"Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in message
news:h4ubcp$5ep$1@build.eclipse.org...
> When deleting a resource from workspace, the workspace synchronizer will
> fire handleResourceChanged events events on all resources though they
> havent been changed.
>
> This is because in the workspace synchronizer in the processDelta
> operation in the IResourceDelta.CHANGED case does not check if the
> contents actually have been changed.
>
> I find this a bit myself esoteric but it seems thats the eay how resource
> change events work with eclipse: When a resource is deleted the
> ResourcePlugin puts the entire workspace into the resource delta one is
> required to visit in order to figure out in what the actual change
> consists in.
>
> To check if a resource has actualy changed on has the check
>
> if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) [1]
>
> This would avoid a lot of unload and reload operations, especialy when it
> comes to GMF after a diagram is deleted and this events ripples through
> all editing domains with their attached resource sets causing the lag
>
>
>
> [1]
> http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
[EMF Index] Re: A proposal for improving the WorkspaceSynchronizer. [message #441917 is a reply to message #441304] Fri, 31 July 2009 11:44 Go to previous message
Juergen Aschenbrenner is currently offline Juergen AschenbrennerFriend
Messages: 25
Registered: July 2009
Junior Member
done,

BTW couldn't help but noticing that there exists some commonalities
between WorkspaceSynchronizer and the EMF Index effort.

The WS falls short notifying events connected to resources added to the
workspace.

Maybe the WS would be more useful when it would no be final and one
could avoid editor inheritance in order to extend it.

Cheers

Juergen

Boris Gruschko schrieb:
> Hi Juergen,
>
> could you please file a bug on EMF Transaction.
>
> I'll have to evaluate the impact of the proposed change.
>
> Thanks,
> Boris
>
> "Juergen Aschenbrenner" <juergen.aschenbrenner@gmail.com> wrote in
> message news:h4ubcp$5ep$1@build.eclipse.org...
>> When deleting a resource from workspace, the workspace synchronizer
>> will fire handleResourceChanged events events on all resources though
>> they havent been changed.
>>
>> This is because in the workspace synchronizer in the processDelta
>> operation in the IResourceDelta.CHANGED case does not check if the
>> contents actually have been changed.
>>
>> I find this a bit myself esoteric but it seems thats the eay how
>> resource change events work with eclipse: When a resource is deleted
>> the ResourcePlugin puts the entire workspace into the resource delta
>> one is required to visit in order to figure out in what the actual
>> change consists in.
>>
>> To check if a resource has actualy changed on has the check
>>
>> if ((delta.getFlags() & IResourceDelta.CONTENT) != 0) [1]
>>
>> This would avoid a lot of unload and reload operations, especialy when
>> it comes to GMF after a diagram is deleted and this events ripples
>> through all editing domains with their attached resource sets causing
>> the lag
>>
>>
>>
>> [1]
>> http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
>
>
Previous Topic:How to link a contentType to an existing editor?
Next Topic:eEMF on eRCP
Goto Forum:
  


Current Time: Mon Dec 09 09:45:33 GMT 2019

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

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

Back to the top