diff options
| author | Stephan Wahlbrink | 2013-03-17 16:43:57 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2013-03-18 17:08:02 +0000 |
| commit | 649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853 (patch) | |
| tree | 1b55136d5f3f00a34c71f82f272c70fd43999ddc | |
| parent | fcb702818ec1dee00c5af2fe745e30355e039dc0 (diff) | |
| download | eclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.tar.gz eclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.tar.xz eclipse.platform.ui-649adf35b5190b6c3dd8e2bde1b4b0ce0dc88853.zip | |
bug 403235 - CommandContributionItem have to restore contributed tooltipN20130318-2000I20130319-1000
when handler changes
Change-Id: Ic9f692b96b8c3d9693363220d27c6956f26f47fb
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java | 6 |
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 f9469357b57..a7091f5f2b7 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; } |
