Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-08-14 06:00:37 -0400
committerLars Vogel2019-08-14 09:59:38 -0400
commita71b89989d8cfb96d2c4d9539f12ee0f3d47adc9 (patch)
treeda9264f4fe65a3512551b629005d107cb637d287
parentfbfee8d1413f408c644681303c5a4e844c700874 (diff)
downloadeclipse.platform.debug-a71b89989d8cfb96d2c4d9539f12ee0f3d47adc9.tar.gz
eclipse.platform.debug-a71b89989d8cfb96d2c4d9539f12ee0f3d47adc9.tar.xz
eclipse.platform.debug-a71b89989d8cfb96d2c4d9539f12ee0f3d47adc9.zip
Use StringBuilder in org.eclipse.debug.uiY20190815-0900I20190816-0155I20190814-1800
Change-Id: Ifd968748a493a9717bce4841360eec6bd7fc7893 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java2
7 files changed, 15 insertions, 15 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
index 77668b3e8..2c772e184 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/AsynchronousModel.java
@@ -615,7 +615,7 @@ public abstract class AsynchronousModel {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
if (fRoot != null) {
buf.append("ROOT: "); //$NON-NLS-1$
append(buf, fRoot, 0);
@@ -625,7 +625,7 @@ public abstract class AsynchronousModel {
return buf.toString();
}
- private void append(StringBuffer buf, ModelNode node, int level) {
+ private void append(StringBuilder buf, ModelNode node, int level) {
for (int i = 0; i < level; i++) {
buf.append('\t');
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
index cdc5dfd0b..b557dc18f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualCopyToClipboardActionDelegate.java
@@ -140,7 +140,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
* @param buffer String buffer for copy text.
* @param indent Current indentation in tree text.
*/
- protected void append(VirtualItem item, StringBuffer buffer, int indent) {
+ protected void append(VirtualItem item, StringBuilder buffer, int indent) {
for (int i= 0; i < indent; i++) {
buffer.append(TAB);
}
@@ -302,12 +302,12 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
private void copySelectionToClipboard(VirtualTreeModelViewer virtualViewer, Set<VirtualItem> itemsToCopy, int selectionRootDepth) {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
writeItemToBuffer (virtualViewer.getTree(), itemsToCopy, buffer, -selectionRootDepth);
writeBufferToClipboard(buffer);
}
- protected void writeItemToBuffer(VirtualItem item, Set<VirtualItem> itemsToCopy, StringBuffer buffer, int indent) {
+ protected void writeItemToBuffer(VirtualItem item, Set<VirtualItem> itemsToCopy, StringBuilder buffer, int indent) {
if (itemsToCopy.contains(item)) {
append(item, buffer, indent);
}
@@ -319,7 +319,7 @@ public class VirtualCopyToClipboardActionDelegate extends AbstractDebugActionDel
}
}
- protected void writeBufferToClipboard(StringBuffer buffer) {
+ protected void writeBufferToClipboard(StringBuilder buffer) {
if (buffer.length() == 0) {
return;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
index cb147026e..be08f7380 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/ModelDelta.java
@@ -292,14 +292,14 @@ public class ModelDelta implements IModelDelta {
@Override
public String toString() {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
buf.append("Model Delta Start\n"); //$NON-NLS-1$
appendDetail(" ", buf, this); //$NON-NLS-1$
buf.append("Model Delta End\n"); //$NON-NLS-1$
return buf.toString();
}
- private void appendDetail(String indent, StringBuffer buf, IModelDelta delta) {
+ private void appendDetail(String indent, StringBuilder buf, IModelDelta delta) {
buf.append(indent);
buf.append("Element: "); //$NON-NLS-1$
buf.append(delta.getElement());
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
index 0115e8b0a..5f3183eee 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/provisional/VirtualItem.java
@@ -530,12 +530,12 @@ public class VirtualItem {
@Override
public String toString() {
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
toStringItem(buffer, IInternalDebugCoreConstants.EMPTY_STRING);
return buffer.toString();
}
- void toStringItem(StringBuffer buffer, String indent) {
+ void toStringItem(StringBuilder buffer, String indent) {
buffer.append(indent);
buffer.append(toStringElement());
buffer.append("\n"); //$NON-NLS-1$
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
index 2a284980c..3decf470e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/CopyTableRenderingToClipboardAction.java
@@ -86,7 +86,7 @@ public class CopyTableRenderingToClipboardAction extends Action
//get the column headers and line them up properly
for (int k=0; k < numColumns; k++) {
- StringBuffer columnLabel = new StringBuffer(columns[k].getText());
+ StringBuilder columnLabel = new StringBuilder(columns[k].getText());
int numBytes = 0;
int numChars = 0;
@@ -136,14 +136,14 @@ public class CopyTableRenderingToClipboardAction extends Action
}
tableContents.append(System.getProperty("line.separator")); //$NON-NLS-1$
- StringBuffer temp;
+ StringBuilder temp;
//get the column contents from all the rows
for (int i=0; i < itemList.length; i++) {
for (int j=0; j < numColumns; j++) {
tableContents.append(COLUMN_SEPERATOR);
- temp = new StringBuffer(labelProvider.getColumnText(itemList[i].getData(), j));
+ temp = new StringBuilder(labelProvider.getColumnText(itemList[i].getData(), j));
if (j>0)
{
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
index 11de48e28..6068deb0c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/PrintTableRenderingAction.java
@@ -148,7 +148,7 @@ public class PrintTableRenderingAction extends Action
//get the column headers
for (int k=0; k < numColumns; k++) {
- StringBuffer columnLabel = new StringBuffer(columns[k].getText());
+ StringBuilder columnLabel = new StringBuilder(columns[k].getText());
int numBytes = 0;
if (k > 0)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
index a2259515a..677bf2714 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingLine.java
@@ -84,7 +84,7 @@ public class TableRenderingLine extends PlatformObject {
{
if (fStrRep == null)
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
fStrRep = RenderingsUtil.convertByteArrayToHexString(getByteArray());
fStrRep = fStrRep.toUpperCase();

Back to the top