mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 08:46:02 +02:00
Bug 492200 - Replace StringBuffer with StringBuilder
There are many opportunities for replacing `StringBuffer` with `StringBuilder` provided that the type isn't visible from the public API and is used only in internal methods. Replace these where appropriate. Change-Id: Ic2f50c5b6f3c3a4eae301bb3b40fb6faed235f79 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
parent
e901d4a7d4
commit
2356a29c70
95 changed files with 231 additions and 231 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009,2012 QNX Software Systems
|
||||
* Copyright (c) 2009, 2016 QNX Software Systems
|
||||
* 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2012 QNX Software Systems
|
||||
* Copyright (c) 2009, 2016 QNX Software Systems
|
||||
* 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
|
||||
|
@ -139,7 +139,7 @@ public class MapProblemPreference extends AbstractProblemPreference
|
|||
@Override
|
||||
public String exportValue() {
|
||||
synchronized (hash) {
|
||||
StringBuffer buf = new StringBuffer("{"); //$NON-NLS-1$
|
||||
StringBuilder buf = new StringBuilder("{"); //$NON-NLS-1$
|
||||
for (Iterator<String> iterator = hash.keySet().iterator(); iterator.hasNext();) {
|
||||
String key = iterator.next();
|
||||
IProblemPreference d = hash.get(key);
|
||||
|
|
|
@ -195,7 +195,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
|
|||
if (i < args.length)
|
||||
executable = findExecutable(args[i]);
|
||||
++i;
|
||||
StringBuffer argBuffer = new StringBuffer();
|
||||
StringBuilder argBuffer = new StringBuilder();
|
||||
// Remaining values are arguments to the executable
|
||||
if (i < args.length)
|
||||
argBuffer.append(args[i++]);
|
||||
|
|
|
@ -225,7 +225,7 @@ public abstract class CBreakpoint extends Breakpoint implements ICBreakpoint2, I
|
|||
}
|
||||
|
||||
protected String getConditionText() throws CoreException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int ignoreCount = getIgnoreCount();
|
||||
if ( ignoreCount > 0 ) {
|
||||
sb.append( MessageFormat.format( BreakpointMessages.getString( "CBreakpoint.1" ), new Object[] { ignoreCount } ) ); //$NON-NLS-1$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2014 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -312,7 +312,7 @@ public class CDebugImages {
|
|||
if (fgIconBaseURL == null)
|
||||
throw new MalformedURLException();
|
||||
|
||||
StringBuffer buffer = new StringBuffer(prefix);
|
||||
StringBuilder buffer = new StringBuilder(prefix);
|
||||
buffer.append('/');
|
||||
buffer.append(name);
|
||||
return new URL(fgIconBaseURL, buffer.toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2004, 2016 QNX Software Systems 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
|
||||
|
@ -414,7 +414,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
|
|||
|
||||
private String getBaseText( Object element ) {
|
||||
boolean showQualified = isShowQualifiedNames();
|
||||
StringBuffer label = new StringBuffer();
|
||||
StringBuilder label = new StringBuilder();
|
||||
try {
|
||||
if ( element instanceof ICModule ) {
|
||||
label.append( getModuleText( (ICModule)element, showQualified ) );
|
||||
|
@ -486,7 +486,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
|
|||
}
|
||||
|
||||
protected String getModuleText( ICModule module, boolean qualified ) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
IPath path = module.getImageName();
|
||||
if ( !path.isEmpty() ) {
|
||||
sb.append( path.lastSegment() );
|
||||
|
@ -580,7 +580,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
|
|||
}
|
||||
|
||||
protected String getSignalText( ICSignal signal ) {
|
||||
StringBuffer sb = new StringBuffer( CDebugUIMessages.getString( "CDTDebugModelPresentation.12" ) ); //$NON-NLS-1$
|
||||
StringBuilder sb = new StringBuilder( CDebugUIMessages.getString( "CDTDebugModelPresentation.12" ) ); //$NON-NLS-1$
|
||||
try {
|
||||
String name = signal.getName();
|
||||
sb.append( " \'" ).append( name ).append( '\'' ); //$NON-NLS-1$
|
||||
|
@ -591,7 +591,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
|
|||
}
|
||||
|
||||
protected String getWatchExpressionText( IWatchExpression expression ) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append( '"' ).append( expression.getExpressionText() ).append( '"' );
|
||||
if ( expression.isPending() ) {
|
||||
result.append( " = " ).append( "..." ); //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
@ -633,7 +633,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
|
|||
protected String getStackFrameText( IStackFrame f, boolean qualified ) throws DebugException {
|
||||
if ( f instanceof ICStackFrame ) {
|
||||
ICStackFrame frame = (ICStackFrame)f;
|
||||
StringBuffer label = new StringBuffer();
|
||||
StringBuilder label = new StringBuilder();
|
||||
label.append( frame.getLevel() );
|
||||
label.append( ' ' );
|
||||
String function = frame.getFunction();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -124,7 +124,7 @@ public class CDebugUIUtils {
|
|||
* Moved from CDebugModelPresentation because it is also used by CVariableLabelProvider.
|
||||
*/
|
||||
static public String getValueText( IValue value ) {
|
||||
StringBuffer label = new StringBuffer();
|
||||
StringBuilder label = new StringBuilder();
|
||||
if ( value instanceof ICDebugElementStatus && !((ICDebugElementStatus)value).isOK() ) {
|
||||
label.append( MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.4" ), (Object[]) new String[] { ((ICDebugElementStatus)value).getMessage() } ) ); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class CDebugUIUtils {
|
|||
* Moved from CDebugModelPresentation because it is also used by CVariableLabelProvider.
|
||||
*/
|
||||
public static String getVariableTypeName( ICType type ) {
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
if ( type != null ) {
|
||||
String typeName = type.getName();
|
||||
if ( typeName != null )
|
||||
|
@ -221,7 +221,7 @@ public class CDebugUIUtils {
|
|||
public static String decorateText( Object element, String text ) {
|
||||
if ( text == null )
|
||||
return null;
|
||||
StringBuffer baseText = new StringBuffer( text );
|
||||
StringBuilder baseText = new StringBuilder( text );
|
||||
if ( element instanceof ICDebugElementStatus && !((ICDebugElementStatus)element).isOK() ) {
|
||||
baseText.append( MessageFormat.format( " <{0}>", new Object[] { ((ICDebugElementStatus)element).getMessage() } ) ); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2012 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2016 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
|
||||
|
@ -49,7 +49,7 @@ public abstract class SingleCharReader extends Reader {
|
|||
* Gets the content as a String
|
||||
*/
|
||||
public String getString() throws IOException {
|
||||
StringBuffer buf= new StringBuffer();
|
||||
StringBuilder buf= new StringBuilder();
|
||||
int ch;
|
||||
while ((ch= read()) != -1) {
|
||||
buf.append((char)ch);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2012 IBM Corporation and others.
|
||||
* Copyright (c) 2000, 2016 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
|
||||
|
@ -32,13 +32,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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2016 QNX Software Systems 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
|
||||
|
@ -226,7 +226,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getPath().lastSegment());
|
||||
return name.toString();
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2016 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
|
||||
|
@ -24,7 +24,7 @@ public final class StringSetSerializer {
|
|||
|
||||
public static String serialize(Set<String> strings) {
|
||||
Assert.isLegal(strings != null);
|
||||
StringBuffer buf= new StringBuffer(strings.size() * 20);
|
||||
StringBuilder buf= new StringBuilder(strings.size() * 20);
|
||||
for (Iterator<String> it= strings.iterator(); it.hasNext();) {
|
||||
buf.append(it.next());
|
||||
if (it.hasNext())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2004, 2016 QNX Software Systems 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
|
||||
|
@ -95,7 +95,7 @@ public class SourceContainerWorkbenchAdapter implements IWorkbenchAdapter {
|
|||
}
|
||||
|
||||
public String getQualifiedName(IPath path) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
String[] segments = path.segments();
|
||||
if (segments.length > 0) {
|
||||
buffer.append(path.lastSegment());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2012 Nokia and others.
|
||||
* Copyright (c) 2008, 2016 Nokia 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
|
||||
|
@ -453,7 +453,7 @@ public class ExecutablesView extends ViewPart {
|
|||
IStatus result = ExecutablesManager.getExecutablesManager().removeExecutables(selectedExesArray, monitor);
|
||||
if (result.getSeverity() != IStatus.OK)
|
||||
{
|
||||
StringBuffer message = new StringBuffer(result.getMessage());
|
||||
StringBuilder message = new StringBuilder(result.getMessage());
|
||||
if (result.isMultiStatus()) {
|
||||
IStatus[] children = result.getChildren();
|
||||
for (int i = 0; i < children.length && i < 6; i++) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2012 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2016 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
|
||||
|
@ -134,7 +134,7 @@ public class ModuleDetailPane extends AbstractDetailPane implements IAdaptable,
|
|||
}
|
||||
|
||||
private String getModuleDetail( ICModule module ) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
// Type
|
||||
String type = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2015 Nokia and others.
|
||||
* Copyright (c) 2007, 2016 Nokia 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
|
||||
|
@ -128,7 +128,7 @@ public class ActionsList extends Composite {
|
|||
}
|
||||
|
||||
public String getActionNames() {
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
TableItem[] currentItems = table.getItems();
|
||||
for (int i = 0; i < currentItems.length; i++) {
|
||||
if (i > 0)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2015 Mentor Graphics and others.
|
||||
* Copyright (c) 2011, 2016 Mentor Graphics 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
|
||||
|
@ -757,7 +757,7 @@ abstract public class AbstractToggleBreakpointAdapter
|
|||
|
||||
private String getFunctionName( IFunction function ) {
|
||||
String functionName = function.getElementName();
|
||||
StringBuffer name = new StringBuffer( functionName );
|
||||
StringBuilder name = new StringBuilder( functionName );
|
||||
ITranslationUnit tu = function.getTranslationUnit();
|
||||
if ( tu != null && tu.isCXXLanguage() ) {
|
||||
appendParameters( name, function );
|
||||
|
@ -766,7 +766,7 @@ abstract public class AbstractToggleBreakpointAdapter
|
|||
}
|
||||
|
||||
private String getMethodName( IMethod method ) {
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
String methodName = method.getElementName();
|
||||
ICElement parent = method.getParent();
|
||||
while( parent != null
|
||||
|
@ -780,7 +780,7 @@ abstract public class AbstractToggleBreakpointAdapter
|
|||
return name.toString();
|
||||
}
|
||||
|
||||
private void appendParameters( StringBuffer sb, IFunctionDeclaration fd ) {
|
||||
private void appendParameters( StringBuilder sb, IFunctionDeclaration fd ) {
|
||||
String[] params = fd.getParameterTypes();
|
||||
sb.append( '(' );
|
||||
for( int i = 0; i < params.length; ++i ) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012, 2015 Tilera Corporation and others.
|
||||
* Copyright (c) 2012, 2016 Tilera 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
|
||||
|
@ -92,7 +92,7 @@ public class VisualizerThread
|
|||
/** Returns string representation. */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer output = new StringBuffer();
|
||||
StringBuilder output = new StringBuilder();
|
||||
output.append(m_core).append(",Proc:").append(m_pid) //$NON-NLS-1$
|
||||
.append(",Thread:(").append(m_tid).append(",").append(m_gdbtid).append(")"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
return output.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2011 Ericsson and others.
|
||||
* Copyright (c) 2009, 2016 Ericsson 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
|
||||
|
@ -126,7 +126,7 @@ public class TracingConsole extends IOConsole {
|
|||
type = config.getType().getName();
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(config.getName());
|
||||
if (type != null) {
|
||||
buffer.append(" ["); //$NON-NLS-1$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2016 QNX Software Systems 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
|
||||
|
@ -148,7 +148,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
public void addControlAccessibleListener(Control control, String controlName) {
|
||||
// Strip mnemonic (&)
|
||||
String[] strs = controlName.split("&"); //$NON-NLS-1$
|
||||
StringBuffer stripped = new StringBuffer();
|
||||
StringBuilder stripped = new StringBuilder();
|
||||
for (int i = 0; i < strs.length; i++) {
|
||||
stripped.append(strs[i]);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2008, 2016 QNX Software Systems 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
|
||||
|
@ -66,7 +66,7 @@ public class LaunchImages {
|
|||
|
||||
|
||||
private static URL makeIconFileURL(String prefix, String name) {
|
||||
StringBuffer buffer= new StringBuffer(prefix);
|
||||
StringBuilder buffer= new StringBuilder(prefix);
|
||||
buffer.append(name);
|
||||
try {
|
||||
return new URL(fgIconBaseURL, buffer.toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2015 Nokia and others.
|
||||
* Copyright (c) 2007, 2016 Nokia 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
|
||||
|
@ -128,7 +128,7 @@ public class TracepointActionsList extends Composite {
|
|||
}
|
||||
|
||||
public String getActionNames() {
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
TableItem[] currentItems = table.getItems();
|
||||
for (int i = 0; i < currentItems.length; i++) {
|
||||
if (i > 0) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Ericsson and others.
|
||||
* Copyright (c) 2006, 2016 Ericsson 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
|
||||
|
@ -366,7 +366,7 @@ public class ContainerVMNode extends AbstractContainerVMNode
|
|||
if (data instanceof IGdbThreadDMData) {
|
||||
String[] cores = ((IGdbThreadDMData)data).getCores();
|
||||
if (cores != null) {
|
||||
StringBuffer str = new StringBuffer();
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (String core : cores) {
|
||||
str.append(core + ","); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2012 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -347,7 +347,7 @@ public class ThreadVMNode extends AbstractThreadVMNode
|
|||
if (data instanceof IGdbThreadDMData) {
|
||||
String[] cores = ((IGdbThreadDMData)data).getCores();
|
||||
if (cores != null) {
|
||||
StringBuffer str = new StringBuffer();
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (String core : cores) {
|
||||
str.append(core + ","); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2010, 2016 Wind River Systems 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
|
||||
|
@ -103,7 +103,7 @@ public class GDBTypeParser {
|
|||
}
|
||||
|
||||
public static String unParse (GDBType gdbParentType) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
GDBType gdbType = gdbParentType;
|
||||
// Fetch the datatype.
|
||||
while (gdbType != null) {
|
||||
|
@ -135,15 +135,15 @@ public class GDBTypeParser {
|
|||
|
||||
}
|
||||
|
||||
private static void handleReference(GDBType gdbType, StringBuffer sb) {
|
||||
private static void handleReference(GDBType gdbType, StringBuilder sb) {
|
||||
handleReferenceOrPointer(gdbType, sb, '&');
|
||||
}
|
||||
|
||||
private static void handlePointer(GDBType gdbType, StringBuffer sb) {
|
||||
private static void handlePointer(GDBType gdbType, StringBuilder sb) {
|
||||
handleReferenceOrPointer(gdbType, sb, '*');
|
||||
}
|
||||
|
||||
private static void handleReferenceOrPointer(GDBType gdbType, StringBuffer sb, char prefix) {
|
||||
private static void handleReferenceOrPointer(GDBType gdbType, StringBuilder sb, char prefix) {
|
||||
switch (getChildType(gdbType)) {
|
||||
case GDBType.POINTER:
|
||||
case GDBType.REFERENCE:
|
||||
|
@ -235,7 +235,7 @@ public class GDBTypeParser {
|
|||
|
||||
@Override
|
||||
public String verbose() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
switch (getType()) {
|
||||
case FUNCTION :
|
||||
sb.append(" function returning " + (hasChild() ? child.verbose() : "")); //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
@ -363,7 +363,7 @@ public class GDBTypeParser {
|
|||
}
|
||||
tokenType = BRACKETS;
|
||||
} else if (isCIdentifierStart(c)) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append((char) c);
|
||||
while (isCIdentifierPart((c = getch())) && c != EOF) {
|
||||
sb.append((char) c);
|
||||
|
|
|
@ -159,7 +159,7 @@ public class CollectAction extends AbstractTracepointAction {
|
|||
public String getSummary() {
|
||||
// Return the exact format that will be sent to GDB.
|
||||
|
||||
StringBuffer collectCmd = new StringBuffer("collect "); //$NON-NLS-1$
|
||||
StringBuilder collectCmd = new StringBuilder("collect "); //$NON-NLS-1$
|
||||
if (fCharPtrAsStrings) {
|
||||
collectCmd.append("/s"); //$NON-NLS-1$
|
||||
if (fCharPtrAsStringsLimit != null) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -684,7 +684,7 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr
|
|||
// Turn it into an envp format
|
||||
List<String> strings = new ArrayList<String>(envMap.size());
|
||||
for (Entry<String, String> entry : envMap.entrySet()) {
|
||||
StringBuffer buffer = new StringBuffer(entry.getKey());
|
||||
StringBuilder buffer = new StringBuilder(entry.getKey());
|
||||
buffer.append('=').append(entry.getValue());
|
||||
strings.add(buffer.toString());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2015 Ericsson and others.
|
||||
* Copyright (c) 2011, 2016 Ericsson 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
|
||||
|
@ -76,7 +76,7 @@ public class InferiorRuntimeProcess extends RuntimeProcess {
|
|||
} catch (CoreException e) {
|
||||
type = null;
|
||||
}
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(config.getName());
|
||||
if (type != null) {
|
||||
buffer.append(" ["); //$NON-NLS-1$
|
||||
|
|
|
@ -540,7 +540,7 @@ public class LaunchUtils {
|
|||
// Turn it into an envp format
|
||||
List<String> strings= new ArrayList<String>(envMap.size());
|
||||
for (Entry<String, String> entry : envMap.entrySet()) {
|
||||
StringBuffer buffer= new StringBuffer(entry.getKey());
|
||||
StringBuilder buffer= new StringBuilder(entry.getKey());
|
||||
buffer.append('=').append(entry.getValue());
|
||||
strings.add(buffer.toString());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -1816,7 +1816,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
|||
|
||||
// cast to type
|
||||
if (castType != null && !castType.isEmpty()) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append('(').append(castType).append(')');
|
||||
buffer.append('(').append(castExpression).append(')');
|
||||
castExpression = buffer.toString();
|
||||
|
@ -1824,7 +1824,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions,
|
|||
|
||||
// cast to array (can be in addition to cast to type)
|
||||
if (castingLength > 0) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("*("); //$NON-NLS-1$
|
||||
buffer.append('(').append(castExpression).append(')');
|
||||
buffer.append('+').append(castingIndex).append(')');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2014 QNX Software Systems and others.
|
||||
* Copyright (c) 2009, 2016 QNX Software Systems 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
|
||||
|
@ -400,7 +400,7 @@ public abstract class AbstractCLIProcess extends Process
|
|||
}
|
||||
|
||||
private class CLIOutputStream extends OutputStream {
|
||||
private final StringBuffer buf = new StringBuffer();
|
||||
private final StringBuilder buf = new StringBuilder();
|
||||
|
||||
@Override
|
||||
public void write(int b) throws IOException {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Ericsson and others.
|
||||
* Copyright (c) 2009, 2016 Ericsson 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
|
||||
|
@ -26,7 +26,7 @@ public class MIGDBSetSolibSearchPath extends MIGDBSet
|
|||
super(ctx, null);
|
||||
// Overload the parameter
|
||||
String sep = System.getProperty("path.separator", ":"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (int i = 0; i < paths.length; i++) {
|
||||
if (buffer.length() == 0) {
|
||||
buffer.append(paths[i]);
|
||||
|
@ -37,4 +37,4 @@ public class MIGDBSetSolibSearchPath extends MIGDBSet
|
|||
String[] p = new String [] {"solib-search-path", buffer.toString()}; //$NON-NLS-1$
|
||||
setParameters(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -72,7 +72,7 @@ public class MIErrorEvent extends MIStoppedEvent {
|
|||
}
|
||||
}
|
||||
if (oobs != null) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < oobs.length; i++) {
|
||||
if (oobs[i] instanceof MILogStreamOutput) {
|
||||
MIStreamRecord o = (MIStreamRecord)oobs[i];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2012 Ericsson and others
|
||||
* Copyright (c) 2011, 2016 Ericsson 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
|
||||
|
@ -76,7 +76,7 @@ public class CLITraceDumpInfo extends MIInfo {
|
|||
*/
|
||||
private void parse(boolean keepHeader) {
|
||||
final Pattern RESULT_PATTERN_UNWRAPRECORD = Pattern.compile("~\"(.*)\"", Pattern.CANON_EQ); //$NON-NLS-1$
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
String unwrapped;
|
||||
if (isDone()) {
|
||||
MIOutput out = getMIOutput();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -52,7 +52,7 @@ public abstract class MIAsyncRecord extends MIOOBRecord {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
if (token > 0) {
|
||||
buffer.append(token);
|
||||
}
|
||||
|
|
|
@ -602,7 +602,7 @@ public class MIBreakpoint {
|
|||
|
||||
void parseCommands(MITuple tuple) {
|
||||
MIValue[] values = tuple.getMIValues();
|
||||
StringBuffer cmds = new StringBuffer();
|
||||
StringBuilder cmds = new StringBuilder();
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
MIValue value = values[i];
|
||||
if (value != null && value instanceof MIConst) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class MIFrame {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("level=\"" + level + "\""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append(",addr=\"" + addr + "\""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append(",func=\"" + func + "\""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -41,7 +41,7 @@ public class MIList extends MIValue {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append('[');
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
if (i != 0) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -97,7 +97,7 @@ public class MIOutput {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (int i = 0; i < oobs.length; i++) {
|
||||
buffer.append(oobs[i].toString());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -37,7 +37,7 @@ public class MIRegisterValue {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("number=\"").append(number).append('"'); //$NON-NLS-1$
|
||||
buffer.append(',').append("value=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return buffer.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -37,7 +37,7 @@ public class MIResult {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(variable);
|
||||
if (value != null) {
|
||||
String v = value.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2014 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -73,7 +73,7 @@ public class MIResultRecord {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
if (token > 0) {
|
||||
buffer.append(token);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Mathias Kunter and others.
|
||||
* Copyright (c) 2012, 2016 Mathias Kunter 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
|
||||
|
@ -199,8 +199,8 @@ public class MIStringHandler {
|
|||
* @return The parsed string.
|
||||
*/
|
||||
public static String parseString(String str, EnumSet<ParseFlags> parseFlags) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuffer escapeBuffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
StringBuilder escapeBuffer = new StringBuilder();
|
||||
EscapeStatus escStatus = EscapeStatus.NONE;
|
||||
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
|
@ -394,7 +394,7 @@ public class MIStringHandler {
|
|||
* @return The escaped string.
|
||||
*/
|
||||
public static String escapeString(String str, boolean escapePrintableSpecialChars) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
// Get the current character code point. Note that using the Java "char" data type isn't
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2014 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2016 QNX Software Systems 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
|
||||
|
@ -69,7 +69,7 @@ public class MITuple extends MIValue {
|
|||
// MIResultRecord.
|
||||
String toString(String start, String end)
|
||||
{
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(start);
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
if (i != 0) {
|
||||
|
|
|
@ -285,7 +285,7 @@ public class PostMortemCoreTest extends BaseParametrizedTestCase {
|
|||
// Prepare to find the common path between the core file and the workspace
|
||||
IPath commonPath = new Path(workspaceLocation);
|
||||
|
||||
StringBuffer backwards = new StringBuffer("/");
|
||||
StringBuilder backwards = new StringBuilder("/");
|
||||
// While the commonPath is not the prefix of the core file path
|
||||
// remove one more segment of the potential commonPath
|
||||
while (!commonPath.isPrefixOf(corePath)) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2011 Wind River Systems and others.
|
||||
* Copyright (c) 2007, 2016 Wind River Systems 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
|
||||
|
@ -124,7 +124,7 @@ public class AddressRulerColumn extends DisassemblyRulerColumn implements IVerti
|
|||
}
|
||||
|
||||
private String getAddressText(BigInteger address) {
|
||||
StringBuffer buf = new StringBuffer(fNumberOfDigits + 3);
|
||||
StringBuilder buf = new StringBuilder(fNumberOfDigits + 3);
|
||||
if (fRadixPrefix != null) {
|
||||
buf.append(fRadixPrefix);
|
||||
}
|
||||
|
|
|
@ -908,9 +908,9 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
|||
if (DEBUG) {
|
||||
String escapedText = null;
|
||||
if (text != null) {
|
||||
escapedText = text.replace(new StringBuffer("\n"), new StringBuffer("\\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
escapedText = escapedText.replace(new StringBuffer("\r"), new StringBuffer("\\r")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
escapedText = escapedText.replace(new StringBuffer("\t"), new StringBuffer("\\t")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
escapedText = text.replace(new StringBuilder("\n"), new StringBuilder("\\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
escapedText = escapedText.replace(new StringBuilder("\r"), new StringBuilder("\\r")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
escapedText = escapedText.replace(new StringBuilder("\t"), new StringBuilder("\\t")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
System.out.println("Calling AbstractDocument.replace("+insertPos.offset+','+replaceLength+",\""+escapedText+"\")"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
|
@ -1037,7 +1037,7 @@ public class DisassemblyDocument extends REDDocument implements IDisassemblyDocu
|
|||
* @param instruction
|
||||
*/
|
||||
private String buildDisassemblyLine(BigInteger address, String functionOffset, String instruction) {
|
||||
StringBuffer buf = new StringBuffer(40);
|
||||
StringBuilder buf = new StringBuilder(40);
|
||||
if (fShowAddresses) {
|
||||
if (fRadixPrefix != null) {
|
||||
buf.append(fRadixPrefix);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2016 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
|
||||
|
@ -334,7 +334,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
|||
new DataRequestMonitor<Map<String,Object>>(executor, null) {
|
||||
@Override
|
||||
protected void handleSuccess() {
|
||||
StringBuffer finalResult = new StringBuffer();
|
||||
StringBuilder finalResult = new StringBuilder();
|
||||
finalResult.append(NAME).append(getData().get(IElementPropertiesProvider.PROP_NAME)).append(CRLF);
|
||||
|
||||
if (formats != null) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2010 Wind River Systems and others.
|
||||
* Copyright (c) 2008, 2016 Wind River Systems 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
|
||||
|
@ -46,7 +46,7 @@ public class ErrorLabelText extends LabelText {
|
|||
if (status.getChildren().length < 2) {
|
||||
return replaceNewlines(status.getMessage());
|
||||
} else {
|
||||
StringBuffer buf = new StringBuffer( status.getMessage() );
|
||||
StringBuilder buf = new StringBuilder( status.getMessage() );
|
||||
for (IStatus childStatus : status.getChildren()) {
|
||||
buf.append(MessagesForDebugVM.ErrorLabelText_Error_message__text_page_break_delimiter);
|
||||
buf.append( replaceNewlines(childStatus.getMessage()) );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2016 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
|
||||
|
@ -431,7 +431,7 @@ public class ModuleDetailPane extends ModulesAbstractDetailPane implements IAdap
|
|||
* @return
|
||||
*/
|
||||
private String getModuleDetail( IModuleDMData module ) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
// Type
|
||||
String type = null;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2012 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -129,7 +129,7 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode
|
|||
public String createWatchExpression(Object element) throws CoreException {
|
||||
IRegisterGroupDMData groupData = getSyncRegisterDataAccess().getRegisterGroupDMData(element);
|
||||
if (groupData != null) {
|
||||
StringBuffer exprBuf = new StringBuffer();
|
||||
StringBuilder exprBuf = new StringBuilder();
|
||||
exprBuf.append("GRP( "); //$NON-NLS-1$
|
||||
exprBuf.append(groupData.getName());
|
||||
exprBuf.append(" )"); //$NON-NLS-1$
|
||||
|
@ -625,4 +625,4 @@ public class RegisterGroupVMNode extends AbstractExpressionVMNode
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2007, 2016 Wind River Systems 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
|
||||
|
@ -70,7 +70,7 @@ public class SyncVariableDataAccess {
|
|||
}
|
||||
|
||||
private String getServiceFilter() {
|
||||
StringBuffer filter = new StringBuffer();
|
||||
StringBuilder filter = new StringBuilder();
|
||||
filter.append("(&"); //$NON-NLS-1$
|
||||
filter.append("(OBJECTCLASS="); //$NON-NLS-1$
|
||||
filter.append(IExpressions.class.getName());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2012 Wind River Systems and others.
|
||||
* Copyright (c) 2009, 2016 Wind River Systems 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
|
||||
|
@ -160,4 +160,4 @@ public class VMPropertiesUpdate extends VMViewerUpdate implements IPropertiesUpd
|
|||
public String toString() {
|
||||
return "VMPropertiesUpdate:" + getElement() + " " + fProperties; //$NON-NLS-1$ //$NON-NLS-2$/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -57,7 +57,7 @@ public class CountingRequestMonitor extends RequestMonitor {
|
|||
super.setStatus(new DsfMultiStatus(DsfPlugin.PLUGIN_ID, 0, "", null) { //$NON-NLS-1$
|
||||
@Override
|
||||
public String getMessage() {
|
||||
StringBuffer message = new StringBuffer();
|
||||
StringBuilder message = new StringBuilder();
|
||||
IStatus[] children = getChildren();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
message.append(children[i].getMessage());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems 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
|
||||
|
@ -223,7 +223,7 @@ abstract public class AbstractDsfService
|
|||
*/
|
||||
@SuppressWarnings({ "rawtypes" })
|
||||
private String generateFilter(Dictionary properties) {
|
||||
StringBuffer filter = new StringBuffer();
|
||||
StringBuilder filter = new StringBuilder();
|
||||
filter.append("(&"); //$NON-NLS-1$
|
||||
|
||||
for (Enumeration keys = properties.keys(); keys.hasMoreElements();) {
|
||||
|
@ -266,4 +266,4 @@ abstract public class AbstractDsfService
|
|||
|
||||
/** Returns the registration object that was obtained when this service was registered */
|
||||
protected ServiceRegistration<?> getServiceRegistration() { return fRegistration; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2016 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
|
||||
|
@ -28,7 +28,7 @@ public class PDAContentAssistProcessor implements IContentAssistProcessor {
|
|||
|
||||
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
|
||||
int index = offset - 1;
|
||||
StringBuffer prefix = new StringBuffer();
|
||||
StringBuilder prefix = new StringBuilder();
|
||||
IDocument document = viewer.getDocument();
|
||||
while (index > 0) {
|
||||
try {
|
||||
|
|
|
@ -790,7 +790,7 @@ public class PDAVirtualMachine {
|
|||
}
|
||||
}
|
||||
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (String child : children) {
|
||||
result.append(child);
|
||||
result.append('|');
|
||||
|
@ -816,7 +816,7 @@ public class PDAVirtualMachine {
|
|||
return;
|
||||
}
|
||||
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (Object val : thread.fStack) {
|
||||
result.append(val);
|
||||
result.append('|');
|
||||
|
@ -871,7 +871,7 @@ public class PDAVirtualMachine {
|
|||
System.arraycopy(fCode, 0, thread.fThreadCode, 0, fCode.length);
|
||||
for (int i = 0; i < numEvalLines; i++) {
|
||||
String line = tokenizer.nextToken();
|
||||
StringBuffer lineBuf = new StringBuffer(line.length());
|
||||
StringBuilder lineBuf = new StringBuilder(line.length());
|
||||
Matcher matcher = fPackPattern.matcher(line);
|
||||
int lastMatchEnd = 0;
|
||||
while (matcher.find()) {
|
||||
|
@ -937,7 +937,7 @@ public class PDAVirtualMachine {
|
|||
for (Register reg : fRegisters.values()) {
|
||||
groups.add(reg.fGroup);
|
||||
}
|
||||
StringBuffer response = new StringBuffer();
|
||||
StringBuilder response = new StringBuilder();
|
||||
for (String group : groups) {
|
||||
response.append(group);
|
||||
response.append('|');
|
||||
|
@ -972,7 +972,7 @@ public class PDAVirtualMachine {
|
|||
void debugRegisters(Args args) {
|
||||
String group = args.getNextStringArg();
|
||||
|
||||
StringBuffer response = new StringBuffer();
|
||||
StringBuilder response = new StringBuilder();
|
||||
for (Register reg : fRegisters.values()) {
|
||||
if (group.equals(reg.fGroup)) {
|
||||
response.append(reg.fName);
|
||||
|
@ -1074,7 +1074,7 @@ public class PDAVirtualMachine {
|
|||
return;
|
||||
}
|
||||
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (Frame frame : thread.fFrames) {
|
||||
result.append(printFrame(frame));
|
||||
result.append('#');
|
||||
|
@ -1099,7 +1099,7 @@ public class PDAVirtualMachine {
|
|||
* filename | line number | function name | var | var | var | var ...
|
||||
*/
|
||||
private String printFrame(Frame frame) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append(fFilename);
|
||||
buf.append('|');
|
||||
buf.append(frame.fPC);
|
||||
|
@ -1205,7 +1205,7 @@ public class PDAVirtualMachine {
|
|||
}
|
||||
|
||||
void debugThreads() {
|
||||
StringBuffer response = new StringBuffer();
|
||||
StringBuilder response = new StringBuilder();
|
||||
for (int threadId : fThreads.keySet()) {
|
||||
response.append(threadId);
|
||||
response.append(' ');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2008, 2016 Wind River Systems 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
|
||||
|
@ -414,7 +414,7 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
|
|||
String formattedResult = "";
|
||||
if (HEX_FORMAT.equals(formatId)) {
|
||||
formattedResult = Integer.toHexString(intResult);
|
||||
StringBuffer prefix = new StringBuffer("0x");
|
||||
StringBuilder prefix = new StringBuilder("0x");
|
||||
for (int i = 0; i < 8 - formattedResult.length(); i++) {
|
||||
prefix.append('0');
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
|
|||
formattedResult = prefix.toString();
|
||||
} else if (OCTAL_FORMAT.equals(formatId)) {
|
||||
formattedResult = Integer.toOctalString(intResult);
|
||||
StringBuffer prefix = new StringBuffer("0c");
|
||||
StringBuilder prefix = new StringBuilder("0c");
|
||||
for (int i = 0; i < 16 - formattedResult.length(); i++) {
|
||||
prefix.append('0');
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ public class PDAExpressions extends AbstractDsfService implements ICachingServic
|
|||
formattedResult = prefix.toString();
|
||||
} else if (BINARY_FORMAT.equals(formatId)) {
|
||||
formattedResult = Integer.toBinaryString(intResult);
|
||||
StringBuffer prefix = new StringBuffer("0b");
|
||||
StringBuilder prefix = new StringBuilder("0b");
|
||||
for (int i = 0; i < 32 - formattedResult.length(); i++) {
|
||||
prefix.append('0');
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2016 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
|
||||
|
@ -115,7 +115,7 @@ public class PreProcessor extends Task {
|
|||
if (!fDestDir.exists()) {
|
||||
throw new BuildException("destdir does not exist: " + fDestDir.getAbsolutePath());
|
||||
}
|
||||
StringBuffer buf = new StringBuffer("Symbols: ");
|
||||
StringBuilder buf = new StringBuilder("Symbols: ");
|
||||
String[] symbols = fSymbols.toArray(new String[fSymbols.size()]);
|
||||
for (int i = 0; i < symbols.length; i++) {
|
||||
String symbol = symbols[i];
|
||||
|
@ -189,7 +189,7 @@ public class PreProcessor extends Task {
|
|||
*/
|
||||
public String preProcessFile(File srcFile, String strip) {
|
||||
try (BufferedReader reader = new BufferedReader(new FileReader(srcFile))) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
String line = reader.readLine();
|
||||
String activeSymbol = null;
|
||||
int state = STATE_OUTSIDE_CONDITION;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2009 Wind River Systems and others.
|
||||
* Copyright (c) 2008, 2016 Wind River Systems 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
|
||||
|
@ -121,7 +121,7 @@ public class AsyncQuicksort {
|
|||
}
|
||||
|
||||
static void printArray(int[] array, int left, int right, int pivot) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (int i = 0; i < array.length; i++ ) {
|
||||
if (i == left) {
|
||||
buffer.append('>');
|
||||
|
|
|
@ -481,7 +481,7 @@ public class ViewerUpdatesListener
|
|||
}
|
||||
|
||||
private String toString(int flags) {
|
||||
StringBuffer buf = new StringBuffer("Viewer Update Listener");
|
||||
StringBuilder buf = new StringBuilder("Viewer Update Listener");
|
||||
|
||||
if (fFailOnRedundantUpdates) {
|
||||
buf.append("\n\t");
|
||||
|
@ -603,7 +603,7 @@ public class ViewerUpdatesListener
|
|||
if (set.isEmpty()) {
|
||||
return "(EMPTY)";
|
||||
}
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (Iterator<TreePath> itr = set.iterator(); itr.hasNext(); ) {
|
||||
buf.append("\n\t\t");
|
||||
buf.append(toStringTreePath(itr.next()));
|
||||
|
@ -615,7 +615,7 @@ public class ViewerUpdatesListener
|
|||
if (set.isEmpty()) {
|
||||
return "(EMPTY)";
|
||||
}
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (Iterator<IViewerUpdate> itr = set.iterator(); itr.hasNext(); ) {
|
||||
buf.append("\n\t\t");
|
||||
buf.append(toStringTreePath((itr.next()).getElementPath()));
|
||||
|
@ -627,7 +627,7 @@ public class ViewerUpdatesListener
|
|||
if (map.isEmpty()) {
|
||||
return "(EMPTY)";
|
||||
}
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (Iterator<TreePath> itr = map.keySet().iterator(); itr.hasNext(); ) {
|
||||
buf.append("\n\t\t");
|
||||
TreePath path = itr.next();
|
||||
|
@ -643,7 +643,7 @@ public class ViewerUpdatesListener
|
|||
if (path.getSegmentCount() == 0) {
|
||||
return "/";
|
||||
}
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for (int i = 0; i < path.getSegmentCount(); i++) {
|
||||
buf.append("/");
|
||||
buf.append(path.getSegment(i));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Wind River Systems and others.
|
||||
* Copyright (c) 2009, 2016 Wind River Systems 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
|
||||
|
@ -616,7 +616,7 @@ public class TestModel extends AbstractDsfService implements IFormattedValues {
|
|||
}
|
||||
|
||||
public String getElementString(TestElement element, String indent) {
|
||||
StringBuffer builder = new StringBuffer();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append(indent);
|
||||
builder.append(element.toString());
|
||||
builder.append('\n');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2007, 2016 QNX Software Systems 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
|
||||
|
@ -630,7 +630,7 @@ public class GDBJtagDSFFinalLaunchSequence extends FinalLaunchSequence {
|
|||
private String composeCommand(Collection<String> commands) {
|
||||
if (commands.isEmpty())
|
||||
return null;
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Iterator<String> it = commands.iterator();
|
||||
while (it.hasNext()) {
|
||||
sb.append(it.next());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 QNX Software Systems and others.
|
||||
* Copyright (c) 2007, 2016 QNX Software Systems 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
|
||||
|
@ -53,7 +53,7 @@ public class GDBJtagImages {
|
|||
}
|
||||
|
||||
private static URL makeIconFileURL(String prefix, String name) {
|
||||
StringBuffer buffer= new StringBuffer(prefix);
|
||||
StringBuilder buffer= new StringBuilder(prefix);
|
||||
buffer.append(name);
|
||||
try {
|
||||
return new URL(iconBaseURL, buffer.toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 Red Hat.
|
||||
* Copyright (c) 2015, 2016 Red Hat 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
|
||||
|
@ -122,7 +122,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate
|
|||
String commandDir = commandPath.removeLastSegments(1)
|
||||
.toString();
|
||||
|
||||
StringBuffer b = new StringBuffer();
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(commandPath.toString().trim());
|
||||
|
||||
String arguments = getProgramArguments(configuration);
|
||||
|
@ -181,7 +181,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate
|
|||
String commandDir = commandPath.removeLastSegments(1)
|
||||
.toString();
|
||||
|
||||
StringBuffer b = new StringBuffer();
|
||||
StringBuilder b = new StringBuilder();
|
||||
|
||||
b.append(gdbserverCommand + " " + commandArguments); //$NON-NLS-1$
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015, 2016 Red Hat
|
||||
* Copyright (c) 2015, 2016 Red Hat 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
|
||||
|
@ -361,7 +361,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab implements
|
|||
public void addControlAccessibleListener(Control control, String controlName) {
|
||||
// Strip mnemonic (&)
|
||||
String[] strs = controlName.split("&"); //$NON-NLS-1$
|
||||
StringBuffer stripped = new StringBuffer();
|
||||
StringBuilder stripped = new StringBuilder();
|
||||
for (int i = 0; i < strs.length; i++) {
|
||||
stripped.append(strs[i]);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2014, 2015 Red Hat.
|
||||
* Copyright (c) 2014, 2016 Red Hat 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
|
||||
|
@ -68,7 +68,7 @@ public class SWTImagesFactory {
|
|||
}
|
||||
|
||||
private static URL makeIconFileURL(String prefix, String name) {
|
||||
StringBuffer buffer = new StringBuffer(prefix);
|
||||
StringBuilder buffer = new StringBuilder(prefix);
|
||||
buffer.append(name);
|
||||
try {
|
||||
return new URL(fgIconBaseURL, buffer.toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Nokia and others.
|
||||
* Copyright (c) 2010, 2016 Nokia 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2016 QNX Software Systems 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
|
||||
|
@ -68,7 +68,7 @@ public class LaunchImages {
|
|||
|
||||
|
||||
private static URL makeIconFileURL(String prefix, String name) {
|
||||
StringBuffer buffer= new StringBuffer(prefix);
|
||||
StringBuilder buffer= new StringBuilder(prefix);
|
||||
buffer.append(name);
|
||||
try {
|
||||
return new URL(fgIconBaseURL, buffer.toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2016 QNX Software Systems 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
|
||||
|
@ -123,7 +123,7 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
|
|||
public void addControlAccessibleListener(Control control, String controlName) {
|
||||
// Strip mnemonic (&)
|
||||
String[] strs = controlName.split("&"); //$NON-NLS-1$
|
||||
StringBuffer stripped = new StringBuffer();
|
||||
StringBuilder stripped = new StringBuilder();
|
||||
for (int i = 0; i < strs.length; i++) {
|
||||
stripped.append(strs[i]);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2014 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2016 QNX Software Systems 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
|
||||
|
@ -240,7 +240,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getPath().lastSegment());
|
||||
return name.toString();
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2008, 2016 QNX Software Systems 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
|
||||
|
@ -366,7 +366,7 @@ public class CMainTab2 extends CAbstractMainTab {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getPath().lastSegment());
|
||||
return name.toString();
|
||||
}
|
||||
|
@ -396,7 +396,7 @@ public class CMainTab2 extends CAbstractMainTab {
|
|||
public String getText(Object element) {
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuffer name = new StringBuffer();
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010, 2015 Nokia Siemens Networks Oyj, Finland.
|
||||
* Copyright (c) 2010, 2016 Nokia Siemens Networks Oyj, Finland.
|
||||
* 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
|
||||
|
@ -381,7 +381,7 @@ public class LlvmEnvironmentVariableSupplier implements IConfigurationEnvironmen
|
|||
if (oldPath!=null) {
|
||||
//if the oldPath isn't empty
|
||||
if (!oldPath.trim().isEmpty()) {
|
||||
StringBuffer sB = new StringBuffer();
|
||||
StringBuilder sB = new StringBuilder();
|
||||
// append old path
|
||||
sB.append(oldPath);
|
||||
// append a path separator
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010-2013 Nokia Siemens Networks Oyj, Finland.
|
||||
* Copyright (c) 2010, 2016 Nokia Siemens Networks Oyj, Finland.
|
||||
* 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
|
||||
|
@ -165,7 +165,7 @@ public class LlvmPreferenceStore {
|
|||
* @param value the string-valued preference
|
||||
*/
|
||||
public static void appendValue(String name, String value) {
|
||||
StringBuffer sB = new StringBuffer();
|
||||
StringBuilder sB = new StringBuilder();
|
||||
String paths = null;
|
||||
//get existing paths
|
||||
paths = getExistingPaths(name);
|
||||
|
@ -233,7 +233,7 @@ public class LlvmPreferenceStore {
|
|||
* @param value Value to remove from the preference store
|
||||
*/
|
||||
public static void removeValue(String name, String value) {
|
||||
StringBuffer sB = new StringBuffer();
|
||||
StringBuilder sB = new StringBuilder();
|
||||
String existingValues = null;
|
||||
String newValue = null;
|
||||
//get existing values
|
||||
|
@ -250,7 +250,7 @@ public class LlvmPreferenceStore {
|
|||
exValArray = LlvmToolOptionPathUtil.removePathFromExistingPathList(exValArray, value);
|
||||
//if the array isn't empty
|
||||
if (exValArray.length > 0) {
|
||||
//append all values to the StringBuffer excluding the removed one
|
||||
//append all values to the StringBuilder excluding the removed one
|
||||
for (String val : exValArray) {
|
||||
//append a value
|
||||
sB.append(val);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010-2016 Nokia Siemens Networks Oyj, Finland.
|
||||
* Copyright (c) 2010, 2016 Nokia Siemens Networks Oyj, Finland.
|
||||
* 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
|
||||
|
@ -831,7 +831,7 @@ public class LlvmToolOptionPathUtil {
|
|||
* a String array separated by a path separator.
|
||||
*/
|
||||
public static String arrayToString(String[] array) {
|
||||
StringBuffer sB = new StringBuffer();
|
||||
StringBuilder sB = new StringBuilder();
|
||||
//if array isn't empty and doesn't contain an empty String
|
||||
if (array.length>0 /*&& !array[0].isEmpty()*/) {
|
||||
for (String i : array) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2016 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
|
||||
|
@ -115,7 +115,7 @@ public class LRTests extends AST2Tests {
|
|||
|
||||
|
||||
public void testBug191279() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" /**/ \n");
|
||||
sb.append("# define YO 99 /**/ \n");
|
||||
sb.append("# undef YO /**/ ");
|
||||
|
@ -126,7 +126,7 @@ public class LRTests extends AST2Tests {
|
|||
|
||||
|
||||
public void testBug191324() throws Exception {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("int x$y = 99; \n");
|
||||
sb.append("int $q = 100; \n"); // can use $ as first character in identifier
|
||||
sb.append("#ifndef SS$_INVFILFOROP \n");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010, 2012 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -84,7 +84,7 @@ public class FPAddressPane extends FPAbstractPane
|
|||
protected int getCellWidth()
|
||||
{
|
||||
GC gc = new GC(this);
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for(int index = 0; index < getCellCharacterCount(); index++)
|
||||
buf.append("0"); //$NON-NLS-1$
|
||||
int width = gc.textExtent(buf.toString()).x;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Wind River Systems Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems Inc. 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
|
||||
|
@ -1428,7 +1428,7 @@ class CopyAction extends Action
|
|||
|
||||
if (rows * columns * bytesPerColumn < lengthToRead.intValue()) rows++;
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007-2016 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2007, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -428,7 +428,7 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
|
||||
private String pad(int characterCount, String value)
|
||||
{
|
||||
StringBuffer sb = new StringBuffer(value);
|
||||
StringBuilder sb = new StringBuilder(value);
|
||||
for(int i = 0; i < characterCount - value.length(); i++)
|
||||
sb.insert(0, "0"); //$NON-NLS-1$
|
||||
return sb.toString();
|
||||
|
@ -1340,7 +1340,7 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
{
|
||||
if(fBytes == null)
|
||||
return ""; //$NON-NLS-1$
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for(int i = 0; i < fBytes.length; i++)
|
||||
buf.append(BigInteger.valueOf(fBytes[i]).toString(16) + " "); //$NON-NLS-1$
|
||||
return buf.toString();
|
||||
|
|
|
@ -91,7 +91,7 @@ public void updateMemorySpaces(String[] ids) {
|
|||
* preferences store
|
||||
*/
|
||||
private void setMemorySpaceIds(String[] memorySpaces) {
|
||||
StringBuffer csv = new StringBuffer();
|
||||
StringBuilder csv = new StringBuilder();
|
||||
for (int i = 0; i < memorySpaces.length; i++) {
|
||||
csv.append(memorySpaces[i]);
|
||||
if (i < memorySpaces.length - 1) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006-2012 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -87,7 +87,7 @@ public class AddressPane extends AbstractPane
|
|||
protected int getCellWidth()
|
||||
{
|
||||
GC gc = new GC(this);
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for(int i = 0; i < getCellCharacterCount(); i++)
|
||||
buf.append("0");
|
||||
int width = gc.textExtent(buf.toString()).x;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006-2016 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -58,7 +58,7 @@ public class DataPane extends AbstractPane
|
|||
if(cellText == null)
|
||||
return;
|
||||
|
||||
StringBuffer cellTextBuffer = new StringBuffer(cellText);
|
||||
StringBuilder cellTextBuffer = new StringBuilder(cellText);
|
||||
cellTextBuffer.setCharAt(subCellPosition, character);
|
||||
BigInteger value = new BigInteger(cellTextBuffer.toString().trim(),
|
||||
fRendering.getNumericRadix(fRendering.getRadix()));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2015 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -1551,7 +1551,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
|
||||
public String getAddressString(BigInteger address)
|
||||
{
|
||||
StringBuffer addressString = new StringBuffer(address.toString(16)
|
||||
StringBuilder addressString = new StringBuilder(address.toString(16)
|
||||
.toUpperCase());
|
||||
for(int chars = getAddressBytes() * 2 - addressString.length(); chars > 0; chars--)
|
||||
{
|
||||
|
@ -2138,7 +2138,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
}
|
||||
}
|
||||
|
||||
StringBuffer errorText = new StringBuffer();
|
||||
StringBuilder errorText = new StringBuilder();
|
||||
for(int i = getRadixCharacterCount(radix, bytes.length); i > 0; i--)
|
||||
errorText.append(getPaddingCharacter());
|
||||
|
||||
|
@ -2220,7 +2220,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
// if any bytes are not readable, return ?'s
|
||||
if(!readable)
|
||||
{
|
||||
StringBuffer errorText = new StringBuffer();
|
||||
StringBuilder errorText = new StringBuilder();
|
||||
for(int i = memoryBytes.length; i > 0; i--)
|
||||
errorText.append(getPaddingCharacter());
|
||||
return errorText.toString();
|
||||
|
@ -2272,7 +2272,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
try
|
||||
{
|
||||
// convert bytes to string using desired character set
|
||||
StringBuffer buf = new StringBuffer(new String(bytes, this.getCharacterSet(textMode)));
|
||||
StringBuilder buf = new StringBuilder(new String(bytes, this.getCharacterSet(textMode)));
|
||||
|
||||
// pad string to (byte count - string length) with spaces
|
||||
for(int i = 0; i < memoryBytes.length - buf.length(); i++)
|
||||
|
@ -2282,7 +2282,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
|
|||
catch(Exception e)
|
||||
{
|
||||
// return ?s the length of byte count
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for(int i = 0; i < memoryBytes.length - buf.length(); i++)
|
||||
buf.append(getPaddingCharacter());
|
||||
return buf.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006-2013 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -53,7 +53,7 @@ public class TextPane extends AbstractPane
|
|||
if(cellText == null)
|
||||
return;
|
||||
|
||||
StringBuffer cellTextBuffer = new StringBuffer(cellText);
|
||||
StringBuilder cellTextBuffer = new StringBuilder(cellText);
|
||||
cellTextBuffer.setCharAt(subCellPosition, character);
|
||||
|
||||
byte byteData[] = cellTextBuffer.toString().getBytes(fRendering.getCharacterSet(fRendering.getTextMode()));
|
||||
|
|
|
@ -1692,7 +1692,7 @@ abstract class CopyAction extends Action
|
|||
if(rows * columns * bytesPerColumn < lengthToRead.intValue())
|
||||
rows++;
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
for(int row = 0; row < rows; row++)
|
||||
{
|
||||
|
@ -1799,4 +1799,4 @@ abstract class CopyAction extends Action
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -516,7 +516,7 @@ public class PlainTextExporter implements IMemoryExporter {
|
|||
|
||||
monitor.subTask(String.format(Messages.getString("Exporter.Progress"), length.toString(10), transferAddress.toString(16))); //$NON-NLS-1$
|
||||
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < length.divide(dataCellSize).intValue(); i++)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -542,7 +542,7 @@ public class SRecordExporter implements IMemoryExporter
|
|||
|
||||
writer.write("S3"); // FIXME 4 byte address //$NON-NLS-1$
|
||||
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
BigInteger sRecordLength = BigInteger.valueOf(4); // address size
|
||||
sRecordLength = sRecordLength.add(length);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2006, 2016 Wind River Systems, Inc. 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
|
||||
|
@ -439,7 +439,7 @@ public class SRecordImporter implements IMemoryImporter {
|
|||
* represented by the pairs of characters making up the records length, address,
|
||||
* and the code/data fields.
|
||||
*/
|
||||
StringBuffer buf = new StringBuffer(line.substring(2));
|
||||
StringBuilder buf = new StringBuilder(line.substring(2));
|
||||
byte checksum = 0;
|
||||
|
||||
for(int i = 0; i < buf.length(); i+=2)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2015, 2016 QNX Software Systems 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
|
||||
|
@ -92,7 +92,7 @@ public class QtBuilder extends ACBuilder {
|
|||
getBuildConfig(), true);
|
||||
Process process = processBuilder.start();
|
||||
|
||||
StringBuffer msg = new StringBuffer();
|
||||
StringBuilder msg = new StringBuilder();
|
||||
for (String arg : command) {
|
||||
msg.append(arg).append(' ');
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2014, 2015 IBM Corporation and others.
|
||||
* Copyright (c) 2014, 2016 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
|
||||
|
@ -186,7 +186,7 @@ public class RemoteCommandLauncher implements ICommandLauncher {
|
|||
if (fConnection != null) {
|
||||
nl = fConnection.getProperty(IRemoteConnection.LINE_SEPARATOR_PROPERTY);
|
||||
}
|
||||
StringBuffer buf = new StringBuffer();
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (commandArgs != null) {
|
||||
for (String commandArg : commandArgs) {
|
||||
if (quote && (commandArg.contains(" ") || commandArg.contains("\"") || commandArg.contains("\\"))) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2015, 2016 QNX Software Systems 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
|
||||
|
@ -172,7 +172,7 @@ public class ArduinoPlatform {
|
|||
try (BufferedReader reader = new BufferedReader(
|
||||
new FileReader(getInstallPath().resolve("platform.txt").toFile()))) { //$NON-NLS-1$
|
||||
// There are regex's here and need to preserve the \'s
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
|
||||
buffer.append(line.replace("\\", "\\\\")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append('\n');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 QNX Software Systems and others.
|
||||
* Copyright (c) 2015, 2016 QNX Software Systems 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
|
||||
|
@ -85,7 +85,7 @@ public class ArduinoLaunchConfigurationDelegate extends LaunchConfigurationTarge
|
|||
monitor);
|
||||
String[] uploadCmd = arduinoConfig.getUploadCommand(arduinoTarget.getPortName());
|
||||
|
||||
StringBuffer cmdStr = new StringBuffer(uploadCmd[0]);
|
||||
StringBuilder cmdStr = new StringBuilder(uploadCmd[0]);
|
||||
for (int i = 1; i < uploadCmd.length; ++i) {
|
||||
cmdStr.append(' ');
|
||||
cmdStr.append(uploadCmd[i]);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2012 Tilera Corporation and others.
|
||||
* Copyright (c) 2012, 2016 Tilera 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
|
||||
|
@ -60,7 +60,7 @@ public class Event
|
|||
|
||||
/** Returns string representation of event */
|
||||
public String toString() {
|
||||
StringBuffer result = new StringBuffer();
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append(getClass().getSimpleName());
|
||||
result.append("[");
|
||||
if (m_type != UNDEFINED) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 QNX Software Systems and others.
|
||||
* Copyright (c) 2007, 2016 QNX Software Systems 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
|
||||
|
@ -154,7 +154,7 @@ public class WinEnvironmentVariableSupplier
|
|||
}
|
||||
|
||||
// INCLUDE
|
||||
StringBuffer buff = new StringBuffer();
|
||||
StringBuilder buff = new StringBuilder();
|
||||
IPath includePaths[] = getIncludePath();
|
||||
for (IPath path : includePaths) {
|
||||
buff.append(path.toOSString()).append(';');
|
||||
|
@ -162,7 +162,7 @@ public class WinEnvironmentVariableSupplier
|
|||
addvar(new WindowsBuildEnvironmentVariable("INCLUDE", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
|
||||
|
||||
// LIB
|
||||
buff = new StringBuffer();
|
||||
buff = new StringBuilder();
|
||||
if (vcDir != null)
|
||||
buff.append(vcDir).append("Lib;");
|
||||
if (sdkDir != null) {
|
||||
|
@ -173,7 +173,7 @@ public class WinEnvironmentVariableSupplier
|
|||
addvar(new WindowsBuildEnvironmentVariable("LIB", buff.toString(), IBuildEnvironmentVariable.ENVVAR_PREPEND));
|
||||
|
||||
// PATH
|
||||
buff = new StringBuffer();
|
||||
buff = new StringBuilder();
|
||||
if (vcDir != null) {
|
||||
buff.append(vcDir).append("..\\Common7\\IDE;");
|
||||
buff.append(vcDir).append("..\\Common7\\Tools;");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2012 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2016 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
|
||||
|
@ -61,7 +61,7 @@ public class XLCBuildOutputParserUtility {
|
|||
}
|
||||
public static IPath convertCygpath(IPath path) {
|
||||
if (path.segmentCount() > 1 && path.segment(0).equals("cygdrive")) { //$NON-NLS-1$
|
||||
StringBuffer buf = new StringBuffer(2);
|
||||
StringBuilder buf = new StringBuilder(2);
|
||||
buf.append(Character.toUpperCase(path.segment(1).charAt(0)));
|
||||
buf.append(':');
|
||||
path = path.removeFirstSegments(2);
|
||||
|
@ -480,7 +480,7 @@ public class XLCBuildOutputParserUtility {
|
|||
if (column > 0) {
|
||||
char driveLetter = path.charAt(column - 1);
|
||||
if (Character.isLowerCase(driveLetter)) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (column - 1 > 0) {
|
||||
sb.append(path.substring(0, column-1));
|
||||
}
|
||||
|
@ -493,9 +493,9 @@ public class XLCBuildOutputParserUtility {
|
|||
return (new Path(path)).toString(); // convert separators to '/'
|
||||
}
|
||||
// lose "./" segments since they confuse the Path normalization
|
||||
StringBuffer buf = new StringBuffer(path);
|
||||
StringBuilder buf = new StringBuilder(path);
|
||||
int len = buf.length();
|
||||
StringBuffer newBuf = new StringBuffer(buf.length());
|
||||
StringBuilder newBuf = new StringBuilder(buf.length());
|
||||
int scp = 0; // starting copy point
|
||||
int ssp = 0; // starting search point
|
||||
int sdot;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2013 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2016 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
|
||||
|
@ -135,7 +135,7 @@ public class XLCPerProjectBuildOutputParser extends
|
|||
}
|
||||
}
|
||||
else {
|
||||
StringBuffer line= new StringBuffer();
|
||||
StringBuilder line= new StringBuilder();
|
||||
for (int j = 0; j < tokens.length; j++) {
|
||||
line.append(tokens[j]);
|
||||
line.append(' ');
|
||||
|
|
Loading…
Add table
Reference in a new issue