Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 113819 Details for
Bug 231304
[Contributions] Tooltip for Menu Contributions placed on toolbar: does not include keybinding sequence(inconsistency in migrating from ActionSets to MenuContributions)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch for the bug
Patch for Bug 231304.txt (text/plain), 4.25 KB, created by
Prakash Rangaraj
on 2008-09-29 18:29:27 EDT
(
hide
)
Description:
A patch for the bug
Filename:
MIME Type:
Creator:
Prakash Rangaraj
Created:
2008-09-29 18:29:27 EDT
Size:
4.25 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface >Index: src/org/eclipse/jface/action/ExternalActionManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface/src/org/eclipse/jface/action/ExternalActionManager.java,v >retrieving revision 1.27 >diff -u -r1.27 ExternalActionManager.java >--- src/org/eclipse/jface/action/ExternalActionManager.java 27 May 2008 18:24:04 -0000 1.27 >+++ src/org/eclipse/jface/action/ExternalActionManager.java 29 Sep 2008 22:27:20 -0000 >@@ -245,6 +245,7 @@ > ListenerList listeners = new ListenerList(ListenerList.IDENTITY); > listeners.add(existing); > listeners.add(listener); >+ registeredListeners.put(commandId, listeners); > } else { > registeredListeners.put(commandId, listener); > } >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java,v >retrieving revision 1.47 >diff -u -r1.47 CommandContributionItem.java >--- Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java 12 Sep 2008 19:54:44 -0000 1.47 >+++ Eclipse UI/org/eclipse/ui/menus/CommandContributionItem.java 29 Sep 2008 22:27:23 -0000 >@@ -21,6 +21,7 @@ > import org.eclipse.core.commands.ParameterizedCommand; > import org.eclipse.core.commands.common.NotDefinedException; > import org.eclipse.jface.action.ContributionItem; >+import org.eclipse.jface.action.ExternalActionManager; > import org.eclipse.jface.action.IContributionManager; > import org.eclipse.jface.action.IMenuListener; > import org.eclipse.jface.action.IMenuManager; >@@ -29,6 +30,8 @@ > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.resource.JFaceResources; > import org.eclipse.jface.resource.LocalResourceManager; >+import org.eclipse.jface.util.IPropertyChangeListener; >+import org.eclipse.jface.util.PropertyChangeEvent; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.widgets.Button; >@@ -141,6 +144,16 @@ > > private int mode = 0; > >+ private final IPropertyChangeListener textChangeListener = new IPropertyChangeListener() { >+ >+ /** >+ * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent) >+ */ >+ public void propertyChange(PropertyChangeEvent event) { >+ update(event.getProperty()); >+ } >+ }; >+ > /** > * This is <code>true</code> when the menu contribution's visibleWhen > * checkEnabled attribute is <code>true</code>. >@@ -399,6 +412,9 @@ > > update(null); > updateIcons(); >+ >+ addTextPropertyChangeListener(); >+ > } > > /* (non-Javadoc) >@@ -428,6 +444,23 @@ > > update(null); > updateIcons(); >+ >+ addTextPropertyChangeListener(); >+ >+ } >+ >+ private void addTextPropertyChangeListener() { >+ >+ if (command == null) { >+ return; >+ } >+ >+ ExternalActionManager.ICallback callback = ExternalActionManager >+ .getInstance().getCallback(); >+ >+ if ((callback != null) && (getId() != null)) { >+ callback.addPropertyChangeListener(getId(), textChangeListener); >+ } > } > > /* >@@ -460,6 +493,8 @@ > > update(null); > updateIcons(); >+ >+ addTextPropertyChangeListener(); > } > > /* >@@ -538,14 +573,27 @@ > item.setText(text); > } > >- if (tooltip != null) >- item.setToolTipText(tooltip); >- else { >- if (text != null) { >- item.setToolTipText(text); >+ String tooltipText = tooltip; >+ if (tooltip == null) >+ if (text != null) >+ tooltipText = text; >+ else >+ tooltipText = ""; //$NON-NLS-1$ >+ >+ TriggerSequence activeBinding = bindingService >+ .getBestActiveBindingFor(command); >+ if (activeBinding != null && !activeBinding.isEmpty()) { >+ String acceleratorText = activeBinding.format(); >+ if (acceleratorText != null >+ && acceleratorText.length() != 0) { >+ tooltipText = JFaceResources.format( >+ "Toolbar_Tooltip_Accelerator", //$NON-NLS-1$ >+ new Object[] { tooltipText, acceleratorText }); > } > } > >+ item.setToolTipText(tooltipText); >+ > if (item.getSelection() != checkedState) { > item.setSelection(checkedState); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231304
:
112126
|
113819
|
114173
|
114290
|
114330
|
114419
|
114510
|
115137