aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Wahlbrink2013-03-17 12:43:57 (EDT)
committerGerrit Code Review @ Eclipse.org2013-03-18 13:08:02 (EDT)
commit649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853 (patch)
tree1b55136d5f3f00a34c71f82f272c70fd43999ddc
parentfcb702818ec1dee00c5af2fe745e30355e039dc0 (diff)
downloadeclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.zip
eclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.tar.gz
eclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.tar.bz2
bug 403235 - CommandContributionItem have to restore contributed tooltipN20130318-2000I20130319-1000refs/changes/54/11254/2
when handler changes Change-Id: Ic9f692b96b8c3d9693363220d27c6956f26f47fb
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
index f946935..a7091f5 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java
@@ -164,6 +164,8 @@ public class CommandContributionItem extends ContributionItem {
// items contributed
private String contributedLabel;
+ private String contributedTooltip;
+
private ImageDescriptor contributedIcon;
private ImageDescriptor contributedDisabledIcon;
@@ -184,6 +186,7 @@ public class CommandContributionItem extends ContributionItem {
super(contributionParameters.id);
contributedLabel = contributionParameters.label;
+ contributedTooltip = contributionParameters.tooltip;
contributedIcon = contributionParameters.icon;
contributedDisabledIcon = contributionParameters.disabledIcon;
contributedHoverIcon = contributionParameters.hoverIcon;
@@ -332,6 +335,7 @@ public class CommandContributionItem extends ContributionItem {
IHandler handler = commandEvent.getCommand().getHandler();
if (shouldRestoreAppearance(handler)) {
label = contributedLabel;
+ tooltip = contributedTooltip;
icon = contributedIcon;
disabledIcon = contributedDisabledIcon;
hoverIcon = contributedHoverIcon;
@@ -1031,9 +1035,9 @@ public class CommandContributionItem extends ContributionItem {
data.disabledIcon = contributedDisabledIcon;
data.hoverIcon = contributedHoverIcon;
data.label = contributedLabel;
+ data.tooltip = contributedTooltip;
data.helpContextId = helpContextId;
data.mnemonic = mnemonic;
- data.tooltip = tooltip;
return data;
}