Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Resource change event not firing
Resource change event not firing [message #323884] Fri, 11 January 2008 00:57 Go to next message
Eclipse UserFriend
Greetings,

I am tracking an issue where it appears that a resource change event is
not firing on certain workspace operations, particularly IFile.delete().
I have narrowed the issue and reproduce the problem fairly reliably in a
recent build (Note: the issue is also occuring on the WTP build server, so
I know it's not localized phenomenon). Characteristics are:

1) The problem is reliably reproducible if it has be faceted as a Dynamic
Web Project (Web Tools Project). This a Java natured IProject with
enhancements.

2) The problem is spurious, perhaps pointing to threading issue. Out of
some 50 JUnit attempts to create a new IFile and then delete it, on
average only about 5-10 fail to fire events for both the creation and
deletion of the file. Other events such as those caused by creating and
opening the project and changing the IProjectDescription seem to fire
(although as I think about it, I haven't checked if they ever fail to
fire).

3) I have added both Thread.sleep and touch calls at the end of the test
loop to see if doing so somehow "flushes" the missing events out but have
had no success.

The problem has started to surface since 3.4 builds have been introduced
and have started to become more common.

Does anyone have any ideas why these events might not fire as normal
course? Are there known issues with the framework (I can't find any open
bugs)? Any tools or ideas as to how to try and narrow down the source of
the problem?


--Cam
Re: Resource change event not firing [message #324001 is a reply to message #323884] Tue, 15 January 2008 23:14 Go to previous messageGo to next message
Eclipse UserFriend
Any ideas on this?
Re: Resource change event not firing [message #324009 is a reply to message #323884] Wed, 16 January 2008 06:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Cameron,

Unfortunately the fact that needing to have a faceted dynamic web
project is part of reproducing the problem is likely to indicate to the
platform folks that the faceted dynamic web project itself is somehow
causing the problem. Looking at the code that fires the notification,
even exceptions thrown by a listener will not interrupt the other
listeners, so that can't be the cause of the problem. I suppose what
I'd do is step through the code involved in a file's delete in the
debugger for a normal path of execution and then add print statements so
that when things fail, I'd have a sense of where the buggy path of
execution strayed from the normal path of execution, and use that to
sift through the haystack... (A magnet is a great way to find a needle
in a haystack, if only we had a magnet.)


Cameron Bateman wrote:
> Greetings,
>
> I am tracking an issue where it appears that a resource change event
> is not firing on certain workspace operations, particularly
> IFile.delete(). I have narrowed the issue and reproduce the problem
> fairly reliably in a recent build (Note: the issue is also occuring on
> the WTP build server, so I know it's not localized phenomenon).
> Characteristics are:
>
> 1) The problem is reliably reproducible if it has be faceted as a
> Dynamic Web Project (Web Tools Project). This a Java natured IProject
> with enhancements.
>
> 2) The problem is spurious, perhaps pointing to threading issue. Out
> of some 50 JUnit attempts to create a new IFile and then delete it, on
> average only about 5-10 fail to fire events for both the creation and
> deletion of the file. Other events such as those caused by creating
> and opening the project and changing the IProjectDescription seem to
> fire (although as I think about it, I haven't checked if they ever
> fail to fire).
>
> 3) I have added both Thread.sleep and touch calls at the end of the
> test loop to see if doing so somehow "flushes" the missing events out
> but have had no success.
>
> The problem has started to surface since 3.4 builds have been
> introduced and have started to become more common.
>
> Does anyone have any ideas why these events might not fire as normal
> course? Are there known issues with the framework (I can't find any
> open bugs)? Any tools or ideas as to how to try and narrow down the
> source of the problem?
>
>
> --Cam
>
Re: Resource change event not firing [message #324149 is a reply to message #324009] Thu, 17 January 2008 18:22 Go to previous message
Eclipse UserFriend
Thanks Ed. I have already spent around 4 days of effort doing some of
what you propose. I was hoping that there may be hints around either
debugging (i.e. some best practice or tracing tools that already exists)
it or if others had seen similar issues with dynamic web projects etc.
I'll ask on WTP newsgroup.

I guess the one thing you suggested that I haven't tried is to import the
platform plugin in as source and edit that code with my own trace
statements.


--Cam

Ed Merks wrote:

> Cameron,

> Unfortunately the fact that needing to have a faceted dynamic web
> project is part of reproducing the problem is likely to indicate to the
> platform folks that the faceted dynamic web project itself is somehow
> causing the problem. Looking at the code that fires the notification,
> even exceptions thrown by a listener will not interrupt the other
> listeners, so that can't be the cause of the problem. I suppose what
> I'd do is step through the code involved in a file's delete in the
> debugger for a normal path of execution and then add print statements so
> that when things fail, I'd have a sense of where the buggy path of
> execution strayed from the normal path of execution, and use that to
> sift through the haystack... (A magnet is a great way to find a needle
> in a haystack, if only we had a magnet.)
Previous Topic:Smart typing in editor
Next Topic:Custom Widgets in Eclipse?
Goto Forum:
  


Current Time: Tue Jul 15 04:49:06 EDT 2025

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

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

Back to the top