| Summary: | [ViewMgmt] View menu is shown even if all of its items are invisible | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Nick Edgar <n.a.edgar> | ||||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||||
| Severity: | normal | ||||||||
| Priority: | P5 | CC: | bokowski, daniel_megert, douglas.pollock, hudsonr, markus.kell.r, pwebster | ||||||
| Version: | 3.0 | ||||||||
| Target Milestone: | 3.7 M6 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Nick Edgar
Still occurs in M2, except for the last two steps: the triangle no longer disappears. *** Bug 106570 has been marked as a duplicate of this bug. *** *** Bug 68242 has been marked as a duplicate of this bug. *** *** Bug 67145 has been marked as a duplicate of this bug. *** Remy is now responsible for watching the [ViewMgmt] category. Still broken on I20091208-0100.
May be a problem with the 'Outline' view itself. If I use the following code in a simple view the dropdown appears and disappears as expected.
IActionBars bars = getViewSite().getActionBars();
IMenuManager menuManager = bars.getMenuManager();
if (show) {
menuManager.add(action1);
menuManager.updateAll(true);
} else {
menuManager.removeAll();
menuManager.updateAll(true);
}
Hit a variant of this while testing I20100426-0852. 1. Open a Java file. The 'Outline' view is populated and the view menu is visible. 2. Open a build.properties file. The 'Outline' view is updated but the view menu is still there. Clicking on it does nothing. If you close them all and reopen the build.properties file, you will see that the 'Outline' view was not supposed to have a view menu. This seems to be because ViewPane's hasViewMenu() returns 'true'. Even when there are no editors showing, the menu manager still appears to have the lingering Java actions in it despite the fact that the editors have been closed. Created attachment 185257 [details]
ViewPane patch v1
Fix to more accurately calculate whether the view menu should be shown or not based on the visibility of the menu manager's items.
Created attachment 185259 [details]
ViewPane patch v2
Separators (and group markers) also need to be ignored. If separators aren't considered, then the 'Search' view will have a view menu after performing a 'Plug-in Search' even though clicking on the drop down won't actually show anything.
(In reply to comment #10) > Created attachment 185259 [details] > ViewPane patch v2 Patch released to HEAD with the copyright header tweaked to 2011. Verified with I20110307-2110 on Windows XP. |