| Summary: | Focus not given to the view when view drop down selected | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | John Ross <jwross> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | curtis.windatt.public, emoffatt, Michael_Rennie, pwebster |
| Version: | 4.3 | ||
| Target Milestone: | 4.3 M7 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=376011 | ||
| Whiteboard: | |||
|
Description
John Ross
Reproduced in Windows 7 I20130416-0800. Give focus to the editor then try to configure contents of problems view: Nothing happens Give focus to the view and try again: Dialog opens fine I would expect clicking on the view menu would give focus the same way right clicking on the view to open the context menu does. Eric, I thought we fixed this with bug 376011 comment #30 We need to test this tomorrow. PW (In reply to comment #2) > Eric, I thought we fixed this with bug 376011 comment #30 > > We need to test this tomorrow. > > PW I can't get that listener to run no matter where/when I click. Whenever the tab folder is activated, the event detail is still 0. Not sure if this indicates a problem in the SWT part of that fix. That being said this problem is independant of the ctabfolder. The view is never activated when a toolbar item is pressed (both buttons and the view drop down menu). If maximize is pressed the view does activate. Since we create the menu (not the model), we can add a selection listener to activate the stack before showing the menu. In org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showMenuButton(MPart, CTabFolder, MMenu) add the following the the tool item's selection listener before showMenu() MElementContainer<MUIElement> stack = (MElementContainer<MUIElement>) ctf .getData(OWNING_ME); activateStack(stack); We should be using a SelectionAdapter here as well to avoid duplicating the code. Just tried this on my Windows 7 system and selecting the drop down i correctly activating the view. Note that you'll have to be running on a very recent build since the fix went in on 2013-04-05, I'm using 4.3.0.N20130410-2000 Curtis, which build are you using ? Note that the fix requires a supporting fix from SWT so just running an inner with the platform's latest code won't help unless you have a build with the SWT fix. (In reply to comment #4) > Curtis, which build are you using ? Note that the fix requires a supporting > fix from SWT so just running an inner with the platform's latest code won't > help unless you have a build with the SWT fix. (In reply to comment #1) > Reproduced in Windows 7 I20130416-0800. I can reproduce in a target or in my host. Unless the SWT fix wasn't included in the I build, there is still an issue here. If you put a breakpoint in the activation listener line 994 in StackRender, is the event.detail ever equals to MouseDown? Even ignoring that, clicking on the view drop down or another view toolbar action does not fire an activate event on the cTabFolder at all. Curtis, not sure what's going on...I just tried 4.3.0.I20130416-0800 myself and don't see the problem. I'm not running an inner, just using eclipse. If I have focus on the Package Explorer and click the drop down arrow for the Problems view it activates and selecting 'Configure Contents...' will bring up the dialog. Is there any chance that you have SWT in the workspace you're launching from ? (In reply to comment #6) > Curtis, not sure what's going on...I just tried 4.3.0.I20130416-0800 myself > and don't see the problem. I'm not running an inner, just using eclipse. If > I have focus on the Package Explorer and click the drop down arrow for the > Problems view it activates and selecting 'Configure Contents...' will bring > up the dialog. > > Is there any chance that you have SWT in the workspace you're launching from > ? Just tested on 4.3.0 I20130416-0800 and the problem is easily reproducible. Steps I tried: 1. select a project in the package explorer 2. select the view menu in the problems view and try to configure - nothing happens 3. select a problem in the problems view 4. select the view menu in the problems view and try configure - the settings dialog shows up
Wow, this is strange...usually it's my machine that's the one that it fails on and everybody else works...;-).
Both Paul (Linux) and I (Win7) have tried this with last night's nightly and it's working for us...
If you open StackRenderer at line 958 you should be seeing a check like this:
if (event.detail == SWT.MouseDown) { ...
If that's there then the remaining possibility is that this also needs an SWT fix to supply the correct event.detail information. This should be in the build but perhaps you're overriding it somehow ?
(In reply to comment #8) > Wow, this is strange...usually it's my machine that's the one that it fails > on and everybody else works...;-). > > Both Paul (Linux) and I (Win7) have tried this with last night's nightly and > it's working for us... > > If you open StackRenderer at line 958 you should be seeing a check like this: > > if (event.detail == SWT.MouseDown) { ... > > If that's there then the remaining possibility is that this also needs an > SWT fix to supply the correct event.detail information. This should be in > the build but perhaps you're overriding it somehow ? As noted in comment #3 that listener always had event.detail == 0. However, trying on a freshly downloaded N20130421-2000 build, the activation is happening correctly, both for menus and toolbar items. So perhaps the SWT fix was missing from I20130416. Will have to verify in the next I build. Yes, comment #3 seems to indicate that the SWT part of the fix wasn't there. Basically that fix was to *set* the event.detail to SWT.MouseDown (i.e. != 0) if the Activate event was triggered by a mouse click. OK, we should likely all check this tomorrow. BTW, how do you get you builds; full copy / download or through updates ? I'm wondering whether there may be an issue with the SWT change not being picked up when using the update site (perhaps they haven't up-revved?). (In reply to comment #10) > OK, we should likely all check this tomorrow. > > BTW, how do you get you builds; full copy / download or through updates ? > I'm wondering whether there may be an issue with the SWT change not being > picked up when using the update site (perhaps they haven't up-revved?). Verified that this is working in I20130423-0800. Closing as WORKSFORME. Typically I update my builds, though I will occasionally download an N build either for testing directly or use as a target platform. Curtis, just to be safe we should check this next week with the M7 candidate. If you could upgrade from some earlier version (i.e. one from before the SWT change) and I just pick up the ZIP we should be able to cover both cases. It's actually more likely that there is / was an issue in the update site anyways... Verified in I20130430-2000. |