Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342992 - @GroupUpdates does not update when context sets are not done on a UI thread
Summary: @GroupUpdates does not update when context sets are not done on a UI thread
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.2 M1   Edit
Assignee: Oleg Besedin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 11:26 EDT by Remy Suen CLA
Modified: 2011-06-24 09:45 EDT (History)
2 users (show)

See Also:


Attachments
WorkbenchWindow patch v1 (2.97 KB, patch)
2011-04-15 11:27 EDT, Remy Suen CLA
no flags Details | Diff
Possible patch (1.57 KB, patch)
2011-06-17 09:32 EDT, Oleg Besedin CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.