Community
Participate
Working Groups
For 3.4, DeferredTreeContentManager introduces an addUpdateCompleteListener(...) method. (per bug #215734). However it is really operating as a setUpdateCompleteListener(...) method. You can't add multiple listeners. It will simply replace the listener each time. I think it should be changed to add listeners to a listener list, although it's possible this could break clients who inadvertantly added the listener multiple times. I got bitten by this while trying to implement a strategy for knowing when a particular model element was done fetching. I had hoped to use this listener for that purpose by adding one for each fetch, but of course this caused timing problems...only the most recently added listener was called regardless of which fetch had completed.
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Targetting for 3.6
Created attachment 146086 [details] Patch v01 Attaching patch. Susan, Do you have any comments on the patch?
Created attachment 146773 [details] patch v02 Replacement patch
The patch looks good. I attached a replacement patch to handle a couple of things: - fleshed out the javadoc to describe the update job listener in a little more detail. Also included the standard "has no effect" verbage for adding the same listener twice, removing a listener that was never added, etc. - Since the removeUpdateListener is a new method for 3.6, I found it a bit odd that there was compatibility code in there. Instead, I moved all the relevant checking into the addUpdateListener method, since that is the method whose semantics are changing. p2 never used this listener because of the original problem. This will allow us to consider using it again. Since PDE requested this listener in the first place, I've cc'ed Curtis and Darin to comment on whether this change could break PDE in any way. (Not sure if PDE still uses this or not since they have their own asynch viewer stuff). We should make sure they are ok with it before it goes in (esp if it is to go into M2).
Haven't seen any issues with PDE plugins view in my testing. Patch v02 released to HEAD
Verified in I20090914-1800