Summary: | [Contributions] Menu manager is enabled even when empty. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Dave Steinberg <davidms> | ||||||
Component: | UI | Assignee: | Simon Arsenault <simon_arsenault> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | csalter, turnham | ||||||
Version: | 2.1 | ||||||||
Target Milestone: | 2.1.1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 2000 | ||||||||
Whiteboard: | |||||||||
Bug Depends on: | 30833 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Dave Steinberg
2003-03-13 16:28:03 EST
Created attachment 4123 [details]
Empty menu behaviour in 2.0
Under Eclipse 2.0, "New Sibling", which contains no items, is disabled.
Created attachment 4124 [details]
Empty menu behaviour in 2.1
Under Eclipse 2.1, "New Sibling" is enabled. Because it has no items in it, no
sub-menu pops up.
Simon, please check that this is in fact a regression. It's not an "unknown" regression... The code to disable the menu item of a sub- menu has been removed for 2.1 because it caused more problems than it solved. For example, when the sub-menu needs to be populated on menuAboutToShow event, if the menu item is disabled, the sub-menu will never be given the chance to populate again. See bug 30833 for a list of bugs related to this problem. See also bug 27019 which is a very much the same as this one. Is there any work-around you could suggest, other than ensuring that all sub-menus always contain at least one item? For example, is there any way that I could explicitly disable the menu myself? As it stands, all EMF.Edit-generated editors are "broken" in this respect. I can't think of any workaround at the moment. Unfortunately, with 2.1 release date just days away, I do not have sufficient time to look more into this. Can someone clarify? Is this a problem that will be fixed in eclipse, or is this an intentional behaviour change that we need to react to? It is a known problem. I think Craig's question is if this well be fixed in 2.1.1. We are working on a product that will be based on 2.1.1 and nearing our code shutdown, so we need to know if Craig should workaround this problem or expect a fix. No plans to fix this for 2.1.1 If that changes, you will see the target milestone field change to reflect this. Please investigate a fix or workaround for 2.1.1. If the context menu is repopulated entirely each time it is popped up, then the problem mentioned in comment #4 does not matter. It would be a problem if there was a dynamically populated submenu in a non-dynamic context menu. For context menus, I'm comfortable with imposing a limitation whereby if there is a dynamically populated submenu, then the context menu must be dynamic as well. However, this also has to work with main menus. A potential fix for this problem has been released in the 2.1.1 stream and will be part of the next 2.1.1 build (next week I'm told). I've also updated the HEAD stream with the same changes. |