Resource change event notify guarantee for top level operations? [message #1387218] |
Tue, 24 June 2014 20:26 |
Bruno Medeiros Messages: 3 Registered: July 2009 |
Junior Member |
|
|
So, I have a pretty standard situation where I have a workspace listener:
ResourcesPlugin.getWorkspace().addResourceChangeListener(
listener, IResourceChangeEvent.POST_CHANGE);
My questions is, are resource change events guaranteed to be notified to listeners right after a top-level workspace operation completes? The documentation states that if the operation is nested, the change events might be delayed, and that is fine. But is there a *guarantee* that when a top-level operation finishes, the change events effected within will be reported right after?
There seems to be a situation in some tests code of mine where that is not happening. :S At first I thought the problem was somewhere else, or that I was misunderstanding what was happening, but after further debugging, it seems to be case of what I said above. Is it a bug?
|
|
|
Re: Resource change event notify guarantee for top level operations? [message #1387416 is a reply to message #1387218] |
Wed, 25 June 2014 04:02 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Bruno,
Yes not getting any notification would be a bug, but note that changes
must be made via the Resource APIs, i.e., not directly via the
underlying file system using, for example, just java.io.File.
On 24/06/2014 10:26 PM, Bruno Medeiros wrote:
> So, I have a pretty standard situation where I have a workspace listener:
> ResourcesPlugin.getWorkspace().addResourceChangeListener(
> listener, IResourceChangeEvent.POST_CHANGE);
>
> My questions is, are resource change events guaranteed to be notified
> to listeners right after a top-level workspace operation completes?
> The documentation states that if the operation is nested, the change
> events might be delayed, and that is fine. But is there a *guarantee*
> that when a top-level operation finishes, the change events effected
> within will be reported right after?
>
> There seems to be a situation in some tests code of mine where that is
> not happening. :S At first I thought the problem was somewhere else,
> or that I was misunderstanding what was happening, but after further
> debugging, it seems to be case of what I said above. Is it a bug?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03970 seconds