Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java8
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLTextPresenter.java6
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultIndentLineAutoEditStrategy.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java10
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TabsToSpacesConverter.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java4
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java12
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordPatternRule.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java6
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java2
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java4
20 files changed, 41 insertions, 41 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java b/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java
index b5b6d35b2..1ea641fcd 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java
@@ -238,7 +238,7 @@ public abstract class AbstractControlContentAssistSubjectAdapter implements ICon
* @param ve the verify event
*/
private void dump(String who, Event e, VerifyEvent ve) {
- StringBuffer sb= new StringBuffer("--- [AbstractControlContentAssistSubjectAdapter]\n"); //$NON-NLS-1$
+ StringBuilder sb= new StringBuilder("--- [AbstractControlContentAssistSubjectAdapter]\n"); //$NON-NLS-1$
sb.append(who);
sb.append(" - e: keyCode="+e.keyCode+hex(e.keyCode)); //$NON-NLS-1$
sb.append("; character="+e.character+hex(e.character)); //$NON-NLS-1$
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
index a1321e0ee..d6966e764 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/SelectionProcessor.java
@@ -302,7 +302,7 @@ public final class SelectionProcessor {
@Override
String getText(ISelection selection) throws BadLocationException {
IBlockTextSelection cts= (IBlockTextSelection)selection;
- StringBuffer buf= new StringBuffer(cts.getLength());
+ StringBuilder buf= new StringBuilder(cts.getLength());
int startLine= cts.getStartLine();
int endLine= cts.getEndLine();
int startColumn= cts.getStartColumn();
@@ -471,7 +471,7 @@ public final class SelectionProcessor {
return new ReplaceEdit(info.getOffset() + startColumn, endColumn - startColumn, replacement);
}
- private void appendColumnRange(StringBuffer buf, int line, int visualStartColumn, int visualEndColumn) throws BadLocationException {
+ private void appendColumnRange(StringBuilder buf, int line, int visualStartColumn, int visualEndColumn) throws BadLocationException {
IRegion info= fDocument.getLineInformation(line);
int lineLength= info.getLength();
String content= fDocument.get(info.getOffset(), lineLength);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java
index 026b7639a..c85cc86f0 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTML2TextReader.java
@@ -301,7 +301,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
*/
private String processHTMLTag() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch;
do {
@@ -337,11 +337,11 @@ public class HTML2TextReader extends SubstitutionTextReader {
return html2Text(buf.toString());
}
- private static boolean isInComment(StringBuffer buf) {
+ private static boolean isInComment(StringBuilder buf) {
return buf.length() >= 3 && "!--".equals(buf.substring(0, 3)); //$NON-NLS-1$
}
- private static boolean isCommentEnd(StringBuffer buf) {
+ private static boolean isCommentEnd(StringBuilder buf) {
int tagLen= buf.length();
return tagLen >= 5 && "--".equals(buf.substring(tagLen - 2)); //$NON-NLS-1$
}
@@ -375,7 +375,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
* A '&' has been read. Process a entity
*/
private String processEntity() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch= nextChar();
while (Character.isLetterOrDigit((char)ch) || ch == '#') {
buf.append((char) ch);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLTextPresenter.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLTextPresenter.java
index b88aa2762..eeded51b1 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLTextPresenter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/HTMLTextPresenter.java
@@ -76,7 +76,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
}
}
- private void append(StringBuffer buffer, String string, TextPresentation presentation) {
+ private void append(StringBuilder buffer, String string, TextPresentation presentation) {
int length= string.length();
buffer.append(string);
@@ -119,7 +119,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
GC gc= new GC(drawable);
try {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
int maxNumberOfLines= Math.round(maxHeight / gc.getFontMetrics().getHeight());
fCounter= 0;
@@ -179,7 +179,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
}
}
- private String trim(StringBuffer buffer, TextPresentation presentation) {
+ private String trim(StringBuilder buffer, TextPresentation presentation) {
int length= buffer.length();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
index 924c35549..1133f8691 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SingleCharReader.java
@@ -58,7 +58,7 @@ public abstract class SingleCharReader extends Reader {
* @exception IOException in case reading fails
*/
public String getString() throws IOException {
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int ch;
while ((ch= read()) != -1) {
buf.append((char)ch);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
index 5a18b6ba2..6e0df7d85 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/SubstitutionTextReader.java
@@ -35,13 +35,13 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
private boolean fSkipWhiteSpace= true;
private boolean fReadFromBuffer;
- private StringBuffer fBuffer;
+ private StringBuilder fBuffer;
private int fIndex;
protected SubstitutionTextReader(Reader reader) {
fReader= reader;
- fBuffer= new StringBuffer();
+ fBuffer= new StringBuilder();
fIndex= 0;
fReadFromBuffer= false;
fCharAfterWhiteSpace= -1;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultIndentLineAutoEditStrategy.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultIndentLineAutoEditStrategy.java
index 1012cd568..86c065ee5 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultIndentLineAutoEditStrategy.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultIndentLineAutoEditStrategy.java
@@ -69,7 +69,7 @@ public class DefaultIndentLineAutoEditStrategy implements IAutoEditStrategy {
// find white spaces
int end= findEndOfWhiteSpace(d, start, c.offset);
- StringBuffer buf= new StringBuffer(c.text);
+ StringBuilder buf= new StringBuilder(c.text);
if (end > start) {
// append to input
buf.append(d.get(start, end - start));
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
index fb9b366a6..07cd87ca0 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.java
@@ -373,7 +373,7 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
@Override
public String toString() {
String delimiter= ", "; //$NON-NLS-1$
- StringBuffer text= new StringBuffer(super.toString());
+ StringBuilder text= new StringBuilder(super.toString());
text.append("\n"); //$NON-NLS-1$
text.append(this.getClass().getName());
text.append(" undo modification stamp: "); //$NON-NLS-1$
@@ -768,9 +768,9 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
}
/** Text buffer to collect text which is inserted into the viewer */
- private StringBuffer fTextBuffer;
+ private StringBuilder fTextBuffer;
/** Text buffer to collect viewer content which has been replaced */
- private StringBuffer fPreservedTextBuffer;
+ private StringBuilder fPreservedTextBuffer;
/** The document modification stamp for undo. */
protected long fPreservedUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
/** The document modification stamp for redo. */
@@ -1199,8 +1199,8 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
public void connect(ITextViewer textViewer) {
if (!isConnected() && textViewer != null) {
fTextViewer= textViewer;
- fTextBuffer= new StringBuffer();
- fPreservedTextBuffer= new StringBuffer();
+ fTextBuffer= new StringBuilder();
+ fPreservedTextBuffer= new StringBuilder();
if (fUndoContext == null)
fUndoContext= new ObjectUndoContext(this);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TabsToSpacesConverter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TabsToSpacesConverter.java
index 6e01547ed..073e65855 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TabsToSpacesConverter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TabsToSpacesConverter.java
@@ -34,7 +34,7 @@ public class TabsToSpacesConverter implements IAutoEditStrategy {
fLineTracker= lineTracker;
}
- private int insertTabString(StringBuffer buffer, int offsetInLine) {
+ private int insertTabString(StringBuilder buffer, int offsetInLine) {
if (fTabRatio == 0)
return 0;
@@ -55,7 +55,7 @@ public class TabsToSpacesConverter implements IAutoEditStrategy {
int index= text.indexOf('\t');
if (index > -1) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
fLineTracker.set(command.text);
int lines= fLineTracker.getNumberOfLines();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
index 8eb31f9e1..e34be7355 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewer.java
@@ -3739,7 +3739,7 @@ public class TextViewer extends Viewer implements
} else {
int lines= processor.getCoveredLines(selection);
String delim= fDocument.getLegalLineDelimiters()[0];
- StringBuffer text= new StringBuffer(lines * length + (lines - 1) * delim.length());
+ StringBuilder text= new StringBuilder(lines * length + (lines - 1) * delim.length());
text.append(e.text);
for (int i= 0; i < lines - 1; i++) {
text.append(delim);
@@ -3962,7 +3962,7 @@ public class TextViewer extends Viewer implements
int length= contents.length();
int lines= processor.getCoveredLines(selection);
String delim= fDocument.getLegalLineDelimiters()[0];
- StringBuffer text= new StringBuffer(lines * length + (lines - 1) * delim.length());
+ StringBuilder text= new StringBuilder(lines * length + (lines - 1) * delim.length());
text.append(contents);
for (int i= 0; i < lines - 1; i++) {
text.append(delim);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java
index 4a5bd8eee..153f26f3b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/WhitespaceCharacterPainter.java
@@ -312,7 +312,7 @@ public class WhitespaceCharacterPainter implements IPainter, PaintListener {
StyleRange styleRange= null;
Color fg= null;
- StringBuffer visibleChar= new StringBuffer(10);
+ StringBuilder visibleChar= new StringBuilder(10);
for (int textOffset= startOffsetInLine; textOffset <= endOffsetInLine; ++textOffset) {
int delta= 0;
boolean eol= false;
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
index a9d8b6652..c47118d8b 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/CompletionProposalPopup.java
@@ -1656,7 +1656,7 @@ class CompletionProposalPopup implements IContentAssistListener {
IDocument document= fContentAssistSubjectControlAdapter.getDocument();
// contains the common postfix in the case that there are any proposals matching our LHS
- StringBuffer rightCasePostfix= null;
+ StringBuilder rightCasePostfix= null;
List<ICompletionProposal> rightCase= new ArrayList<>();
boolean isWrongCaseMatch= false;
@@ -1666,7 +1666,7 @@ class CompletionProposalPopup implements IContentAssistListener {
CharSequence wrongCasePrefix= null;
int wrongCasePrefixStart= 0;
// contains the common postfix of all case-insensitive matches
- StringBuffer wrongCasePostfix= null;
+ StringBuilder wrongCasePostfix= null;
List<ICompletionProposal> wrongCase= new ArrayList<>();
boolean hasMixedProposals= hasMixedProposals();
@@ -1689,7 +1689,7 @@ class CompletionProposalPopup implements IContentAssistListener {
rightCase.add(proposal);
CharSequence newPostfix= insertion.subSequence(relativeCompletionOffset, insertion.length());
if (rightCasePostfix == null)
- rightCasePostfix= new StringBuffer(newPostfix.toString());
+ rightCasePostfix= new StringBuilder(newPostfix.toString());
else
truncatePostfix(rightCasePostfix, newPostfix, false);
} else if (i == 0 || isWrongCaseMatch) {
@@ -1721,7 +1721,7 @@ class CompletionProposalPopup implements IContentAssistListener {
newPostfix= insertion.subSequence(relativeCompletionOffset, insertion.length());
}
if (wrongCasePostfix == null)
- wrongCasePostfix= new StringBuffer(newPostfix.toString());
+ wrongCasePostfix= new StringBuilder(newPostfix.toString());
else
truncatePostfix(wrongCasePostfix, newPostfix, hasMixedProposals);
wrongCase.add(proposal);
@@ -1779,7 +1779,7 @@ class CompletionProposalPopup implements IContentAssistListener {
try {
// 4: check if parts of the postfix are already in the document
int to= Math.min(document.getLength(), fFilterOffset + postfix.length());
- StringBuffer inDocument= new StringBuffer(document.get(fFilterOffset, to - fFilterOffset));
+ StringBuilder inDocument= new StringBuilder(document.get(fFilterOffset, to - fFilterOffset));
truncatePostfix(inDocument, postfix, hasMixedProposals);
// 5: replace and reveal
@@ -1864,7 +1864,7 @@ class CompletionProposalPopup implements IContentAssistListener {
* @param sequence the characters to truncate with
* @param ignoreCase <code>true</code> to ignore case while comparing
*/
- private void truncatePostfix(StringBuffer buffer, CharSequence sequence, boolean ignoreCase) {
+ private void truncatePostfix(StringBuilder buffer, CharSequence sequence, boolean ignoreCase) {
// find common prefix
int min= Math.min(buffer.length(), sequence.length());
for (int c= 0; c < min; c++) {
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
index b22164821..72c62e987 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java
@@ -1188,7 +1188,7 @@ public class ContentAssistant implements IContentAssistant, IContentAssistantExt
if (fProcessors == null)
return ""; //$NON-NLS-1$
- StringBuffer buf= new StringBuffer(5);
+ StringBuilder buf= new StringBuilder(5);
for (Set<IContentAssistProcessor> processorsForContentType : fProcessors.values()) {
for (IContentAssistProcessor processor : processorsForContentType) {
char[] triggers= processor.getCompletionProposalAutoActivationCharacters();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordPatternRule.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordPatternRule.java
index 3c1762c8f..db819722c 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordPatternRule.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordPatternRule.java
@@ -26,7 +26,7 @@ public class WordPatternRule extends SingleLineRule {
/** The word detector used by this rule */
protected IWordDetector fDetector;
/** The internal buffer used for pattern detection */
- private StringBuffer fBuffer= new StringBuffer();
+ private StringBuilder fBuffer= new StringBuilder();
/**
* Creates a rule for the given starting and ending word
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
index 2c71c57a8..17eba16fa 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/WordRule.java
@@ -39,7 +39,7 @@ public class WordRule implements IRule {
/** The table of predefined words and token for this rule. */
protected Map<String, IToken> fWords= new HashMap<>();
/** Buffer used for pattern detection. */
- private StringBuffer fBuffer= new StringBuffer();
+ private StringBuilder fBuffer= new StringBuilder();
/**
* Tells whether this rule is case sensitive.
* @since 3.3
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java
index 9a83dd091..4e05e1569 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/DefaultAnnotationHover.java
@@ -131,7 +131,7 @@ public class DefaultAnnotationHover implements IAnnotationHover {
* @return the formatted message
*/
protected String formatMultipleMessages(List<String> messages) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
buffer.append(JFaceTextMessages.getString("DefaultAnnotationHover.multipleMarkers")); //$NON-NLS-1$
Iterator<String> e= messages.iterator();
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java
index 13a676b41..50d597bfe 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineChangeHover.java
@@ -47,7 +47,7 @@ public class LineChangeHover implements IAnnotationHover, IAnnotationHoverExtens
*/
protected String formatSource(String content) {
if (content != null) {
- StringBuffer sb= new StringBuffer(content);
+ StringBuilder sb= new StringBuilder(content);
final String tabReplacement= getTabReplacement();
for (int pos= 0; pos < sb.length(); pos++) {
if (sb.charAt(pos) == '\t')
@@ -114,7 +114,7 @@ public class LineChangeHover implements IAnnotationHover, IAnnotationHoverExtens
* the viewer).
* added controls how many lines are added - added lines are
*/
- StringBuffer text = new StringBuffer();
+ StringBuilder text = new StringBuilder();
int added= 0;
for (ILineDiffInfo info : diffInfos) {
String[] original= info.getOriginalText();
@@ -138,7 +138,7 @@ public class LineChangeHover implements IAnnotationHover, IAnnotationHoverExtens
}
}
- text = new StringBuffer(text.toString().trim());
+ text = new StringBuilder(text.toString().trim());
if (text.length() == 0 && added-- > 0 && maxLines-- > 0) {
text.append("+ ");//$NON-NLS-1$
}
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
index a835305b4..6a130453c 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/LineNumberChangeRulerColumn.java
@@ -125,7 +125,7 @@ public class LineNumberChangeRulerColumn extends LineNumberRulerColumn implement
@Override
protected String createDisplayString(int line) {
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
if (fShowNumbers)
buffer.append(super.createDisplayString(line));
if (fCharacterDisplay && getModel() != null)
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
index f2c3ae8b4..63946a32e 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/OverviewRuler.java
@@ -1502,7 +1502,7 @@ public class OverviewRuler implements IOverviewRulerExtension, IOverviewRuler {
if (fHeader.getToolTipText() != null)
return;
- StringBuffer overview = new StringBuffer();
+ StringBuilder overview = new StringBuilder();
for (int i= fAnnotationsSortedByLayer.size() -1; i >= 0; i--) {
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
index b3e8306e5..e54dd9294 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/templates/persistence/TemplateReaderWriter.java
@@ -198,7 +198,7 @@ public class TemplateReaderWriter {
boolean enabled = getBooleanValue(attributes, ENABLED_ATTRIBUTE, true);
boolean autoInsertable= getBooleanValue(attributes, AUTO_INSERTABLE_ATTRIBUTE, true);
- StringBuffer buffer= new StringBuffer();
+ StringBuilder buffer= new StringBuilder();
NodeList children= node.getChildNodes();
for (int j= 0; j != children.getLength(); j++) {
String value= children.item(j).getNodeValue();
@@ -386,7 +386,7 @@ public class TemplateReaderWriter {
if (idx == -1) {
return str;
}
- StringBuffer buf= new StringBuffer();
+ StringBuilder buf= new StringBuilder();
int k= 0;
while (idx != -1) {
buf.append(str.substring(k, idx));

Back to the top