Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342992

Summary: @GroupUpdates does not update when context sets are not done on a UI thread
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: RuntimeAssignee: Oleg Besedin <ob1.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse, pwebster
Version: 4.1   
Target Milestone: 4.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
WorkbenchWindow patch v1
none
Possible patch none

Description Remy Suen CLA 2011-04-15 11:26:07 EDT
When I set some stuff into a window's context from a job, my consumer object is reinjected with values for one method but not with the method that I have annotated with the @GroupUpdates annotation.
Comment 1 Remy Suen CLA 2011-04-15 11:27:28 EDT
Created attachment 193383 [details]
WorkbenchWindow patch v1

This patch will apply onto WorkbenchWindow v1.91.

Just launch an inner and then you will see that the @GroupUpdates print statement is only ever printed once.
Comment 2 Oleg Besedin CLA 2011-06-17 09:32:00 EDT
Created attachment 198177 [details]
Possible patch

I am unable to duplicate using code from Head / RC4. Windows 7, 64 bit stack.

Remy, could you try to see if you can reproduce this?

The patch fixes one place in EclipseContext that is not thread safe.
Comment 3 Remy Suen CLA 2011-06-17 09:50:06 EDT
(In reply to comment #2)
> I am unable to duplicate using code from Head / RC4. Windows 7, 64 bit stack.
> 
> Remy, could you try to see if you can reproduce this?

I seem to be getting seeing identical print statements also. Thanks for checking, Oleg. It is up to you whether you want to go ahead and deliver the patch anyway or not, doesn't matter to me right now.

Feel free to close as WORKSFORME if you wish, thanks.
Comment 4 Oleg Besedin CLA 2011-06-24 09:45:34 EDT
I'll apply the patch to be on the safe side. 

Overall, the injection is not [yet] expected to be thread-safe. Let's say some parts are better then others :-). I'd like to take a pass through the code to fix obvious issues in one of the early 4.2 milestones.