diff options
author | Dean Roberts | 2011-10-13 17:51:54 +0000 |
---|---|---|
committer | Oleg Besedin | 2011-10-13 17:51:54 +0000 |
commit | 8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb (patch) | |
tree | ff49929afc1b65683840589683b8f8b1901282e2 | |
parent | 88406581bce09ddb99184fc0755a13c172bcd795 (diff) | |
download | eclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.tar.gz eclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.tar.xz eclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.zip |
Bug 358788 - [PerspectiveBar] Perspective switcher renders text after a
save even if the text rendering has been disabled
2 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java index 59823bd5de4..5a97d8d8bac 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java @@ -196,7 +196,9 @@ public class PerspectiveSwitcher { } private void updateToolItem(ToolItem ti, String attName, Object newValue) { - if (UIEvents.UILabel.LABEL.equals(attName)) { + boolean showText = PrefUtil.getAPIPreferenceStore().getBoolean( + IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR); + if (showText && UIEvents.UILabel.LABEL.equals(attName)) { String newName = (String) newValue; ti.setText(newName); } else if (UIEvents.UILabel.TOOLTIP.equals(attName)) { diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java index efc71cca4b3..230480ab323 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java @@ -3172,6 +3172,7 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements sortedPerspectives.add(perspective); visiblePerspective.setLabel(perspective.getLabel()); + visiblePerspective.setTooltip(perspective.getLabel()); visiblePerspective.setElementId(perspective.getId()); modelService.cloneElement(visiblePerspective, application); if (perspective instanceof PerspectiveDescriptor) { |