diff options
| author | Eric Moffatt | 2013-04-05 18:52:58 +0000 |
|---|---|---|
| committer | Eric Moffatt | 2013-04-05 18:52:58 +0000 |
| commit | 9611c6e4bcdd5190d13a5b506402d002a5d890b3 (patch) | |
| tree | 36d1a09a0447a977cc4a67b9e63837a9b5b1f746 | |
| parent | f5392cb888caa6b0e52155bca9bb6fd01c29c01c (diff) | |
| download | eclipse.platform.ui-9611c6e4bcdd5190d13a5b506402d002a5d890b3.tar.gz eclipse.platform.ui-9611c6e4bcdd5190d13a5b506402d002a5d890b3.tar.xz eclipse.platform.ui-9611c6e4bcdd5190d13a5b506402d002a5d890b3.zip | |
Fix for Bug 401709 - Secondary Problems view doesn't have a view menu ->
not configurable (menus / TBs)
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java index 498795a1eff..a155504063e 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityView.java @@ -127,7 +127,13 @@ public class CompatibilityView extends CompatibilityPart { MMenu menu = getViewMenu(); if (menu == null) { menu = MenuFactoryImpl.eINSTANCE.createMenu(); - menu.setElementId(part.getElementId()); + + // If the id contains a ':' use the part before it as the descriptor + // id + String partId = part.getElementId(); + int colonIndex = partId.indexOf(':'); + String descId = colonIndex == -1 ? partId : partId.substring(0, colonIndex); + menu.setElementId(descId); menu.getTags().add(StackRenderer.TAG_VIEW_MENU); menu.getTags().add(ContributionsAnalyzer.MC_MENU); @@ -144,7 +150,14 @@ public class CompatibilityView extends CompatibilityPart { MToolBar toolbar = part.getToolbar(); if (toolbar == null) { toolbar = MenuFactoryImpl.eINSTANCE.createToolBar(); - toolbar.setElementId(part.getElementId()); + + // If the id contains a ':' use the part before it as the descriptor + // id + String partId = part.getElementId(); + int colonIndex = partId.indexOf(':'); + String descId = colonIndex == -1 ? partId : partId.substring(0, colonIndex); + toolbar.setElementId(descId); + part.setToolbar(toolbar); } apr = rendererFactory.getRenderer(toolbar, parent); |
