| Summary: | [Compatibility] Context help in 'Help' view is stale | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Chris Goldthorpe <cgold> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | emoffatt, pwebster, remy.suen | ||||
| Version: | 1.0 | ||||||
| Target Milestone: | 4.1 M6 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Chris Goldthorpe
Parts which use an IContextProvider seem to work fine, the problem occurs for all other parts. The HelpView class is listening for part activation events, when it gets one and there is no IContextProvider the code below is used to determine which control in the view being switched to is has focus.
Display display = part.getSite().getShell().getDisplay();
Control c = display.getFocusControl();
In Eclipse 3.7 display.getFocusControl() returns the control that has focus after the part activation, in Eclipse 4.1 it returns the control that had focus before the part activation.
This seems to be primarily noticeable if I switch between views in the same stack. If I click on different stacks it does not appear to occur. Created attachment 188149 [details]
EPartService patch v1
Activation events were being fired before the part was granted focus. This patch delays the activation notification so that the part will get focus first.
(In reply to comment #3) > Activation events were being fired before the part was granted focus. This > patch delays the activation notification so that the part will get focus first. Initially I was concerned that the active part wouldn't match the part that got its focus method called...but that actually seems to be the case in 3.x. I suppose I can buy that it's not technically active until focus has been granted and the method has returned. (In reply to comment #3) > Created attachment 188149 [details] > EPartService patch v1 Patch released to HEAD. It's early in M6 so we should have plenty of time to gauge the severity of this change. Thanks for the bug report, Chris! Verified in I20110204-0715. |