Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-01-13 11:18:28 +0000
committerDani Megert2012-01-13 11:18:28 +0000
commitff9f8f3686f510c0a4a153225ebe8a5d4f092f9f (patch)
treecb211b736842440d9e389eb5909ea72c3aa8fff6
parentffc8144b38d604904081eaba5ed19ab3065646f3 (diff)
downloadeclipse.platform.text-ff9f8f3686f510c0a4a153225ebe8a5d4f092f9f.tar.gz
eclipse.platform.text-ff9f8f3686f510c0a4a153225ebe8a5d4f092f9f.tar.xz
eclipse.platform.text-ff9f8f3686f510c0a4a153225ebe8a5d4f092f9f.zip
Fixed bug 368474: [implementation] Find / Replace; Escape Regularv20120113-1118
Expression routine leaves out leading zero
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
index 4e46f245482..957ff7b48c2 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/FindReplaceDocumentAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -698,7 +698,10 @@ public class FindReplaceDocumentAdapter implements CharSequence {
default:
if (0 <= ch && ch < 0x20) {
pattern.append("\\x"); //$NON-NLS-1$
- pattern.append(Integer.toHexString(ch).toUpperCase());
+ String hexString= Integer.toHexString(ch).toUpperCase();
+ if (hexString.length() == 1)
+ pattern.append('0');
+ pattern.append(hexString);
} else {
pattern.append(ch);
}

Back to the top