aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime PORHEL2014-03-13 14:15:51 (EDT)
committerPaul Webster2014-04-01 10:40:09 (EDT)
commit85bd30aaaf10bdc4caa47f449eacb635aa6264e5 (patch)
tree1e8ae0e06cb5e9d809f865c9dbbf14537752f8a5
parent833920011392b47b0fe0629164e3c19d3ade3064 (diff)
downloadeclipse.platform.ui-85bd30aaaf10bdc4caa47f449eacb635aa6264e5.zip
eclipse.platform.ui-85bd30aaaf10bdc4caa47f449eacb635aa6264e5.tar.gz
eclipse.platform.ui-85bd30aaaf10bdc4caa47f449eacb635aa6264e5.tar.bz2
Bug 430116 - Wrong action bar populationrefs/changes/47/23347/6
IMenuManager children should not be added to the menu manage parent toolbar. Change-Id: I4b77eabef0ba6f2575a1564a2b47de04f1e2e29a Signed-off-by: Maxime PORHEL <maxime.porhel@obeo.fr>
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java
index a4a67da..c04737e 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Maxime Porhel <maxime.porhel@obeo.fr> Obeo - Bug 430116
******************************************************************************/
package org.eclipse.ui.internal;
@@ -551,6 +552,10 @@ public class CoolBarToTrimManager extends ContributionManager implements ICoolBa
//new Exception("fill(MToolBar container, IContributionManager manager) with " //$NON-NLS-1$
// + item + " to " + manager2).printStackTrace(); //$NON-NLS-1$
fill(container, manager2);
+ } else if (item instanceof IMenuManager) {
+ // No element to add in toolbar:
+ // let the menu manager control its contributions.
+ continue;
} else if (item instanceof IContributionManager) {
// new Exception(
// "fill(MToolBar container, IContributionManager manager) with rogue contribution manager: " //$NON-NLS-1$
@@ -570,6 +575,7 @@ public class CoolBarToTrimManager extends ContributionManager implements ICoolBa
if (item instanceof AbstractGroupMarker) {
toolItem.setVisible(item.isVisible());
}
+ // make sure the renderer knows this has already been processed
renderer.linkModelToContribution(toolItem, item);
container.getChildren().add(toolItem);
}