Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/CoolBarToTrimManager.java')
-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 fc8ce60885d..9348fa1c87f 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();

Back to the top