mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 492230 - Replace buffer.append(a+b) calls
When using a `StringBuilder` or `StringBuffer` to create a string message, using implicit string concatenation inside an `.append()` call will create a nested StringBuilder for the purposes of creating the arguments, which will subsequently be converted to a String and then passed to the outer StringBuilder. Skip the creation of the intermediate object and String by simply replacing such calls with `buffer.append(a).append(b)`. Where values are compile time String constants, leave as is so that the javac compiler can perform compile-time String concatenation. Ensure that NEWLINE isn't appended in such a way since it is not a compile time constant `System.getProperty("line.separator")` Change-Id: I4126aefb2272f06b08332e004d7ea76b6f02cdba Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
parent
e21fc12f90
commit
6bdca5f4a2
72 changed files with 344 additions and 330 deletions
|
@ -303,12 +303,12 @@ public class AutotoolsConfiguration implements IAConfiguration {
|
|||
IConfigureOption childOption = getOption(childOptions[j].getName());
|
||||
String parameter = childOption.getParameter();
|
||||
if (!parameter.isEmpty())
|
||||
buf.append(" " + parameter);
|
||||
buf.append(' ').append(parameter);
|
||||
}
|
||||
} else {
|
||||
String parameter = option.getParameter();
|
||||
if (!parameter.isEmpty())
|
||||
buf.append(" " + parameter);
|
||||
buf.append(' ').append(parameter);
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
|
|
|
@ -44,23 +44,23 @@ public class FlagConfigureOption extends AbstractConfigurationOption {
|
|||
for (String flagName : flagNames) {
|
||||
parms.append(flagSeparator);
|
||||
flagSeparator = " "; //$NON-NLS-1$
|
||||
StringBuilder parm = new StringBuilder(flagName+"=\""); //$NON-NLS-1$
|
||||
StringBuilder parm = new StringBuilder(flagName).append("=\""); //$NON-NLS-1$
|
||||
boolean haveParm = false;
|
||||
if (isParmSet()) {
|
||||
String separator = "";
|
||||
String separator = ""; //$NON-NLS-1$
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
String fvname = children.get(i);
|
||||
IConfigureOption o = cfg.getOption(fvname);
|
||||
if (o.isParmSet()) {
|
||||
if (o instanceof IFlagConfigureValueOption) {
|
||||
parm.append(separator + ((IFlagConfigureValueOption)o).getFlags()); //$NON-NLS-1$
|
||||
separator = " ";
|
||||
parm.append(separator).append(((IFlagConfigureValueOption)o).getFlags());
|
||||
separator = " "; //$NON-NLS-1$
|
||||
haveParm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (haveParm) {
|
||||
parm.append("\""); //$NON-NLS-1$
|
||||
parm.append('"');
|
||||
parms.append(parm);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,25 +41,21 @@ public class AutoconfPartitioner extends FastPartitioner {
|
|||
|
||||
public void printPartitions(ITypedRegion[] partitions)
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
|
||||
for (int i = 0; i < partitions.length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
buffer.append("Partition type: " + partitions[i].getType() //$NON-NLS-1$
|
||||
System.out.print("Partition type: " + partitions[i].getType() //$NON-NLS-1$
|
||||
+ ", offset: " + partitions[i].getOffset() //$NON-NLS-1$
|
||||
+ ", length: " + partitions[i].getLength()); //$NON-NLS-1$
|
||||
buffer.append("\n"); //$NON-NLS-1$
|
||||
buffer.append("Text:\n"); //$NON-NLS-1$
|
||||
buffer.append(super.fDocument.get(partitions[i].getOffset(), partitions[i].getLength()));
|
||||
buffer.append("\n---------------------------\n\n\n"); //$NON-NLS-1$
|
||||
+ ", length: " + partitions[i].getLength() //$NON-NLS-1$
|
||||
+"\nText:\n" //$NON-NLS-1$
|
||||
+ super.fDocument.get(partitions[i].getOffset(), partitions[i].getLength())
|
||||
+ "\n---------------------------\n\n\n"); //$NON-NLS-1$
|
||||
}
|
||||
catch (BadLocationException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
System.out.print(buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
|||
if (currentWord.startsWith("'")) { //$NON-NLS-1$
|
||||
StringBuilder tmpTarget = new StringBuilder();
|
||||
while (!currentWord.endsWith("'")) { //$NON-NLS-1$
|
||||
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
||||
tmpTarget.append(currentWord).append(' ');
|
||||
if (!st.hasMoreTokens()) {
|
||||
// quote not closed properly, so return null
|
||||
return null;
|
||||
|
@ -146,7 +146,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
|||
if (currentWord.startsWith("\"")) { //$NON-NLS-1$
|
||||
StringBuilder tmpTarget = new StringBuilder();
|
||||
while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
|
||||
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
||||
tmpTarget.append(currentWord).append(' ');
|
||||
if (!st.hasMoreTokens()) {
|
||||
// double quote not closed properly, so return null
|
||||
return null;
|
||||
|
@ -340,7 +340,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
|||
// POSIX-compliant shells.
|
||||
StringBuilder command1 = new StringBuilder(strippedCommand);
|
||||
for (String arg : argumentList) {
|
||||
command1.append(" " + arg);
|
||||
command1.append(' ').append(arg);
|
||||
}
|
||||
newArgumentList = new String[] { "-c", command1.toString() };
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2016 Red Hat Inc..
|
||||
* Copyright (c) 2006, 2016 Red Hat 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
|
||||
|
@ -76,7 +76,7 @@ public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
|
|||
StringBuilder toReturn = new StringBuilder();
|
||||
toReturn.append(preReqs[0]);
|
||||
for (int i = 1; i < preReqs.length; i++) {
|
||||
toReturn.append(" " + preReqs[i]);
|
||||
toReturn.append(' ').append(preReqs[i]);
|
||||
}
|
||||
return toReturn.toString();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2016 Red Hat, Inc.
|
||||
* Copyright (c) 2006, 2016 Red Hat, 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
|
||||
|
@ -294,7 +294,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
Element elem = document.getElementById(name);
|
||||
if (null != elem) {
|
||||
int prototypeCount = 0;
|
||||
buffer.append("<B>Macro:</B> " + name);
|
||||
buffer.append("<B>Macro:</B> ").append(name);
|
||||
NodeList nl = elem.getChildNodes();
|
||||
for (int i = 0; i < nl.getLength(); ++i) {
|
||||
Node n = nl.item(i);
|
||||
|
@ -304,8 +304,11 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
++prototypeCount;
|
||||
if (prototypeCount == 1) {
|
||||
buffer.append(" (");
|
||||
} else
|
||||
buffer.append(" <B>or</B> " + name + " (<I>"); //$NON-NLS-2$
|
||||
} else {
|
||||
buffer.append(" <B>or</B> "); //$NON-NLS-2$
|
||||
buffer.append(name);
|
||||
buffer.append(" (<I>"); //$NON-NLS-2$
|
||||
}
|
||||
NodeList varList = n.getChildNodes();
|
||||
for (int j = 0; j < varList.getLength(); ++j) {
|
||||
Node v = varList.item(j);
|
||||
|
@ -317,10 +320,10 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
|||
if (prototype.length() == 0)
|
||||
prototype.append(parm);
|
||||
else
|
||||
prototype.append(", " + parm);
|
||||
prototype.append(", ").append(parm);
|
||||
}
|
||||
}
|
||||
buffer.append(prototype.toString() + "</I>)<br>"); //$NON-NLS-1$
|
||||
buffer.append(prototype).append("</I>)<br>"); //$NON-NLS-1$
|
||||
}
|
||||
if (nodeName.equals("synopsis")) { //$NON-NLS-1$
|
||||
Node textNode = n.getLastChild();
|
||||
|
|
|
@ -77,7 +77,9 @@ public class SCDMakefileGenerator extends DefaultRunSIProvider {
|
|||
buffer.append(DENDL);
|
||||
buffer.append("COMMANDS := "); //$NON-NLS-1$
|
||||
for (CCommandDSC cmd : commands) {
|
||||
buffer.append("\t\\"+ENDL+"\t scd_cmd_"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("\t\\"); //$NON-NLS-1$
|
||||
buffer.append(ENDL);
|
||||
buffer.append("\t scd_cmd_"); //$NON-NLS-1$
|
||||
buffer.append(cmd.getCommandId());
|
||||
}
|
||||
buffer.append(DENDL);
|
||||
|
@ -88,7 +90,9 @@ public class SCDMakefileGenerator extends DefaultRunSIProvider {
|
|||
buffer.append(cmd.getCommandId());
|
||||
buffer.append(':');
|
||||
buffer.append(ENDL);
|
||||
buffer.append("\t@echo begin generating scanner info for $@"+ENDL+"\t"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("\t@echo begin generating scanner info for $@"); //$NON-NLS-1$
|
||||
buffer.append(ENDL);
|
||||
buffer.append('\t');
|
||||
buffer.append(cmd.getSCDRunnableCommand(true, true)); // quote includes and defines
|
||||
for (String arg : prepareArguments(buildInfo.isUseDefaultProviderCommand(providerId))) {
|
||||
buffer.append(' ');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011, 2012 Broadcom Corporation and others.
|
||||
* Copyright (c) 2011, 2016 Broadcom 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
|
||||
|
@ -236,7 +236,7 @@ public abstract class AbstractBuilderTest extends TestCase {
|
|||
int i = 0;
|
||||
// line number
|
||||
if (attrs[i] != null)
|
||||
sb.append(" line " + attrs[i]);
|
||||
sb.append(" line ").append(attrs[i]); //$NON-NLS-1$
|
||||
// severity
|
||||
if (attrs[++i] != null) {
|
||||
switch ((Integer)attrs[i++]) {
|
||||
|
@ -254,7 +254,7 @@ public abstract class AbstractBuilderTest extends TestCase {
|
|||
// append the rest of the string fields
|
||||
do {
|
||||
if (attrs[i] != null)
|
||||
sb.append(" " + attrs[i]);
|
||||
sb.append(' ').append(attrs[i]);
|
||||
} while (++i < attrs.length);
|
||||
// Finally print the string
|
||||
System.err.println(sb.toString());
|
||||
|
@ -275,4 +275,4 @@ public abstract class AbstractBuilderTest extends TestCase {
|
|||
return ResourcesPlugin.getWorkspace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -463,10 +463,10 @@ public class ManagedBuildTestHelper {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("File ").append(testFileLocation.lastSegment()).append(" does not match its benchmark.\n ");
|
||||
buffer.append("expected:\n ");
|
||||
buffer.append("\"").append(benchmarkBuffer).append("\"");
|
||||
buffer.append('"').append(benchmarkBuffer).append('"');
|
||||
buffer.append("\n\n ");
|
||||
buffer.append("but was:\n ");
|
||||
buffer.append("\"").append(testBuffer).append("\"");
|
||||
buffer.append('"').append(testBuffer).append('"');
|
||||
buffer.append("\n\n ");
|
||||
|
||||
buffer.append(">>>>>>>>>>>>>>>start diff: \n");
|
||||
|
@ -787,10 +787,10 @@ public class ManagedBuildTestHelper {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("File ").append(tFile.getName()).append(" does not match its benchmark.\n ");
|
||||
buffer.append("expected:\n ");
|
||||
buffer.append("\"").append(benchmarkBuffer).append("\"");
|
||||
buffer.append('"').append(benchmarkBuffer).append('"');
|
||||
buffer.append("\n\n ");
|
||||
buffer.append("but was:\n ");
|
||||
buffer.append("\"").append(testBuffer).append("\"");
|
||||
buffer.append('"').append(testBuffer).append('"');
|
||||
buffer.append("\n\n ");
|
||||
|
||||
buffer.append(">>>>>>>>>>>>>>>start diff: \n");
|
||||
|
|
|
@ -538,7 +538,8 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
|
|||
checkChildren(delta);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
fMessage.append("Exception during event notification:" + e.getMessage());
|
||||
fMessage.append("Exception during event notification:");
|
||||
fMessage.append(e.getMessage());
|
||||
fIsDeltaValid = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 Texas Instruments and others.
|
||||
* Copyright (c) 2011, 2016 Texas Instruments 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
|
||||
|
@ -34,11 +34,14 @@ public class CustomOptionCommandGenerator implements IOptionCommandGenerator
|
|||
if(list != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.append(option.getCommand()).append('"');
|
||||
|
||||
for(String entry : list) {
|
||||
sb.append(entry + ';');
|
||||
sb.append(entry).append(';');
|
||||
}
|
||||
|
||||
return option.getCommand() + '\"' + sb.toString() + '\"';
|
||||
sb.append('"');
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
catch(Exception x) {
|
||||
|
|
|
@ -102,7 +102,7 @@ public class Test30_2_CommandLineGenerator implements
|
|||
else if( varName.compareToIgnoreCase( OUTPUT_PREFIX_PRM_NAME ) == 0 ) sb.append( info.commandOutputPrefix.trim() );
|
||||
else if( varName.compareToIgnoreCase( OUTPUT_PRM_NAME ) == 0 ) sb.append( info.commandOutput.trim() );
|
||||
else if( varName.compareToIgnoreCase( INPUTS_PRM_NAME ) == 0 ) sb.append( info.commandInputs );
|
||||
else sb.append( VAR_FIRST_CHAR + VAR_SECOND_CHAR + varName + VAR_FINAL_CHAR );
|
||||
else sb.append(VAR_FIRST_CHAR).append(VAR_SECOND_CHAR).append(varName).append(VAR_FINAL_CHAR);
|
||||
} catch( Exception ex ) {
|
||||
// do nothing for a while
|
||||
}
|
||||
|
|
|
@ -87,10 +87,10 @@ public class DbgUtil {
|
|||
|
||||
IBuildIOType types[] = inputs ? step.getInputIOTypes() : step.getOutputIOTypes();
|
||||
|
||||
buf.append("\n"); //$NON-NLS-1$
|
||||
buf.append('\n');
|
||||
|
||||
for(int i = 0; i < types.length; i++){
|
||||
buf.append("ioType " + i + ":"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append("ioType ").append(i).append(':'); //$NON-NLS-1$
|
||||
buf.append(ioTypeResources(types[i]));
|
||||
}
|
||||
|
||||
|
|
|
@ -114,10 +114,13 @@ public class ManagedCommandLineGenerator implements
|
|||
}
|
||||
|
||||
private String stringArrayToString( String[] array ) {
|
||||
if( array == null || array.length <= 0 ) return ""; // $NON-NLS-1$
|
||||
if( array == null || array.length <= 0 ) return ""; //$NON-NLS-1$
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for( int i = 0; i < array.length; i++ )
|
||||
sb.append( array[i] + WHITESPACE );
|
||||
for( int i = 0; i < array.length; i++ ) {
|
||||
if(i > 0) // we add whitespace after each but not first so .trim() is a no-op
|
||||
sb.append(WHITESPACE);
|
||||
sb.append(array[i]);
|
||||
}
|
||||
return sb.toString().trim();
|
||||
}
|
||||
|
||||
|
|
|
@ -996,7 +996,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
|
|||
if (browseFilterExtensions != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(String ext : browseFilterExtensions) {
|
||||
sb.append(ext + ',');
|
||||
sb.append(ext).append(',');
|
||||
}
|
||||
element.setAttribute(BROWSE_FILTER_EXTENSIONS, sb.toString());
|
||||
}
|
||||
|
|
|
@ -2707,7 +2707,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
if(list != null){
|
||||
for (String temp : list) {
|
||||
if(temp.length() > 0 && !temp.equals(EMPTY_QUOTED_STRING))
|
||||
sb.append( evaluateCommand( listCmd, temp ) + WHITE_SPACE );
|
||||
sb.append( evaluateCommand( listCmd, temp ) ).append( WHITE_SPACE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -510,21 +510,21 @@ public class ToolReference implements IToolReference {
|
|||
boolCmd = option.getCommandFalse();
|
||||
}
|
||||
if (boolCmd != null && boolCmd.length() > 0) {
|
||||
buf.append(boolCmd + WHITE_SPACE);
|
||||
buf.append(boolCmd).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
case IOption.ENUMERATED :
|
||||
String enumVal = option.getEnumCommand(option.getSelectedEnum());
|
||||
if (enumVal.length() > 0) {
|
||||
buf.append(enumVal + WHITE_SPACE);
|
||||
buf.append(enumVal).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
case IOption.TREE :
|
||||
String treeVal = option.getCommand(option.getStringValue());
|
||||
if (treeVal.length() > 0) {
|
||||
buf.append(treeVal + WHITE_SPACE);
|
||||
buf.append(treeVal).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -533,7 +533,7 @@ public class ToolReference implements IToolReference {
|
|||
String val = option.getStringValue();
|
||||
if (val.length() > 0) {
|
||||
if (strCmd != null) buf.append(strCmd);
|
||||
buf.append(val + WHITE_SPACE);
|
||||
buf.append(val).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -543,7 +543,7 @@ public class ToolReference implements IToolReference {
|
|||
for (int j = 0; j < list.length; j++) {
|
||||
String temp = list[j];
|
||||
if (cmd != null) buf.append(cmd);
|
||||
buf.append(temp + WHITE_SPACE);
|
||||
buf.append(temp).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -552,7 +552,7 @@ public class ToolReference implements IToolReference {
|
|||
String[] paths = option.getIncludePaths();
|
||||
for (int j = 0; j < paths.length; j++) {
|
||||
String temp = paths[j];
|
||||
buf.append(incCmd + temp + WHITE_SPACE);
|
||||
buf.append(incCmd).append(temp).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -561,7 +561,7 @@ public class ToolReference implements IToolReference {
|
|||
String[] symbols = option.getDefinedSymbols();
|
||||
for (int j = 0; j < symbols.length; j++) {
|
||||
String temp = symbols[j];
|
||||
buf.append(defCmd + temp + WHITE_SPACE);
|
||||
buf.append(defCmd).append(temp).append(WHITE_SPACE);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ import org.eclipse.core.resources.IResource;
|
|||
*/
|
||||
public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerator {
|
||||
|
||||
private static final String EMPTY_STRING = ""; // $NON-NLS-1$
|
||||
private static final String[] EMPTY_STRING_ARRAY = new String[0];
|
||||
public final String WHITESPACE = " "; //$NON-NLS-1$
|
||||
|
||||
|
@ -80,7 +79,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
|
|||
|
||||
// Work out the build-relative path for the output files
|
||||
IContainer resourceLocation = resource.getParent();
|
||||
String relativePath = ""; // $NON-NLS-1$
|
||||
String relativePath = ""; //$NON-NLS-1$
|
||||
if (resourceLocation != null) {
|
||||
relativePath += resourceLocation.getProjectRelativePath().toString();
|
||||
}
|
||||
|
@ -96,23 +95,24 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
|
|||
IManagedBuilderMakefileGenerator.DEP_EXT +
|
||||
")'"; //$NON-NLS-1$
|
||||
|
||||
// Note that X + Y are in-lineable constants by the compiler
|
||||
// Add the rule that will actually create the right format for the dep
|
||||
buffer.append(IManagedBuilderMakefileGenerator.TAB +
|
||||
IManagedBuilderMakefileGenerator.ECHO +
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
"-n" + //$NON-NLS-1$
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
depRule +
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
"$(dir $@)" + //$NON-NLS-1$
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
">" + //$NON-NLS-1$
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
depRule +
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
IManagedBuilderMakefileGenerator.LOGICAL_AND +
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
IManagedBuilderMakefileGenerator.LINEBREAK);
|
||||
buffer.append(IManagedBuilderMakefileGenerator.TAB
|
||||
+ IManagedBuilderMakefileGenerator.ECHO
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ "-n" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE)
|
||||
.append(depRule)
|
||||
.append(IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ "$(dir $@)" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ ">"
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE)
|
||||
.append(depRule)
|
||||
.append(IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ IManagedBuilderMakefileGenerator.LOGICAL_AND
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ IManagedBuilderMakefileGenerator.LINEBREAK);
|
||||
|
||||
// Add the line that will do the work to calculate dependencies
|
||||
IManagedCommandLineInfo cmdLInfo = null;
|
||||
|
@ -293,11 +293,12 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
|
|||
}
|
||||
}
|
||||
|
||||
buffer.append(IManagedBuilderMakefileGenerator.TAB +
|
||||
buildCmd +
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE +
|
||||
">>" + //$NON-NLS-1$
|
||||
IManagedBuilderMakefileGenerator.WHITESPACE + depRule );
|
||||
buffer.append(IManagedBuilderMakefileGenerator.TAB)
|
||||
.append(buildCmd)
|
||||
.append(IManagedBuilderMakefileGenerator.WHITESPACE
|
||||
+ ">>" //$NON-NLS-1$
|
||||
+ IManagedBuilderMakefileGenerator.WHITESPACE)
|
||||
.append(depRule);
|
||||
|
||||
return buffer.toString();
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
// Write every macro to the file
|
||||
for (Entry<String, List<String>> entry : outputMacros.entrySet()) {
|
||||
macroBuffer.append(entry.getKey() + " :="); //$NON-NLS-1$
|
||||
macroBuffer.append(entry.getKey()).append(" :="); //$NON-NLS-1$
|
||||
valueList = entry.getValue();
|
||||
for (String path : valueList) {
|
||||
// These macros will also be used within commands.
|
||||
|
@ -1152,16 +1152,16 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// Add the macros to the makefile
|
||||
for (Entry<String, List<IPath>> entry : buildSrcVars.entrySet()) {
|
||||
String macroName = entry.getKey();
|
||||
buffer.append(macroName + WHITESPACE + ":=" + WHITESPACE + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(macroName).append(WHITESPACE).append(":=").append(WHITESPACE).append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
Set<Entry<String, List<IPath>>> set = buildOutVars.entrySet();
|
||||
for (Entry<String, List<IPath>> entry : set) {
|
||||
String macroName = entry.getKey();
|
||||
buffer.append(macroName + WHITESPACE + ":=" + WHITESPACE + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(macroName).append(WHITESPACE).append(":=").append(WHITESPACE).append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Add a list of subdirectories to the makefile
|
||||
buffer.append(NEWLINE + addSubdirectories());
|
||||
buffer.append(NEWLINE).append(addSubdirectories());
|
||||
|
||||
// Save the file
|
||||
save(buffer, fileHandle);
|
||||
|
@ -1217,11 +1217,11 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
// Add the ROOT macro
|
||||
//buffer.append("ROOT := .." + NEWLINE); //$NON-NLS-1$
|
||||
//buffer.append("ROOT := ..").append(NEWLINE); //$NON-NLS-1$
|
||||
//buffer.append(NEWLINE);
|
||||
|
||||
// include makefile.init supplementary makefile
|
||||
buffer.append("-include " + ROOT + SEPARATOR + MAKEFILE_INIT + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("-include " + ROOT + SEPARATOR + MAKEFILE_INIT).append(NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(NEWLINE);
|
||||
|
||||
// Get the clean command from the build model
|
||||
|
@ -1238,13 +1238,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
} catch (BuildMacroException e) {
|
||||
}
|
||||
|
||||
buffer.append(cleanCommand + NEWLINE);
|
||||
buffer.append(cleanCommand).append(NEWLINE);
|
||||
|
||||
buffer.append(NEWLINE);
|
||||
|
||||
// Now add the source providers
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(SRC_LISTS) + NEWLINE);
|
||||
buffer.append("-include sources.mk" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(SRC_LISTS)).append(NEWLINE);
|
||||
buffer.append("-include sources.mk").append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
// Add includes for each subdir in child-subdir-first order (required for makefile rule matching to work).
|
||||
List<String> subDirList = new ArrayList<String>();
|
||||
|
@ -1255,33 +1255,33 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
Collections.sort(subDirList, Collections.reverseOrder());
|
||||
for (String dir : subDirList) {
|
||||
buffer.append("-include " + escapeWhitespaces(dir) + SEPARATOR + "subdir.mk"+ NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("-include ").append(escapeWhitespaces(dir)).append(SEPARATOR).append("subdir.mk").append(NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
buffer.append("-include subdir.mk" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("-include subdir.mk").append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
buffer.append("-include objects.mk" + NEWLINE + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("-include objects.mk").append(NEWLINE).append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
// Include generated dependency makefiles if non-empty AND a "clean" has not been requested
|
||||
if (!buildDepVars.isEmpty()) {
|
||||
buffer.append("ifneq ($(MAKECMDGOALS),clean)" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("ifneq ($(MAKECMDGOALS),clean)").append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
for (Entry<String, GnuDependencyGroupInfo> entry : buildDepVars.entrySet()) {
|
||||
String depsMacro = entry.getKey();
|
||||
GnuDependencyGroupInfo info = entry.getValue();
|
||||
buffer.append("ifneq ($(strip $(" + depsMacro + ")),)" + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("ifneq ($(strip $(").append(depsMacro).append(")),)").append(NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (info.conditionallyInclude) {
|
||||
buffer.append("-include $(" + depsMacro + ")" + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("-include $(").append(depsMacro).append(')').append(NEWLINE); //$NON-NLS-1$
|
||||
} else {
|
||||
buffer.append("include $(" + depsMacro + ")" + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("include $(").append(depsMacro).append(')').append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
buffer.append("endif" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("endif").append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
buffer.append("endif" + NEWLINE + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("endif").append(NEWLINE).append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Include makefile.defs supplemental makefile
|
||||
buffer.append("-include " + ROOT + SEPARATOR + MAKEFILE_DEFS + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("-include ").append(ROOT).append(SEPARATOR).append(MAKEFILE_DEFS).append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
|
||||
return (buffer.append(NEWLINE));
|
||||
|
@ -1359,10 +1359,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
if (prebuildStep.length() > 0) {
|
||||
|
||||
// Add the comment for the "All" target
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(ALL_TARGET) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(ALL_TARGET)).append(NEWLINE);
|
||||
|
||||
buffer.append(defaultTarget + WHITESPACE);
|
||||
buffer.append(PREBUILD + WHITESPACE);
|
||||
buffer.append(defaultTarget).append(WHITESPACE);
|
||||
buffer.append(PREBUILD).append(WHITESPACE);
|
||||
|
||||
// Reset defaultTarget for now and for subsequent use, below
|
||||
defaultTarget = MAINBUILD;
|
||||
|
@ -1371,14 +1371,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// Update the defaultTarget, main-build, by adding a colon, which is
|
||||
// needed below
|
||||
defaultTarget = defaultTarget.concat(COLON);
|
||||
buffer.append(NEWLINE + NEWLINE);
|
||||
buffer.append(NEWLINE).append(NEWLINE);
|
||||
|
||||
// Add the comment for the "main-build" target
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MAINBUILD_TARGET) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(MAINBUILD_TARGET)).append(NEWLINE);
|
||||
}
|
||||
else
|
||||
// Add the comment for the "All" target
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(ALL_TARGET) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(ALL_TARGET)).append(NEWLINE);
|
||||
|
||||
// Write out the all target first in case someone just runs make
|
||||
// all: <target_name> or mainbuild: <target_name>
|
||||
|
@ -1387,19 +1387,19 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
if (targetTool != null) {
|
||||
outputPrefix = targetTool.getOutputPrefix();
|
||||
}
|
||||
buffer.append(defaultTarget + WHITESPACE + outputPrefix
|
||||
+ ensurePathIsGNUMakeTargetRuleCompatibleSyntax(buildTargetName));
|
||||
buffer.append(defaultTarget).append(WHITESPACE).append(outputPrefix)
|
||||
.append(ensurePathIsGNUMakeTargetRuleCompatibleSyntax(buildTargetName));
|
||||
if (buildTargetExt.length() > 0) {
|
||||
buffer.append(DOT + buildTargetExt);
|
||||
buffer.append(DOT).append(buildTargetExt);
|
||||
}
|
||||
|
||||
// Add the Secondary Outputs to the all target, if any
|
||||
IOutputType[] secondaryOutputs = config.getToolChain().getSecondaryOutputs();
|
||||
if (secondaryOutputs.length > 0) {
|
||||
buffer.append(WHITESPACE + SECONDARY_OUTPUTS);
|
||||
buffer.append(WHITESPACE).append(SECONDARY_OUTPUTS);
|
||||
}
|
||||
|
||||
buffer.append(NEWLINE + NEWLINE);
|
||||
buffer.append(NEWLINE).append(NEWLINE);
|
||||
|
||||
/*
|
||||
* The build target may depend on other projects in the workspace. These
|
||||
|
@ -1419,7 +1419,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
// if (!dep.exists()) continue;
|
||||
if (addDeps) {
|
||||
buffer.append("dependents:" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("dependents:").append(NEWLINE); //$NON-NLS-1$
|
||||
addDeps = false;
|
||||
}
|
||||
String buildDir = depCfg.getOwner().getLocation().toString();
|
||||
|
@ -1468,7 +1468,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
dependency = escapeWhitespaces(dependency);
|
||||
managedProjectOutputs.add(dependency);
|
||||
//}
|
||||
buffer.append(TAB + "-cd" + WHITESPACE + escapeWhitespaces(buildDir) + WHITESPACE + LOGICAL_AND + WHITESPACE + "$(MAKE) " + depTargets + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append(TAB).append("-cd").append(WHITESPACE).append(escapeWhitespaces(buildDir)) //$NON-NLS-1$
|
||||
.append(WHITESPACE).append(LOGICAL_AND).append(WHITESPACE).append("$(MAKE) ").append(depTargets).append(NEWLINE); //$NON-NLS-1$
|
||||
}
|
||||
// }
|
||||
buffer.append(NEWLINE);
|
||||
|
@ -1480,51 +1481,51 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
// Add the prebuild step target, if specified
|
||||
if (prebuildStep.length() > 0) {
|
||||
buffer.append(PREBUILD + COLON + NEWLINE);
|
||||
buffer.append(PREBUILD).append(COLON).append(NEWLINE);
|
||||
if (preannouncebuildStep.length() > 0) {
|
||||
buffer.append(TAB + DASH + AT + escapedEcho(preannouncebuildStep));
|
||||
buffer.append(TAB).append(DASH).append(AT).append(escapedEcho(preannouncebuildStep));
|
||||
}
|
||||
buffer.append(TAB + DASH + prebuildStep + NEWLINE);
|
||||
buffer.append(TAB + DASH + AT + ECHO_BLANK_LINE + NEWLINE);
|
||||
buffer.append(TAB).append(DASH).append(prebuildStep).append(NEWLINE);
|
||||
buffer.append(TAB).append(DASH).append(AT).append(ECHO_BLANK_LINE).append(NEWLINE);
|
||||
}
|
||||
|
||||
// Add the postbuild step, if specified
|
||||
if (postbuildStep.length() > 0) {
|
||||
buffer.append(POSTBUILD + COLON + NEWLINE);
|
||||
buffer.append(POSTBUILD).append(COLON).append(NEWLINE);
|
||||
if (postannouncebuildStep.length() > 0) {
|
||||
buffer.append(TAB + DASH + AT + escapedEcho(postannouncebuildStep));
|
||||
buffer.append(TAB).append(DASH).append(AT).append(escapedEcho(postannouncebuildStep));
|
||||
}
|
||||
buffer.append(TAB + DASH + postbuildStep + NEWLINE);
|
||||
buffer.append(TAB + DASH + AT + ECHO_BLANK_LINE + NEWLINE);
|
||||
buffer.append(TAB).append(DASH).append(postbuildStep).append(NEWLINE);
|
||||
buffer.append(TAB).append(DASH).append(AT).append(ECHO_BLANK_LINE).append(NEWLINE);
|
||||
}
|
||||
|
||||
// Add the Secondary Outputs target, if needed
|
||||
if (secondaryOutputs.length > 0) {
|
||||
buffer.append(SECONDARY_OUTPUTS + COLON);
|
||||
buffer.append(SECONDARY_OUTPUTS).append(COLON);
|
||||
Vector<String> outs2 = calculateSecondaryOutputs(secondaryOutputs);
|
||||
for (int i=0; i<outs2.size(); i++) {
|
||||
buffer.append(WHITESPACE + "$(" + outs2.get(i) + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append(WHITESPACE).append("$(").append(outs2.get(i)).append(')'); //$NON-NLS-1$
|
||||
}
|
||||
buffer.append(NEWLINE + NEWLINE);
|
||||
buffer.append(NEWLINE).append(NEWLINE);
|
||||
}
|
||||
|
||||
// Add all the needed dummy and phony targets
|
||||
buffer.append(".PHONY: all clean dependents" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(".PHONY: all clean dependents").append(NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(".SECONDARY:"); //$NON-NLS-1$
|
||||
if (prebuildStep.length() > 0) {
|
||||
buffer.append(WHITESPACE + MAINBUILD + WHITESPACE + PREBUILD);
|
||||
buffer.append(WHITESPACE).append(MAINBUILD).append(WHITESPACE).append(PREBUILD);
|
||||
}
|
||||
if (postbuildStep.length() > 0) {
|
||||
buffer.append(WHITESPACE + POSTBUILD);
|
||||
buffer.append(WHITESPACE).append(POSTBUILD);
|
||||
}
|
||||
buffer.append(NEWLINE);
|
||||
for (String output : managedProjectOutputs) {
|
||||
buffer.append(output + COLON + NEWLINE);
|
||||
buffer.append(output).append(COLON).append(NEWLINE);
|
||||
}
|
||||
buffer.append(NEWLINE);
|
||||
|
||||
// Include makefile.targets supplemental makefile
|
||||
buffer.append("-include " + ROOT + SEPARATOR + MAKEFILE_TARGETS + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append("-include ").append(ROOT).append(SEPARATOR).append(MAKEFILE_TARGETS).append(NEWLINE); //$NON-NLS-1$
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
@ -1543,7 +1544,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
List<String> outputVarsAdditionsList, Vector<String> managedProjectOutputs, boolean postbuildStep) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
// Add the comment
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(BUILD_TOP) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(BUILD_TOP)).append(NEWLINE);
|
||||
|
||||
ToolInfoHolder h = (ToolInfoHolder)toolInfos.getValue();
|
||||
ITool[] buildTools = h.buildTools;
|
||||
|
@ -1564,7 +1565,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
buffer.append(TAB + AT + escapedEcho(MESSAGE_NO_TARGET_TOOL + WHITESPACE + OUT_MACRO));
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(MESSAGE_NO_TARGET_TOOL + WHITESPACE + OUT_MACRO));
|
||||
}
|
||||
|
||||
// Generate the rules for all Tools that specify InputType.multipleOfType, and any Tools that
|
||||
|
@ -1585,14 +1586,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
|
||||
// Add the comment
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(BUILD_TARGETS) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(BUILD_TARGETS)).append(NEWLINE);
|
||||
|
||||
// Always add a clean target
|
||||
buffer.append("clean:" + NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(TAB + "-$(RM)" + WHITESPACE); //$NON-NLS-1$
|
||||
buffer.append("clean:").append(NEWLINE); //$NON-NLS-1$
|
||||
buffer.append(TAB).append("-$(RM)").append(WHITESPACE); //$NON-NLS-1$
|
||||
for (Entry<String, List<IPath>> entry : buildOutVars.entrySet()) {
|
||||
String macroName = entry.getKey();
|
||||
buffer.append("$(" + macroName + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append("$(").append(macroName).append(')'); //$NON-NLS-1$
|
||||
}
|
||||
String outputPrefix = EMPTY_STRING;
|
||||
if (targetTool != null) {
|
||||
|
@ -1603,12 +1604,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
completeBuildTargetName = completeBuildTargetName + DOT + buildTargetExt;
|
||||
}
|
||||
if (completeBuildTargetName.contains(" ")) { //$NON-NLS-1$
|
||||
buffer.append(WHITESPACE + "\"" + completeBuildTargetName + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append(WHITESPACE).append('"').append(completeBuildTargetName).append('"');
|
||||
} else {
|
||||
buffer.append(WHITESPACE + completeBuildTargetName);
|
||||
buffer.append(WHITESPACE).append(completeBuildTargetName);
|
||||
}
|
||||
buffer.append(NEWLINE);
|
||||
buffer.append(TAB + DASH + AT + ECHO_BLANK_LINE + NEWLINE);
|
||||
buffer.append(TAB).append(DASH).append(AT).append(ECHO_BLANK_LINE).append(NEWLINE);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
@ -1687,11 +1688,11 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
else {
|
||||
getRuleList().add(buildRule);
|
||||
buffer.append(buildRule + NEWLINE);
|
||||
buffer.append(buildRule).append(NEWLINE);
|
||||
if (bTargetTool) {
|
||||
buffer.append(TAB + AT + escapedEcho(MESSAGE_START_BUILD + WHITESPACE + OUT_MACRO));
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(MESSAGE_START_BUILD + WHITESPACE + OUT_MACRO));
|
||||
}
|
||||
buffer.append(TAB + AT + escapedEcho(tool.getAnnouncement()));
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(tool.getAnnouncement()));
|
||||
|
||||
// Get the command line for this tool invocation
|
||||
String[] flags;
|
||||
|
@ -1750,23 +1751,23 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
|
||||
|
||||
//buffer.append(TAB + AT + escapedEcho(buildCmd));
|
||||
//buffer.append(TAB + AT + buildCmd);
|
||||
buffer.append(TAB + buildCmd);
|
||||
//buffer.append(TAB).append(AT).append(escapedEcho(buildCmd));
|
||||
//buffer.append(TAB).append(AT).append(buildCmd);
|
||||
buffer.append(TAB).append(buildCmd);
|
||||
|
||||
// TODO
|
||||
// NOTE WELL: Dependency file generation is not handled for this type of Tool
|
||||
|
||||
// Echo finished message
|
||||
buffer.append(NEWLINE);
|
||||
buffer.append(TAB + AT + escapedEcho((bTargetTool ? MESSAGE_FINISH_BUILD : MESSAGE_FINISH_FILE) + WHITESPACE + OUT_MACRO));
|
||||
buffer.append(TAB + AT + ECHO_BLANK_LINE);
|
||||
buffer.append(TAB).append(AT).append(escapedEcho((bTargetTool ? MESSAGE_FINISH_BUILD : MESSAGE_FINISH_FILE) + WHITESPACE + OUT_MACRO));
|
||||
buffer.append(TAB).append(AT).append(ECHO_BLANK_LINE);
|
||||
|
||||
// If there is a post build step, then add a recursive invocation of MAKE to invoke it after the main build
|
||||
// Note that $(MAKE) will instantiate in the recusive invocation to the make command that was used to invoke
|
||||
// the makefile originally
|
||||
if (bEmitPostBuildStepCall) {
|
||||
buffer.append(TAB + MAKE + WHITESPACE + NO_PRINT_DIR + WHITESPACE + POSTBUILD + NEWLINE + NEWLINE);
|
||||
buffer.append(TAB).append(MAKE).append(WHITESPACE).append(NO_PRINT_DIR).append(WHITESPACE).append(POSTBUILD).append(NEWLINE).append(NEWLINE);
|
||||
}
|
||||
else {
|
||||
// Just emit a blank line
|
||||
|
@ -1935,19 +1936,19 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
private StringBuffer addSubdirectories() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
// Add the comment
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MOD_LIST) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(MOD_LIST)).append(NEWLINE);
|
||||
|
||||
buffer.append("SUBDIRS := " + LINEBREAK); //$NON-NLS-1$
|
||||
buffer.append("SUBDIRS := ").append(LINEBREAK); //$NON-NLS-1$
|
||||
|
||||
// Get all the module names
|
||||
for (IResource container : getSubdirList()) {
|
||||
updateMonitor(ManagedMakeMessages.getFormattedString("MakefileGenerator.message.adding.source.folder", container.getFullPath().toString())); //$NON-NLS-1$
|
||||
// Check the special case where the module is the project root
|
||||
if (container.getFullPath() == project.getFullPath()) {
|
||||
buffer.append(DOT + WHITESPACE + LINEBREAK);
|
||||
buffer.append(DOT).append(WHITESPACE).append(LINEBREAK);
|
||||
} else {
|
||||
IPath path = container.getProjectRelativePath();
|
||||
buffer.append(escapeWhitespaces(path.toString()) + WHITESPACE + LINEBREAK);
|
||||
buffer.append(escapeWhitespaces(path.toString())).append(WHITESPACE).append(LINEBREAK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2024,7 +2025,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
// Write out the macro addition entries to the buffer
|
||||
buffer.append(writeAdditionMacros(buildVarToRuleStringMap));
|
||||
return buffer.append(ruleBuffer + NEWLINE);
|
||||
return buffer.append(ruleBuffer).append(NEWLINE);
|
||||
}
|
||||
|
||||
/* (non-Javadoc
|
||||
|
@ -2596,9 +2597,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
getRuleList().add(buildRule);
|
||||
|
||||
// Echo starting message
|
||||
buffer.append(buildRule + NEWLINE);
|
||||
buffer.append(TAB + AT + escapedEcho(MESSAGE_START_FILE + WHITESPACE + IN_MACRO));
|
||||
buffer.append(TAB + AT + escapedEcho(tool.getAnnouncement()));
|
||||
buffer.append(buildRule).append(NEWLINE);
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(MESSAGE_START_FILE + WHITESPACE + IN_MACRO));
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(tool.getAnnouncement()));
|
||||
|
||||
// If the tool specifies a dependency calculator of TYPE_BUILD_COMMANDS, ask whether
|
||||
// there are any pre-tool commands.
|
||||
|
@ -2629,7 +2630,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
outputLocation, null, tool));
|
||||
}
|
||||
if (resolvedCommand != null)
|
||||
buffer.append(resolvedCommand + NEWLINE);
|
||||
buffer.append(resolvedCommand).append(NEWLINE);
|
||||
} catch (BuildMacroException e) {
|
||||
}
|
||||
}
|
||||
|
@ -2704,7 +2705,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
StringBuffer buildFlags = new StringBuffer();
|
||||
for (String flag : flags) {
|
||||
if( flag != null ) {
|
||||
buildFlags.append( flag + WHITESPACE );
|
||||
buildFlags.append(flag).append(WHITESPACE);
|
||||
}
|
||||
}
|
||||
buildCmd = cmd + WHITESPACE + buildFlags.toString().trim() + WHITESPACE + outflag + WHITESPACE +
|
||||
|
@ -2742,9 +2743,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
} catch (BuildMacroException e) {
|
||||
}
|
||||
|
||||
//buffer.append(TAB + AT + escapedEcho(buildCmd));
|
||||
//buffer.append(TAB + AT + buildCmd);
|
||||
buffer.append(TAB + buildCmd);
|
||||
//buffer.append(TAB).append(AT).append(escapedEcho(buildCmd));
|
||||
//buffer.append(TAB).append(AT).append(buildCmd);
|
||||
buffer.append(TAB).append(buildCmd);
|
||||
|
||||
// Determine if there are any dependencies to calculate
|
||||
if (doDepGen) {
|
||||
|
@ -2763,7 +2764,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
for (String depCmd : depCmds) {
|
||||
// Resolve any macros in the dep command after it has been generated.
|
||||
// Note: do not trim the result because it will strip out necessary tab characters.
|
||||
buffer.append(WHITESPACE + LOGICAL_AND + WHITESPACE + LINEBREAK);
|
||||
buffer.append(WHITESPACE).append(LOGICAL_AND).append(WHITESPACE).append(LINEBREAK);
|
||||
try {
|
||||
if (!needExplicitRuleForFile) {
|
||||
depCmd = ManagedBuildManager.getBuildMacroProvider()
|
||||
|
@ -2799,8 +2800,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
// Echo finished message
|
||||
buffer.append(NEWLINE);
|
||||
buffer.append(TAB + AT + escapedEcho(MESSAGE_FINISH_FILE + WHITESPACE + IN_MACRO));
|
||||
buffer.append(TAB + AT + ECHO_BLANK_LINE + NEWLINE);
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(MESSAGE_FINISH_FILE + WHITESPACE + IN_MACRO));
|
||||
buffer.append(TAB).append(AT).append(ECHO_BLANK_LINE).append(NEWLINE);
|
||||
}
|
||||
|
||||
// Determine if there are calculated dependencies
|
||||
|
@ -2888,8 +2889,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
if (!getDepRuleList().contains(depLine)) {
|
||||
getDepRuleList().add(depLine);
|
||||
addedDepLines = true;
|
||||
buffer.append(depLine + NEWLINE);
|
||||
buffer.append(TAB + AT + escapedEcho(MESSAGE_START_DEPENDENCY + WHITESPACE + OUT_MACRO));
|
||||
buffer.append(depLine).append(NEWLINE);
|
||||
buffer.append(TAB).append(AT).append(escapedEcho(MESSAGE_START_DEPENDENCY + WHITESPACE + OUT_MACRO));
|
||||
for (String preBuildCommand : preBuildCommands) {
|
||||
depLine = preBuildCommand;
|
||||
// Resolve macros
|
||||
|
@ -2920,13 +2921,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
|
||||
} catch (BuildMacroException e) {
|
||||
}
|
||||
//buffer.append(TAB + AT + escapedEcho(depLine));
|
||||
//buffer.append(TAB + AT + depLine + NEWLINE);
|
||||
buffer.append(TAB + depLine + NEWLINE);
|
||||
//buffer.append(TAB).append(AT).append(escapedEcho(depLine));
|
||||
//buffer.append(TAB).append(AT).append(depLine).append(NEWLINE);
|
||||
buffer.append(TAB).append(depLine).append(NEWLINE);
|
||||
}
|
||||
}
|
||||
if (addedDepLines) {
|
||||
buffer.append(TAB + AT + ECHO_BLANK_LINE + NEWLINE);
|
||||
buffer.append(TAB).append(AT).append(ECHO_BLANK_LINE).append(NEWLINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3488,7 +3489,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// practically nil so it doesn't seem worth the hassle of generating a truly
|
||||
// unique name.
|
||||
if(extensionName.equals(extensionName.toUpperCase())) {
|
||||
macroName.append(extensionName.toUpperCase() + "_UPPER"); //$NON-NLS-1$
|
||||
macroName.append(extensionName.toUpperCase()).append("_UPPER"); //$NON-NLS-1$
|
||||
} else {
|
||||
// lower case... no need for "UPPER_"
|
||||
macroName.append(extensionName.toUpperCase());
|
||||
|
@ -3510,7 +3511,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// practically nil so it doesn't seem worth the hassle of generating a truly
|
||||
// unique name.
|
||||
if(extensionName.equals(extensionName.toUpperCase())) {
|
||||
macroName.append(extensionName.toUpperCase() + "_UPPER"); //$NON-NLS-1$
|
||||
macroName.append(extensionName.toUpperCase()).append("_UPPER"); //$NON-NLS-1$
|
||||
} else {
|
||||
// lower case... no need for "UPPER_"
|
||||
macroName.append(extensionName.toUpperCase());
|
||||
|
@ -3655,9 +3656,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
}
|
||||
if (secondToken.startsWith("'")) { //$NON-NLS-1$
|
||||
// This is the Win32 implementation of echo (MinGW without MSYS)
|
||||
outBuffer.append(secondToken.substring(1) + WHITESPACE);
|
||||
outBuffer.append(secondToken.substring(1)).append(WHITESPACE);
|
||||
} else {
|
||||
outBuffer.append(secondToken + WHITESPACE);
|
||||
outBuffer.append(secondToken).append(WHITESPACE);
|
||||
}
|
||||
|
||||
// The relative path to the build goal comes next
|
||||
|
@ -3691,15 +3692,15 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
fourthToken = ""; // $NON-NLS-1$
|
||||
}
|
||||
outBuffer.append(fourthToken + WHITESPACE);
|
||||
outBuffer.append(fourthToken).append(WHITESPACE);
|
||||
|
||||
// Followed by the actual dependencies
|
||||
try {
|
||||
for (String nextElement : deps) {
|
||||
if (nextElement.endsWith("\\")) { //$NON-NLS-1$
|
||||
outBuffer.append(nextElement + NEWLINE + WHITESPACE);
|
||||
outBuffer.append(nextElement).append(NEWLINE).append(WHITESPACE);
|
||||
} else {
|
||||
outBuffer.append(nextElement + WHITESPACE);
|
||||
outBuffer.append(nextElement).append(WHITESPACE);
|
||||
}
|
||||
}
|
||||
} catch (IndexOutOfBoundsException e) {
|
||||
|
@ -3728,7 +3729,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
* The formatting here is
|
||||
* <dummy_target>:
|
||||
*/
|
||||
outBuffer.append(dummy + COLON + NEWLINE + NEWLINE);
|
||||
outBuffer.append(dummy).append(COLON).append(NEWLINE).append(NEWLINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3761,7 +3762,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
static protected StringBuffer addDefaultHeader() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
outputCommentLine(buffer);
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(HEADER) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(HEADER)).append(NEWLINE);
|
||||
outputCommentLine(buffer);
|
||||
buffer.append(NEWLINE);
|
||||
return buffer;
|
||||
|
@ -3812,9 +3813,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
protected void addMacroAdditionPrefix(LinkedHashMap<String, String> map, String macroName, String relativePath, boolean addPrefix) {
|
||||
// there is no entry in the map, so create a buffer for this macro
|
||||
StringBuffer tempBuffer = new StringBuffer();
|
||||
tempBuffer.append(macroName + WHITESPACE + MACRO_ADDITION_PREFIX_SUFFIX);
|
||||
tempBuffer.append(macroName).append(WHITESPACE).append(MACRO_ADDITION_PREFIX_SUFFIX);
|
||||
if (addPrefix) {
|
||||
tempBuffer.append(MACRO_ADDITION_ADDPREFIX_HEADER + relativePath + MACRO_ADDITION_ADDPREFIX_SUFFIX);
|
||||
tempBuffer.append(MACRO_ADDITION_ADDPREFIX_HEADER).append(relativePath).append(MACRO_ADDITION_ADDPREFIX_SUFFIX);
|
||||
}
|
||||
|
||||
// have to store the buffer in String form as StringBuffer is not a sublcass of Object
|
||||
|
@ -3833,7 +3834,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// escape whitespace in the filename
|
||||
filename = escapeWhitespaces(filename);
|
||||
|
||||
buffer.append(filename + WHITESPACE + LINEBREAK);
|
||||
buffer.append(filename).append(WHITESPACE).append(LINEBREAK);
|
||||
// re-insert string in the map
|
||||
map.put(macroName, buffer.toString());
|
||||
}
|
||||
|
@ -3885,7 +3886,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
// Bug 417288, ilg@livius.net & freidin.alex@gmail.com
|
||||
filename = ensurePathIsGNUMakeTargetRuleCompatibleSyntax(filename);
|
||||
|
||||
buffer.append(filename + WHITESPACE + LINEBREAK);
|
||||
buffer.append(filename).append(WHITESPACE).append(LINEBREAK);
|
||||
}
|
||||
}
|
||||
// re-insert string in the map
|
||||
|
@ -3898,7 +3899,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
protected StringBuffer writeAdditionMacros(LinkedHashMap<String, String> map) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
// Add the comment
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MOD_VARS) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(MOD_VARS)).append(NEWLINE);
|
||||
|
||||
for (String macroString : map.values()) {
|
||||
// Check if we added any files to the rule
|
||||
|
@ -3930,7 +3931,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
|
|||
protected StringBuffer writeTopAdditionMacros(List<String> varList, HashMap<String, String> varMap) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
// Add the comment
|
||||
buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MOD_VARS) + NEWLINE);
|
||||
buffer.append(COMMENT_SYMBOL).append(WHITESPACE).append(ManagedMakeMessages.getResourceString(MOD_VARS)).append(NEWLINE);
|
||||
|
||||
for (int i=0; i<varList.size(); i++) {
|
||||
String addition = varMap.get(varList.get(i));
|
||||
|
|
|
@ -361,7 +361,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
// If the parsed string does not match with any previous option
|
||||
// values then consider this option as a additional build option
|
||||
if (!optionValueExist) {
|
||||
addnOptions.append(optionValue + ITool.WHITE_SPACE);
|
||||
addnOptions.append(optionValue).append(ITool.WHITE_SPACE);
|
||||
}
|
||||
}
|
||||
// check whether some of the "STRING" option value or "OBJECTS" type
|
||||
|
@ -378,7 +378,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
String[] vals = val.split(WHITESPACE);
|
||||
for (int t = 0; t < vals.length; t++) {
|
||||
if (alloptions.indexOf(vals[t]) != -1)
|
||||
buf.append(vals[t] + ITool.WHITE_SPACE);
|
||||
buf.append(vals[t]).append(ITool.WHITE_SPACE);
|
||||
}
|
||||
setOption(((IOption) key),
|
||||
buf.toString().trim());
|
||||
|
|
|
@ -645,10 +645,10 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
|
|||
break;
|
||||
}
|
||||
|
||||
result.append(Messages.ToolChainEditTab_15 +
|
||||
(i+1) + Messages.ToolChainEditTab_16 +
|
||||
SPACE + t + SPACE + o + SPACE + n +
|
||||
Messages.ToolChainEditTab_17);
|
||||
result.append(Messages.ToolChainEditTab_15)
|
||||
.append(i+1).append(Messages.ToolChainEditTab_16)
|
||||
.append(SPACE).append(t).append(SPACE).append(o).append(SPACE).append(n)
|
||||
.append(Messages.ToolChainEditTab_17);
|
||||
}
|
||||
String s = result.toString();
|
||||
if (s.trim().length() == 0)
|
||||
|
|
|
@ -148,7 +148,7 @@ public class MapProblemPreference extends AbstractProblemPreference
|
|||
continue;
|
||||
}
|
||||
}
|
||||
buf.append(key + "=>" + d.exportValue()); //$NON-NLS-1$
|
||||
buf.append(key).append("=>").append(d.exportValue()); //$NON-NLS-1$
|
||||
if (iterator.hasNext())
|
||||
buf.append(","); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -262,9 +262,10 @@ public class ErrorParserManagerTest extends TestCase {
|
|||
|
||||
StringBuilder buf = new StringBuilder("errorT: ");
|
||||
for (int i = 0; i < 100; i++) {
|
||||
buf.append("la la la la la "+i+" ");
|
||||
buf.append("la la la la la ").append(i).append(' ');
|
||||
}
|
||||
output(buf.toString()+"\n");
|
||||
buf.append('\n');
|
||||
output(buf.toString());
|
||||
end();
|
||||
assertEquals(1, errorList.size());
|
||||
ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
|
||||
|
@ -298,9 +299,10 @@ public class ErrorParserManagerTest extends TestCase {
|
|||
|
||||
StringBuilder buf = new StringBuilder("errorT: ");
|
||||
for (int i = 0; i < 100; i++) {
|
||||
buf.append("la la la la la "+i+" ");
|
||||
buf.append("la la la la la ").append(i).append(' ');
|
||||
}
|
||||
output(buf.toString()+"\n");
|
||||
buf.append('\n');
|
||||
output(buf.toString());
|
||||
end();
|
||||
assertEquals(1, errorList.size());
|
||||
ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
|
||||
|
|
|
@ -3847,9 +3847,9 @@ public class AST2Tests extends AST2TestBase {
|
|||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("#define M0 1\n");
|
||||
for (int i = 1; i < depth; i++) {
|
||||
buffer.append("#define M" + i + " (M" + (i-1) + "+1)\n");
|
||||
buffer.append("#define M").append(i).append(" (M").append(i-1).append("+1)\n");
|
||||
}
|
||||
buffer.append("int a= M" + (depth-1) + ";\n");
|
||||
buffer.append("int a= M").append(depth-1).append(";\n");
|
||||
long time= System.currentTimeMillis();
|
||||
parse(buffer.toString(), CPP);
|
||||
parse(buffer.toString(), C);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2014 Institute for Software, HSR Hochschule fuer Technik
|
||||
* Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
|
||||
* Rapperswil, University of applied sciences and others
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
|
@ -145,7 +145,7 @@ public class CommentHandlingTest extends RewriteBaseTest {
|
|||
StringBuilder output = new StringBuilder();
|
||||
for (IASTNode actNode : keyTree) {
|
||||
List<IASTComment> comments = map.get(actNode);
|
||||
output.append(getSignature(actNode) + " = "); //$NON-NLS-1$
|
||||
output.append(getSignature(actNode)).append(" = "); //$NON-NLS-1$
|
||||
boolean first = true;
|
||||
for (IASTComment actComment : comments) {
|
||||
if (!first) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2014 Symbian Software Systems and others.
|
||||
* Copyright (c) 2006, 2016 Symbian 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
|
||||
|
@ -49,7 +49,7 @@ public class PDOMPrettyPrinter implements IPDOMVisitor {
|
|||
if (node instanceof PDOMBinding) {
|
||||
sb.append(" ");
|
||||
PDOMBinding binding= (PDOMBinding) node;
|
||||
sb.append(" " + binding.getRecord());
|
||||
sb.append(' ').append(binding.getRecord());
|
||||
}
|
||||
System.out.println(sb);
|
||||
return true;
|
||||
|
|
|
@ -208,8 +208,8 @@ public class BaseTestCase extends TestCase {
|
|||
}
|
||||
|
||||
if (statusLog.size() != fExpectedLoggedNonOK) {
|
||||
StringBuilder msg= new StringBuilder("Expected number (" + fExpectedLoggedNonOK + ") of ");
|
||||
msg.append("Non-OK status objects in log differs from actual (" + statusLog.size() + ").\n");
|
||||
StringBuilder msg= new StringBuilder("Expected number (").append(fExpectedLoggedNonOK).append(") of ");
|
||||
msg.append("Non-OK status objects in log differs from actual (").append(statusLog.size()).append(").\n");
|
||||
Throwable cause= null;
|
||||
if (!statusLog.isEmpty()) {
|
||||
synchronized (statusLog) {
|
||||
|
@ -217,7 +217,7 @@ public class BaseTestCase extends TestCase {
|
|||
IStatus[] ss= {status};
|
||||
ss= status instanceof MultiStatus ? ((MultiStatus) status).getChildren() : ss;
|
||||
for (IStatus s : ss) {
|
||||
msg.append("\t" + s.getMessage() + " ");
|
||||
msg.append('\t').append(s.getMessage()).append(' ');
|
||||
|
||||
Throwable t= s.getException();
|
||||
cause= cause != null ? cause : t;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2014 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
|
||||
|
@ -154,7 +154,7 @@ public class TestSourceReader {
|
|||
for (String line = br.readLine(); line != null; line = br.readLine()) {
|
||||
line = line.replaceFirst("^\\s*", ""); // Replace leading whitespace, preserve trailing
|
||||
if (line.startsWith("//")) {
|
||||
content.append(line.substring(2) + "\n");
|
||||
content.append(line.substring(2)).append('\n');
|
||||
} else {
|
||||
if (!line.startsWith("@") && content.length() > 0) {
|
||||
contents.add(content);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2011 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 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
|
||||
|
@ -328,7 +328,7 @@ public class CElementBaseLabels {
|
|||
|
||||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
buf.append(" - [" + bin.getCPU() + "/" + (bin.isLittleEndian() ? "le" : "be") + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
||||
buf.append(" - [").append(bin.getCPU()).append('/').append(bin.isLittleEndian() ? "le" : "be").append(']'); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -451,10 +451,10 @@ public class Buffer implements IBuffer {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("Owner: " + ((CElement)this.owner).toString()); //$NON-NLS-1$
|
||||
buffer.append("\nHas unsaved changes: " + this.hasUnsavedChanges()); //$NON-NLS-1$
|
||||
buffer.append("\nIs readonly: " + this.isReadOnly()); //$NON-NLS-1$
|
||||
buffer.append("\nIs closed: " + this.isClosed()); //$NON-NLS-1$
|
||||
buffer.append("Owner: ").append(((CElement)this.owner).toString()); //$NON-NLS-1$
|
||||
buffer.append("\nHas unsaved changes: ").append(this.hasUnsavedChanges()); //$NON-NLS-1$
|
||||
buffer.append("\nIs readonly: ").append(this.isReadOnly()); //$NON-NLS-1$
|
||||
buffer.append("\nIs closed: ").append(this.isClosed()); //$NON-NLS-1$
|
||||
buffer.append("\nContents:\n"); //$NON-NLS-1$
|
||||
char[] contents = this.getCharacters();
|
||||
if (contents == null) {
|
||||
|
|
|
@ -671,13 +671,13 @@ public class CElementDelta implements ICElementDelta {
|
|||
if ((changeFlags & ICElementDelta.F_MOVED_FROM) != 0) {
|
||||
if (prev)
|
||||
buffer.append(" | "); //$NON-NLS-1$
|
||||
//buffer.append("MOVED_FROM(" + ((CElement)getMovedFromElement()).toStringWithAncestors() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
//buffer.append("MOVED_FROM(").append(((CElement)getMovedFromElement()).toStringWithAncestors().append(')'); //$NON-NLS-1$
|
||||
prev = true;
|
||||
}
|
||||
if ((changeFlags & ICElementDelta.F_MOVED_TO) != 0) {
|
||||
if (prev)
|
||||
buffer.append(" | "); //$NON-NLS-1$
|
||||
//buffer.append("MOVED_TO(" + ((CElement)getMovedToElement()).toStringWithAncestors() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
//buffer.append("MOVED_TO(").append(((CElement)getMovedToElement()).toStringWithAncestors()).append(')'); //$NON-NLS-1$
|
||||
prev = true;
|
||||
}
|
||||
if ((changeFlags & ICElementDelta.F_MODIFIERS) != 0) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2012 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2016 Intel 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
|
||||
|
@ -160,7 +160,7 @@ public class CProjectDescriptionDelta implements ICDescriptionDelta {
|
|||
@SuppressWarnings("nls")
|
||||
private static String flagsToString(int flags) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(", flags=0x" + Integer.toHexString(flags));
|
||||
str.append(", flags=0x").append(Integer.toHexString(flags));
|
||||
|
||||
str.append(":");
|
||||
if ((flags&ACTIVE_CFG)!=0) str.append("ACTIVE_CFG|");
|
||||
|
@ -197,10 +197,10 @@ public class CProjectDescriptionDelta implements ICDescriptionDelta {
|
|||
StringBuilder str = new StringBuilder();
|
||||
|
||||
String type = fSetting.getClass().getSimpleName();
|
||||
str.append("[" + type + "]");
|
||||
str.append('[').append(type).append(']');
|
||||
|
||||
int kind = getDeltaKind();
|
||||
str.append(", kind="+kind);
|
||||
str.append(", kind=").append(kind);
|
||||
switch (kind) {
|
||||
case ADDED: str.append(":ADDED");break;
|
||||
case REMOVED: str.append(":REMOVED");break;
|
||||
|
@ -214,7 +214,7 @@ public class CProjectDescriptionDelta implements ICDescriptionDelta {
|
|||
if (children==null) {
|
||||
str.append(", no children");
|
||||
} else {
|
||||
str.append(", " + getChildren().length + " children");
|
||||
str.append(", ").append(getChildren().length).append(" children");
|
||||
}
|
||||
|
||||
return str.toString();
|
||||
|
|
|
@ -43,7 +43,7 @@ public class CompositeCPPFunctionSpecialization extends CompositeCPPFunction imp
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append(getName()+" "+ASTTypeUtil.getParameterTypeString(getType())); //$NON-NLS-1$
|
||||
result.append(getName()).append(' ').append(ASTTypeUtil.getParameterTypeString(getType()));
|
||||
return result.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
|
||||
|
@ -1016,7 +1016,7 @@ public class PDOMFile implements IIndexFragmentFile {
|
|||
buf.append(", includes: "); //$NON-NLS-1$
|
||||
buf.append(getIncludes().length);
|
||||
} catch (CoreException e) {
|
||||
buf.append(" (incomplete due to " + e.getClass().getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append(" (incomplete due to ").append(e.getClass().getName()).append(')'); //$NON-NLS-1$
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2013 QNX Software Systems and others.
|
||||
* Copyright (c) 2006, 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
|
||||
|
@ -322,15 +322,15 @@ public class PDOMInclude implements IIndexFragmentInclude {
|
|||
buf.append(isSystem ? '>' : '"');
|
||||
IIndexFile includedBy = getIncludedBy();
|
||||
if (includedBy != null)
|
||||
buf.append(" in " + includedBy); //$NON-NLS-1$
|
||||
buf.append(" in ").append(includedBy); //$NON-NLS-1$
|
||||
IIndexFragmentFile includes = getIncludes();
|
||||
if (includes != null) {
|
||||
buf.append(" resolved to " + includes); //$NON-NLS-1$
|
||||
buf.append(" resolved to ").append(includes); //$NON-NLS-1$
|
||||
} else {
|
||||
buf.append(" unresolved"); //$NON-NLS-1$
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
buf.append(" (incomplete due to " + e.getClass().getName() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append(" (incomplete due to ").append(e.getClass().getName()).append(')'); //$NON-NLS-1$
|
||||
e.printStackTrace();
|
||||
}
|
||||
return buf.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2013 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
|
||||
|
@ -1781,7 +1781,7 @@ public class Scribe {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buffer= new StringBuilder();
|
||||
buffer.append("(page width = " + pageWidth + ") - (tabChar = "); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append("(page width = ").append(pageWidth).append(") - (tabChar = "); //$NON-NLS-1$//$NON-NLS-2$
|
||||
switch (tabChar) {
|
||||
case DefaultCodeFormatterOptions.TAB:
|
||||
buffer.append("TAB"); //$NON-NLS-1$
|
||||
|
@ -1793,11 +1793,11 @@ public class Scribe {
|
|||
buffer.append("MIXED"); //$NON-NLS-1$
|
||||
}
|
||||
buffer
|
||||
.append(") - (tabSize = " + tabLength + ")") //$NON-NLS-1$//$NON-NLS-2$
|
||||
.append(") - (tabSize = ").append(tabLength).append(')') //$NON-NLS-1$/
|
||||
.append(lineSeparator)
|
||||
.append("(line = " + line + ") - (column = " + column + ") - (identationLevel = " + indentationLevel + ")") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
.append("(line = ").append(line).append(") - (column = ").append(column).append(") - (identationLevel = ").append(indentationLevel).append(')') //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
.append(lineSeparator)
|
||||
.append("(needSpace = " + needSpace + ") - (lastNumberOfNewLines = " + lastNumberOfNewLines + ") - (checkLineWrapping = " + checkLineWrapping + ")") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
.append("(needSpace = ").append(needSpace).append(") - (lastNumberOfNewLines = ").append(lastNumberOfNewLines).append(") - (checkLineWrapping = ").append(checkLineWrapping).append(')') //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
.append(lineSeparator).append(
|
||||
"==================================================================================") //$NON-NLS-1$
|
||||
.append(lineSeparator);
|
||||
|
|
|
@ -93,7 +93,7 @@ public class Exe {
|
|||
|
||||
buffer.append("EXE HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||
buffer.append("signature "); //$NON-NLS-1$
|
||||
buffer.append((char)e_signature[0] + " " + (char)e_signature[1]); //$NON-NLS-1$
|
||||
buffer.append((char)e_signature[0]).append(' ').append((char)e_signature[1]);
|
||||
buffer.append(NL);
|
||||
|
||||
buffer.append("lastsize: 0x"); //$NON-NLS-1$
|
||||
|
|
|
@ -90,11 +90,11 @@ public class Dwarf {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Length: " + length).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sb.append("Version: " + version).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sb.append("Abbreviation: " + abbreviationOffset).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sb.append("Address size: " + addressSize).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sb.append("Offset size: " + offsetSize).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
sb.append("Length: ").append(length).append('\n'); //$NON-NLS-1$
|
||||
sb.append("Version: ").append(version).append('\n'); //$NON-NLS-1$
|
||||
sb.append("Abbreviation: ").append(abbreviationOffset).append('\n'); //$NON-NLS-1$
|
||||
sb.append("Address size: ").append(addressSize).append('\n'); //$NON-NLS-1$
|
||||
sb.append("Offset size: ").append(offsetSize).append('\n'); //$NON-NLS-1$
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -126,8 +126,8 @@ public class Dwarf {
|
|||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("name: " + Long.toHexString(name)); //$NON-NLS-1$
|
||||
sb.append(" value: " + Long.toHexString(form)); //$NON-NLS-1$
|
||||
sb.append("name: ").append(Long.toHexString(name)); //$NON-NLS-1$
|
||||
sb.append(" value: ").append(Long.toHexString(form)); //$NON-NLS-1$
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010 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
|
||||
|
@ -107,7 +107,7 @@ public class InactiveCodeHighlightingTest extends TestCase {
|
|||
Position position= positions[i];
|
||||
int startLine= document.getLineOfOffset(position.getOffset());
|
||||
int endLine= document.getLineOfOffset(position.getOffset()+position.getLength()-1);
|
||||
buf.append("\tcreatePosition(" + startLine + ", " + endLine + "),\n");
|
||||
buf.append("\tcreatePosition(").append(startLine).append(", ").append(endLine).append("),\n");
|
||||
}
|
||||
buf.append("};\n");
|
||||
return buf.toString();
|
||||
|
|
|
@ -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
|
||||
|
@ -146,7 +146,7 @@ public class PartitionTokenScannerTest extends TestCase {
|
|||
if (offsetIndex > line.length())
|
||||
offsetIndex= line.length();
|
||||
|
||||
buffer.append("line = " + document.getLineOfOffset(offset) + ": [");
|
||||
buffer.append("line = ").append(document.getLineOfOffset(offset)).append(": [");
|
||||
buffer.append(line.substring(0, offsetIndex));
|
||||
buffer.append("<POS>");
|
||||
buffer.append(line.substring(offsetIndex));
|
||||
|
|
|
@ -210,7 +210,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
|
|||
ModelElement item= (ModelElement) element;
|
||||
boolean included= changed == item ? isInDefaultCategory : item.isInDefaultCategory();
|
||||
if (!included)
|
||||
buf.append(item.getId() + SEPARATOR);
|
||||
buf.append(item.getId()).append(SEPARATOR);
|
||||
}
|
||||
|
||||
String newValue= buf.toString();
|
||||
|
@ -225,7 +225,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
|
|||
ModelElement item= it.next();
|
||||
boolean separate= changed == item ? isSeparate : item.isSeparateCommand();
|
||||
int rank= separate ? i : i + LIMIT;
|
||||
buf.append(item.getId() + COLON + rank + SEPARATOR);
|
||||
buf.append(item.getId()).append(COLON).append(rank).append(SEPARATOR);
|
||||
}
|
||||
|
||||
String newValue= buf.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2010 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
|
||||
|
@ -54,22 +54,22 @@ public class CStringAutoIndentStrategy extends DefaultIndentLineAutoEditStrategy
|
|||
token = tokenizer.nextToken();
|
||||
if (token.equals("\n")) { //$NON-NLS-1$
|
||||
buffer.append("\\n"); //$NON-NLS-1$
|
||||
buffer.append("\"" + delimiter); //$NON-NLS-1$
|
||||
buffer.append('"').append(delimiter);
|
||||
buffer.append(indentation);
|
||||
buffer.append("\""); //$NON-NLS-1$
|
||||
buffer.append('"');
|
||||
continue;
|
||||
}
|
||||
buffer.append("\"" + delimiter); //$NON-NLS-1$
|
||||
buffer.append('"').append(delimiter);
|
||||
buffer.append(indentation);
|
||||
buffer.append("\""); //$NON-NLS-1$
|
||||
buffer.append('"');
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
} else if (token.equals("\n")) { //$NON-NLS-1$
|
||||
buffer.append("\\n"); //$NON-NLS-1$
|
||||
buffer.append("\"" + delimiter); //$NON-NLS-1$
|
||||
buffer.append('"').append(delimiter);
|
||||
buffer.append(indentation);
|
||||
buffer.append("\""); //$NON-NLS-1$
|
||||
buffer.append('"');
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2015 Symbian Software Systems and others.
|
||||
* Copyright (c) 2008, 2016 Symbian 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
|
||||
|
@ -125,7 +125,7 @@ public class DoxygenSingleAutoEditStrategy extends DoxygenMultilineAutoEditStrat
|
|||
{
|
||||
buf.setLength(0);
|
||||
buf.append(fgDefaultLineDelim);
|
||||
buf.append(indentationWithPrefix + " "); //$NON-NLS-1$
|
||||
buf.append(indentationWithPrefix).append(' ');
|
||||
c.shiftsCaret= false;
|
||||
c.caretOffset= c.offset + buf.length();
|
||||
} else {
|
||||
|
@ -134,7 +134,7 @@ public class DoxygenSingleAutoEditStrategy extends DoxygenMultilineAutoEditStrat
|
|||
c.shiftsCaret= false;
|
||||
c.caretOffset= c.offset + 1;
|
||||
buf.setLength(0);
|
||||
buf.append(" " + //$NON-NLS-1$
|
||||
buf.append(' ').append(
|
||||
indent(content, indentationWithPrefix + " ", //$NON-NLS-1$
|
||||
fgDefaultLineDelim).substring((indentationWithPrefix + " ").length())); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
|
|||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(bin.getCPU()).append(bin.isLittleEndian() ? "le" : "be"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
return name.toString();
|
||||
|
|
|
@ -254,7 +254,7 @@ public class VisualizerThread
|
|||
|
||||
// Add the address
|
||||
if (dmData.getAddress() != null) {
|
||||
label.append("- 0x" + dmData.getAddress().toString(16)); //$NON-NLS-1$
|
||||
label.append("- 0x").append(dmData.getAddress().toString(16)); //$NON-NLS-1$
|
||||
}
|
||||
this.m_locInfo = label.toString();
|
||||
}
|
||||
|
|
|
@ -111,10 +111,10 @@ public class ProcessPrompter implements IStatusHandler {
|
|||
|
||||
String owner = info.getOwner();
|
||||
if (owner != null && !owner.isEmpty()) {
|
||||
text.append(" (" + owner + ")"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
text.append(" (").append(owner).append(")"); //$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
|
||||
text.append(" - " + info.getPid()); //$NON-NLS-1$
|
||||
text.append(" - ").append(info.getPid()); //$NON-NLS-1$
|
||||
|
||||
String[] cores = info.getCores();
|
||||
if (cores != null && cores.length > 0) {
|
||||
|
@ -124,10 +124,10 @@ public class ProcessPrompter implements IStatusHandler {
|
|||
} else {
|
||||
coreStr = LaunchUIMessages.getString("ProcessPrompter.Cores"); //$NON-NLS-1$
|
||||
}
|
||||
text.append(" [" + coreStr + ": "); //$NON-NLS-1$//$NON-NLS-2$
|
||||
text.append(" [").append(coreStr).append(": "); //$NON-NLS-1$//$NON-NLS-2$
|
||||
|
||||
for (String core : cores) {
|
||||
text.append(core + ", "); //$NON-NLS-1$
|
||||
text.append(core).append(", "); //$NON-NLS-1$
|
||||
}
|
||||
// Remove the last comma and space
|
||||
text.replace(text.length()-2, text.length(), "]"); //$NON-NLS-1$
|
||||
|
|
|
@ -972,16 +972,16 @@ public class TraceControlView extends ViewPart implements IViewPart {
|
|||
|
||||
StringBuilder sb = new StringBuilder(64);
|
||||
if (!shortForm) {
|
||||
if (days != 0) sb.append(days + TracepointsMessages.TraceControlView_date_days);
|
||||
if (hours != 0) sb.append(hours + TracepointsMessages.TraceControlView_date_hours);
|
||||
if (minutes != 0) sb.append(minutes + TracepointsMessages.TraceControlView_date_minutes);
|
||||
if (seconds != 0) sb.append(seconds + TracepointsMessages.TraceControlView_date_seconds);
|
||||
if (days != 0) sb.append(days).append(TracepointsMessages.TraceControlView_date_days);
|
||||
if (hours != 0) sb.append(hours).append(TracepointsMessages.TraceControlView_date_hours);
|
||||
if (minutes != 0) sb.append(minutes).append(TracepointsMessages.TraceControlView_date_minutes);
|
||||
if (seconds != 0) sb.append(seconds).append(TracepointsMessages.TraceControlView_date_seconds);
|
||||
if (sb.length() == 0) sb.append(TracepointsMessages.TraceControlView_date_zero);
|
||||
} else {
|
||||
if (days != 0) sb.append(days + TracepointsMessages.TraceControlView_date_short_days);
|
||||
if (hours != 0) sb.append(hours + TracepointsMessages.TraceControlView_date_short_hours);
|
||||
if (minutes != 0) sb.append(minutes + TracepointsMessages.TraceControlView_date_short_minutes);
|
||||
if (seconds != 0) sb.append(seconds + TracepointsMessages.TraceControlView_date_short_seconds);
|
||||
if (days != 0) sb.append(days).append(TracepointsMessages.TraceControlView_date_short_days);
|
||||
if (hours != 0) sb.append(hours).append(TracepointsMessages.TraceControlView_date_short_hours);
|
||||
if (minutes != 0) sb.append(minutes).append(TracepointsMessages.TraceControlView_date_short_minutes);
|
||||
if (seconds != 0) sb.append(seconds).append(TracepointsMessages.TraceControlView_date_short_seconds);
|
||||
if (sb.length() == 0) sb.append(TracepointsMessages.TraceControlView_date_short_zero);
|
||||
|
||||
}
|
||||
|
|
|
@ -368,7 +368,7 @@ public class ContainerVMNode extends AbstractContainerVMNode
|
|||
if (cores != null) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (String core : cores) {
|
||||
str.append(core + ","); //$NON-NLS-1$
|
||||
str.append(core).append(',');
|
||||
}
|
||||
if (str.length() > 0) {
|
||||
coresStr = str.substring(0, str.length() - 1);
|
||||
|
|
|
@ -349,7 +349,7 @@ public class ThreadVMNode extends AbstractThreadVMNode
|
|||
if (cores != null) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
for (String core : cores) {
|
||||
str.append(core + ","); //$NON-NLS-1$
|
||||
str.append(core).append(',');
|
||||
}
|
||||
if (str.length() > 0) {
|
||||
String coresStr = str.substring(0, str.length() - 1);
|
||||
|
|
|
@ -238,16 +238,16 @@ public class GDBTypeParser {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
switch (getType()) {
|
||||
case FUNCTION :
|
||||
sb.append(" function returning " + (hasChild() ? child.verbose() : "")); //$NON-NLS-1$//$NON-NLS-2$
|
||||
sb.append(" function returning ").append(hasChild() ? child.verbose() : ""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
break;
|
||||
case ARRAY :
|
||||
sb.append(" array[" + dimension + "]" + " of " + (hasChild() ? child.verbose() : "")); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||
sb.append(" array[").append(dimension).append("] of ").append(hasChild() ? child.verbose() : ""); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
|
||||
break;
|
||||
case REFERENCE :
|
||||
sb.append(" reference to " + (hasChild() ? child.verbose() : "")); //$NON-NLS-1$//$NON-NLS-2$
|
||||
sb.append(" reference to ").append(hasChild() ? child.verbose() : ""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
break;
|
||||
case POINTER :
|
||||
sb.append(" pointer to " + (hasChild() ? child.verbose() : "")); //$NON-NLS-1$//$NON-NLS-2$
|
||||
sb.append(" pointer to ").append(hasChild() ? child.verbose() : ""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
break;
|
||||
}
|
||||
return sb.toString();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2013 Ericsson AB and others.
|
||||
* Copyright (c) 2013, 2016 Ericsson AB 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
|
||||
|
@ -88,7 +88,7 @@ public class StepIntoSelectionActiveOperation {
|
|||
StringBuilder sb = null;
|
||||
sb = new StringBuilder();
|
||||
if (fTargetFunction.getParent() != null) {
|
||||
sb.append(fTargetFunction.getParent().getElementName() + StepIntoSelectionUtils.cppSep);
|
||||
sb.append(fTargetFunction.getParent().getElementName()).append(StepIntoSelectionUtils.cppSep);
|
||||
}
|
||||
|
||||
sb.append(fTargetFunction.getElementName());
|
||||
|
@ -98,4 +98,4 @@ public class StepIntoSelectionActiveOperation {
|
|||
|
||||
return fFunctionSignature;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Freescale Semiconductor and others.
|
||||
* Copyright (c) 2010, 2016 Freescale Semiconductor 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
|
||||
|
@ -25,9 +25,9 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput;
|
|||
public class CLICatch extends CLICommand<CLICatchInfo> {
|
||||
|
||||
private static String formOperation(String event, String[] args) {
|
||||
StringBuilder oper = new StringBuilder("catch " + event); //$NON-NLS-1$
|
||||
StringBuilder oper = new StringBuilder("catch ").append(event); //$NON-NLS-1$
|
||||
for (String arg : args) {
|
||||
oper.append(" " + arg); //$NON-NLS-1$
|
||||
oper.append(' ').append(arg);
|
||||
}
|
||||
return oper.toString();
|
||||
}
|
||||
|
|
|
@ -150,15 +150,15 @@ public class MICommand<V extends MIInfo> implements ICommand<V> {
|
|||
|
||||
// Add the --thread option
|
||||
if (supportsThreadAndFrameOptions() && threadId != null && !threadId.trim().isEmpty()) {
|
||||
command.append(" --thread " + threadId); //$NON-NLS-1$
|
||||
command.append(" --thread ").append(threadId); //$NON-NLS-1$
|
||||
|
||||
// Add the --frame option, but only if we are using the --thread option
|
||||
if (frameId >= 0) {
|
||||
command.append(" --frame " + frameId); //$NON-NLS-1$
|
||||
command.append(" --frame ").append(frameId); //$NON-NLS-1$
|
||||
}
|
||||
} else if (supportsThreadGroupOption() && groupId != null && !groupId.trim().isEmpty()) {
|
||||
// The --thread-group option is only allowed if we are not using the --thread option
|
||||
command.append(" --thread-group " + groupId); //$NON-NLS-1$
|
||||
command.append(" --thread-group ").append(groupId); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
String opt = optionsToString();
|
||||
|
|
|
@ -62,19 +62,19 @@ public class MIFrame {
|
|||
@Override
|
||||
public String toString() {
|
||||
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$
|
||||
buffer.append(",file=\"" + file + "\""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append(",fullname=\"" + fullname + "\""); //$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append("level=\"").append(level).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",addr=\"").append(addr).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",func=\"").append(func).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",file=\"").append(file).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",fullname=\"").append(fullname).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",line=\"").append(line).append('"'); //$NON-NLS-1$
|
||||
buffer.append(",args=["); //$NON-NLS-1$
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
if (i != 0) {
|
||||
buffer.append(',');
|
||||
}
|
||||
buffer.append("{name=\"" + args[i].getName() + "\"");//$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append(",value=\"" + args[i].getValue() + "\"}");//$NON-NLS-1$//$NON-NLS-2$
|
||||
buffer.append("{name=\"").append(args[i].getName()).append('"');//$NON-NLS-1$
|
||||
buffer.append(",value=\"").append(args[i].getValue()).append("\"}");//$NON-NLS-1$//$NON-NLS-2$
|
||||
}
|
||||
buffer.append(']');
|
||||
return buffer.toString();
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MIRegisterValue {
|
|||
public String toString() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("number=\"").append(number).append('"'); //$NON-NLS-1$
|
||||
buffer.append(',').append("value=\"" + value + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append(',').append("value=\"").append(value).append('"'); //$NON-NLS-1$
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class MIResult {
|
|||
if (!v.isEmpty() && (v.charAt(0) == '[' || v.charAt(0) =='{')) {
|
||||
buffer.append(v);
|
||||
} else {
|
||||
buffer.append("\"" + value.toString() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buffer.append('"').append(v).append('"');
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
|
|
|
@ -335,7 +335,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
|||
@Override
|
||||
protected void handleSuccess() {
|
||||
StringBuilder finalResult = new StringBuilder();
|
||||
finalResult.append(NAME).append(getData().get(IElementPropertiesProvider.PROP_NAME)).append(CRLF);
|
||||
finalResult.append(NAME).append(getData().get(IElementPropertiesProvider.PROP_NAME)).append(CRLF);
|
||||
|
||||
if (formats != null) {
|
||||
for (int i = 0; i < formats.length; i++) {
|
||||
|
@ -363,7 +363,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
|
|||
String childMessage = statuses[i].getMessage().trim();
|
||||
// Avoid root message duplication
|
||||
if (!childMessage.equals(rootMessage)) {
|
||||
finalResult.append(CRLF + CRLF + (i+1) + PARENTHESES + childMessage);
|
||||
finalResult.append(CRLF).append(CRLF).append(i + 1).append(PARENTHESES).append(childMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -559,7 +559,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
|
|||
|
||||
// Add the address
|
||||
if (dmData.getAddress() != null) {
|
||||
label.append("- 0x" + dmData.getAddress().toString(16)); //$NON-NLS-1$
|
||||
label.append("- 0x").append(dmData.getAddress().toString(16)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// Set the label to the result listener
|
||||
|
|
|
@ -109,7 +109,7 @@ public class ViewerDataRequestMonitor<V> extends DataRequestMonitor<V> {
|
|||
break;
|
||||
}
|
||||
if (topFrame != null) {
|
||||
str.append("[" + type + "] " + topFrame + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
str.append('[').append(type).append("] ").append(topFrame).append('\n'); //$NON-NLS-1$
|
||||
}
|
||||
else {
|
||||
str.append("<unknown>\n"); //$NON-NLS-1$
|
||||
|
|
|
@ -827,14 +827,14 @@ abstract public class AbstractVMProvider implements IVMProvider, IVMEventListene
|
|||
str.append(DsfPlugin.getDebugTime());
|
||||
str.append(' ');
|
||||
if (action == EventHandlerAction.skipped || action == EventHandlerAction.canceled) {
|
||||
str.append(LoggingUtils.toString(this) + " " + action.toString() + " event " + LoggingUtils.toString(skippedOrCanceledEvent) + " because of event " + LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
str.append(LoggingUtils.toString(this)).append(' ').append(action).append(" event ").append(LoggingUtils.toString(skippedOrCanceledEvent)).append(" because of event ").append(LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
else {
|
||||
str.append(LoggingUtils.toString(this) + " " + action.toString() + " event " + LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(LoggingUtils.toString(this)).append(' ').append(action).append(" event ").append(LoggingUtils.toString(event)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (action != EventHandlerAction.received) {
|
||||
str.append(" for proxy " + LoggingUtils.toString(proxy) + ", whose root is " + LoggingUtils.toString(proxy.getRootElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(" for proxy ").append(LoggingUtils.toString(proxy)).append(", whose root is ").append(LoggingUtils.toString(proxy.getRootElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
DsfUIPlugin.debug(str.toString());
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -128,10 +128,10 @@ public class VMChildrenUpdate extends VMViewerUpdate implements IChildrenUpdate
|
|||
// trace our result
|
||||
if (VMViewerUpdateTracing.DEBUG_VMUPDATES && !isCanceled() && VMViewerUpdateTracing.matchesFilterRegex(this.getClass())) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(DsfPlugin.getDebugTime() + " " + LoggingUtils.toString(this) + " marked done; element = " + LoggingUtils.toString(getElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(DsfPlugin.getDebugTime()).append(' ').append(LoggingUtils.toString(this)).append(" marked done; element = ").append(LoggingUtils.toString(getElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
if (fElements != null && !fElements.isEmpty()) {
|
||||
for (Object element : fElements) {
|
||||
str.append(" " + LoggingUtils.toString(element) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(" ").append(LoggingUtils.toString(element)).append('\n'); //$NON-NLS-1$
|
||||
}
|
||||
str.deleteCharAt(str.length()-1); // remove trailing \n
|
||||
}
|
||||
|
|
|
@ -284,10 +284,10 @@ public class VMDelta extends ModelDelta {
|
|||
for (int i = 0; i < depth; i++) {
|
||||
indent += '\t';
|
||||
}
|
||||
buf.append(indent + "\tElement: "); //$NON-NLS-1$
|
||||
buf.append(indent).append("\tElement: "); //$NON-NLS-1$
|
||||
buf.append(delta.getElement());
|
||||
buf.append('\n');
|
||||
buf.append(indent + "\t\tFlags: "); //$NON-NLS-1$
|
||||
buf.append(indent).append("\t\tFlags: "); //$NON-NLS-1$
|
||||
int flags = delta.getFlags();
|
||||
if (flags == 0) {
|
||||
buf.append("NO_CHANGE"); //$NON-NLS-1$
|
||||
|
@ -327,7 +327,7 @@ public class VMDelta extends ModelDelta {
|
|||
}
|
||||
}
|
||||
buf.append('\n');
|
||||
buf.append(indent + "\t\tIndex: "); //$NON-NLS-1$
|
||||
buf.append(indent).append("\t\tIndex: "); //$NON-NLS-1$
|
||||
buf.append(delta.fIndex);
|
||||
buf.append(" Child Count: "); //$NON-NLS-1$
|
||||
buf.append(delta.fChildCount);
|
||||
|
|
|
@ -137,7 +137,7 @@ public class VMPropertiesUpdate extends VMViewerUpdate implements IPropertiesUpd
|
|||
// trace our result
|
||||
if (VMViewerUpdateTracing.DEBUG_VMUPDATES && !isCanceled() && VMViewerUpdateTracing.matchesFilterRegex(this.getClass())) {
|
||||
StringBuilder str = new StringBuilder();
|
||||
str.append(DsfPlugin.getDebugTime() + " " + LoggingUtils.toString(this) + " marked done; element = " + LoggingUtils.toString(getElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(DsfPlugin.getDebugTime()).append(' ').append(LoggingUtils.toString(this)).append(" marked done; element = ").append(LoggingUtils.toString(getElement())); //$NON-NLS-1$
|
||||
if (fValues != null) {
|
||||
Iterator<String> keyIter = fValues.keySet().iterator();
|
||||
while (keyIter.hasNext()) {
|
||||
|
@ -146,7 +146,7 @@ public class VMPropertiesUpdate extends VMViewerUpdate implements IPropertiesUpd
|
|||
if (val instanceof String[]) {
|
||||
val = LoggingUtils.toString((String[])val);
|
||||
}
|
||||
str.append(" " + prop + "=" + val + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
str.append(" ").append(prop).append("=").append(val).append('\n'); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
str.deleteCharAt(str.length()-1); // remove trailing linefeed
|
||||
}
|
||||
|
|
|
@ -1379,14 +1379,14 @@ public class AbstractCachingVMProvider extends AbstractVMProvider
|
|||
str.append(DsfPlugin.getDebugTime());
|
||||
str.append(' ');
|
||||
if (action == EventHandlerAction.skipped || action == EventHandlerAction.canceled) {
|
||||
str.append(LoggingUtils.toString(this) + " " + action.toString() + " event " + LoggingUtils.toString(skippedOrCanceledEvent) + " because of event " + LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
str.append(LoggingUtils.toString(this)).append(' ').append(action).append(" event ").append(LoggingUtils.toString(skippedOrCanceledEvent)).append(" because of event ").append(LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
else {
|
||||
str.append(LoggingUtils.toString(this) + " " + action.toString() + " event " + LoggingUtils.toString(event)); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(LoggingUtils.toString(this)).append(' ').append(action).append(" event ").append(LoggingUtils.toString(event)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (action != EventHandlerAction.received) {
|
||||
str.append(" for proxy " + LoggingUtils.toString(proxy) + ", whose root is " + LoggingUtils.toString(proxy.getRootElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
str.append(" for proxy ").append(LoggingUtils.toString(proxy)).append( ", whose root is ").append(LoggingUtils.toString(proxy.getRootElement())); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
DsfUIPlugin.debug(str.toString());
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ public class DefaultDsfExecutor extends ScheduledThreadPoolExecutor
|
|||
final String refstr = LoggingUtils.toString(executable, false);
|
||||
String tostr = LoggingUtils.trimTrailingNewlines(executable.toString());
|
||||
traceBuilder.append("\n\t\t"); //$NON-NLS-1$
|
||||
traceBuilder.append("instance = " + refstr); //$NON-NLS-1$
|
||||
traceBuilder.append("instance = ").append(refstr); //$NON-NLS-1$
|
||||
if (!tostr.equals(refstr)) {
|
||||
traceBuilder.append(" ["); //$NON-NLS-1$
|
||||
traceBuilder.append(tostr);
|
||||
|
|
|
@ -200,7 +200,7 @@ public class DsfExecutable {
|
|||
// traceBuilder.append(' ');
|
||||
//
|
||||
// final String refstr = LoggingUtils.toString(this, false);
|
||||
// traceBuilder.append("DSF executable was never executed: " + refstr); //$NON-NLS-1$
|
||||
// traceBuilder.append("DSF executable was never executed: ").append(refstr); //$NON-NLS-1$
|
||||
// final String tostr = LoggingUtils.trimTrailingNewlines(this.toString());
|
||||
// if (!tostr.equals(refstr)) {
|
||||
// traceBuilder.append(" ["); //$NON-NLS-1$
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2015 Freescale Semiconductor, Inc. and others.
|
||||
* Copyright (c) 2009, 2016 Freescale Semiconductor, 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
|
||||
|
@ -73,7 +73,7 @@ public class LoggingUtils {
|
|||
public static String toString(String[] strings) {
|
||||
StringBuilder str = new StringBuilder("{"); //$NON-NLS-1$
|
||||
for (String s : strings) {
|
||||
str.append(s + ", "); //$NON-NLS-1$
|
||||
str.append(s).append(", "); //$NON-NLS-1$
|
||||
}
|
||||
if (strings.length > 0) {
|
||||
str.delete(str.length()-2, Integer.MAX_VALUE); // remove the trailing comma and space
|
||||
|
|
|
@ -490,19 +490,19 @@ public class ViewerUpdatesListener
|
|||
}
|
||||
if (fFailOnMultipleLabelUpdateSequences) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fMultipleLabelUpdateSequencesObserved = " + fMultipleLabelUpdateSequencesObserved);
|
||||
buf.append("fMultipleLabelUpdateSequencesObserved = ").append(fMultipleLabelUpdateSequencesObserved);
|
||||
}
|
||||
if (fFailOnMultipleModelUpdateSequences) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fMultipleModelUpdateSequencesObserved = " + fMultipleModelUpdateSequencesObserved);
|
||||
buf.append("fMultipleModelUpdateSequencesObserved = ").append(fMultipleModelUpdateSequencesObserved);
|
||||
}
|
||||
if ( (flags & LABEL_SEQUENCE_COMPLETE) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fLabelSequenceComplete = " + fLabelSequenceComplete);
|
||||
buf.append("fLabelSequenceComplete = ").append(fLabelSequenceComplete);
|
||||
}
|
||||
if ( (flags & LABEL_UPDATES_RUNNING) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fLabelUpdatesRunning = " + fLabelUpdatesCounter);
|
||||
buf.append("fLabelUpdatesRunning = ").append(fLabelUpdatesCounter);
|
||||
}
|
||||
if ( (flags & LABEL_SEQUENCE_STARTED) != 0) {
|
||||
buf.append("\n\t");
|
||||
|
@ -519,11 +519,11 @@ public class ViewerUpdatesListener
|
|||
}
|
||||
if ( (flags & CONTENT_SEQUENCE_COMPLETE) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fContentSequenceComplete = " + fContentSequenceComplete);
|
||||
buf.append("fContentSequenceComplete = ").append(fContentSequenceComplete);
|
||||
}
|
||||
if ( (flags & VIEWER_UPDATES_RUNNING) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fContentUpdatesCounter = " + fContentUpdatesCounter);
|
||||
buf.append("fContentUpdatesCounter = ").append(fContentUpdatesCounter);
|
||||
}
|
||||
if ( (flags & HAS_CHILDREN_UPDATES_STARTED) != 0) {
|
||||
buf.append("\n\t");
|
||||
|
@ -566,26 +566,26 @@ public class ViewerUpdatesListener
|
|||
}
|
||||
if ( (flags & MODEL_CHANGED_COMPLETE) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fModelChangedComplete = " + fModelChangedComplete);
|
||||
buf.append("fModelChangedComplete = ").append(fModelChangedComplete);
|
||||
}
|
||||
if ( (flags & STATE_SAVE_COMPLETE) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fStateSaveComplete = " + fStateSaveComplete);
|
||||
buf.append("fStateSaveComplete = ").append(fStateSaveComplete);
|
||||
}
|
||||
if ( (flags & STATE_RESTORE_COMPLETE) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fStateRestoreComplete = " + fStateRestoreComplete);
|
||||
buf.append("fStateRestoreComplete = ").append(fStateRestoreComplete);
|
||||
}
|
||||
// if ( (flags & MODEL_PROXIES_INSTALLED) != 0) {
|
||||
// buf.append("\n\t");
|
||||
// buf.append("fProxyModels = " + fProxyModels);
|
||||
// buf.append("fProxyModels = ").append(fProxyModels);
|
||||
// }
|
||||
if ( (flags & PROPERTY_UPDATES_STARTED) != 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fPropertiesUpdatesRunning = ");
|
||||
buf.append(toStringViewerUpdatesSet(fPropertiesUpdatesRunning));
|
||||
buf.append("\n\t");
|
||||
buf.append("fPropertiesUpdatesCompleted = " + fPropertiesUpdatesCompleted);
|
||||
buf.append("fPropertiesUpdatesCompleted = ").append(fPropertiesUpdatesCompleted);
|
||||
}
|
||||
if ( (flags & PROPERTY_UPDATES) != 0) {
|
||||
buf.append("\n\t");
|
||||
|
@ -594,7 +594,7 @@ public class ViewerUpdatesListener
|
|||
}
|
||||
if (fTimeoutInterval > 0) {
|
||||
buf.append("\n\t");
|
||||
buf.append("fTimeoutInterval = " + fTimeoutInterval);
|
||||
buf.append("fTimeoutInterval = ").append(fTimeoutInterval);
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate
|
|||
|
||||
StringBuilder b = new StringBuilder();
|
||||
|
||||
b.append(gdbserverCommand + " " + commandArguments); //$NON-NLS-1$
|
||||
b.append(gdbserverCommand).append(' ').append(commandArguments); //$NON-NLS-1$
|
||||
|
||||
String arguments = getProgramArguments(configuration);
|
||||
if (arguments.trim().length() > 0) {
|
||||
|
|
|
@ -272,7 +272,7 @@ public class CMainTab extends CAbstractMainTab {
|
|||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(bin.getCPU()).append(bin.isLittleEndian() ? "le" : "be"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
return name.toString();
|
||||
|
|
|
@ -397,7 +397,7 @@ public class CMainTab2 extends CAbstractMainTab {
|
|||
if (element instanceof IBinary) {
|
||||
IBinary bin = (IBinary)element;
|
||||
StringBuilder name = new StringBuilder();
|
||||
name.append(bin.getCPU() + (bin.isLittleEndian() ? "le" : "be")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(bin.getCPU()).append(bin.isLittleEndian() ? "le" : "be"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
name.append(" - "); //$NON-NLS-1$
|
||||
name.append(bin.getPath().toString());
|
||||
return name.toString();
|
||||
|
|
|
@ -1342,7 +1342,7 @@ public class FindReplaceDialog extends SelectionDialog
|
|||
return ""; //$NON-NLS-1$
|
||||
StringBuilder buf = new StringBuilder();
|
||||
for(int i = 0; i < fBytes.length; i++)
|
||||
buf.append(BigInteger.valueOf(fBytes[i]).toString(16) + " "); //$NON-NLS-1$
|
||||
buf.append(BigInteger.valueOf(fBytes[i]).toString(16)).append(' ');
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue