Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2006-07-05 12:32:40 +0000
committerDani Megert2006-07-05 12:32:40 +0000
commit5a2861aa1a15e5aeeb8fd7fcd8da17186a66d3e6 (patch)
treef184d6fef2cf08c43ae9047c2f5fd6dc2b3af993
parentb22a3e912b4dafd26055928190489f04ea1aacb4 (diff)
downloadeclipse.platform.text-5a2861aa1a15e5aeeb8fd7fcd8da17186a66d3e6.tar.gz
eclipse.platform.text-5a2861aa1a15e5aeeb8fd7fcd8da17186a66d3e6.tar.xz
eclipse.platform.text-5a2861aa1a15e5aeeb8fd7fcd8da17186a66d3e6.zip
Backported bug 144747 to 3.2.1
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java12
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java22
2 files changed, 5 insertions, 29 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
index d47614239..41203d202 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
@@ -50,6 +50,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.jface.action.LegacyActionTools;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.IPageChangeProvider;
@@ -265,15 +266,8 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
final ArrayList createdImages= new ArrayList(input.size());
ILabelProvider labelProvider= new LabelProvider() {
public String getText(Object element) {
- if (element instanceof SearchPageDescriptor) {
- String label= ((SearchPageDescriptor)element).getLabel();
- int i= label.indexOf('&');
- while (i >= 0) {
- label= label.substring(0, i) + label.substring(i+1);
- i= label.indexOf('&');
- }
- return label;
- }
+ if (element instanceof SearchPageDescriptor)
+ return LegacyActionTools.removeMnemonics(((SearchPageDescriptor)element).getLabel());
return null;
}
public Image getImage(Object element) {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
index dbda358e1..8c86cbc12 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/QuickDiffConfigurationBlock.java
@@ -29,6 +29,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.jface.action.LegacyActionTools;
import org.eclipse.jface.preference.ColorSelector;
import org.eclipse.jface.preference.PreferenceConverter;
@@ -141,26 +142,7 @@ class QuickDiffConfigurationBlock implements IPreferenceConfigurationBlock {
ArrayList listModelItems= new ArrayList();
for (Iterator it= descriptors.iterator(); it.hasNext();) {
ReferenceProviderDescriptor descriptor= (ReferenceProviderDescriptor) it.next();
- String label= descriptor.getLabel();
- int i, j=-1;
- i= label.indexOf("(&"); //$NON-NLS-1$
- if (i >= 0)
- j = label.indexOf(')',i);
- while (i >= 0 && j >= 0) {
- label= label.substring(0, i) + label.substring(j+1);
- i= label.indexOf("(&"); //$NON-NLS-1$
- if(i >= 0)
- j = label.indexOf(')',i);
- }
-
- i= label.indexOf('&');
- while (i >= 0) {
- if (i < label.length())
- label= label.substring(0, i) + label.substring(i+1);
- else
- label= label.substring(0, i);
- i= label.indexOf('&');
- }
+ String label= LegacyActionTools.removeMnemonics(descriptor.getLabel());
listModelItems.add(new String[] { descriptor.getId(), label });
}
String[][] items= new String[listModelItems.size()][];

Back to the top