mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 492200 - Replace StringBuffer with StringBuilder
There are many opportunities for replacing `StringBuffer` with `StringBuilder` provided that the type isn't visible from the public API and is used only in internal methods. Replace these where appropriate. Change-Id: I769ceb6eaee18d183fb0e00fa0d730651f8a7edb Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
parent
8a2fd3307b
commit
ccbab86d6c
120 changed files with 300 additions and 302 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2012 Red Hat Inc. and others.
|
* Copyright (c) 2012, 2016 Red Hat Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -91,7 +91,7 @@ public class AutotoolsConfigurationBuilder extends ACBuilder {
|
||||||
|
|
||||||
OutputStream cos = console.getOutputStream();
|
OutputStream cos = console.getOutputStream();
|
||||||
String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
|
String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
|
||||||
StringBuffer buf = new StringBuffer(errormsg);
|
StringBuilder buf = new StringBuilder(errormsg);
|
||||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
||||||
|
|
|
@ -872,7 +872,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
||||||
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
|
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
// Launch command - main invocation
|
// Launch command - main invocation
|
||||||
if (consoleStart)
|
if (consoleStart)
|
||||||
|
@ -968,7 +968,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report either the success or failure of our mission
|
// Report either the success or failure of our mission
|
||||||
buf = new StringBuffer();
|
buf = new StringBuilder();
|
||||||
if (errMsg != null && errMsg.length() > 0) {
|
if (errMsg != null && errMsg.length() > 0) {
|
||||||
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
|
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
|
||||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
|
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
@ -1172,7 +1172,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
||||||
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
|
"MakeGenerator.make.message", msgs)); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
// Launch command - main invocation
|
// Launch command - main invocation
|
||||||
if (consoleStart)
|
if (consoleStart)
|
||||||
|
@ -1302,7 +1302,7 @@ public class AutotoolsNewMakeGenerator extends MarkerGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report either the success or failure of our mission
|
// Report either the success or failure of our mission
|
||||||
buf = new StringBuffer();
|
buf = new StringBuilder();
|
||||||
if (errMsg != null && errMsg.length() > 0) {
|
if (errMsg != null && errMsg.length() > 0) {
|
||||||
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
|
String errorDesc = AutotoolsPlugin.getResourceString("MakeGenerator.generation.error"); //$NON-NLS-1$
|
||||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
|
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
|
|
@ -293,7 +293,7 @@ public class AutotoolsConfiguration implements IAConfiguration {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getToolParameters(String name) {
|
public String getToolParameters(String name) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
Option[] options = getChildOptions(name);
|
Option[] options = getChildOptions(name);
|
||||||
for (int i = 0; i < options.length; ++i) {
|
for (int i = 0; i < options.length; ++i) {
|
||||||
IConfigureOption option = getOption(options[i].getName());
|
IConfigureOption option = getOption(options[i].getName());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2011, 2015 Red Hat Inc.
|
* Copyright (c) 2011, 2016 Red Hat Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -37,14 +37,14 @@ public class FlagConfigureOption extends AbstractConfigurationOption {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getParameter() {
|
public String getParameter() {
|
||||||
StringBuffer parms = new StringBuffer();
|
StringBuilder parms = new StringBuilder();
|
||||||
// Multiple flags are designated by putting multiple flags together using "|" as delimiter
|
// Multiple flags are designated by putting multiple flags together using "|" as delimiter
|
||||||
String[] flagNames = getValue().split("\\|"); //$NON-NLS-1$
|
String[] flagNames = getValue().split("\\|"); //$NON-NLS-1$
|
||||||
String flagSeparator = "";
|
String flagSeparator = "";
|
||||||
for (String flagName : flagNames) {
|
for (String flagName : flagNames) {
|
||||||
parms.append(flagSeparator);
|
parms.append(flagSeparator);
|
||||||
flagSeparator = " "; //$NON-NLS-1$
|
flagSeparator = " "; //$NON-NLS-1$
|
||||||
StringBuffer parm = new StringBuffer(flagName+"=\""); //$NON-NLS-1$
|
StringBuilder parm = new StringBuilder(flagName+"=\""); //$NON-NLS-1$
|
||||||
boolean haveParm = false;
|
boolean haveParm = false;
|
||||||
if (isParmSet()) {
|
if (isParmSet()) {
|
||||||
String separator = "";
|
String separator = "";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -135,7 +135,7 @@ public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHov
|
||||||
* Formats a message as HTML text.
|
* Formats a message as HTML text.
|
||||||
*/
|
*/
|
||||||
private String formatSingleMessage(String message) {
|
private String formatSingleMessage(String message) {
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
HTMLPrinter.addPageProlog(buffer);
|
HTMLPrinter.addPageProlog(buffer);
|
||||||
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
|
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
|
||||||
HTMLPrinter.addPageEpilog(buffer);
|
HTMLPrinter.addPageEpilog(buffer);
|
||||||
|
@ -146,7 +146,7 @@ public class AutoconfAnnotationHover implements IAnnotationHover, IAnnotationHov
|
||||||
* Formats several message as HTML text.
|
* Formats several message as HTML text.
|
||||||
*/
|
*/
|
||||||
private String formatMultipleMessages(List<String> messages) {
|
private String formatMultipleMessages(List<String> messages) {
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
HTMLPrinter.addPageProlog(buffer);
|
HTMLPrinter.addPageProlog(buffer);
|
||||||
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
|
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Red Hat, Inc.
|
* Copyright (c) 2006, 2016 Red Hat, Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -37,7 +37,7 @@ public class AutoconfMacroPartitionRule implements IPredicateRule {
|
||||||
protected static final int UNDEFINED = -1;
|
protected static final int UNDEFINED = -1;
|
||||||
|
|
||||||
/** Buffer used for pattern detection */
|
/** Buffer used for pattern detection */
|
||||||
private StringBuffer fBuffer = new StringBuffer();
|
private StringBuilder fBuffer = new StringBuilder();
|
||||||
|
|
||||||
public AutoconfMacroPartitionRule(IToken inToken) {
|
public AutoconfMacroPartitionRule(IToken inToken) {
|
||||||
token = inToken;
|
token = inToken;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Red Hat, Inc.
|
* Copyright (c) 2006, 2016 Red Hat, Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -34,7 +34,7 @@ public class AutoconfMacroRule implements IRule {
|
||||||
protected static final int UNDEFINED = -1;
|
protected static final int UNDEFINED = -1;
|
||||||
|
|
||||||
/** Buffer used for pattern detection */
|
/** Buffer used for pattern detection */
|
||||||
private StringBuffer fBuffer = new StringBuffer();
|
private StringBuilder fBuffer = new StringBuilder();
|
||||||
|
|
||||||
private String fStartingSequence;
|
private String fStartingSequence;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Red Hat, Inc.
|
* Copyright (c) 2006, 2016 Red Hat, Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -41,7 +41,7 @@ public class AutoconfPartitioner extends FastPartitioner {
|
||||||
|
|
||||||
public void printPartitions(ITypedRegion[] partitions)
|
public void printPartitions(ITypedRegion[] partitions)
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
for (int i = 0; i < partitions.length; i++)
|
for (int i = 0; i < partitions.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -62,4 +62,4 @@ public class AutoconfPartitioner extends FastPartitioner {
|
||||||
}
|
}
|
||||||
System.out.print(buffer);
|
System.out.print(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Red Hat, Inc.
|
* Copyright (c) 2006, 2016 Red Hat, Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -34,7 +34,7 @@ public class InlineDataRule implements IRule {
|
||||||
protected static final int UNDEFINED = -1;
|
protected static final int UNDEFINED = -1;
|
||||||
|
|
||||||
/** Buffer used for pattern detection */
|
/** Buffer used for pattern detection */
|
||||||
private StringBuffer fBuffer = new StringBuffer();
|
private StringBuilder fBuffer = new StringBuilder();
|
||||||
|
|
||||||
private String fStartingSequence = "<<";
|
private String fStartingSequence = "<<";
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class InlineDataRule implements IRule {
|
||||||
// Confirm an EOL delimeter after already matching first delimeter character.
|
// Confirm an EOL delimeter after already matching first delimeter character.
|
||||||
protected boolean confirmDelimeter(ICharacterScanner scanner, char[] delimeter) {
|
protected boolean confirmDelimeter(ICharacterScanner scanner, char[] delimeter) {
|
||||||
int c = scanner.read();
|
int c = scanner.read();
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append((char)c);
|
buffer.append((char)c);
|
||||||
for (int i = 1; i < delimeter.length; ++i) {
|
for (int i = 1; i < delimeter.length; ++i) {
|
||||||
if (c == delimeter[i]) {
|
if (c == delimeter[i]) {
|
||||||
|
@ -76,7 +76,7 @@ public class InlineDataRule implements IRule {
|
||||||
}
|
}
|
||||||
|
|
||||||
char[][] lineDelimeters = scanner.getLegalLineDelimiters();
|
char[][] lineDelimeters = scanner.getLegalLineDelimiters();
|
||||||
StringBuffer endMarkerBuffer = new StringBuffer();
|
StringBuilder endMarkerBuffer = new StringBuilder();
|
||||||
if (c == '-') {
|
if (c == '-') {
|
||||||
fBuffer.append((char)c);
|
fBuffer.append((char)c);
|
||||||
c = scanner.read();
|
c = scanner.read();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2015 Red Hat, Inc.
|
* Copyright (c) 2007, 2016 Red Hat, Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -42,7 +42,7 @@ public class AutoconfElement {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String source = getSource();
|
String source = getSource();
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
StringBuffer kids = new StringBuffer();
|
StringBuilder kids = new StringBuilder();
|
||||||
for (AutoconfElement kid : children) {
|
for (AutoconfElement kid : children) {
|
||||||
kids.append(kid.toString());
|
kids.append(kid.toString());
|
||||||
kids.append(","); //$NON-NLS-1$
|
kids.append(","); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2015 Red Hat, Inc. and others.
|
* Copyright (c) 2007, 2016 Red Hat, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -952,7 +952,7 @@ public class AutoconfParser {
|
||||||
// track the exact tokens forming the start and end of an argument, defaulting
|
// track the exact tokens forming the start and end of an argument, defaulting
|
||||||
// to the borders of the parentheses and commas if no text is included.
|
// to the borders of the parentheses and commas if no text is included.
|
||||||
|
|
||||||
StringBuffer argBuffer = new StringBuffer();
|
StringBuilder argBuffer = new StringBuilder();
|
||||||
AutoconfMacroArgumentElement arg = new AutoconfMacroArgumentElement();
|
AutoconfMacroArgumentElement arg = new AutoconfMacroArgumentElement();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2012 Nokia Corporation.
|
* Copyright (c) 2008, 2016 Nokia Corporation.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -146,7 +146,7 @@ public class AutoconfTokenizer {
|
||||||
}
|
}
|
||||||
|
|
||||||
startOffset = offset;
|
startOffset = offset;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
// check EOL
|
// check EOL
|
||||||
if (ch == '\r' || ch == '\n') {
|
if (ch == '\r' || ch == '\n') {
|
||||||
|
@ -251,7 +251,7 @@ public class AutoconfTokenizer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Token parseWord(char ch) {
|
private Token parseWord(char ch) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
buffer.append(ch);
|
buffer.append(ch);
|
||||||
offset++;
|
offset++;
|
||||||
|
@ -306,7 +306,7 @@ public class AutoconfTokenizer {
|
||||||
private Token parseQuote() {
|
private Token parseQuote() {
|
||||||
// read text, honoring nested quotes, but don't put the outermost quotes in the token
|
// read text, honoring nested quotes, but don't put the outermost quotes in the token
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
int quoteLevel = 1;
|
int quoteLevel = 1;
|
||||||
// keep reading until the close quote
|
// keep reading until the close quote
|
||||||
|
@ -338,7 +338,7 @@ public class AutoconfTokenizer {
|
||||||
startOffset = offset;
|
startOffset = offset;
|
||||||
offset++;
|
offset++;
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
char ch = 0;
|
char ch = 0;
|
||||||
while (offset < chars.length) {
|
while (offset < chars.length) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2012 IBM Corporation and others.
|
* Copyright (c) 2005, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -94,7 +94,7 @@ public class AutotoolsUIPluginImages {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static URL makeIconFileURL(String prefix, String name) {
|
private static URL makeIconFileURL(String prefix, String name) {
|
||||||
StringBuffer buffer= new StringBuffer(prefix);
|
StringBuilder buffer= new StringBuilder(prefix);
|
||||||
buffer.append(name);
|
buffer.append(name);
|
||||||
try {
|
try {
|
||||||
return new URL(fgIconBaseURL, buffer.toString());
|
return new URL(fgIconBaseURL, buffer.toString());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000 2015 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -172,7 +172,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
|
||||||
*/
|
*/
|
||||||
private String processHTMLTag() throws IOException {
|
private String processHTMLTag() throws IOException {
|
||||||
|
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
int ch;
|
int ch;
|
||||||
do {
|
do {
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ public class HTML2TextReader extends SubstitutionTextReader {
|
||||||
* A '&' has been read. Process a entity
|
* A '&' has been read. Process a entity
|
||||||
*/
|
*/
|
||||||
private String processEntity() throws IOException {
|
private String processEntity() throws IOException {
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
int ch= nextChar();
|
int ch= nextChar();
|
||||||
while (Character.isLetterOrDigit((char)ch) || ch == '#') {
|
while (Character.isLetterOrDigit((char)ch) || ch == '#') {
|
||||||
buf.append((char) ch);
|
buf.append((char) ch);
|
||||||
|
@ -256,4 +256,4 @@ public class HTML2TextReader extends SubstitutionTextReader {
|
||||||
buf.append((char) ch);
|
buf.append((char) ch);
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000 2015 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -68,7 +68,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void append(StringBuffer buffer, String string, TextPresentation presentation) {
|
private void append(StringBuilder buffer, String string, TextPresentation presentation) {
|
||||||
|
|
||||||
int length= string.length();
|
int length= string.length();
|
||||||
buffer.append(string);
|
buffer.append(string);
|
||||||
|
@ -97,7 +97,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
||||||
GC gc= new GC(display);
|
GC gc= new GC(display);
|
||||||
try {
|
try {
|
||||||
|
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
int maxNumberOfLines= Math.round((float)maxHeight / gc.getFontMetrics().getHeight());
|
int maxNumberOfLines= Math.round((float)maxHeight / gc.getFontMetrics().getHeight());
|
||||||
|
|
||||||
fCounter= 0;
|
fCounter= 0;
|
||||||
|
@ -157,7 +157,7 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String trim(StringBuffer buffer, TextPresentation presentation) {
|
private String trim(StringBuilder buffer, TextPresentation presentation) {
|
||||||
|
|
||||||
int length= buffer.length();
|
int length= buffer.length();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2012 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -111,7 +111,7 @@ public class MakeUIImages {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static URL makeIconFileURL(String prefix, String name) {
|
private static URL makeIconFileURL(String prefix, String name) {
|
||||||
StringBuffer buffer = new StringBuffer(prefix);
|
StringBuilder buffer = new StringBuilder(prefix);
|
||||||
buffer.append(name);
|
buffer.append(name);
|
||||||
try {
|
try {
|
||||||
return new URL(fgIconBaseURL, buffer.toString());
|
return new URL(fgIconBaseURL, buffer.toString());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000 2015 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -55,7 +55,7 @@ public abstract class SingleCharReader extends Reader {
|
||||||
* Gets the content as a String
|
* Gets the content as a String
|
||||||
*/
|
*/
|
||||||
public String getString() throws IOException {
|
public String getString() throws IOException {
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
int ch;
|
int ch;
|
||||||
while ((ch= read()) != -1) {
|
while ((ch= read()) != -1) {
|
||||||
buf.append((char)ch);
|
buf.append((char)ch);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000 2015 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -30,13 +30,13 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
|
||||||
private int fCharAfterWhiteSpace;
|
private int fCharAfterWhiteSpace;
|
||||||
|
|
||||||
private boolean fReadFromBuffer;
|
private boolean fReadFromBuffer;
|
||||||
private StringBuffer fBuffer;
|
private StringBuilder fBuffer;
|
||||||
private int fIndex;
|
private int fIndex;
|
||||||
|
|
||||||
|
|
||||||
protected SubstitutionTextReader(Reader reader) {
|
protected SubstitutionTextReader(Reader reader) {
|
||||||
fReader= reader;
|
fReader= reader;
|
||||||
fBuffer= new StringBuffer();
|
fBuffer= new StringBuilder();
|
||||||
fIndex= 0;
|
fIndex= 0;
|
||||||
fReadFromBuffer= false;
|
fReadFromBuffer= false;
|
||||||
fCharAfterWhiteSpace= -1;
|
fCharAfterWhiteSpace= -1;
|
||||||
|
@ -127,4 +127,4 @@ public abstract class SubstitutionTextReader extends SingleCharReader {
|
||||||
fBuffer.setLength(0);
|
fBuffer.setLength(0);
|
||||||
fIndex= 0;
|
fIndex= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2009, 2015 Red Hat Inc..
|
* Copyright (c) 2009, 2016 Red Hat Inc..
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -128,7 +128,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
||||||
String currentWord = st.nextToken().trim();
|
String currentWord = st.nextToken().trim();
|
||||||
|
|
||||||
if (currentWord.startsWith("'")) { //$NON-NLS-1$
|
if (currentWord.startsWith("'")) { //$NON-NLS-1$
|
||||||
StringBuffer tmpTarget = new StringBuffer();
|
StringBuilder tmpTarget = new StringBuilder();
|
||||||
while (!currentWord.endsWith("'")) { //$NON-NLS-1$
|
while (!currentWord.endsWith("'")) { //$NON-NLS-1$
|
||||||
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
||||||
if (!st.hasMoreTokens()) {
|
if (!st.hasMoreTokens()) {
|
||||||
|
@ -144,7 +144,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentWord.startsWith("\"")) { //$NON-NLS-1$
|
if (currentWord.startsWith("\"")) { //$NON-NLS-1$
|
||||||
StringBuffer tmpTarget = new StringBuffer();
|
StringBuilder tmpTarget = new StringBuilder();
|
||||||
while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
|
while (!currentWord.endsWith("\"")) { //$NON-NLS-1$
|
||||||
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
tmpTarget.append(currentWord + " "); //$NON-NLS-1$
|
||||||
if (!st.hasMoreTokens()) {
|
if (!st.hasMoreTokens()) {
|
||||||
|
@ -286,7 +286,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
||||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||||
IConfiguration cfg = info.getDefaultConfiguration();
|
IConfiguration cfg = info.getDefaultConfiguration();
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
String[] consoleHeader = new String[3];
|
String[] consoleHeader = new String[3];
|
||||||
|
|
||||||
consoleHeader[0] = actionName;
|
consoleHeader[0] = actionName;
|
||||||
|
@ -338,7 +338,7 @@ public abstract class AbstractAutotoolsHandler extends AbstractHandler {
|
||||||
// some Linux shells such as dash. Using sh -c will
|
// some Linux shells such as dash. Using sh -c will
|
||||||
// work on all Linux
|
// work on all Linux
|
||||||
// POSIX-compliant shells.
|
// POSIX-compliant shells.
|
||||||
StringBuffer command1 = new StringBuffer(strippedCommand);
|
StringBuilder command1 = new StringBuilder(strippedCommand);
|
||||||
for (String arg : argumentList) {
|
for (String arg : argumentList) {
|
||||||
command1.append(" " + arg);
|
command1.append(" " + arg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -202,8 +202,8 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
|
||||||
int len = line.length();
|
int len = line.length();
|
||||||
boolean foundDollar = false;
|
boolean foundDollar = false;
|
||||||
boolean inMacro = false;
|
boolean inMacro = false;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
StringBuffer macroName = new StringBuffer();
|
StringBuilder macroName = new StringBuilder();
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
char c = line.charAt(i);
|
char c = line.charAt(i);
|
||||||
switch(c) {
|
switch(c) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -26,7 +26,7 @@ class AutomakeMacroDefinitionRule implements IPredicateRule {
|
||||||
private static final int ERROR_STATE = 5;
|
private static final int ERROR_STATE = 5;
|
||||||
|
|
||||||
private IToken token;
|
private IToken token;
|
||||||
private StringBuffer buffer = new StringBuffer();
|
private StringBuilder buffer = new StringBuilder();
|
||||||
protected IToken defaultToken;
|
protected IToken defaultToken;
|
||||||
|
|
||||||
public AutomakeMacroDefinitionRule(IToken token, IToken defaultToken) {
|
public AutomakeMacroDefinitionRule(IToken token, IToken defaultToken) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Red Hat Inc..
|
* Copyright (c) 2006, 2016 Red Hat Inc..
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -73,7 +73,7 @@ public class AutomakeTextHover implements ITextHover, ITextHoverExtension {
|
||||||
case '?':
|
case '?':
|
||||||
preReqs = target.getPrerequisites();
|
preReqs = target.getPrerequisites();
|
||||||
if (preReqs != null && preReqs.length > 0) {
|
if (preReqs != null && preReqs.length > 0) {
|
||||||
StringBuffer toReturn = new StringBuffer();
|
StringBuilder toReturn = new StringBuilder();
|
||||||
toReturn.append(preReqs[0]);
|
toReturn.append(preReqs[0]);
|
||||||
for (int i = 1; i < preReqs.length; i++) {
|
for (int i = 1; i < preReqs.length; i++) {
|
||||||
toReturn.append(" " + preReqs[i]);
|
toReturn.append(" " + preReqs[i]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -80,7 +80,7 @@ public class Command extends Directive implements ICommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer cmd = new StringBuffer();
|
StringBuilder cmd = new StringBuilder();
|
||||||
cmd.append( '\t');
|
cmd.append( '\t');
|
||||||
if (getPrefix() != 0) {
|
if (getPrefix() != 0) {
|
||||||
cmd.append(getPrefix());
|
cmd.append(getPrefix());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -27,7 +27,7 @@ public class Comment extends Directive implements IComment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(POUND_STRING).append(comment).append('\n');
|
buffer.append(POUND_STRING).append(comment).append('\n');
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -39,7 +39,7 @@ public class GNUTargetRule extends TargetRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString());
|
buffer.append(getTarget().toString());
|
||||||
buffer.append(':');
|
buffer.append(':');
|
||||||
String[] reqs = getNormalPrerequisites();
|
String[] reqs = getNormalPrerequisites();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -59,7 +59,7 @@ public class If extends Conditional implements IAutomakeConditional, ICommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IF);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IF);
|
||||||
sb.append(' ').append(getVariable());
|
sb.append(' ').append(getVariable());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ public class Ifdef extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFDEF);
|
||||||
sb.append(' ').append(getVariable());
|
sb.append(' ').append(getVariable());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -24,7 +24,7 @@ public class Ifeq extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFEQ);
|
||||||
sb.append(' ').append(getConditional());
|
sb.append(' ').append(getConditional());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ public class Ifndef extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNDEF);
|
||||||
sb.append(' ').append(getVariable());
|
sb.append(' ').append(getVariable());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -24,7 +24,7 @@ public class Ifneq extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNEQ);
|
||||||
sb.append(' ').append(getConditional());
|
sb.append(' ').append(getConditional());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -28,7 +28,7 @@ public class Include extends Parent implements IInclude {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_INCLUDE);
|
||||||
for (int i = 0; i < filenames.length; i++) {
|
for (int i = 0; i < filenames.length; i++) {
|
||||||
sb.append(' ').append(filenames[i]);
|
sb.append(' ').append(filenames[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -28,7 +28,7 @@ public class InferenceRule extends Rule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
|
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
|
||||||
ICommand[] cmds = getCommands();
|
ICommand[] cmds = getCommands();
|
||||||
for (int i = 0; i < cmds.length; i++) {
|
for (int i = 0; i < cmds.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2015 QNX Software Systems and others.
|
* Copyright (c) 2002, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ class MacroDefinitionRule implements IPredicateRule {
|
||||||
private static final int ERROR_STATE = 5;
|
private static final int ERROR_STATE = 5;
|
||||||
|
|
||||||
private IToken token;
|
private IToken token;
|
||||||
private StringBuffer buffer = new StringBuffer();
|
private StringBuilder buffer = new StringBuilder();
|
||||||
protected IToken defaultToken;
|
protected IToken defaultToken;
|
||||||
|
|
||||||
public MacroDefinitionRule(IToken token, IToken defaultToken) {
|
public MacroDefinitionRule(IToken token, IToken defaultToken) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -148,7 +148,7 @@ public class MakefileAnnotationHover implements IAnnotationHover, IAnnotationHov
|
||||||
* Formats a message as HTML text.
|
* Formats a message as HTML text.
|
||||||
*/
|
*/
|
||||||
private String formatSingleMessage(String message) {
|
private String formatSingleMessage(String message) {
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
HTMLPrinter.addPageProlog(buffer);
|
HTMLPrinter.addPageProlog(buffer);
|
||||||
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
|
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message));
|
||||||
HTMLPrinter.addPageEpilog(buffer);
|
HTMLPrinter.addPageEpilog(buffer);
|
||||||
|
@ -159,7 +159,7 @@ public class MakefileAnnotationHover implements IAnnotationHover, IAnnotationHov
|
||||||
* Formats several message as HTML text.
|
* Formats several message as HTML text.
|
||||||
*/
|
*/
|
||||||
private String formatMultipleMessages(List<String> messages) {
|
private String formatMultipleMessages(List<String> messages) {
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
HTMLPrinter.addPageProlog(buffer);
|
HTMLPrinter.addPageProlog(buffer);
|
||||||
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
|
HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(AutoconfEditorMessages.getString("AutoconfAnnotationHover.multipleMarkers"))); //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -31,7 +31,7 @@ public class MakefileReader extends LineNumberReader {
|
||||||
@Override
|
@Override
|
||||||
public String readLine() throws IOException {
|
public String readLine() throws IOException {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
boolean escapedLine = false;
|
boolean escapedLine = false;
|
||||||
boolean escapedCommand = false;
|
boolean escapedCommand = false;
|
||||||
while (!done) {
|
while (!done) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -64,7 +64,7 @@ public class MakefileTextHover implements ITextHover {
|
||||||
statements = new IMacroDefinition[0];
|
statements = new IMacroDefinition[0];
|
||||||
}
|
}
|
||||||
// iterate over all the different categories
|
// iterate over all the different categories
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
for (int i = 0; i < statements.length; i++) {
|
for (int i = 0; i < statements.length; i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buffer.append("\n"); //$NON-NLS-1$
|
buffer.append("\n"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -63,7 +63,7 @@ public abstract class Parent extends Directive implements IParent {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
IDirective[] directives = getDirectives();
|
IDirective[] directives = getDirectives();
|
||||||
for (int i = 0; i < directives.length; i++) {
|
for (int i = 0; i < directives.length; i++) {
|
||||||
sb.append(directives[i]);
|
sb.append(directives[i]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -32,7 +32,7 @@ public abstract class SpecialRule extends Rule implements ISpecialRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(target).append(':');
|
sb.append(target).append(':');
|
||||||
String[] reqs = getPrerequisites();
|
String[] reqs = getPrerequisites();
|
||||||
for (int i = 0; i < reqs.length; i++) {
|
for (int i = 0; i < reqs.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -49,7 +49,7 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget()).append(':');
|
buffer.append(getTarget()).append(':');
|
||||||
String pattern = getTargetPattern();
|
String pattern = getTargetPattern();
|
||||||
if (pattern != null && pattern.length() > 0) {
|
if (pattern != null && pattern.length() > 0) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2015 IBM Corporation and others.
|
* Copyright (c) 2005, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -112,7 +112,7 @@ public class StatusInfo implements IStatus {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append("StatusInfo "); //$NON-NLS-1$
|
buf.append("StatusInfo "); //$NON-NLS-1$
|
||||||
if (fSeverity == OK) {
|
if (fSeverity == OK) {
|
||||||
buf.append("OK"); //$NON-NLS-1$
|
buf.append("OK"); //$NON-NLS-1$
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class StringMatcher {
|
||||||
Vector<String> temp = new Vector<>();
|
Vector<String> temp = new Vector<>();
|
||||||
|
|
||||||
int pos= 0;
|
int pos= 0;
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
while (pos < fLength) {
|
while (pos < fLength) {
|
||||||
char c= fPattern.charAt(pos++);
|
char c= fPattern.charAt(pos++);
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -53,7 +53,7 @@ public class TargetRule extends Rule implements ITargetRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString());
|
buffer.append(getTarget().toString());
|
||||||
buffer.append(':');
|
buffer.append(':');
|
||||||
String[] reqs = getPrerequisites();
|
String[] reqs = getPrerequisites();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -23,7 +23,7 @@ public class UnExport extends Directive implements IUnExport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
|
||||||
sb.append(' ').append(variable);
|
sb.append(' ').append(variable);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2015 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ public class VPath extends Directive implements IVPath {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_VPATH);
|
||||||
if (pattern != null && pattern.length() > 0) {
|
if (pattern != null && pattern.length() > 0) {
|
||||||
sb.append(' ').append(pattern);
|
sb.append(' ').append(pattern);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2015 QNX Software Systems and others.
|
* Copyright (c) 2002, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -296,7 +296,7 @@ public abstract class AbstractEditorPreferencePage extends PreferencePage implem
|
||||||
protected String loadPreviewContentFromFile(String filename) {
|
protected String loadPreviewContentFromFile(String filename) {
|
||||||
String line;
|
String line;
|
||||||
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
StringBuffer buffer= new StringBuffer(512);
|
StringBuilder buffer= new StringBuilder(512);
|
||||||
BufferedReader reader= null;
|
BufferedReader reader= null;
|
||||||
try {
|
try {
|
||||||
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
|
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2009, 2015 Red Hat Inc.
|
* Copyright (c) 2009, 2016 Red Hat Inc.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -105,7 +105,7 @@ public class AutotoolsCategoryPropertyOptionPage extends
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String createList(String[] arg0) {
|
protected String createList(String[] arg0) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (String item : arg0) {
|
for (String item : arg0) {
|
||||||
sb.append(item);
|
sb.append(item);
|
||||||
sb.append("\\s"); //$NON-NLS-1$
|
sb.append("\\s"); //$NON-NLS-1$
|
||||||
|
|
|
@ -288,7 +288,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getIndexedInfoFromDocument(String name, Document document) {
|
private static String getIndexedInfoFromDocument(String name, Document document) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
if (document != null && name != null) {
|
if (document != null && name != null) {
|
||||||
Element elem = document.getElementById(name);
|
Element elem = document.getElementById(name);
|
||||||
|
@ -300,7 +300,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
||||||
Node n = nl.item(i);
|
Node n = nl.item(i);
|
||||||
String nodeName = n.getNodeName();
|
String nodeName = n.getNodeName();
|
||||||
if (nodeName.equals("prototype")) { //$NON-NLS-1$
|
if (nodeName.equals("prototype")) { //$NON-NLS-1$
|
||||||
StringBuffer prototype = new StringBuffer();
|
StringBuilder prototype = new StringBuilder();
|
||||||
++prototypeCount;
|
++prototypeCount;
|
||||||
if (prototypeCount == 1) {
|
if (prototypeCount == 1) {
|
||||||
buffer.append(" (");
|
buffer.append(" (");
|
||||||
|
@ -364,7 +364,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
||||||
Node n2 = macroAttrs.getNamedItem("id"); //$NON-NLS-1$
|
Node n2 = macroAttrs.getNamedItem("id"); //$NON-NLS-1$
|
||||||
if (n2 != null) {
|
if (n2 != null) {
|
||||||
String name = n2.getNodeValue();
|
String name = n2.getNodeValue();
|
||||||
StringBuffer parms = new StringBuffer();
|
StringBuilder parms = new StringBuilder();
|
||||||
NodeList macroChildren = macro.getChildNodes();
|
NodeList macroChildren = macro.getChildNodes();
|
||||||
for (int j = 0; j < macroChildren.getLength(); ++j) {
|
for (int j = 0; j < macroChildren.getLength(); ++j) {
|
||||||
Node x = macroChildren.item(j);
|
Node x = macroChildren.item(j);
|
||||||
|
@ -540,7 +540,7 @@ public class AutoconfTextHover implements ITextHover, ITextHoverExtension {
|
||||||
try {
|
try {
|
||||||
styleSheetURL= FileLocator.toFileURL(styleSheetURL);
|
styleSheetURL= FileLocator.toFileURL(styleSheetURL);
|
||||||
try (BufferedReader reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()))) {
|
try (BufferedReader reader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()))) {
|
||||||
StringBuffer buffer= new StringBuffer(200);
|
StringBuilder buffer= new StringBuilder(200);
|
||||||
String line= reader.readLine();
|
String line= reader.readLine();
|
||||||
while (line != null) {
|
while (line != null) {
|
||||||
buffer.append(line);
|
buffer.append(line);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -79,7 +79,7 @@ public final class InfoContext {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
if(fProject != null)
|
if(fProject != null)
|
||||||
buf.append(fProject.toString());
|
buf.append(fProject.toString());
|
||||||
|
|
|
@ -340,7 +340,7 @@ public class BuildInfoFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setErrorParsers(String[] parsers) throws CoreException {
|
public void setErrorParsers(String[] parsers) throws CoreException {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for (int i = 0; i < parsers.length; i++) {
|
for (int i = 0; i < parsers.length; i++) {
|
||||||
buf.append(parsers[i]).append(';');
|
buf.append(parsers[i]).append(';');
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ public class BuildInfoFactory {
|
||||||
protected Map<String, String> decodeMap(String value) {
|
protected Map<String, String> decodeMap(String value) {
|
||||||
Map<String, String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
StringBuffer envStr = new StringBuffer(value);
|
StringBuilder envStr = new StringBuilder(value);
|
||||||
String escapeChars = "|\\"; //$NON-NLS-1$
|
String escapeChars = "|\\"; //$NON-NLS-1$
|
||||||
char escapeChar = '\\';
|
char escapeChar = '\\';
|
||||||
try {
|
try {
|
||||||
|
@ -397,7 +397,7 @@ public class BuildInfoFactory {
|
||||||
}
|
}
|
||||||
ndx++;
|
ndx++;
|
||||||
}
|
}
|
||||||
StringBuffer line = new StringBuffer(envStr.substring(0, ndx));
|
StringBuilder line = new StringBuilder(envStr.substring(0, ndx));
|
||||||
int lndx = 0;
|
int lndx = 0;
|
||||||
while (lndx < line.length()) {
|
while (lndx < line.length()) {
|
||||||
if (line.charAt(lndx) == '=') {
|
if (line.charAt(lndx) == '=') {
|
||||||
|
@ -420,7 +420,7 @@ public class BuildInfoFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String encodeMap(Map<String, String> values) {
|
protected String encodeMap(Map<String, String> values) {
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuilder str = new StringBuilder();
|
||||||
for (Entry<String, String> entry : values.entrySet()) {
|
for (Entry<String, String> entry : values.entrySet()) {
|
||||||
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
str.append(escapeChars(entry.getKey(), "=|\\", '\\')); //$NON-NLS-1$
|
||||||
str.append("="); //$NON-NLS-1$
|
str.append("="); //$NON-NLS-1$
|
||||||
|
@ -431,7 +431,7 @@ public class BuildInfoFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String escapeChars(String string, String escapeChars, char escapeChar) {
|
protected String escapeChars(String string, String escapeChars, char escapeChar) {
|
||||||
StringBuffer str = new StringBuffer(string);
|
StringBuilder str = new StringBuilder(string);
|
||||||
for (int i = 0; i < str.length(); i++) {
|
for (int i = 0; i < str.length(); i++) {
|
||||||
if (escapeChars.indexOf(str.charAt(i)) != -1) {
|
if (escapeChars.indexOf(str.charAt(i)) != -1) {
|
||||||
str.insert(i, escapeChar);
|
str.insert(i, escapeChar);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -30,7 +30,7 @@ public class MakeRecon extends OutputStream {
|
||||||
IProgressMonitor monitor;
|
IProgressMonitor monitor;
|
||||||
OutputStream console;
|
OutputStream console;
|
||||||
MyList log;
|
MyList log;
|
||||||
StringBuffer currentLine;
|
StringBuilder currentLine;
|
||||||
|
|
||||||
class MyList extends ArrayList<String> {
|
class MyList extends ArrayList<String> {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -68,7 +68,7 @@ public class MakeRecon extends OutputStream {
|
||||||
directory = workingDirectory;
|
directory = workingDirectory;
|
||||||
monitor = mon;
|
monitor = mon;
|
||||||
console = cos;
|
console = cos;
|
||||||
currentLine = new StringBuffer();
|
currentLine = new StringBuilder();
|
||||||
log = new MyList();
|
log = new MyList();
|
||||||
|
|
||||||
// Get the buffer log.
|
// Get the buffer log.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2014 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -219,8 +219,8 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
|
||||||
int len = line.length();
|
int len = line.length();
|
||||||
boolean foundDollar = false;
|
boolean foundDollar = false;
|
||||||
boolean inMacro = false;
|
boolean inMacro = false;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
StringBuffer macroName = new StringBuffer();
|
StringBuilder macroName = new StringBuilder();
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
char c = line.charAt(i);
|
char c = line.charAt(i);
|
||||||
switch(c) {
|
switch(c) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -80,7 +80,7 @@ public class Command extends Directive implements ICommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer cmd = new StringBuffer();
|
StringBuilder cmd = new StringBuilder();
|
||||||
cmd.append( '\t');
|
cmd.append( '\t');
|
||||||
if (getPrefix() != 0) {
|
if (getPrefix() != 0) {
|
||||||
cmd.append(getPrefix());
|
cmd.append(getPrefix());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -27,7 +27,7 @@ public class Comment extends Directive implements IComment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(POUND_STRING).append(comment).append('\n');
|
buffer.append(POUND_STRING).append(comment).append('\n');
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -31,7 +31,7 @@ public class InferenceRule extends Rule {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
|
buffer.append(getTarget().toString()).append(":\n"); //$NON-NLS-1$
|
||||||
ICommand[] cmds = getCommands();
|
ICommand[] cmds = getCommands();
|
||||||
for (int i = 0; i < cmds.length; i++) {
|
for (int i = 0; i < cmds.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -31,7 +31,7 @@ public class MakefileReader extends LineNumberReader {
|
||||||
@Override
|
@Override
|
||||||
public String readLine() throws IOException {
|
public String readLine() throws IOException {
|
||||||
boolean done = false;
|
boolean done = false;
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
boolean escapedLine = false;
|
boolean escapedLine = false;
|
||||||
boolean escapedCommand = false;
|
boolean escapedCommand = false;
|
||||||
while (!done) {
|
while (!done) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2013 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -78,7 +78,7 @@ public abstract class Parent extends Directive implements IParent {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
IDirective[] directives = getDirectives();
|
IDirective[] directives = getDirectives();
|
||||||
for (int i = 0; i < directives.length; i++) {
|
for (int i = 0; i < directives.length; i++) {
|
||||||
sb.append(directives[i]);
|
sb.append(directives[i]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -32,7 +32,7 @@ public abstract class SpecialRule extends Rule implements ISpecialRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(target).append(':');
|
sb.append(target).append(':');
|
||||||
String[] reqs = getPrerequisites();
|
String[] reqs = getPrerequisites();
|
||||||
for (int i = 0; i < reqs.length; i++) {
|
for (int i = 0; i < reqs.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -60,7 +60,7 @@ public class TargetRule extends Rule implements ITargetRule {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString());
|
buffer.append(getTarget().toString());
|
||||||
buffer.append(':');
|
buffer.append(':');
|
||||||
String[] reqs = getPrerequisites();
|
String[] reqs = getPrerequisites();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -67,7 +67,7 @@ public class GNUMakefileValidator implements IMakefileValidator {
|
||||||
if (problemMarkerInfo.file != null) {
|
if (problemMarkerInfo.file != null) {
|
||||||
name = problemMarkerInfo.file.getName();
|
name = problemMarkerInfo.file.getName();
|
||||||
}
|
}
|
||||||
StringBuffer sb = new StringBuffer(name);
|
StringBuilder sb = new StringBuilder(name);
|
||||||
sb.append(':').append(problemMarkerInfo.lineNumber).append(':').append(getSeverity(problemMarkerInfo.severity));
|
sb.append(':').append(problemMarkerInfo.lineNumber).append(':').append(getSeverity(problemMarkerInfo.severity));
|
||||||
if (problemMarkerInfo.description != null) {
|
if (problemMarkerInfo.description != null) {
|
||||||
sb.append(':').append(problemMarkerInfo.description);
|
sb.append(':').append(problemMarkerInfo.description);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -47,7 +47,7 @@ public class GNUTargetRule extends TargetRule {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget().toString());
|
buffer.append(getTarget().toString());
|
||||||
buffer.append(':');
|
buffer.append(':');
|
||||||
String[] reqs = getNormalPrerequisites();
|
String[] reqs = getNormalPrerequisites();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -27,7 +27,7 @@ public class Ifdef extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFDEF);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFDEF);
|
||||||
sb.append(' ').append(getVariable());
|
sb.append(' ').append(getVariable());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -26,7 +26,7 @@ public class Ifeq extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFEQ);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFEQ);
|
||||||
sb.append(' ').append(getConditional());
|
sb.append(' ').append(getConditional());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -27,7 +27,7 @@ public class Ifndef extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNDEF);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNDEF);
|
||||||
sb.append(' ').append(getVariable());
|
sb.append(' ').append(getVariable());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -26,7 +26,7 @@ public class Ifneq extends Conditional {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.CONDITIONAL_IFNEQ);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.CONDITIONAL_IFNEQ);
|
||||||
sb.append(' ').append(getConditional());
|
sb.append(' ').append(getConditional());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2013 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -37,7 +37,7 @@ public class Include extends Parent implements IInclude {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_INCLUDE);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_INCLUDE);
|
||||||
for (int i = 0; i < filenames.length; i++) {
|
for (int i = 0; i < filenames.length; i++) {
|
||||||
sb.append(' ').append(filenames[i]);
|
sb.append(' ').append(filenames[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -57,7 +57,7 @@ public class StaticTargetRule extends InferenceRule implements IInferenceRule {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(getTarget()).append(':');
|
buffer.append(getTarget()).append(':');
|
||||||
String pattern = getTargetPattern();
|
String pattern = getTargetPattern();
|
||||||
if (pattern != null && pattern.length() > 0) {
|
if (pattern != null && pattern.length() > 0) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -24,7 +24,7 @@ public class UnExport extends Directive implements IUnExport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_UNEXPORT);
|
||||||
sb.append(' ').append(variable);
|
sb.append(' ').append(variable);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -26,7 +26,7 @@ public class VPath extends Directive implements IVPath {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer(GNUMakefileConstants.DIRECTIVE_VPATH);
|
StringBuilder sb = new StringBuilder(GNUMakefileConstants.DIRECTIVE_VPATH);
|
||||||
if (pattern != null && pattern.length() > 0) {
|
if (pattern != null && pattern.length() > 0) {
|
||||||
sb.append(' ').append(pattern);
|
sb.append(' ').append(pattern);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -348,7 +348,7 @@ public class CDataDiscoveredInfoCalculator {
|
||||||
if(fExts.length == 0)
|
if(fExts.length == 0)
|
||||||
return "<empty>"; //$NON-NLS-1$
|
return "<empty>"; //$NON-NLS-1$
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
for(int i = 0; i < fExts.length; i++){
|
for(int i = 0; i < fExts.length; i++){
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2012 IBM Corporation and others.
|
* Copyright (c) 2004, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -186,7 +186,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
|
||||||
protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) {
|
protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) {
|
||||||
ArrayList<String[]> commands= new ArrayList<String[]>();
|
ArrayList<String[]> commands= new ArrayList<String[]>();
|
||||||
ArrayList<String> tokens= new ArrayList<String>();
|
ArrayList<String> tokens= new ArrayList<String>();
|
||||||
StringBuffer token= new StringBuffer();
|
StringBuilder token= new StringBuilder();
|
||||||
|
|
||||||
final char[] input= line.toCharArray();
|
final char[] input= line.toCharArray();
|
||||||
boolean nextEscaped= false;
|
boolean nextEscaped= false;
|
||||||
|
@ -283,14 +283,14 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
|
||||||
return commands.toArray(new String[commands.size()][]);
|
return commands.toArray(new String[commands.size()][]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void endCommand(StringBuffer token, ArrayList<String> tokens, ArrayList<String[]> commands) {
|
private void endCommand(StringBuilder token, ArrayList<String> tokens, ArrayList<String[]> commands) {
|
||||||
endToken(token, tokens);
|
endToken(token, tokens);
|
||||||
if (!tokens.isEmpty()) {
|
if (!tokens.isEmpty()) {
|
||||||
commands.add(tokens.toArray(new String[tokens.size()]));
|
commands.add(tokens.toArray(new String[tokens.size()]));
|
||||||
tokens.clear();
|
tokens.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void endToken(StringBuffer token, ArrayList<String> tokens) {
|
private void endToken(StringBuilder token, ArrayList<String> tokens) {
|
||||||
if (token.length() > 0) {
|
if (token.length() > 0) {
|
||||||
tokens.add(token.toString());
|
tokens.add(token.toString());
|
||||||
token.setLength(0);
|
token.setLength(0);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2011 IBM Corporation and others.
|
* Copyright (c) 2004, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -103,7 +103,7 @@ public abstract class AbstractGCCBOPConsoleParserUtility {
|
||||||
|
|
||||||
public static IPath convertCygpath(IPath path) {
|
public static IPath convertCygpath(IPath path) {
|
||||||
if (path.segmentCount() > 1 && path.segment(0).equals("cygdrive")) { //$NON-NLS-1$
|
if (path.segmentCount() > 1 && path.segment(0).equals("cygdrive")) { //$NON-NLS-1$
|
||||||
StringBuffer buf = new StringBuffer(2);
|
StringBuilder buf = new StringBuilder(2);
|
||||||
buf.append(Character.toUpperCase(path.segment(1).charAt(0)));
|
buf.append(Character.toUpperCase(path.segment(1).charAt(0)));
|
||||||
buf.append(':');
|
buf.append(':');
|
||||||
path = path.removeFirstSegments(2);
|
path = path.removeFirstSegments(2);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2013 IBM Corporation and others.
|
* Copyright (c) 2004, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -267,7 +267,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
|
||||||
if (column > 0) {
|
if (column > 0) {
|
||||||
char driveLetter = path.charAt(column - 1);
|
char driveLetter = path.charAt(column - 1);
|
||||||
if (Character.isLowerCase(driveLetter)) {
|
if (Character.isLowerCase(driveLetter)) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
if (column - 1 > 0) {
|
if (column - 1 > 0) {
|
||||||
sb.append(path.substring(0, column-1));
|
sb.append(path.substring(0, column-1));
|
||||||
}
|
}
|
||||||
|
@ -280,9 +280,9 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
|
||||||
return (new Path(path)).toString(); // convert separators to '/'
|
return (new Path(path)).toString(); // convert separators to '/'
|
||||||
}
|
}
|
||||||
// lose "./" segments since they confuse the Path normalization
|
// lose "./" segments since they confuse the Path normalization
|
||||||
StringBuffer buf = new StringBuffer(path);
|
StringBuilder buf = new StringBuilder(path);
|
||||||
int len = buf.length();
|
int len = buf.length();
|
||||||
StringBuffer newBuf = new StringBuffer(buf.length());
|
StringBuilder newBuf = new StringBuilder(buf.length());
|
||||||
int scp = 0; // starting copy point
|
int scp = 0; // starting copy point
|
||||||
int ssp = 0; // starting search point
|
int ssp = 0; // starting search point
|
||||||
int sdot;
|
int sdot;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2010 IBM Corporation and others.
|
* Copyright (c) 2004, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -70,7 +70,7 @@ public class SCDMakefileGenerator extends DefaultRunSIProvider {
|
||||||
resource.getProject(), ScannerInfoTypes.UNDISCOVERED_COMPILER_COMMAND);
|
resource.getProject(), ScannerInfoTypes.UNDISCOVERED_COMPILER_COMMAND);
|
||||||
if (commands != null && commands.size() > 0) {
|
if (commands != null && commands.size() > 0) {
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("# This is a generated file. Please do not edit."); //$NON-NLS-1$
|
buffer.append("# This is a generated file. Please do not edit."); //$NON-NLS-1$
|
||||||
buffer.append(DENDL);
|
buffer.append(DENDL);
|
||||||
buffer.append(".PHONY: all"); //$NON-NLS-1$
|
buffer.append(".PHONY: all"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2013 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -51,8 +51,8 @@ public class AddBuildTargetAction extends Action {
|
||||||
Shell shell = fOutliner.getControl().getShell();
|
Shell shell = fOutliner.getControl().getShell();
|
||||||
ITargetRule[] rules = getTargetRules(fOutliner.getSelection());
|
ITargetRule[] rules = getTargetRules(fOutliner.getSelection());
|
||||||
if (file != null && rules.length > 0 && shell != null) {
|
if (file != null && rules.length > 0 && shell != null) {
|
||||||
StringBuffer sbBuildName = new StringBuffer();
|
StringBuilder sbBuildName = new StringBuilder();
|
||||||
StringBuffer sbMakefileTarget = new StringBuffer();
|
StringBuilder sbMakefileTarget = new StringBuilder();
|
||||||
for (ITargetRule rule : rules) {
|
for (ITargetRule rule : rules) {
|
||||||
String name = rule.getTarget().toString().trim();
|
String name = rule.getTarget().toString().trim();
|
||||||
if (sbBuildName.length() == 0) {
|
if (sbBuildName.length() == 0) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2015 QNX Software Systems and others.
|
* Copyright (c) 2002, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -307,7 +307,7 @@ public abstract class AbstractMakefileEditorPreferencePage extends PreferencePag
|
||||||
protected String loadPreviewContentFromFile(String filename) {
|
protected String loadPreviewContentFromFile(String filename) {
|
||||||
String line;
|
String line;
|
||||||
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
String separator= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
StringBuffer buffer= new StringBuffer(512);
|
StringBuilder buffer= new StringBuilder(512);
|
||||||
BufferedReader reader= null;
|
BufferedReader reader= null;
|
||||||
try {
|
try {
|
||||||
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
|
reader= new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(filename)));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2013, 2015 Andrew Gvozdev and others.
|
* Copyright (c) 2013, 2016 Andrew Gvozdev and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -19,7 +19,7 @@ import org.eclipse.jface.text.rules.WordRule;
|
||||||
|
|
||||||
public class FunctionReferenceRule extends WordRule {
|
public class FunctionReferenceRule extends WordRule {
|
||||||
/** Buffer used for pattern detection. */
|
/** Buffer used for pattern detection. */
|
||||||
private StringBuffer fBuffer= new StringBuffer();
|
private StringBuilder fBuffer= new StringBuilder();
|
||||||
private String startSeq;
|
private String startSeq;
|
||||||
private String endSeq;
|
private String endSeq;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2009 QNX Software Systems and others.
|
* Copyright (c) 2002, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -24,7 +24,7 @@ class MacroDefinitionRule implements IPredicateRule {
|
||||||
private static final int ERROR_STATE = 5;
|
private static final int ERROR_STATE = 5;
|
||||||
|
|
||||||
private IToken token;
|
private IToken token;
|
||||||
private StringBuffer buffer = new StringBuffer();
|
private StringBuilder buffer = new StringBuilder();
|
||||||
protected IToken defaultToken;
|
protected IToken defaultToken;
|
||||||
|
|
||||||
public MacroDefinitionRule(IToken token, IToken defaultToken) {
|
public MacroDefinitionRule(IToken token, IToken defaultToken) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2013 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -70,7 +70,7 @@ public class MakefileTextHover implements ITextHover {
|
||||||
statements = new IMacroDefinition[0];
|
statements = new IMacroDefinition[0];
|
||||||
}
|
}
|
||||||
// iterate over all the different categories
|
// iterate over all the different categories
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
for (int i = 0; i < statements.length; i++) {
|
for (int i = 0; i < statements.length; i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buffer.append("\n"); //$NON-NLS-1$
|
buffer.append("\n"); //$NON-NLS-1$
|
||||||
|
|
|
@ -287,7 +287,7 @@ public class MakeTargetDialog extends Dialog {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
if (useBuilderCommandCheckBox.getSelection() == true) {
|
if (useBuilderCommandCheckBox.getSelection() == true) {
|
||||||
StringBuffer cmd = new StringBuffer(builderCommand.toString());
|
StringBuilder cmd = new StringBuilder(builderCommand.toString());
|
||||||
if (builderArguments != null && !builderArguments.isEmpty()) {
|
if (builderArguments != null && !builderArguments.isEmpty()) {
|
||||||
cmd.append(" "); //$NON-NLS-1$
|
cmd.append(" "); //$NON-NLS-1$
|
||||||
cmd.append(builderArguments);
|
cmd.append(builderArguments);
|
||||||
|
@ -398,7 +398,7 @@ public class MakeTargetDialog extends Dialog {
|
||||||
}
|
}
|
||||||
targetNameText.selectAll();
|
targetNameText.selectAll();
|
||||||
if (targetBuildCommand != null) {
|
if (targetBuildCommand != null) {
|
||||||
StringBuffer cmd = new StringBuffer(targetBuildCommand.toOSString());
|
StringBuilder cmd = new StringBuilder(targetBuildCommand.toOSString());
|
||||||
if (targetBuildArguments != null && !targetBuildArguments.isEmpty()) {
|
if (targetBuildArguments != null && !targetBuildArguments.isEmpty()) {
|
||||||
cmd.append(" "); //$NON-NLS-1$
|
cmd.append(" "); //$NON-NLS-1$
|
||||||
cmd.append(targetBuildArguments);
|
cmd.append(targetBuildArguments);
|
||||||
|
@ -433,7 +433,7 @@ public class MakeTargetDialog extends Dialog {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!isUsingBuilderCommand) {
|
if (!isUsingBuilderCommand) {
|
||||||
StringBuffer cmd = new StringBuffer(targetBuildCommand.toOSString()).append(targetBuildArguments);
|
StringBuilder cmd = new StringBuilder(targetBuildCommand.toOSString()).append(targetBuildArguments);
|
||||||
if (!getBuildLine().equals(cmd.toString())) {
|
if (!getBuildLine().equals(cmd.toString())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, null) != null) {
|
if (fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, null) != null) {
|
||||||
StringBuffer cmd = new StringBuffer(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "")); //$NON-NLS-1$
|
StringBuilder cmd = new StringBuilder(fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_COMMAND, "")); //$NON-NLS-1$
|
||||||
if (!fBuildInfo.isDefaultBuildCmd()) {
|
if (!fBuildInfo.isDefaultBuildCmd()) {
|
||||||
String args = fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, ""); //$NON-NLS-1$
|
String args = fBuildInfo.getBuildAttribute(IMakeCommonBuildInfo.BUILD_ARGUMENTS, ""); //$NON-NLS-1$
|
||||||
if (args != null && !args.isEmpty()) {
|
if (args != null && !args.isEmpty()) {
|
||||||
|
@ -542,7 +542,7 @@ public class SettingsBlock extends AbstractCOptionPage {
|
||||||
else
|
else
|
||||||
stopOnErrorButton.setSelection(false);
|
stopOnErrorButton.setSelection(false);
|
||||||
if (info.getBuildCommand() != null) {
|
if (info.getBuildCommand() != null) {
|
||||||
StringBuffer cmd = new StringBuffer(info.getBuildCommand().toOSString());
|
StringBuilder cmd = new StringBuilder(info.getBuildCommand().toOSString());
|
||||||
if (!info.isDefaultBuildCmd()) {
|
if (!info.isDefaultBuildCmd()) {
|
||||||
String args = info.getBuildArguments();
|
String args = info.getBuildArguments();
|
||||||
if (args != null && !args.isEmpty()) {
|
if (args != null && !args.isEmpty()) {
|
||||||
|
|
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -146,7 +146,7 @@ public class BuildSystemTestHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
static public String arrayToString(Object[] arr){
|
static public String arrayToString(Object[] arr){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append('[');
|
buf.append('[');
|
||||||
for(int i = 0; i < arr.length; i++) {
|
for(int i = 0; i < arr.length; i++) {
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -30,7 +30,7 @@ public class DiffUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String createCommand(String location1, String location2){
|
private static String createCommand(String location1, String location2){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(DIFF_CMD).append(" '").append(location1).append("' '").append(location2).append("'");
|
buf.append(DIFF_CMD).append(" '").append(location1).append("' '").append(location2).append("'");
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ public class DiffUtil {
|
||||||
BufferedReader br;
|
BufferedReader br;
|
||||||
br = new BufferedReader(new InputStreamReader(in));
|
br = new BufferedReader(new InputStreamReader(in));
|
||||||
String line;
|
String line;
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
while ((line = br.readLine()) != null) {
|
while ((line = br.readLine()) != null) {
|
||||||
buf.append("\n");
|
buf.append("\n");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2011 IBM Corporation and others.
|
* Copyright (c) 2000, 2016 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -94,7 +94,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer("ExpectedChange(");
|
StringBuilder buf = new StringBuilder("ExpectedChange(");
|
||||||
buf.append(fResource);
|
buf.append(fResource);
|
||||||
buf.append(", ");
|
buf.append(", ");
|
||||||
buf.append(convertKind(fKind));
|
buf.append(convertKind(fKind));
|
||||||
|
@ -111,7 +111,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
|
||||||
*/
|
*/
|
||||||
private Hashtable<IPath, ExpectedChange> fExpectedChanges = new Hashtable<IPath, ExpectedChange>();
|
private Hashtable<IPath, ExpectedChange> fExpectedChanges = new Hashtable<IPath, ExpectedChange>();
|
||||||
boolean fIsDeltaValid = true;
|
boolean fIsDeltaValid = true;
|
||||||
private StringBuffer fMessage = new StringBuffer();
|
private StringBuilder fMessage = new StringBuilder();
|
||||||
/**
|
/**
|
||||||
* The verifier can be in one of three states. In the initial
|
* The verifier can be in one of three states. In the initial
|
||||||
* state, the verifier is still receiving inputs via the
|
* state, the verifier is still receiving inputs via the
|
||||||
|
@ -370,7 +370,7 @@ public class ResourceDeltaVerifier extends Assert implements IResourceChangeList
|
||||||
if (changeFlags == 0) {
|
if (changeFlags == 0) {
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
if ((changeFlags & IResourceDelta.CONTENT) != 0) {
|
if ((changeFlags & IResourceDelta.CONTENT) != 0) {
|
||||||
changeFlags ^= IResourceDelta.CONTENT;
|
changeFlags ^= IResourceDelta.CONTENT;
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class Test30_2_CommandLineGenerator implements
|
||||||
// Generate the command line
|
// Generate the command line
|
||||||
int start = 0;
|
int start = 0;
|
||||||
int stop = 0;
|
int stop = 0;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while( (start = commandLinePattern.indexOf( VAR_FIRST_CHAR, start )) >= 0 ) {
|
while( (start = commandLinePattern.indexOf( VAR_FIRST_CHAR, start )) >= 0 ) {
|
||||||
if( commandLinePattern.charAt( start + 1 ) != VAR_SECOND_CHAR ) {
|
if( commandLinePattern.charAt( start + 1 ) != VAR_SECOND_CHAR ) {
|
||||||
sb.append(VAR_FIRST_CHAR);
|
sb.append(VAR_FIRST_CHAR);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -245,7 +245,7 @@ public class ToolChainModificationTests extends TestCase {
|
||||||
|
|
||||||
s1.removeAll(s2);
|
s1.removeAll(s2);
|
||||||
s2.removeAll(s1c);
|
s2.removeAll(s1c);
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append("checking c1..\n");
|
buf.append("checking c1..\n");
|
||||||
boolean fail = checkEmpty(s1, buf);
|
boolean fail = checkEmpty(s1, buf);
|
||||||
buf.append("checking c2..\n");
|
buf.append("checking c2..\n");
|
||||||
|
@ -255,7 +255,7 @@ public class ToolChainModificationTests extends TestCase {
|
||||||
fail(buf.toString());
|
fail(buf.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkEmpty(Collection<? extends IBuildObject> c, StringBuffer buf){
|
private boolean checkEmpty(Collection<? extends IBuildObject> c, StringBuilder buf){
|
||||||
if(c.size() != 0){
|
if(c.size() != 0){
|
||||||
buf.append("non-empty dump:\n");
|
buf.append("non-empty dump:\n");
|
||||||
for (IBuildObject bo : c)
|
for (IBuildObject bo : c)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -75,7 +75,7 @@ public final class CfgInfoContext{
|
||||||
public InfoContext toInfoContext(){
|
public InfoContext toInfoContext(){
|
||||||
if(fContext == null){
|
if(fContext == null){
|
||||||
IProject project = fCfg.isPreference() ? null : fCfg.getOwner().getProject();
|
IProject project = fCfg.isPreference() ? null : fCfg.getOwner().getProject();
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(fCfg.getId());
|
buf.append(fCfg.getId());
|
||||||
if(fRcInfo != null){
|
if(fRcInfo != null){
|
||||||
buf.append(DELIMITER);
|
buf.append(DELIMITER);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -347,7 +347,7 @@ public class PerFileSettingsCalculator {
|
||||||
if(fExts.length == 0)
|
if(fExts.length == 0)
|
||||||
return "<empty>"; //$NON-NLS-1$
|
return "<empty>"; //$NON-NLS-1$
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
for(int i = 0; i < fExts.length; i++){
|
for(int i = 0; i < fExts.length; i++){
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2010 Intel Corporation and others.
|
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -293,7 +293,7 @@ public class BuildDescriptionManager {
|
||||||
|
|
||||||
// IPath path = null;
|
// IPath path = null;
|
||||||
IPath tmp = cwd;
|
IPath tmp = cwd;
|
||||||
StringBuffer buf = null;
|
StringBuilder buf = null;
|
||||||
while(tmp.segmentCount() != 0){
|
while(tmp.segmentCount() != 0){
|
||||||
if(tmp.isPrefixOf(location)){
|
if(tmp.isPrefixOf(location)){
|
||||||
IPath p = location.removeFirstSegments(tmp.segmentCount()).setDevice(null);
|
IPath p = location.removeFirstSegments(tmp.segmentCount()).setDevice(null);
|
||||||
|
@ -303,7 +303,7 @@ public class BuildDescriptionManager {
|
||||||
return new Path(buf.toString());
|
return new Path(buf.toString());
|
||||||
}
|
}
|
||||||
if(buf == null){
|
if(buf == null){
|
||||||
buf = new StringBuffer();
|
buf = new StringBuilder();
|
||||||
buf.append("../"); //$NON-NLS-1$
|
buf.append("../"); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
buf.append("../"); //$NON-NLS-1$
|
buf.append("../"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2010, 2012 Wind River Systems and others.
|
* Copyright (c) 2010, 2016 Wind River Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -225,7 +225,7 @@ public class ExternalBuildRunner extends AbstractBuildRunner {
|
||||||
// Convert into env strings
|
// Convert into env strings
|
||||||
List<String> strings= new ArrayList<String>(env.size());
|
List<String> strings= new ArrayList<String>(env.size());
|
||||||
for (Entry<String, String> entry : env.entrySet()) {
|
for (Entry<String, String> entry : env.entrySet()) {
|
||||||
StringBuffer buffer= new StringBuffer(entry.getKey());
|
StringBuilder buffer= new StringBuilder(entry.getKey());
|
||||||
buffer.append('=').append(entry.getValue());
|
buffer.append('=').append(entry.getValue());
|
||||||
strings.add(buffer.toString());
|
strings.add(buffer.toString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -3714,7 +3714,7 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
}
|
}
|
||||||
if(prefix.segmentCount() > 0){
|
if(prefix.segmentCount() > 0){
|
||||||
int diff = container.segmentCount() - prefix.segmentCount();
|
int diff = container.segmentCount() - prefix.segmentCount();
|
||||||
StringBuffer buff = new StringBuffer();
|
StringBuilder buff = new StringBuilder();
|
||||||
while(diff-- > 0)
|
while(diff-- > 0)
|
||||||
buff.append("../"); //$NON-NLS-1$
|
buff.append("../"); //$NON-NLS-1$
|
||||||
path = new Path(buff.toString()).append(contents.removeFirstSegments(prefix.segmentCount()));
|
path = new Path(buff.toString()).append(contents.removeFirstSegments(prefix.segmentCount()));
|
||||||
|
@ -3931,7 +3931,7 @@ public class ManagedBuildManager extends AbstractCExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String fullPathToLocation(String path){
|
public static String fullPathToLocation(String path){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
return buf.append("${").append("workspace_loc:").append(path).append("}").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
return buf.append("${").append("workspace_loc:").append(path).append("}").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -185,6 +185,6 @@ public final class OptionStringValue {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new StringBuffer().append("ov:").append(value.toString()).toString(); //$NON-NLS-1$
|
return new StringBuilder().append("ov:").append(value.toString()).toString(); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -122,7 +122,7 @@ public class BuildDescriptionGnuMakefileGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String createVarRef(String var){
|
protected String createVarRef(String var){
|
||||||
return new StringBuffer().append(VARREF_PREFIX).append(var).append(VARREF_SUFFIX).toString();
|
return new StringBuilder().append(VARREF_PREFIX).append(var).append(VARREF_SUFFIX).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void write(Writer writer, IBuildStep step) throws CoreException, IOException {
|
protected void write(Writer writer, IBuildStep step) throws CoreException, IOException {
|
||||||
|
@ -162,7 +162,7 @@ public class BuildDescriptionGnuMakefileGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String toString(IBuildCommand cmd){
|
protected String toString(IBuildCommand cmd){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(cmd.getCommand());
|
buf.append(cmd.getCommand());
|
||||||
String argsString = CDataUtil.arrayToString(cmd.getArgs(), SPACE);
|
String argsString = CDataUtil.arrayToString(cmd.getArgs(), SPACE);
|
||||||
if(argsString != null && argsString.length() != 0){
|
if(argsString != null && argsString.length() != 0){
|
||||||
|
@ -181,7 +181,7 @@ public class BuildDescriptionGnuMakefileGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String toString(IBuildResource[] rcs){
|
protected String toString(IBuildResource[] rcs){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for(int i = 0; i < rcs.length; i++){
|
for(int i = 0; i < rcs.length; i++){
|
||||||
if(i != 0)
|
if(i != 0)
|
||||||
buf.append(SPACE);
|
buf.append(SPACE);
|
||||||
|
@ -208,7 +208,7 @@ public class BuildDescriptionGnuMakefileGenerator {
|
||||||
private String removeDotDotSlashes(String str){
|
private String removeDotDotSlashes(String str){
|
||||||
int index = str.indexOf(DOT_DOT_SLASH, 0);
|
int index = str.indexOf(DOT_DOT_SLASH, 0);
|
||||||
if(index != -1){
|
if(index != -1){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
int start = 0;
|
int start = 0;
|
||||||
for(; index != -1; index = str.indexOf(DOT_DOT_SLASH, start)){
|
for(; index != -1; index = str.indexOf(DOT_DOT_SLASH, start)){
|
||||||
buf.append(str.substring(start, index));
|
buf.append(str.substring(start, index));
|
||||||
|
@ -223,7 +223,7 @@ public class BuildDescriptionGnuMakefileGenerator {
|
||||||
private String removeDotDotBackslashes(String str){
|
private String removeDotDotBackslashes(String str){
|
||||||
int index = str.indexOf(DOT_DOT_BACKSLASH, 0);
|
int index = str.indexOf(DOT_DOT_BACKSLASH, 0);
|
||||||
if(index != -1){
|
if(index != -1){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
int start = 0;
|
int start = 0;
|
||||||
for(; index != -1; index = str.indexOf(DOT_DOT_BACKSLASH, start)){
|
for(; index != -1; index = str.indexOf(DOT_DOT_BACKSLASH, start)){
|
||||||
buf.append(str.substring(start, index));
|
buf.append(str.substring(start, index));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2015 Intel Corporation and others.
|
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -237,7 +237,7 @@ public class BuildResource implements IBuildResource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append("BR "); //$NON-NLS-1$
|
buf.append("BR "); //$NON-NLS-1$
|
||||||
IPath fullPath = getFullPath();
|
IPath fullPath = getFullPath();
|
||||||
if(fullPath != null)
|
if(fullPath != null)
|
||||||
|
|
|
@ -262,7 +262,7 @@ public class BuildStep implements IBuildStep {
|
||||||
IBuildResource[] generated = fBuildDescription.getResources(true);
|
IBuildResource[] generated = fBuildDescription.getResources(true);
|
||||||
|
|
||||||
if(generated.length != 0){
|
if(generated.length != 0){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for(int i = 0; i < generated.length; i++){
|
for(int i = 0; i < generated.length; i++){
|
||||||
buf.append(' ');
|
buf.append(' ');
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ public class BuildStep implements IBuildStep {
|
||||||
char prev = 0;
|
char prev = 0;
|
||||||
// int start = 0;
|
// int start = 0;
|
||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for(int i = 0; i < arr.length; i++){
|
for(int i = 0; i < arr.length; i++){
|
||||||
char ch = arr[i];
|
char ch = arr[i];
|
||||||
switch(ch){
|
switch(ch){
|
||||||
|
@ -523,7 +523,7 @@ public class BuildStep implements IBuildStep {
|
||||||
if(list == null || list.length == 0)
|
if(list == null || list.length == 0)
|
||||||
return ""; // $NON-NLS-1$
|
return ""; // $NON-NLS-1$
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer(list[0]);
|
StringBuilder buf = new StringBuilder(list[0]);
|
||||||
|
|
||||||
for(int i = 1; i < list.length; i++){
|
for(int i = 1; i < list.length; i++){
|
||||||
buf.append(delimiter).append(list[i]);
|
buf.append(delimiter).append(list[i]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2012 Intel Corporation and others.
|
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -181,7 +181,7 @@ public class CommandBuilder implements IBuildModelBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getCommandLine() {
|
protected String getCommandLine() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
if (fCmd != null) {
|
if (fCmd != null) {
|
||||||
buf.append(fCmd.getCommand().toOSString());
|
buf.append(fCmd.getCommand().toOSString());
|
||||||
String args[] = fCmd.getArgs();
|
String args[] = fCmd.getArgs();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2010 Intel Corporation and others.
|
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -55,7 +55,7 @@ public class DbgUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String dumpType(IBuildIOType type){
|
public static String dumpType(IBuildIOType type){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
buf.append("dumping type: "); //$NON-NLS-1$
|
buf.append("dumping type: "); //$NON-NLS-1$
|
||||||
buf.append(type.isInput() ? "INPUT" : "OUTPUT"); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append(type.isInput() ? "INPUT" : "OUTPUT"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
@ -66,7 +66,7 @@ public class DbgUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String ioTypeResources(IBuildIOType type){
|
public static String ioTypeResources(IBuildIOType type){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
IBuildResource rcs[] = type.getResources();
|
IBuildResource rcs[] = type.getResources();
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public class DbgUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String dumpStep(IBuildStep step, boolean inputs) {
|
public static String dumpStep(IBuildStep step, boolean inputs) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
buf.append("dumping step ").append(stepName(step)).append(inputs ? " inputs" : " outputs"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
buf.append("dumping step ").append(stepName(step)).append(inputs ? " inputs" : " outputs"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ public class DbgUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String dumpResource(IBuildResource rc, boolean producer){
|
public static String dumpResource(IBuildResource rc, boolean producer){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
|
|
||||||
buf.append("dumping resource ").append(resourceName(rc)).append(producer ? " producer:" : " deps:"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
buf.append("dumping resource ").append(resourceName(rc)).append(producer ? " producer:" : " deps:"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006 Intel Corporation and others.
|
* Copyright (c) 2006, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -54,7 +54,7 @@ public class ProcessLauncher {
|
||||||
* Returns command line in a single string
|
* Returns command line in a single string
|
||||||
*/
|
*/
|
||||||
public String getCommandLine() {
|
public String getCommandLine() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
if (cmd != null) {
|
if (cmd != null) {
|
||||||
for (int i = 0; i < cmd.length; i++) {
|
for (int i = 0; i < cmd.length; i++) {
|
||||||
buf.append(cmd[i]);
|
buf.append(cmd[i]);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -107,7 +107,7 @@ public class BuildProperties implements IBuildProperties {
|
||||||
if(fInexistentProperties != null){
|
if(fInexistentProperties != null){
|
||||||
String inexistentProps = CDataUtil.arrayToString(fInexistentProperties.toArray(new String[fInexistentProperties.size()]), BuildPropertyManager.PROPERTIES_SEPARATOR);
|
String inexistentProps = CDataUtil.arrayToString(fInexistentProperties.toArray(new String[fInexistentProperties.size()]), BuildPropertyManager.PROPERTIES_SEPARATOR);
|
||||||
if(props.length() != 0){
|
if(props.length() != 0){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(props).append(BuildPropertyManager.PROPERTIES_SEPARATOR).append(inexistentProps);
|
buf.append(props).append(BuildPropertyManager.PROPERTIES_SEPARATOR).append(inexistentProps);
|
||||||
} else {
|
} else {
|
||||||
props = inexistentProps;
|
props = inexistentProps;
|
||||||
|
@ -123,7 +123,7 @@ public class BuildProperties implements IBuildProperties {
|
||||||
else if(size == 1)
|
else if(size == 1)
|
||||||
return fPropertiesMap.values().iterator().next().toString();
|
return fPropertiesMap.values().iterator().next().toString();
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
Iterator<IBuildProperty> iter = fPropertiesMap.values().iterator();
|
Iterator<IBuildProperty> iter = fPropertiesMap.values().iterator();
|
||||||
buf.append(iter.next().toString());
|
buf.append(iter.next().toString());
|
||||||
for(;iter.hasNext();){
|
for(;iter.hasNext();){
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
* Copyright (c) 2007, 2016 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -80,7 +80,7 @@ public class BuildProperty implements IBuildProperty{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String toString(String type, String value){
|
public static String toString(String type, String value){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(type).append(BuildPropertyManager.PROPERTY_VALUE_SEPARATOR).append(value);
|
buf.append(type).append(BuildPropertyManager.PROPERTY_VALUE_SEPARATOR).append(value);
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
|
||||||
|
|
|
@ -2491,7 +2491,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
String name = getName();
|
String name = getName();
|
||||||
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
|
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
|
||||||
if(version != null && version.length() != 0){
|
if(version != null && version.length() != 0){
|
||||||
return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
|
return new StringBuilder().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -2700,7 +2700,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
} else if(ids.length == 0){
|
} else if(ids.length == 0){
|
||||||
errorParserIds = EMPTY_STRING;
|
errorParserIds = EMPTY_STRING;
|
||||||
} else {
|
} else {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(ids[0]);
|
buf.append(ids[0]);
|
||||||
for(int i = 1; i < ids.length; i++){
|
for(int i = 1; i < ids.length; i++){
|
||||||
buf.append(";").append(ids[i]); //$NON-NLS-1$
|
buf.append(";").append(ids[i]); //$NON-NLS-1$
|
||||||
|
@ -2730,7 +2730,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
||||||
} else {
|
} else {
|
||||||
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
|
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
|
||||||
if(version != null){
|
if(version != null){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(name);
|
buf.append(name);
|
||||||
buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
name = buf.toString();
|
name = buf.toString();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue