summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMarco Descher2013-04-13 06:50:20 (EDT)
committer Marco Descher2013-04-15 13:31:54 (EDT)
commit3a4f5ff85b6b22a0cc0840ff539a4d0219f10b0c (patch)
tree60f81ca7b4821446dfe933cd830cbe2652cc3d3f
parent00fc1245477acbf03d077c85a06be65e4b304572 (diff)
downloadeclipse.platform.ui-3a4f5ff85b6b22a0cc0840ff539a4d0219f10b0c.zip
eclipse.platform.ui-3a4f5ff85b6b22a0cc0840ff539a4d0219f10b0c.tar.gz
eclipse.platform.ui-3a4f5ff85b6b22a0cc0840ff539a4d0219f10b0c.tar.bz2
Bug 405471 - Incorrect handling of MMenu contribution inI20130416-0800refs/changes/80/11880/2
DynamicMenuContribution Change-Id: I87afc4aae5b95e19ec6d8d46513da52c7150de63
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java
index 12e4960..8e7cfe6 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java
@@ -7,7 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Marco Descher <marco@descher.at> - Bug 389063, Bug 398865, Bug 398866
+ * Marco Descher <marco@descher.at> - Bug 389063, Bug 398865, Bug 398866, Bug 405471
*******************************************************************************/
package org.eclipse.e4.ui.workbench.renderers.swt;
@@ -989,8 +989,14 @@ public class MenuManagerRenderer extends SWTPartRenderer {
removeMenuContributions(menuModel, dump);
for (MMenuElement mMenuElement : dump) {
IContributionItem ici = getContribution(mMenuElement);
+ if (ici == null && mMenuElement instanceof MMenu) {
+ MMenu menuElement = (MMenu) mMenuElement;
+ ici = getManager(menuElement);
+ clearModelToManager(menuElement, (MenuManager) ici);
+ } else {
+ clearModelToContribution(menuModel, ici);
+ }
menuManager.remove(ici);
- clearModelToContribution(menuModel, ici);
}
}
}