Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2017-06-13 04:11:12 -0400
committerLars Vogel2017-06-13 04:11:12 -0400
commit941655d6b1b3144ca2df6f2ff9352ded3ce9c8ff (patch)
treed07fe0ddffe4190856fd213b838c498eb94d7960
parenta7f6ec37f4889b1fc268d7331b11275c82583b9c (diff)
downloadeclipse.platform.text-941655d6b1b3144ca2df6f2ff9352ded3ce9c8ff.tar.gz
eclipse.platform.text-941655d6b1b3144ca2df6f2ff9352ded3ce9c8ff.tar.xz
eclipse.platform.text-941655d6b1b3144ca2df6f2ff9352ded3ce9c8ff.zip
Bug 516535 - Replace StringBuffer with StringBuilder in
org.eclipse.ui.workbench.texteditor Change-Id: I19138d70a9ecc170b0d63a99ed9b5f950967deb4 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java8
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/JoinLinesAction.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
index b5e4596cf..10dc9621e 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/HippieCompletionEngine.java
@@ -105,7 +105,7 @@ public final class HippieCompletionEngine {
* @return the string converted to a regex pattern
*/
private String asRegPattern(CharSequence string) {
- StringBuffer out= new StringBuffer(string.length());
+ StringBuilder out= new StringBuilder(string.length());
boolean quoting= false;
for (int i= 0, length= string.length(); i < length; i++) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
index bbb1cd237..ef0d3f156 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindTarget.java
@@ -89,7 +89,7 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
/** The find replace target to delegate find requests */
private final IFindReplaceTarget fTarget;
/** The current find string */
- private StringBuffer fFindString= new StringBuffer();
+ private StringBuilder fFindString= new StringBuilder();
/** The position of the first upper case character, -1 if none */
private int fCasePosition;
/**
@@ -193,7 +193,7 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
text.setSelectionRange(searchResult.selection, searchResult.length);
text.showSelection();
- // relies on the contents of the StringBuffer
+ // relies on the contents of the StringBuilder
fFindString.setLength(searchResult.findLength);
fCurrentIndex= searchResult.index;
fFound= searchResult.found;
@@ -503,7 +503,7 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
*/
private boolean repeatSearch(boolean forward) {
if (fFindString.length() == 0) {
- fFindString= new StringBuffer(fPrevFindString);
+ fFindString= new StringBuilder(fPrevFindString);
fCasePosition= fPrevCasePosition;
}
@@ -718,7 +718,7 @@ class IncrementalFindTarget implements IFindReplaceTarget, IFindReplaceTargetExt
* @return the given string with all tab characters replace with a proper status line presentation
*/
private String escapeTabs(String string) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
int begin= 0;
int end= string.indexOf('\t', begin);
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/JoinLinesAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/JoinLinesAction.java
index df2f8e82d..548a13c52 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/JoinLinesAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/JoinLinesAction.java
@@ -149,7 +149,7 @@ public class JoinLinesAction extends TextEditorAction {
if (startLine == endLine)
endLine++; // append join with the next line
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
for (int line= startLine; line <= endLine; line++) {
buffer.append(trim(document, line, line == startLine));
if (line != endLine)

Back to the top