Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java4
-rw-r--r--build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java10
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java14
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java6
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java4
-rw-r--r--build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java15
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java3
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CustomOptionCommandGenerator.java9
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java9
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java47
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java207
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java4
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java8
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java10
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java6
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/util/CElementBaseLabels.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java8
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java10
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMInclude.java8
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java10
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java14
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CStringAutoIndentStrategy.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java2
-rwxr-xr-xdsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java8
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/LoggingUtils.java4
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java24
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab2.java2
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.search/src/org/eclipse/cdt/debug/ui/memory/search/FindReplaceDialog.java2
72 files changed, 344 insertions, 330 deletions
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
index f3e4162b8c5..065bd712b10 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/AutotoolsConfiguration.java
@@ -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();
diff --git a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
index e2066d5e2bc..6abc667257a 100644
--- a/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
+++ b/build/org.eclipse.cdt.autotools.core/src/org/eclipse/cdt/internal/autotools/core/configure/FlagConfigureOption.java
@@ -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);
}
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
index 4de4a5257e7..000f36ca68d 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/autotools/ui/editors/AutoconfPartitioner.java
@@ -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);
}
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
index 82ddf6719de..1de726c5ae2 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/actions/AbstractAutotoolsHandler.java
@@ -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() };
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
index 86bb102ba7c..74b124508e6 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/editors/automake/AutomakeTextHover.java
@@ -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();
}
diff --git a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
index c6e37a7a4de..a1891e7a52a 100644
--- a/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
+++ b/build/org.eclipse.cdt.autotools.ui/src/org/eclipse/cdt/internal/autotools/ui/text/hover/AutoconfTextHover.java
@@ -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();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
index ce66ce5ad19..10200464617 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCDMakefileGenerator.java
@@ -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(' ');
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
index 0b2a1c1d408..13a03132da7 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/AbstractBuilderTest.java
@@ -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();
}
-} \ No newline at end of file
+}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
index 2d8da8a6ef7..c5c51af35ab 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ManagedBuildTestHelper.java
@@ -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");
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
index ad686f91bfe..5d09fc62283 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/suite/org/eclipse/cdt/managedbuilder/testplugin/ResourceDeltaVerifier.java
@@ -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;
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CustomOptionCommandGenerator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CustomOptionCommandGenerator.java
index c9b025538ef..d9273f5c109 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CustomOptionCommandGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CustomOptionCommandGenerator.java
@@ -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) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
index e2340881c17..3217401d838 100644
--- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/Test30_2_CommandLineGenerator.java
@@ -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
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
index 2da809ebcfd..7d24e38b43c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/DbgUtil.java
@@ -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]));
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
index 39cfb460d33..00141b0915c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
@@ -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();
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
index c8e9a76f0e4..368697c7b85 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
@@ -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());
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index fd8c4d594d6..92f5e97c252 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -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 );
}
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
index 73af0f0456a..8feda5ee498 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
@@ -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;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
index 7a2cff762e4..229dea84d84 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/DefaultGCCDependencyCalculator.java
@@ -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();
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
index fd351aa84f3..83d82e4cbff 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
@@ -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));
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
index c9a62333f23..83454113a28 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildToolSettingUI.java
@@ -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());
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
index f055869c3ea..2f72f7e4c21 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolChainEditTab.java
@@ -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)
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
index ff62f29a641..f7c39d5a532 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
@@ -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$
}
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
index fd16457206f..fa49e1115fe 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
@@ -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);
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
index 276629d35ac..a7e89354295 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java
@@ -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);
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
index 18ec2e65054..1166316bd44 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/comenthandler/CommentHandlingTest.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
index 8ddb950128e..28b411f9282 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/pdom/tests/PDOMPrettyPrinter.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
index 02e3384e580..5d8c32c89b1 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/BaseTestCase.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
index 943c8ad1a85..9fb9446d85a 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/util/TestSourceReader.java
@@ -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);
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/util/CElementBaseLabels.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/util/CElementBaseLabels.java
index fe8d9883556..dbda6d593b4 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/util/CElementBaseLabels.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/util/CElementBaseLabels.java
@@ -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$
}
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
index 2771b5c207e..64d77479979 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
index b06e193fca2..89751536aba 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementDelta.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
index f463023eeae..b2b2f2a5eb0 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionDelta.java
@@ -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();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
index 4046cc5a525..e8abaf9b4f9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPFunctionSpecialization.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
index a4eb7c2955e..83818f5084e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMInclude.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMInclude.java
index a915db28f60..2946bf0757d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMInclude.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMInclude.java
@@ -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();
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
index 8be10734665..6759db225f3 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/formatter/Scribe.java
@@ -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);
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
index f9569addfd2..e1afea3e98c 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/Exe.java
@@ -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$
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
index 6df934c8f6e..446da9e08de 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
@@ -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();
}
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java
index 5e2d5d865c7..fff64519b05 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/InactiveCodeHighlightingTest.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java
index 660cc4b0da5..8eb0836b220 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/PartitionTokenScannerTest.java
@@ -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));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
index caa462d40b6..7619911058e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CStringAutoIndentStrategy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CStringAutoIndentStrategy.java
index f934e29c452..62276632ee1 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CStringAutoIndentStrategy.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CStringAutoIndentStrategy.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java
index f5b814ec15e..55b9e7c8458 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/doxygen/DoxygenSingleAutoEditStrategy.java
@@ -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$
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
index d86a82281d2..a90cb1efd2b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
@@ -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();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
index 1b9c86b94dd..791e779aa4c 100755
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.multicorevisualizer.ui/src/org/eclipse/cdt/dsf/gdb/multicorevisualizer/internal/ui/model/VisualizerThread.java
@@ -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();
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java
index bff8df09dd3..05882b14502 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/ProcessPrompter.java
@@ -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$
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
index 94d386144a1..04d78abb8e1 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
@@ -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);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
index 564f15672d2..3395a145774 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
@@ -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);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java
index 0d3d7def95e..9efd65e70b9 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java
@@ -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);
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java
index 6712e41ffc9..ec485def38c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/GDBTypeParser.java
@@ -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();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java
index 8f9e5c29e11..de9df045e4f 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/service/control/StepIntoSelectionActiveOperation.java
@@ -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;
}
-} \ No newline at end of file
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java
index a6791ed2b38..5d191fd8c7d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/CLICatch.java
@@ -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();
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java
index 3d7de02ab53..ad49c075fd1 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MICommand.java
@@ -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();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java
index d6d3514f352..583f13ed5a7 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIFrame.java
@@ -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();
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java
index 2a897ef12c5..4502c7334c1 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java
@@ -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();
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java
index 2c29175e5d4..3ffc0609142 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIResult.java
@@ -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();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
index 1fb78c6b591..a1f1855d19a 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
@@ -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);
}
}
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
index 0e2e3e4288e..f9b7914cb11 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
@@ -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
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java
index ace9ed70660..8c6bc23f399 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/ViewerDataRequestMonitor.java
@@ -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$
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
index f3b92cb8a44..71fdb44a990 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java
@@ -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());
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
index deb4b7dee7c..d139436c397 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMChildrenUpdate.java
@@ -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
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java
index 1c31dd4e5ae..eeab138ee1c 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/VMDelta.java
@@ -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);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
index 9f627b91417..6a711504c55 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/VMPropertiesUpdate.java
@@ -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
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
index 978d1605392..2894d83b327 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/update/AbstractCachingVMProvider.java
@@ -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());
}
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java
index c9758967a09..1f8deacc11a 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DefaultDsfExecutor.java
@@ -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);
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java
index e1373792c69..2d2363f44ab 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/DsfExecutable.java
@@ -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$
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/LoggingUtils.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/LoggingUtils.java
index fdcc1da65dc..bdceb2e616c 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/LoggingUtils.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/internal/LoggingUtils.java
@@ -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
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
index cdba4027e3f..176ee096d29 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/ViewerUpdatesListener.java
@@ -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();
}
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
index 860a42b3e19..23f7febce58 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
@@ -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) {
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 1839c714069..0e9368c28b2 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -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();
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab2.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab2.java
index e3b4d772a3d..9144d6bb6dc 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab2.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab2.java
@@ -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();
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.search/src/org/eclipse/cdt/debug/ui/memory/search/FindReplaceDialog.java b/memory/org.eclipse.cdt.debug.ui.memory.search/src/org/eclipse/cdt/debug/ui/memory/search/FindReplaceDialog.java
index bd54eebcdae..2d8161f7748 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.search/src/org/eclipse/cdt/debug/ui/memory/search/FindReplaceDialog.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.search/src/org/eclipse/cdt/debug/ui/memory/search/FindReplaceDialog.java
@@ -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();
}

Back to the top