summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDaniel Rolka2013-11-28 07:06:10 (EST)
committer Gerrit Code Review @ Eclipse.org2013-11-29 16:01:57 (EST)
commitd5c198410b5bb2692f3037c9fd3b5876935d5385 (patch)
tree875ad786a834936a926b835916027dae0051adba
parenta3c710b567f2280cccd2a8532173e1552f79e9bf (diff)
downloadeclipse.platform.ui-d5c198410b5bb2692f3037c9fd3b5876935d5385.zip
eclipse.platform.ui-d5c198410b5bb2692f3037c9fd3b5876935d5385.tar.gz
eclipse.platform.ui-d5c198410b5bb2692f3037c9fd3b5876935d5385.tar.bz2
Bug 418859 - [Contributions] Menu bar not displayed refs/changes/71/18971/5
Change-Id: I297f7ba9f770d4a15438f1b9ef065ce00c9ac775 Signed-off-by: Daniel Rolka <daniel.rolka@pl.ibm.com>
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java4
1 files changed, 3 insertions, 1 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 fc8ce60..9348fa1 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
@@ -167,7 +167,9 @@ public class CoolBarToTrimManager extends ContributionManager implements ICoolBa
separator.setToBeRendered(false);
separator.setElementId(item.getId());
- MToolBar toolBar = (MToolBar) modelService.find(item.getId(), window);
+ List<MToolBar> toolbars = modelService.findElements(window, item.getId(),
+ MToolBar.class, null);
+ MToolBar toolBar = toolbars.isEmpty() ? null : toolbars.get(0);
boolean tbFound = toolBar != null;
if (!tbFound) {
toolBar = MenuFactoryImpl.eINSTANCE.createToolBar();