diff options
author | elaskavaia | 2016-10-18 13:19:03 +0000 |
---|---|---|
committer | Pascal Rapicault | 2016-10-31 00:46:42 +0000 |
commit | 0ad814300c6267a47d4552b3721a41d3048d5ba7 (patch) | |
tree | a6f4d038d360420cdb06b16af60e680753d6b6b2 | |
parent | b7027ff906f5af925fae03d5e0088c36ee16fc51 (diff) | |
download | rt.equinox.p2-0ad814300c6267a47d4552b3721a41d3048d5ba7.tar.gz rt.equinox.p2-0ad814300c6267a47d4552b3721a41d3048d5ba7.tar.xz rt.equinox.p2-0ad814300c6267a47d4552b3721a41d3048d5ba7.zip |
Bug 506142 - P2 properties dialogue unnecessary escapes & in text
control causing double &&
Change-Id: I8569368a520de2ce0b5d520ac4a6933d17455bf8
Signed-off-by: elaskavaia <elaskavaia.cdt@gmail.com>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java index 37f70c2c6..9be99dd25 100644 --- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java +++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/IUGeneralInfoPropertyPage.java @@ -111,13 +111,12 @@ public class IUGeneralInfoPropertyPage extends IUPropertyPage { } private void addField(Composite parent, String property, String value) { - if (value != null && value.length() > 0) { Label label = new Label(parent, SWT.NONE); label.setText(property); Text text = new Text(parent, SWT.WRAP | SWT.READ_ONLY); - text.setText(getEscapedString(value)); + text.setText(value); // Needed to get the right color on the Mac. // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=258112 text.setBackground(text.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); @@ -125,17 +124,4 @@ public class IUGeneralInfoPropertyPage extends IUPropertyPage { text.setLayoutData(gd); } } - - private String getEscapedString(String value) { - StringBuffer result = new StringBuffer(value.length() + 10); - for (int i = 0; i < value.length(); ++i) { - char c = value.charAt(i); - if ('&' == c) { - result.append("&&"); //$NON-NLS-1$ - } else { - result.append(c); - } - } - return result.toString(); - } } |