summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDean Roberts2011-10-13 13:51:54 (EDT)
committer Oleg Besedin2011-10-13 13:51:54 (EDT)
commit8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb (patch)
treeff49929afc1b65683840589683b8f8b1901282e2
parent88406581bce09ddb99184fc0755a13c172bcd795 (diff)
downloadeclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.zip
eclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.tar.gz
eclipse.platform.ui-8cceb01b013ce4fec78ad8a5c5e6fb4decf094fb.tar.bz2
Bug 358788 - [PerspectiveBar] Perspective switcher renders text after a
save even if the text rendering has been disabled
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java4
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java1
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 59823bd..5a97d8d 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 efc71cc..230480a 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) {