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

Bug 342994

Summary: @GroupUpdates on selection only seems to work on the first workbench window
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
Version: 4.1   
Target Milestone: 4.2 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
SelectionService patch v1
none
Patch none

Description Remy Suen CLA 2011-04-15 11:31:15 EDT
If I try to use @GroupUpdates to inject the active selection, it only ever seems to work on the first workbench window. If I spawn another workbench window that one's @GroupUpdates method does not get called.
Comment 1 Remy Suen CLA 2011-04-15 11:32:32 EDT
Created attachment 193384 [details]
SelectionService patch v1

1. Launch an inner with the patch applied to SelectionService (should apply cleanly to v1.20).
2. Select stuff in the 'Problems' view, both @Inject methods are being called.
3. Window > New Window
4. Repeat step 2 for this new workbench window. The @GroupUpdates method does not get called.
Comment 2 Oleg Besedin CLA 2011-06-16 17:47:08 EDT
Created attachment 198152 [details]
Patch

Seems to be a side effect of an uninject event for a different object on the same context.
Comment 3 Remy Suen CLA 2011-06-17 10:34:26 EDT
(In reply to comment #2)
> Seems to be a side effect of an uninject event for a different object on the
> same context.

It sounds like this bug would happen even for cases where @GroupUpdates is not used then, is this correct?
Comment 4 Oleg Besedin CLA 2011-06-17 10:56:31 EDT
(In reply to comment #3)
> It sounds like this bug would happen even for cases where @GroupUpdates is not
> used then, is this correct?

No, I don't think so. The problem is in setting "cachedEvent" type to null while, in reality, the event has not being processed. The "cachedEvent" is only used for grouped updates.
Comment 5 Oleg Besedin CLA 2011-06-24 09:48:03 EDT
Patch applied to CVS Head.