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: I2634593603eef88dd68e127de9319377f43e7436 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
This commit is contained in:
parent
ccbab86d6c
commit
6b0a04c15e
164 changed files with 495 additions and 495 deletions
|
@ -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
|
||||||
|
@ -59,7 +59,7 @@ public class ProcessList implements IProcessList {
|
||||||
processInfo = new ProcessInfo[pidFiles.length];
|
processInfo = new ProcessInfo[pidFiles.length];
|
||||||
for (int i = 0; i < pidFiles.length; i++) {
|
for (int i = 0; i < pidFiles.length; i++) {
|
||||||
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
|
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
|
||||||
StringBuffer line = new StringBuffer();
|
StringBuilder line = new StringBuilder();
|
||||||
FileReader reader = null;
|
FileReader reader = null;
|
||||||
try {
|
try {
|
||||||
reader = new FileReader(cmdLine);
|
reader = new FileReader(cmdLine);
|
||||||
|
|
|
@ -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
|
||||||
|
@ -59,7 +59,7 @@ public class ProcessList implements IProcessList {
|
||||||
processInfo = new ProcessInfo[pidFiles.length];
|
processInfo = new ProcessInfo[pidFiles.length];
|
||||||
for (int i = 0; i < pidFiles.length; i++) {
|
for (int i = 0; i < pidFiles.length; i++) {
|
||||||
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
|
File cmdLine = new File(pidFiles[i], "cmdline"); //$NON-NLS-1$
|
||||||
StringBuffer line = new StringBuffer();
|
StringBuilder line = new StringBuilder();
|
||||||
FileReader reader = null;
|
FileReader reader = null;
|
||||||
try {
|
try {
|
||||||
reader = new FileReader(cmdLine);
|
reader = new FileReader(cmdLine);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2015 QNX Software Systems and others.
|
* Copyright (c) 2008, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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
|
||||||
|
@ -260,7 +260,7 @@ public class ErrorParserManagerTest extends TestCase {
|
||||||
String id = addErrorParserExtension("test2", TestParser2.class);
|
String id = addErrorParserExtension("test2", TestParser2.class);
|
||||||
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
|
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer("errorT: ");
|
StringBuilder buf = new StringBuilder("errorT: ");
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
buf.append("la la la la la "+i+" ");
|
buf.append("la la la la la "+i+" ");
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ public class ErrorParserManagerTest extends TestCase {
|
||||||
String id = addErrorParserExtension("test3", TestParser3.class);
|
String id = addErrorParserExtension("test3", TestParser3.class);
|
||||||
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
|
epManager = new ErrorParserManager(cProject.getProject(), markerGenerator, new String[] { id });
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer("errorT: ");
|
StringBuilder buf = new StringBuilder("errorT: ");
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
buf.append("la la la la la "+i+" ");
|
buf.append("la la la la la "+i+" ");
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ public class ErrorParserManagerTest extends TestCase {
|
||||||
String id = addErrorParserExtension("test4", TestParser4.class);
|
String id = addErrorParserExtension("test4", TestParser4.class);
|
||||||
epManager = new ErrorParserManager(null, markerGenerator, new String[] { id });
|
epManager = new ErrorParserManager(null, markerGenerator, new String[] { id });
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer("errorT: ");
|
StringBuilder buf = new StringBuilder("errorT: ");
|
||||||
output(buf.toString()+"\n");
|
output(buf.toString()+"\n");
|
||||||
end();
|
end();
|
||||||
assertEquals(1, errorList.size());
|
assertEquals(1, errorList.size());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2012 QNX Software Systems Ltd and others.
|
* Copyright (c) 2004, 2016 QNX Software Systems Ltd 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 abstract class GenericErrorParserTests extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String makeStringFromArray(String[] pieces, String sep) {
|
protected String makeStringFromArray(String[] pieces, String sep) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for (int i = 0; i < pieces.length; i++) {
|
for (int i = 0; i < pieces.length; i++) {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
buf.append(sep);
|
buf.append(sep);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2015 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
|
||||||
|
@ -266,7 +266,7 @@ public class BackwardCompatibilityTests extends BaseTestCase {
|
||||||
if(array == null)
|
if(array == null)
|
||||||
return "null";
|
return "null";
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append('[');
|
buf.append('[');
|
||||||
for(int i = 0; i < array.length; i++){
|
for(int i = 0; i < array.length; i++){
|
||||||
if(i != 0){
|
if(i != 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
|
||||||
|
@ -3103,7 +3103,7 @@ public class AST2CPPSpecTest extends AST2SpecTestBase {
|
||||||
|
|
||||||
// Not legal C++
|
// Not legal C++
|
||||||
// // public void test10_4s2b() throws Exception {
|
// // public void test10_4s2b() throws Exception {
|
||||||
// StringBuffer buffer = new StringBuffer();
|
// StringBuilder buffer = new StringBuilder();
|
||||||
// buffer.append("struct C {\n"); //$NON-NLS-1$
|
// buffer.append("struct C {\n"); //$NON-NLS-1$
|
||||||
// buffer.append("virtual void f() { }=0; // illformed\n"); //$NON-NLS-1$
|
// buffer.append("virtual void f() { }=0; // illformed\n"); //$NON-NLS-1$
|
||||||
// buffer.append("};\n"); //$NON-NLS-1$
|
// buffer.append("};\n"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2013 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
|
||||||
|
@ -1107,7 +1107,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSimpleKRCTest1() throws Exception {
|
public void testSimpleKRCTest1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int f(char x);\n" ); //$NON-NLS-1$
|
buffer.append( "int f(char x);\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
|
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
||||||
|
@ -1126,7 +1126,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSimpleKRCTest2() throws Exception {
|
public void testSimpleKRCTest2() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int f();\n" ); //$NON-NLS-1$
|
buffer.append( "int f();\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
|
buffer.append( "int f(x) char x;\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
||||||
|
@ -1145,7 +1145,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSimpleKRCTest3() throws Exception {
|
public void testSimpleKRCTest3() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int const *f();\n" ); //$NON-NLS-1$
|
buffer.append( "int const *f();\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int const *f(x) char x;\n" ); //$NON-NLS-1$
|
buffer.append( "int const *f(x) char x;\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
buffer.append( "{ return x == 0; }\n" ); //$NON-NLS-1$
|
||||||
|
@ -1164,7 +1164,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKRC_1() throws Exception {
|
public void testKRC_1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int isroot (x, y) /* comment */ \n" ); //$NON-NLS-1$
|
buffer.append( "int isroot (x, y) /* comment */ \n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int x;\n" ); //$NON-NLS-1$
|
buffer.append( "int x;\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int y;\n" ); //$NON-NLS-1$
|
buffer.append( "int y;\n" ); //$NON-NLS-1$
|
||||||
|
@ -1184,7 +1184,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKRCWithTypes() throws Exception {
|
public void testKRCWithTypes() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "typedef char c;\n" ); //$NON-NLS-1$
|
buffer.append( "typedef char c;\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int isroot (c);\n" ); //$NON-NLS-1$
|
buffer.append( "int isroot (c);\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int isroot (x) \n" ); //$NON-NLS-1$
|
buffer.append( "int isroot (x) \n" ); //$NON-NLS-1$
|
||||||
|
@ -1216,7 +1216,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKRC_monop_cards1() throws Exception {
|
public void testKRC_monop_cards1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#ifdef __STDC__\n" ); //$NON-NLS-1$
|
buffer.append( "#ifdef __STDC__\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "#define __P(x) x\n" ); //$NON-NLS-1$
|
buffer.append( "#define __P(x) x\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "#else\n" ); //$NON-NLS-1$
|
buffer.append( "#else\n" ); //$NON-NLS-1$
|
||||||
|
@ -1265,7 +1265,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKRC_monop_cards2() throws Exception {
|
public void testKRC_monop_cards2() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int\n" ); //$NON-NLS-1$
|
buffer.append( "int\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "getinp(prompt, list)\n" ); //$NON-NLS-1$
|
buffer.append( "getinp(prompt, list)\n" ); //$NON-NLS-1$
|
||||||
buffer.append( " const char *prompt, *const list[];\n" ); //$NON-NLS-1$
|
buffer.append( " const char *prompt, *const list[];\n" ); //$NON-NLS-1$
|
||||||
|
@ -1298,7 +1298,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testKRC_getParametersOrder() throws Exception {
|
public void testKRC_getParametersOrder() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int f(a, b) int b,a;{}\n" ); //$NON-NLS-1$
|
buffer.append( "int f(a, b) int b,a;{}\n" ); //$NON-NLS-1$
|
||||||
|
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -1315,7 +1315,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testKRC_Ethereal_1() throws Exception {
|
public void testKRC_Ethereal_1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "struct symbol {\n" ); //$NON-NLS-1$
|
buffer.append( "struct symbol {\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int lambda;\n};\n" ); //$NON-NLS-1$
|
buffer.append( "int lambda;\n};\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "struct lemon {\n" ); //$NON-NLS-1$
|
buffer.append( "struct lemon {\n" ); //$NON-NLS-1$
|
||||||
|
@ -1361,7 +1361,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86698() throws Exception {
|
public void testBug86698() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "struct C;\n"); //$NON-NLS-1$
|
buffer.append( "struct C;\n"); //$NON-NLS-1$
|
||||||
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
|
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
|
||||||
buffer.append( "struct C {\n"); //$NON-NLS-1$
|
buffer.append( "struct C {\n"); //$NON-NLS-1$
|
||||||
|
@ -1383,7 +1383,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLittleThings() throws Exception {
|
public void testLittleThings() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("int a[3];\r\n"); //$NON-NLS-1$
|
buffer.append("int a[3];\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("int *b;\r\n"); //$NON-NLS-1$
|
buffer.append("int *b;\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("int &c;\r\n"); //$NON-NLS-1$
|
buffer.append("int &c;\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1453,7 +1453,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSimpleWindowsPreprocessorSelections() throws Exception {
|
public void testSimpleWindowsPreprocessorSelections() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
|
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
|
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
|
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1499,7 +1499,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86993() throws Exception {
|
public void testBug86993() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#define _BEGIN_STD_C extern \"C\" {\r\n"); //$NON-NLS-1$
|
buffer.append("#define _BEGIN_STD_C extern \"C\" {\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _END_STD_C }\r\n"); //$NON-NLS-1$
|
buffer.append("#define _END_STD_C }\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("_BEGIN_STD_C\r\n"); //$NON-NLS-1$
|
buffer.append("_BEGIN_STD_C\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1524,7 +1524,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86870() throws Exception {
|
public void testBug86870() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#if VERSION == 1\r\n"); //$NON-NLS-1$
|
buffer.append("#if VERSION == 1\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define INCFILE \"vers1.h\"\r\n"); //$NON-NLS-1$
|
buffer.append("#define INCFILE \"vers1.h\"\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#elif VERSION == 2\r\n"); //$NON-NLS-1$
|
buffer.append("#elif VERSION == 2\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1573,7 +1573,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
|
|
||||||
public void testBug87179() throws Exception
|
public void testBug87179() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
|
buffer.append("#define ONE 1\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
|
buffer.append("#ifdef ONE\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
|
buffer.append("int x=0;\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1601,7 +1601,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug97301() throws Exception {
|
public void testBug97301() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
// test2.h:
|
// test2.h:
|
||||||
buffer.append("#ifndef _WINGDI_H\r\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _WINGDI_H\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _WINGDI_H\r\n"); //$NON-NLS-1$
|
buffer.append("#define _WINGDI_H\r\n"); //$NON-NLS-1$
|
||||||
|
@ -1621,7 +1621,7 @@ public class AST2SelectionParseTest extends AST2SelectionParseTestBase {
|
||||||
|
|
||||||
|
|
||||||
// test1.h:
|
// test1.h:
|
||||||
buffer = new StringBuffer();
|
buffer = new StringBuilder();
|
||||||
buffer.append("#ifdef RC_INVOKED\r\n"); //$NON-NLS-1$
|
buffer.append("#ifdef RC_INVOKED\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#else\r\n"); //$NON-NLS-1$
|
buffer.append("#else\r\n"); //$NON-NLS-1$
|
||||||
buffer.append("#if !(defined NOGDI || defined _WINGDI_H)\r\n"); //$NON-NLS-1$
|
buffer.append("#if !(defined NOGDI || defined _WINGDI_H)\r\n"); //$NON-NLS-1$
|
||||||
|
|
|
@ -315,7 +315,7 @@ public class AST2TestBase extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IASTExpression getExpressionFromStatementInCode(String code, ParserLanguage language) throws ParserException {
|
protected IASTExpression getExpressionFromStatementInCode(String code, ParserLanguage language) throws ParserException {
|
||||||
StringBuffer buffer = new StringBuffer("void f() { "); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder("void f() { "); //$NON-NLS-1$
|
||||||
buffer.append("int x, y;\n"); //$NON-NLS-1$
|
buffer.append("int x, y;\n"); //$NON-NLS-1$
|
||||||
buffer.append(code);
|
buffer.append(code);
|
||||||
buffer.append(";\n}"); //$NON-NLS-1$
|
buffer.append(";\n}"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2013 Institute for Software, HSR Hochschule fuer Technik
|
* Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
|
||||||
* Rapperswil, University of applied sciences and others.
|
* Rapperswil, University of applied sciences 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
|
||||||
|
@ -92,7 +92,7 @@ public class CommentTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getHSource() {
|
private String getHSource() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef CPPCLASS_H_\n");
|
buffer.append("#ifndef CPPCLASS_H_\n");
|
||||||
buffer.append("#define CPPCLASS_H_\n");
|
buffer.append("#define CPPCLASS_H_\n");
|
||||||
buffer.append("/* A very cool class\n");
|
buffer.append("/* A very cool class\n");
|
||||||
|
@ -119,7 +119,7 @@ public class CommentTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCppSource() {
|
private String getCppSource() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("void CppClass()\n");
|
buffer.append("void CppClass()\n");
|
||||||
buffer.append("{\n");
|
buffer.append("{\n");
|
||||||
buffer.append(" // Comment in cpp\n");
|
buffer.append(" // Comment in cpp\n");
|
||||||
|
@ -168,7 +168,7 @@ public class CommentTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getCSource() {
|
private String getCSource() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("//A little input/output programm\n");
|
buffer.append("//A little input/output programm\n");
|
||||||
buffer.append("int main(void){\n");
|
buffer.append("int main(void){\n");
|
||||||
buffer.append(" int number = -1;\n");
|
buffer.append(" int number = -1;\n");
|
||||||
|
|
|
@ -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
|
||||||
|
@ -54,7 +54,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug97967() throws Exception {
|
public void testBug97967() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
||||||
|
@ -85,7 +85,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
|
|
||||||
public void testBug101875() throws Exception {
|
public void testBug101875() throws Exception {
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef _BLAH_H_\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _BLAH_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("#endif"); //$NON-NLS-1$
|
buffer.append("#endif"); //$NON-NLS-1$
|
||||||
if (i > 1)
|
if (i > 1)
|
||||||
|
@ -93,7 +93,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
if ((i % 2) == 1)
|
if ((i % 2) == 1)
|
||||||
buffer.append("\n"); //$NON-NLS-1$
|
buffer.append("\n"); //$NON-NLS-1$
|
||||||
importFile("blah.h", buffer.toString()); //$NON-NLS-1$
|
importFile("blah.h", buffer.toString()); //$NON-NLS-1$
|
||||||
buffer = new StringBuffer();
|
buffer = new StringBuilder();
|
||||||
buffer.append("#include \"blah.h\"\n"); //$NON-NLS-1$
|
buffer.append("#include \"blah.h\"\n"); //$NON-NLS-1$
|
||||||
buffer.append("/**\n"); //$NON-NLS-1$
|
buffer.append("/**\n"); //$NON-NLS-1$
|
||||||
buffer.append(" * A type used by test functions.\n"); //$NON-NLS-1$
|
buffer.append(" * A type used by test functions.\n"); //$NON-NLS-1$
|
||||||
|
@ -391,7 +391,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
|
|
||||||
public void testBug90851() throws Exception {
|
public void testBug90851() throws Exception {
|
||||||
IFile imacro_file = importFile("macro.h", "#define BEAST 666\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
IFile imacro_file = importFile("macro.h", "#define BEAST 666\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
||||||
|
@ -426,7 +426,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIProblemLocation() throws Exception {
|
public void testIProblemLocation() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#include <not_found.h>\n"); //$NON-NLS-1$
|
buffer.append("#include <not_found.h>\n"); //$NON-NLS-1$
|
||||||
buffer.append("int x,y,z;"); //$NON-NLS-1$
|
buffer.append("int x,y,z;"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -454,7 +454,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
|
|
||||||
public void testBug97603() throws Exception {
|
public void testBug97603() throws Exception {
|
||||||
IFile imacro_file = importFile("macro.h", "#define JEDEN 1\n#define DVA 2\n#define TRI 3\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
IFile imacro_file = importFile("macro.h", "#define JEDEN 1\n#define DVA 2\n#define TRI 3\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
||||||
|
@ -495,7 +495,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
public void testBug97603_2() throws Exception {
|
public void testBug97603_2() throws Exception {
|
||||||
IFile imacro_file1= importFile("macro1.h", "#define JEDEN 1\n");
|
IFile imacro_file1= importFile("macro1.h", "#define JEDEN 1\n");
|
||||||
IFile imacro_file2= importFile("macro2.h", "#define DVA 2\n#define TRI 3\n");
|
IFile imacro_file2= importFile("macro2.h", "#define DVA 2\n#define TRI 3\n");
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#ifndef _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
buffer.append("#define _INCLUDE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
buffer.append("typedef void (*vfp)();\n"); //$NON-NLS-1$
|
||||||
|
@ -535,7 +535,7 @@ public class DOMLocationInclusionTests extends AST2FileBasePluginTestCase {
|
||||||
|
|
||||||
public void testSystemInclude() throws Exception {
|
public void testSystemInclude() throws Exception {
|
||||||
IFile incsh= importFile("incs.h", "");
|
IFile incsh= importFile("incs.h", "");
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#include <incs.h>\n");
|
buffer.append("#include <incs.h>\n");
|
||||||
buffer.append("#include <../AST2BasedProjectMofo/incs.h>\n");
|
buffer.append("#include <../AST2BasedProjectMofo/incs.h>\n");
|
||||||
buffer.append("#define TARG <incs.h>\n");
|
buffer.append("#define TARG <incs.h>\n");
|
||||||
|
|
|
@ -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
|
||||||
|
@ -48,7 +48,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testObjectStyleMacroExpansionSimpleDeclarator() throws Exception
|
public void testObjectStyleMacroExpansionSimpleDeclarator() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define ABC D\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define ABC D\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int ABC;"); //$NON-NLS-1$
|
buffer.append( "int ABC;"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
for (ParserLanguage language : languages) {
|
for (ParserLanguage language : languages) {
|
||||||
|
@ -74,7 +74,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testObjectMacroExpansionModestDeclarator() throws Exception
|
public void testObjectMacroExpansionModestDeclarator() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define ABC * D\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define ABC * D\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "int ABC;"); //$NON-NLS-1$
|
buffer.append( "int ABC;"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
for (ParserLanguage language : languages) {
|
for (ParserLanguage language : languages) {
|
||||||
|
@ -121,7 +121,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testObjectMacroExpansionPartialDeclSpec() throws Exception
|
public void testObjectMacroExpansionPartialDeclSpec() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
|
||||||
buffer.append( "XYZ int var;"); //$NON-NLS-1$
|
buffer.append( "XYZ int var;"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
for (ParserLanguage language : languages) {
|
for (ParserLanguage language : languages) {
|
||||||
|
@ -148,7 +148,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testObjectMacroExpansionNested() throws Exception
|
public void testObjectMacroExpansionNested() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define PO *\n"); //$NON-NLS-1$
|
buffer.append( "#define PO *\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
|
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int C_PO var;"); //$NON-NLS-1$
|
buffer.append( "int C_PO var;"); //$NON-NLS-1$
|
||||||
|
@ -180,7 +180,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testObjectMacroExpansionComplex() throws Exception
|
public void testObjectMacroExpansionComplex() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define XYZ const\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define XYZ const\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define PO *\n"); //$NON-NLS-1$
|
buffer.append( "#define PO *\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
|
buffer.append( "#define C_PO PO XYZ\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define IT int\n"); //$NON-NLS-1$
|
buffer.append( "#define IT int\n"); //$NON-NLS-1$
|
||||||
|
@ -232,7 +232,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testStdioBug() throws ParserException
|
public void testStdioBug() throws ParserException
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define _PTR void *\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define _PTR void *\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
|
buffer.append( "#define __cdecl __attribute__ ((__cdecl__))\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "#define _EXFUN(name, proto) __cdecl name proto\n"); //$NON-NLS-1$
|
buffer.append( "#define _EXFUN(name, proto) __cdecl name proto\n"); //$NON-NLS-1$
|
||||||
buffer.append( "_PTR _EXFUN(memchr,(const _PTR, int, size_t));\n"); //$NON-NLS-1$
|
buffer.append( "_PTR _EXFUN(memchr,(const _PTR, int, size_t));\n"); //$NON-NLS-1$
|
||||||
|
@ -274,7 +274,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testMacroBindings() throws Exception
|
public void testMacroBindings() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define ABC def\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define ABC def\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int ABC;\n"); //$NON-NLS-1$
|
buffer.append( "int ABC;\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#undef ABC\n"); //$NON-NLS-1$
|
buffer.append( "#undef ABC\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define ABC ghi\n"); //$NON-NLS-1$
|
buffer.append( "#define ABC ghi\n"); //$NON-NLS-1$
|
||||||
|
@ -311,7 +311,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testBug90978() throws Exception {
|
public void testBug90978() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer( "#define MACRO mm\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define MACRO mm\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int MACRO;\n"); //$NON-NLS-1$
|
buffer.append( "int MACRO;\n"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
for (ParserLanguage language : languages) {
|
for (ParserLanguage language : languages) {
|
||||||
|
@ -332,7 +332,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug94933() throws Exception {
|
public void testBug94933() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer( "#define API extern\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define API extern\n" ); //$NON-NLS-1$
|
||||||
buffer.append( "#define MYAPI API\n"); //$NON-NLS-1$
|
buffer.append( "#define MYAPI API\n"); //$NON-NLS-1$
|
||||||
buffer.append( "MYAPI void func() {}" ); //$NON-NLS-1$
|
buffer.append( "MYAPI void func() {}" ); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -345,7 +345,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testFunctionMacroExpansionWithNameSubstitution_Bug173637() throws Exception
|
public void testFunctionMacroExpansionWithNameSubstitution_Bug173637() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer( "#define PLUS5(x) (x+5)\n"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#define PLUS5(x) (x+5)\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define FUNCTION PLUS5 \n"); //$NON-NLS-1$
|
buffer.append( "#define FUNCTION PLUS5 \n"); //$NON-NLS-1$
|
||||||
buffer.append( "int var= FUNCTION(1);"); //$NON-NLS-1$
|
buffer.append( "int var= FUNCTION(1);"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -394,7 +394,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testBug186257() throws Exception {
|
public void testBug186257() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("typedef char STR; \n"); //$NON-NLS-1$
|
sb.append("typedef char STR; \n"); //$NON-NLS-1$
|
||||||
sb.append("#define Nullstr Null(STR*) \n"); //$NON-NLS-1$
|
sb.append("#define Nullstr Null(STR*) \n"); //$NON-NLS-1$
|
||||||
sb.append("#define Null(x) ((x)NULL) \n"); //$NON-NLS-1$
|
sb.append("#define Null(x) ((x)NULL) \n"); //$NON-NLS-1$
|
||||||
|
@ -412,7 +412,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testArgumentExpansion() throws Exception {
|
public void testArgumentExpansion() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#define ADD(a,b, c) (a) + (b) + (c) \n"); //$NON-NLS-1$
|
sb.append("#define ADD(a,b, c) (a) + (b) + (c) \n"); //$NON-NLS-1$
|
||||||
sb.append("#define ONEYONENOE 111111 \n"); //$NON-NLS-1$
|
sb.append("#define ONEYONENOE 111111 \n"); //$NON-NLS-1$
|
||||||
sb.append("#define TWO 2 \n"); //$NON-NLS-1$
|
sb.append("#define TWO 2 \n"); //$NON-NLS-1$
|
||||||
|
@ -431,7 +431,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testArgumentCapture() throws Exception {
|
public void testArgumentCapture() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#define add(x,y) x + y \n"); //$NON-NLS-1$
|
sb.append("#define add(x,y) x + y \n"); //$NON-NLS-1$
|
||||||
sb.append("#define add2 add(x, \n"); //$NON-NLS-1$
|
sb.append("#define add2 add(x, \n"); //$NON-NLS-1$
|
||||||
sb.append("int x = add2 z); \n"); //$NON-NLS-1$
|
sb.append("int x = add2 z); \n"); //$NON-NLS-1$
|
||||||
|
@ -448,7 +448,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
|
|
||||||
|
|
||||||
public void testFunctionMacroNotCalled() throws Exception {
|
public void testFunctionMacroNotCalled() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#define FUNCTION(x) x \n"); //$NON-NLS-1$
|
sb.append("#define FUNCTION(x) x \n"); //$NON-NLS-1$
|
||||||
sb.append("#define YO FUNCTION \n"); //$NON-NLS-1$
|
sb.append("#define YO FUNCTION \n"); //$NON-NLS-1$
|
||||||
sb.append("int x = YO; \n"); //$NON-NLS-1$
|
sb.append("int x = YO; \n"); //$NON-NLS-1$
|
||||||
|
@ -464,7 +464,7 @@ public class DOMLocationMacroTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBuildFunctionMacroName() throws Exception {
|
public void testBuildFunctionMacroName() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
|
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
|
||||||
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
|
sb.append("#define FUN1(x) x \n"); //$NON-NLS-1$
|
||||||
sb.append("#define MAKEFUN(num) FUN ## num \n"); //$NON-NLS-1$
|
sb.append("#define MAKEFUN(num) FUN ## num \n"); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -373,7 +373,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testSimplePreprocessorStatements() throws Exception
|
public void testSimplePreprocessorStatements() throws Exception
|
||||||
{
|
{
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#ifndef _APPLE_H_\n"); //$NON-NLS-1$
|
buffer.append( "#ifndef _APPLE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#define _APPLE_H_\n"); //$NON-NLS-1$
|
buffer.append( "#define _APPLE_H_\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#undef _APPLE_H_\n"); //$NON-NLS-1$
|
buffer.append( "#undef _APPLE_H_\n"); //$NON-NLS-1$
|
||||||
|
@ -397,7 +397,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug162180() throws Exception {
|
public void testBug162180() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
|
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int x;\n"); //$NON-NLS-1$
|
buffer.append( "int x;\n"); //$NON-NLS-1$
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -422,7 +422,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug162180_0() throws Exception {
|
public void testBug162180_0() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
|
buffer.append( "#include <notfound.h>\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#include <notfound1.h> \r\n"); //$NON-NLS-1$
|
buffer.append( "#include <notfound1.h> \r\n"); //$NON-NLS-1$
|
||||||
buffer.append( "#include <notfound2.h> // more stuff \n"); //$NON-NLS-1$
|
buffer.append( "#include <notfound2.h> // more stuff \n"); //$NON-NLS-1$
|
||||||
|
@ -445,7 +445,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test162180_1() throws Exception {
|
public void test162180_1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#define xxx(!) int a\n"); // [0-20]
|
buffer.append( "#define xxx(!) int a\n"); // [0-20]
|
||||||
buffer.append( "int x;\n"); // [21-27]
|
buffer.append( "int x;\n"); // [21-27]
|
||||||
buffer.append( "int x\\i;\n"); // [28-36]
|
buffer.append( "int x\\i;\n"); // [28-36]
|
||||||
|
@ -468,7 +468,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test162180_2() throws Exception {
|
public void test162180_2() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#define ! x\n");
|
buffer.append( "#define ! x\n");
|
||||||
buffer.append( "int x;\n");
|
buffer.append( "int x;\n");
|
||||||
String code = buffer.toString();
|
String code = buffer.toString();
|
||||||
|
@ -486,7 +486,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test162180_3() throws Exception {
|
public void test162180_3() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#define nix(x) x\n");
|
buffer.append( "#define nix(x) x\n");
|
||||||
buffer.append( "nix(y,z);");
|
buffer.append( "nix(y,z);");
|
||||||
buffer.append( "int x;\n");
|
buffer.append( "int x;\n");
|
||||||
|
@ -505,7 +505,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void test162180_4() throws Exception {
|
public void test162180_4() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "#include \"\"\n");
|
buffer.append( "#include \"\"\n");
|
||||||
buffer.append( "#else\n");
|
buffer.append( "#else\n");
|
||||||
buffer.append( "int x;\n");
|
buffer.append( "int x;\n");
|
||||||
|
@ -540,7 +540,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86698_1() throws Exception {
|
public void testBug86698_1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "struct C;\n"); //$NON-NLS-1$
|
buffer.append( "struct C;\n"); //$NON-NLS-1$
|
||||||
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
|
buffer.append( "void no_opt(C*);\n"); //$NON-NLS-1$
|
||||||
buffer.append( "struct C {\n"); //$NON-NLS-1$
|
buffer.append( "struct C {\n"); //$NON-NLS-1$
|
||||||
|
@ -558,7 +558,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86698_2() throws Exception {
|
public void testBug86698_2() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append( "int f(int);\n"); //$NON-NLS-1$
|
buffer.append( "int f(int);\n"); //$NON-NLS-1$
|
||||||
buffer.append( "class C {\n"); //$NON-NLS-1$
|
buffer.append( "class C {\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int i;\n"); //$NON-NLS-1$
|
buffer.append( "int i;\n"); //$NON-NLS-1$
|
||||||
|
@ -583,7 +583,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug157009_1() throws Exception {
|
public void testBug157009_1() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef A\r\n#error X\r\n#else\r\n#error Y\r\n#endif");
|
buffer.append("#ifndef A\r\n#error X\r\n#else\r\n#error Y\r\n#endif");
|
||||||
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
||||||
|
|
||||||
|
@ -593,7 +593,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug157009_2() throws Exception {
|
public void testBug157009_2() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#ifndef A\n#error X\n#else\n#error Y\n#endif");
|
buffer.append("#ifndef A\n#error X\n#else\n#error Y\n#endif");
|
||||||
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
|
|
||||||
public void testBug171520() throws Exception {
|
public void testBug171520() throws Exception {
|
||||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
|
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171520
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("int i = sizeof(int);");
|
buffer.append("int i = sizeof(int);");
|
||||||
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
IASTTranslationUnit tu = parse(buffer.toString(), ParserLanguage.CPP, false, false);
|
||||||
IASTDeclaration[] decls= tu.getDeclarations();
|
IASTDeclaration[] decls= tu.getDeclarations();
|
||||||
|
@ -624,7 +624,7 @@ public class DOMLocationTests extends AST2TestBase {
|
||||||
public void testBug120607() throws Exception {
|
public void testBug120607() throws Exception {
|
||||||
// C/C++ Indexer rejects valid pre-processor directive
|
// C/C++ Indexer rejects valid pre-processor directive
|
||||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120607
|
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=120607
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#import \"include_once.h\"\n");
|
buffer.append("#import \"include_once.h\"\n");
|
||||||
buffer.append("#warning \"deprecated include\"\n");
|
buffer.append("#warning \"deprecated include\"\n");
|
||||||
buffer.append("#line 5\n");
|
buffer.append("#line 5\n");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2013 Institute for Software, HSR Hochschule fuer Technik
|
* Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
|
||||||
* Rapperswil, University of applied sciences and others.
|
* Rapperswil, University of applied sciences 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
|
||||||
|
@ -36,7 +36,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testPragma() throws Exception {
|
public void testPragma() throws Exception {
|
||||||
String msg = "GCC poison printf sprintf fprintf";
|
String msg = "GCC poison printf sprintf fprintf";
|
||||||
StringBuffer buffer = new StringBuffer( "#pragma " + msg + "\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#pragma " + msg + "\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(1, st.length);
|
assertEquals(1, st.length);
|
||||||
|
@ -47,7 +47,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testElIf() throws Exception {
|
public void testElIf() throws Exception {
|
||||||
String cond = "2 == 2";
|
String cond = "2 == 2";
|
||||||
StringBuffer buffer = new StringBuffer( "#if 1 == 2\n#elif " + cond + "\n#else\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#if 1 == 2\n#elif " + cond + "\n#else\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(4, st.length);
|
assertEquals(4, st.length);
|
||||||
|
@ -58,7 +58,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIf() throws Exception {
|
public void testIf() throws Exception {
|
||||||
String cond = "2 == 2";
|
String cond = "2 == 2";
|
||||||
StringBuffer buffer = new StringBuffer( "#if " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#if " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -69,7 +69,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIfDef() throws Exception{
|
public void testIfDef() throws Exception{
|
||||||
String cond = "SYMBOL";
|
String cond = "SYMBOL";
|
||||||
StringBuffer buffer = new StringBuffer( "#ifdef " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#ifdef " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -80,7 +80,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIfnDef() throws Exception{
|
public void testIfnDef() throws Exception{
|
||||||
String cond = "SYMBOL";
|
String cond = "SYMBOL";
|
||||||
StringBuffer buffer = new StringBuffer( "#ifndef " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#ifndef " + cond + "\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -91,7 +91,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testError() throws Exception{
|
public void testError() throws Exception{
|
||||||
String msg = "Message";
|
String msg = "Message";
|
||||||
StringBuffer buffer = new StringBuffer( "#error " + msg + "\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#error " + msg + "\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(1, st.length);
|
assertEquals(1, st.length);
|
||||||
|
@ -102,7 +102,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testPragmaWithSpaces() throws Exception {
|
public void testPragmaWithSpaces() throws Exception {
|
||||||
String msg = "GCC poison printf sprintf fprintf";
|
String msg = "GCC poison printf sprintf fprintf";
|
||||||
StringBuffer buffer = new StringBuffer( "# pragma " + msg + " \n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "# pragma " + msg + " \n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(1, st.length);
|
assertEquals(1, st.length);
|
||||||
|
@ -113,7 +113,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testElIfWithSpaces() throws Exception {
|
public void testElIfWithSpaces() throws Exception {
|
||||||
String cond = "2 == 2";
|
String cond = "2 == 2";
|
||||||
StringBuffer buffer = new StringBuffer( "#if 1 == 2\n# elif " + cond + " \n#else\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#if 1 == 2\n# elif " + cond + " \n#else\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(4, st.length);
|
assertEquals(4, st.length);
|
||||||
|
@ -124,7 +124,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIfWithSpaces() throws Exception {
|
public void testIfWithSpaces() throws Exception {
|
||||||
String cond = "2 == 2";
|
String cond = "2 == 2";
|
||||||
StringBuffer buffer = new StringBuffer( "# if " + cond + " \n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "# if " + cond + " \n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -135,7 +135,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIfDefWithSpaces() throws Exception{
|
public void testIfDefWithSpaces() throws Exception{
|
||||||
String cond = "SYMBOL";
|
String cond = "SYMBOL";
|
||||||
StringBuffer buffer = new StringBuffer( "# ifdef " + cond + " \n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "# ifdef " + cond + " \n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -146,7 +146,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testIfnDefWithSpaces() throws Exception{
|
public void testIfnDefWithSpaces() throws Exception{
|
||||||
String cond = "SYMBOL";
|
String cond = "SYMBOL";
|
||||||
StringBuffer buffer = new StringBuffer( "# ifndef " + cond + "\t\n#endif\n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "# ifndef " + cond + "\t\n#endif\n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(2, st.length);
|
assertEquals(2, st.length);
|
||||||
|
@ -157,7 +157,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
|
|
||||||
public void testErrorWithSpaces() throws Exception{
|
public void testErrorWithSpaces() throws Exception{
|
||||||
String msg = "Message";
|
String msg = "Message";
|
||||||
StringBuffer buffer = new StringBuffer( "# error \t" + msg + " \n" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "# error \t" + msg + " \n" ); //$NON-NLS-1$
|
||||||
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
|
IASTTranslationUnit tu = parse( buffer.toString(), ParserLanguage.CPP, false, false );
|
||||||
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
IASTPreprocessorStatement[] st = tu.getAllPreprocessorStatements();
|
||||||
assertEquals(1, st.length);
|
assertEquals(1, st.length);
|
||||||
|
@ -167,7 +167,7 @@ public class DOMPreprocessorInformationTest extends AST2TestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testMacroExpansion() throws Exception {
|
public void testMacroExpansion() throws Exception {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#define add(a, b) (a) + (b) \n");
|
sb.append("#define add(a, b) (a) + (b) \n");
|
||||||
sb.append("int x = add(foo, bar); \n");
|
sb.append("int x = add(foo, bar); \n");
|
||||||
String code = sb.toString();
|
String code = sb.toString();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2013 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -1620,7 +1620,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug64181() throws Exception {
|
public void testBug64181() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("namespace Foo { // ** (A) **\n");
|
buffer.append("namespace Foo { // ** (A) **\n");
|
||||||
buffer.append("int bar;\n");
|
buffer.append("int bar;\n");
|
||||||
buffer.append("}\n");
|
buffer.append("}\n");
|
||||||
|
@ -1649,7 +1649,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug80823() throws Exception {
|
public void testBug80823() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("class MyEggImpl {}; // line A\n");
|
buffer.append("class MyEggImpl {}; // line A\n");
|
||||||
buffer.append("#define MyChicken MyEggImpl\n");
|
buffer.append("#define MyChicken MyEggImpl\n");
|
||||||
buffer.append("MyChicken c; // line C\n");
|
buffer.append("MyChicken c; // line C\n");
|
||||||
|
@ -1669,7 +1669,7 @@ public class DOMSelectionParseTest extends DOMSelectionParseTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug86993() throws Exception {
|
public void testBug86993() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("#define _BEGIN_STD_C extern \"C\" {\n");
|
buffer.append("#define _BEGIN_STD_C extern \"C\" {\n");
|
||||||
buffer.append("#define _END_STD_C }\n");
|
buffer.append("#define _END_STD_C }\n");
|
||||||
buffer.append("_BEGIN_STD_C\n");
|
buffer.append("_BEGIN_STD_C\n");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2013 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
|
||||||
|
@ -1387,7 +1387,7 @@ public class QuickParser2Tests extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBug68116() throws Exception {
|
public void testBug68116() throws Exception {
|
||||||
StringBuffer buffer = new StringBuffer("char dummy[] = \"0123456789");
|
StringBuilder buffer = new StringBuilder("char dummy[] = \"0123456789");
|
||||||
for (int i = 0; i < 5000; ++i)
|
for (int i = 0; i < 5000; ++i)
|
||||||
buffer.append("0123456789");
|
buffer.append("0123456789");
|
||||||
buffer.append("\";");
|
buffer.append("\";");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
|
* Copyright (c) 2008, 2016 Institute for Software, HSR Hochschule fuer Technik
|
||||||
* Rapperswil, University of applied sciences and others
|
* Rapperswil, University of applied sciences 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
|
||||||
|
@ -22,8 +22,8 @@ import org.eclipse.jface.text.TextSelection;
|
||||||
public class TestSourceFile {
|
public class TestSourceFile {
|
||||||
private static final String REPLACEMENT = ""; //$NON-NLS-1$
|
private static final String REPLACEMENT = ""; //$NON-NLS-1$
|
||||||
private String name;
|
private String name;
|
||||||
private StringBuffer source = new StringBuffer();
|
private StringBuilder source = new StringBuilder();
|
||||||
private StringBuffer expectedSource = new StringBuffer();
|
private StringBuilder expectedSource = new StringBuilder();
|
||||||
private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
|
private String separator = System.getProperty("line.separator"); //$NON-NLS-1$
|
||||||
private int selectionStart = -1;
|
private int selectionStart = -1;
|
||||||
private int selectionEnd = -1;
|
private int selectionEnd = -1;
|
||||||
|
|
|
@ -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
|
||||||
|
@ -230,7 +230,7 @@ public class InclusionTests extends PreprocessorTestsBase {
|
||||||
|
|
||||||
public void testBug91086() throws Exception {
|
public void testBug91086() throws Exception {
|
||||||
IFile inclusion = importFile( "file.h", "#define FOUND 666\n" ); //$NON-NLS-1$ //$NON-NLS-2$
|
IFile inclusion = importFile( "file.h", "#define FOUND 666\n" ); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
StringBuffer buffer = new StringBuffer( "#include \"" ); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder( "#include \"" ); //$NON-NLS-1$
|
||||||
buffer.append( inclusion.getLocation().toOSString() );
|
buffer.append( inclusion.getLocation().toOSString() );
|
||||||
buffer.append( "\"\n"); //$NON-NLS-1$
|
buffer.append( "\"\n"); //$NON-NLS-1$
|
||||||
buffer.append( "int var = FOUND;\n"); //$NON-NLS-1$
|
buffer.append( "int var = FOUND;\n"); //$NON-NLS-1$
|
||||||
|
@ -251,7 +251,7 @@ public class InclusionTests extends PreprocessorTestsBase {
|
||||||
|
|
||||||
public void testBug156990() throws Exception {
|
public void testBug156990() throws Exception {
|
||||||
IFile inclusion = importFile( "file.h", "ok" );
|
IFile inclusion = importFile( "file.h", "ok" );
|
||||||
StringBuffer buffer = new StringBuffer( "#include \"file.h\"" );
|
StringBuilder buffer = new StringBuilder( "#include \"file.h\"" );
|
||||||
IFile base = importFile( "base.cpp", buffer.toString() ); //$NON-NLS-1$
|
IFile base = importFile( "base.cpp", buffer.toString() ); //$NON-NLS-1$
|
||||||
|
|
||||||
FileContent reader= FileContent.create(base);
|
FileContent reader= FileContent.create(base);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
|
* Copyright (c) 2007, 2016 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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
|
||||||
|
@ -691,7 +691,7 @@ public class LexerTests extends BaseTestCase {
|
||||||
|
|
||||||
for (int splices=0; splices<9; splices++) {
|
for (int splices=0; splices<9; splices++) {
|
||||||
for (int trigraphs= 0; trigraphs<6; trigraphs++) {
|
for (int trigraphs= 0; trigraphs<6; trigraphs++) {
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
String input= useTrigraphs(ops.toCharArray(), trigraphs);
|
String input= useTrigraphs(ops.toCharArray(), trigraphs);
|
||||||
init(instertLineSplices(input, splices));
|
init(instertLineSplices(input, splices));
|
||||||
for (int token2 : tokens) {
|
for (int token2 : tokens) {
|
||||||
|
@ -727,7 +727,7 @@ public class LexerTests extends BaseTestCase {
|
||||||
int m1= splices%3;
|
int m1= splices%3;
|
||||||
int m2= (splices-m1)/3;
|
int m2= (splices-m1)/3;
|
||||||
char[] c= input.toCharArray();
|
char[] c= input.toCharArray();
|
||||||
StringBuffer result= new StringBuffer();
|
StringBuilder result= new StringBuilder();
|
||||||
for (int i = 0; i < c.length; i++) {
|
for (int i = 0; i < c.length; i++) {
|
||||||
result.append(c[i]);
|
result.append(c[i]);
|
||||||
if (c[i]=='?' && i+2 < c.length && c[i+1] == '?' && TRIGRAPH_CHARS.indexOf(c[i+2]) >= 0) {
|
if (c[i]=='?' && i+2 < c.length && c[i+1] == '?' && TRIGRAPH_CHARS.indexOf(c[i+2]) >= 0) {
|
||||||
|
@ -760,7 +760,7 @@ public class LexerTests extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean yes= mode > 1;
|
boolean yes= mode > 1;
|
||||||
StringBuffer result= new StringBuffer();
|
StringBuilder result= new StringBuilder();
|
||||||
for (char c : input) {
|
for (char c : input) {
|
||||||
int idx= TRIGRAPH_REPLACES_CHARS.indexOf(c);
|
int idx= TRIGRAPH_REPLACES_CHARS.indexOf(c);
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2014 Wind River Systems, Inc. and others.
|
* Copyright (c) 2006, 2016 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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
|
||||||
|
@ -409,7 +409,7 @@ public class IndexBugsTests extends BaseTestCase {
|
||||||
public void test150906() throws Exception {
|
public void test150906() throws Exception {
|
||||||
String fileName= "bug150906.c";
|
String fileName= "bug150906.c";
|
||||||
String varName= "arrayDataSize";
|
String varName= "arrayDataSize";
|
||||||
StringBuffer content= new StringBuffer();
|
StringBuilder content= new StringBuilder();
|
||||||
content.append("unsigned char arrayData[] = {\n");
|
content.append("unsigned char arrayData[] = {\n");
|
||||||
for (int i= 0; i < 1024 * 250 - 1; i++) {
|
for (int i= 0; i < 1024 * 250 - 1; i++) {
|
||||||
content.append("0x00,");
|
content.append("0x00,");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2014 Symbian Software Systems and others.
|
* Copyright (c) 2007, 2016 Symbian 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
|
||||||
|
@ -75,7 +75,7 @@ public class DBPropertiesTests extends BaseTestCase {
|
||||||
public void testLong() throws Exception {
|
public void testLong() throws Exception {
|
||||||
DBProperties ps = new DBProperties(db);
|
DBProperties ps = new DBProperties(db);
|
||||||
|
|
||||||
StringBuffer largeValue = new StringBuffer();
|
StringBuilder largeValue = new StringBuilder();
|
||||||
for (int i= 0; i < Database.CHUNK_SIZE * 2; i += 64) {
|
for (int i= 0; i < Database.CHUNK_SIZE * 2; i += 64) {
|
||||||
largeValue.append("********");
|
largeValue.append("********");
|
||||||
ps.setProperty("key", largeValue.toString());
|
ps.setProperty("key", largeValue.toString());
|
||||||
|
|
|
@ -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
|
||||||
|
@ -206,7 +206,7 @@ public class CProjectHelper {
|
||||||
|
|
||||||
|
|
||||||
private static String getMessage(IStatus status) {
|
private static String getMessage(IStatus status) {
|
||||||
StringBuffer message = new StringBuffer("[");
|
StringBuilder message = new StringBuilder("[");
|
||||||
message.append(status.getMessage());
|
message.append(status.getMessage());
|
||||||
if (status.isMultiStatus()) {
|
if (status.isMultiStatus()) {
|
||||||
IStatus children[] = status.getChildren();
|
IStatus children[] = status.getChildren();
|
||||||
|
|
|
@ -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
|
||||||
|
@ -282,7 +282,7 @@ public class VerifyDialog extends TitleAreaDialog {
|
||||||
*/
|
*/
|
||||||
private void handleFailure() {
|
private void handleFailure() {
|
||||||
IDialogTestPass test = _dialogTests[TEST_TYPE];
|
IDialogTestPass test = _dialogTests[TEST_TYPE];
|
||||||
StringBuffer text = new StringBuffer();
|
StringBuilder text = new StringBuilder();
|
||||||
String label = test.label();
|
String label = test.label();
|
||||||
label = label.substring(0, label.indexOf("&")) +
|
label = label.substring(0, label.indexOf("&")) +
|
||||||
label.substring(label.indexOf("&") + 1);
|
label.substring(label.indexOf("&") + 1);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2013 QNX Software Systems and others.
|
* Copyright (c) 2004, 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
|
||||||
|
@ -118,7 +118,7 @@ public class QualifiedTypeName implements IQualifiedTypeName {
|
||||||
@Override
|
@Override
|
||||||
public String getFullyQualifiedName() {
|
public String getFullyQualifiedName() {
|
||||||
if (fSegments.length > 0) {
|
if (fSegments.length > 0) {
|
||||||
StringBuffer buf = new StringBuffer(fSegments.length * INITIAL_SEGMENT_LENGTH);
|
StringBuilder buf = new StringBuilder(fSegments.length * INITIAL_SEGMENT_LENGTH);
|
||||||
for (int i = 0; i < fSegments.length; ++i) {
|
for (int i = 0; i < fSegments.length; ++i) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buf.append(QUALIFIER);
|
buf.append(QUALIFIER);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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 CModelException extends CoreException {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer= new StringBuffer();
|
StringBuilder buffer= new StringBuilder();
|
||||||
buffer.append("C Model Exception: "); //$NON-NLS-1$
|
buffer.append("C Model Exception: "); //$NON-NLS-1$
|
||||||
if (getException() != null) {
|
if (getException() != null) {
|
||||||
if (getException() instanceof CoreException) {
|
if (getException() instanceof CoreException) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 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
|
||||||
|
@ -168,7 +168,7 @@ public final class Flags {
|
||||||
* @return the standard string representation of the given flags
|
* @return the standard string representation of the given flags
|
||||||
*/
|
*/
|
||||||
public static String toString(int flags) {
|
public static String toString(int flags) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
if (isPublic(flags)) sb.append("public "); //$NON-NLS-1$
|
if (isPublic(flags)) sb.append("public "); //$NON-NLS-1$
|
||||||
if (isProtected(flags)) sb.append("protected "); //$NON-NLS-1$
|
if (isProtected(flags)) sb.append("protected "); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -169,7 +169,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements ICLibraryFil
|
||||||
String result = super.contentsToString();
|
String result = super.contentsToString();
|
||||||
|
|
||||||
if(fSourceAttachmentPath != null){
|
if(fSourceAttachmentPath != null){
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(result);
|
buf.append(result);
|
||||||
buf.append(" ; srcPath=").append(fSourceAttachmentPath); //$NON-NLS-1$
|
buf.append(" ; srcPath=").append(fSourceAttachmentPath); //$NON-NLS-1$
|
||||||
buf.append("; srcRoot=").append(fSourceAttachmentRootPath); //$NON-NLS-1$
|
buf.append("; srcRoot=").append(fSourceAttachmentRootPath); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2013 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,6 +80,6 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String contentsToString() {
|
protected String contentsToString() {
|
||||||
return new StringBuffer().append(getName()).append('=').append(fValue).toString();
|
return new StringBuilder().append(getName()).append('=').append(fValue).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2010 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
|
||||||
|
@ -451,7 +451,7 @@ public class CDataSerializer {
|
||||||
|
|
||||||
int kinds = data.getSupportedEntryKinds();
|
int kinds = data.getSupportedEntryKinds();
|
||||||
int[] allKinds = KindBasedStore.getLanguageEntryKinds();
|
int[] allKinds = KindBasedStore.getLanguageEntryKinds();
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for(int i = 0; i < allKinds.length; i++){
|
for(int i = 0; i < allKinds.length; i++){
|
||||||
if((allKinds[i] & kinds) != 0){
|
if((allKinds[i] & kinds) != 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
|
||||||
|
@ -630,10 +630,10 @@ public final class PathSettingsContainer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return contributeToString(new StringBuffer(), 0).toString();
|
return contributeToString(new StringBuilder(), 0).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private StringBuffer contributeToString(StringBuffer buf, int depth){
|
private StringBuilder contributeToString(StringBuilder buf, int depth){
|
||||||
for (int i= 0; i < depth; i++) {
|
for (int i= 0; i < depth; i++) {
|
||||||
buf.append('\t');
|
buf.append('\t');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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
|
||||||
|
@ -140,7 +140,7 @@ public abstract class APathEntry extends PathEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (basePath != null && !basePath.isEmpty()) {
|
if (basePath != null && !basePath.isEmpty()) {
|
||||||
sb.append(" base-path:").append(basePath.toString()); //$NON-NLS-1$
|
sb.append(" base-path:").append(basePath.toString()); //$NON-NLS-1$
|
||||||
|
|
|
@ -486,7 +486,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
if (buffer.getCharacters() == null){
|
if (buffer.getCharacters() == null){
|
||||||
IBinaryObject bin = getBinaryObject();
|
IBinaryObject bin = getBinaryObject();
|
||||||
if (bin != null) {
|
if (bin != null) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
BufferedReader stream = new BufferedReader(new InputStreamReader(bin.getContents()));
|
BufferedReader stream = new BufferedReader(new InputStreamReader(bin.getContents()));
|
||||||
char[] buf = new char[512];
|
char[] buf = new char[512];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -190,7 +190,7 @@ public class Buffer implements IBuffer {
|
||||||
int gapLength = this.gapEnd - this.gapStart;
|
int gapLength = this.gapEnd - this.gapStart;
|
||||||
return new String(this.contents, offset + gapLength, length);
|
return new String(this.contents, offset + gapLength, length);
|
||||||
}
|
}
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(this.contents, offset, this.gapStart - offset);
|
buf.append(this.contents, offset, this.gapStart - offset);
|
||||||
buf.append(this.contents, this.gapEnd, offset + length - this.gapStart);
|
buf.append(this.contents, this.gapEnd, offset + length - this.gapStart);
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
|
@ -450,7 +450,7 @@ public class Buffer implements IBuffer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("Owner: " + ((CElement)this.owner).toString()); //$NON-NLS-1$
|
buffer.append("Owner: " + ((CElement)this.owner).toString()); //$NON-NLS-1$
|
||||||
buffer.append("\nHas unsaved changes: " + this.hasUnsavedChanges()); //$NON-NLS-1$
|
buffer.append("\nHas unsaved changes: " + this.hasUnsavedChanges()); //$NON-NLS-1$
|
||||||
buffer.append("\nIs readonly: " + this.isReadOnly()); //$NON-NLS-1$
|
buffer.append("\nIs readonly: " + this.isReadOnly()); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -633,7 +633,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
* @see #toString()
|
* @see #toString()
|
||||||
*/
|
*/
|
||||||
public String toDebugString(int depth) {
|
public String toDebugString(int depth) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
for (int i= 0; i < depth; i++) {
|
for (int i= 0; i < depth; i++) {
|
||||||
buffer.append('\t');
|
buffer.append('\t');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2010 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -370,7 +370,7 @@ private void removeElementInfo(ICElement element) {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("Built delta:\n"); //$NON-NLS-1$
|
buffer.append("Built delta:\n"); //$NON-NLS-1$
|
||||||
buffer.append(this.delta.toString());
|
buffer.append(this.delta.toString());
|
||||||
return buffer.toString();
|
return buffer.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
|
||||||
|
@ -169,7 +169,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
Throwable exception = getException();
|
Throwable exception = getException();
|
||||||
if (isMultiStatus()) {
|
if (isMultiStatus()) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
IStatus[] children = getChildren();
|
IStatus[] children = getChildren();
|
||||||
if (children != null && children.length > 0) {
|
if (children != null && children.length > 0) {
|
||||||
for (int i = 0; i < children.length; ++i) {
|
for (int i = 0; i < children.length; ++i) {
|
||||||
|
@ -205,7 +205,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
return CoreModelMessages.getFormattedString("status.invalidDestination", getFirstElementName()); //$NON-NLS-1$
|
return CoreModelMessages.getFormattedString("status.invalidDestination", getFirstElementName()); //$NON-NLS-1$
|
||||||
|
|
||||||
case INVALID_ELEMENT_TYPES:
|
case INVALID_ELEMENT_TYPES:
|
||||||
StringBuffer buff = new StringBuffer(CoreModelMessages.getFormattedString("operation.notSupported")); //$NON-NLS-1$
|
StringBuilder buff = new StringBuilder(CoreModelMessages.getFormattedString("operation.notSupported")); //$NON-NLS-1$
|
||||||
for (int i = 0; i < fElements.length; i++) {
|
for (int i = 0; i < fElements.length; i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
buff.append(", "); //$NON-NLS-1$
|
buff.append(", "); //$NON-NLS-1$
|
||||||
|
@ -243,7 +243,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
return CoreModelMessages.getFormattedString("status.IOException"); //$NON-NLS-1$
|
return CoreModelMessages.getFormattedString("status.IOException"); //$NON-NLS-1$
|
||||||
|
|
||||||
case NAME_COLLISION:
|
case NAME_COLLISION:
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
if (fElements != null && fElements.length > 0) {
|
if (fElements != null && fElements.length > 0) {
|
||||||
ICElement element = fElements[0];
|
ICElement element = fElements[0];
|
||||||
sb.append(element.getElementName()).append(' ');
|
sb.append(element.getElementName()).append(' ');
|
||||||
|
@ -413,7 +413,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
if (this == VERIFIED_OK) {
|
if (this == VERIFIED_OK) {
|
||||||
return "CModelStatus[OK]"; //$NON-NLS-1$
|
return "CModelStatus[OK]"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("C Model Status ["); //$NON-NLS-1$
|
buffer.append("C Model Status ["); //$NON-NLS-1$
|
||||||
buffer.append(getMessage());
|
buffer.append(getMessage());
|
||||||
buffer.append("]"); //$NON-NLS-1$
|
buffer.append("]"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -113,7 +113,7 @@ public class CopyElementsOperation extends MultiOperation {
|
||||||
ISourceReference source = (ISourceReference)element;
|
ISourceReference source = (ISourceReference)element;
|
||||||
ISourceRange range = source.getSourceRange();
|
ISourceRange range = source.getSourceRange();
|
||||||
String contents = source.getSource();
|
String contents = source.getSource();
|
||||||
StringBuffer sb = new StringBuffer(contents);
|
StringBuilder sb = new StringBuilder(contents);
|
||||||
// Copy the extra spaces and newLines like it is part of
|
// Copy the extra spaces and newLines like it is part of
|
||||||
// the element. Note: the DeleteElementAction is doing the same.
|
// the element. Note: the DeleteElementAction is doing the same.
|
||||||
IBuffer buffer = getSourceTranslationUnit(element).getBuffer();
|
IBuffer buffer = getSourceTranslationUnit(element).getBuffer();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -94,7 +94,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(fReturnType).append(' ');
|
sb.append(fReturnType).append(' ');
|
||||||
sb.append(fName);
|
sb.append(fName);
|
||||||
if (fInitializer != null && fInitializer.length() > 0) {
|
if (fInitializer != null && fInitializer.length() > 0) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2008 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
|
||||||
|
@ -117,7 +117,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("#include "); //$NON-NLS-1$;
|
sb.append("#include "); //$NON-NLS-1$;
|
||||||
if (fIsStandard) {
|
if (fIsStandard) {
|
||||||
sb.append('<');
|
sb.append('<');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -94,7 +94,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(fReturnType);
|
sb.append(fReturnType);
|
||||||
sb.append(' ');
|
sb.append(' ');
|
||||||
sb.append(fName);
|
sb.append(fName);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -77,7 +77,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("namespace "); //$NON-NLS-1$;
|
sb.append("namespace "); //$NON-NLS-1$;
|
||||||
sb.append(fNamespace).append(' ').append('{');
|
sb.append(fNamespace).append(' ').append('{');
|
||||||
sb.append(Util.LINE_SEPARATOR);
|
sb.append(Util.LINE_SEPARATOR);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -85,7 +85,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("using "); //$NON-NLS-1$;
|
sb.append("using "); //$NON-NLS-1$;
|
||||||
if (fIsDirective) {
|
if (fIsDirective) {
|
||||||
sb.append("namespace "); //$NON-NLS-1$
|
sb.append("namespace "); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -338,7 +338,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
// Save the exclusions attributes
|
// Save the exclusions attributes
|
||||||
IPath[] exclusionPatterns = entry.getExclusionPatterns();
|
IPath[] exclusionPatterns = entry.getExclusionPatterns();
|
||||||
if (exclusionPatterns.length > 0) {
|
if (exclusionPatterns.length > 0) {
|
||||||
StringBuffer excludeRule = new StringBuffer(10);
|
StringBuilder excludeRule = new StringBuilder(10);
|
||||||
for (int j = 0, max = exclusionPatterns.length; j < max; j++) {
|
for (int j = 0, max = exclusionPatterns.length; j < max; j++) {
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
excludeRule.append('|');
|
excludeRule.append('|');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -67,7 +67,7 @@ public class FunctionTemplate extends Function implements IFunctionTemplate {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
if (isConst()) {
|
if (isConst()) {
|
||||||
sig.append(" const"); //$NON-NLS-1$
|
sig.append(" const"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2011 QnX Software Systems and others.
|
* Copyright (c) 2005, 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
|
||||||
|
@ -36,7 +36,7 @@ public class FunctionTemplateDeclaration extends FunctionDeclaration implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
if(isConst())
|
if(isConst())
|
||||||
sig.append(" const"); //$NON-NLS-1$
|
sig.append(" const"); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -132,7 +132,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (isSystemInclude) {
|
if (isSystemInclude) {
|
||||||
sb.append(" isSystemInclude:").append(isSystemInclude); //$NON-NLS-1$
|
sb.append(" isSystemInclude:").append(isSystemInclude); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -119,7 +119,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (includeFilePath != null && !includeFilePath.isEmpty()) {
|
if (includeFilePath != null && !includeFilePath.isEmpty()) {
|
||||||
sb.append(" includeFilePath:").append(includeFilePath); //$NON-NLS-1$
|
sb.append(" includeFilePath:").append(includeFilePath); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -192,7 +192,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (libraryPath != null && !libraryPath.isEmpty()) {
|
if (libraryPath != null && !libraryPath.isEmpty()) {
|
||||||
sb.append(" librarypath:").append(libraryPath.toString()); //$NON-NLS-1$
|
sb.append(" librarypath:").append(libraryPath.toString()); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -92,7 +92,7 @@ public class MacroEntry extends APathEntry implements IMacroEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (macroName != null && macroName.length() > 0) {
|
if (macroName != null && macroName.length() > 0) {
|
||||||
sb.append(" name:").append(macroName); //$NON-NLS-1$
|
sb.append(" name:").append(macroName); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -121,7 +121,7 @@ public class MacroFileEntry extends APathEntry implements IMacroFileEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(super.toString());
|
sb.append(super.toString());
|
||||||
if (macroFilePath != null && !macroFilePath.isEmpty()) {
|
if (macroFilePath != null && !macroFilePath.isEmpty()) {
|
||||||
sb.append(" macroFilePath:").append(macroFilePath); //$NON-NLS-1$
|
sb.append(" macroFilePath:").append(macroFilePath); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2013 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -63,7 +63,7 @@ public class MethodTemplate extends Method implements IMethodTemplate {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
if (isConst())
|
if (isConst())
|
||||||
sig.append(" const"); //$NON-NLS-1$
|
sig.append(" const"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2011 QnX Software Systems and others.
|
* Copyright (c) 2005, 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
|
||||||
|
@ -36,7 +36,7 @@ public class MethodTemplateDeclaration extends MethodDeclaration implements IMet
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuilder sig = new StringBuilder(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
if(isConst())
|
if(isConst())
|
||||||
sig.append(" const"); //$NON-NLS-1$
|
sig.append(" const"); //$NON-NLS-1$
|
||||||
|
|
|
@ -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
|
||||||
|
@ -146,7 +146,7 @@ public class PathEntry implements IPathEntry {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (path != null && !path.isEmpty()) {
|
if (path != null && !path.isEmpty()) {
|
||||||
buffer.append(path.toString()).append(' ');
|
buffer.append(path.toString()).append(' ');
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ public class PathEntryUtil {
|
||||||
if (dups.size() > 0) {
|
if (dups.size() > 0) {
|
||||||
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
|
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
|
||||||
for (int i = 0; i < dups.size(); ++i) {
|
for (int i = 0; i < dups.size(); ++i) {
|
||||||
StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
|
StringBuilder errMesg = new StringBuilder(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
|
||||||
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
||||||
}
|
}
|
||||||
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
|
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
|
||||||
|
@ -365,7 +365,7 @@ public class PathEntryUtil {
|
||||||
if (dups.size() > 0) {
|
if (dups.size() > 0) {
|
||||||
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
|
ICModelStatus[] cmodelStatus = new ICModelStatus[dups.size()];
|
||||||
for (int i = 0; i < dups.size(); ++i) {
|
for (int i = 0; i < dups.size(); ++i) {
|
||||||
StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
|
StringBuilder errMesg = new StringBuilder(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
|
||||||
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.NAME_COLLISION, errMesg.toString());
|
cmodelStatus[i] = new CModelStatus(ICModelStatusConstants.NAME_COLLISION, errMesg.toString());
|
||||||
}
|
}
|
||||||
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
|
return CModelStatus.newMultiStatus(ICModelStatusConstants.INVALID_PATHENTRY, cmodelStatus);
|
||||||
|
@ -392,15 +392,15 @@ public class PathEntryUtil {
|
||||||
&& !CoreModelUtil.isExcluded(entryPath.append("*"), exclusionPatterns)) { //$NON-NLS-1$
|
&& !CoreModelUtil.isExcluded(entryPath.append("*"), exclusionPatterns)) { //$NON-NLS-1$
|
||||||
|
|
||||||
if (CoreModelUtil.isExcluded(entryPath, exclusionPatterns)) {
|
if (CoreModelUtil.isExcluded(entryPath, exclusionPatterns)) {
|
||||||
StringBuffer errMesg = new StringBuffer(
|
StringBuilder errMesg = new StringBuilder(
|
||||||
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
||||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
||||||
} else if (otherKind == IPathEntry.CDT_SOURCE) {
|
} else if (otherKind == IPathEntry.CDT_SOURCE) {
|
||||||
StringBuffer errMesg = new StringBuffer(
|
StringBuilder errMesg = new StringBuilder(
|
||||||
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
||||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
||||||
} else {
|
} else {
|
||||||
StringBuffer errMesg = new StringBuffer(
|
StringBuilder errMesg = new StringBuilder(
|
||||||
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
CCorePlugin.getResourceString("CoreModel.PathEntry.NestedEntry")); //$NON-NLS-1$
|
||||||
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2011 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
|
||||||
|
@ -151,7 +151,7 @@ public class Region implements IRegion {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
ICElement[] roots = getElements();
|
ICElement[] roots = getElements();
|
||||||
buffer.append('[');
|
buffer.append('[');
|
||||||
for (int i = 0; i < roots.length; i++) {
|
for (int i = 0; i < roots.length; i++) {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -105,7 +105,7 @@ class SourceManipulationInfo extends CElementInfo {
|
||||||
// try {
|
// try {
|
||||||
// IResource res = tu.getResource();
|
// IResource res = tu.getResource();
|
||||||
// if (res != null && res instanceof IFile) {
|
// if (res != null && res instanceof IFile) {
|
||||||
// StringBuffer buffer = Util.getContent((IFile)res);
|
// StringBuilder buffer = Util.getContent((IFile)res);
|
||||||
// return buffer.substring(getElement().getStartPos(),
|
// return buffer.substring(getElement().getStartPos(),
|
||||||
// getElement().getStartPos() + getElement().getLength());
|
// getElement().getStartPos() + getElement().getLength());
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -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
|
||||||
|
@ -87,7 +87,7 @@ class SourceRange implements ISourceRange {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("[offset="); //$NON-NLS-1$
|
buffer.append("[offset="); //$NON-NLS-1$
|
||||||
buffer.append(this.startPos);
|
buffer.append(this.startPos);
|
||||||
buffer.append(", length="); //$NON-NLS-1$
|
buffer.append(", length="); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2011 QnX Software Systems and others.
|
* Copyright (c) 2005, 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 Template implements ITemplate {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() {
|
public String getTemplateSignature() {
|
||||||
StringBuffer sig = new StringBuffer(fName);
|
StringBuilder sig = new StringBuilder(fName);
|
||||||
if(getNumberOfTemplateParameters() > 0){
|
if(getNumberOfTemplateParameters() > 0){
|
||||||
sig.append("<"); //$NON-NLS-1$
|
sig.append("<"); //$NON-NLS-1$
|
||||||
String[] paramTypes = getTemplateParameterTypes();
|
String[] paramTypes = getTemplateParameterTypes();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2011 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -56,7 +56,7 @@ public class VariableTemplate extends Variable implements ITemplate {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(getElementName());
|
StringBuilder sig = new StringBuilder(getElementName());
|
||||||
if(getNumberOfTemplateParameters() > 0){
|
if(getNumberOfTemplateParameters() > 0){
|
||||||
sig.append("<"); //$NON-NLS-1$
|
sig.append("<"); //$NON-NLS-1$
|
||||||
String[] paramTypes = getTemplateParameterTypes();
|
String[] paramTypes = getTemplateParameterTypes();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2009 IBM Corporation and others.
|
* Copyright (c) 2002, 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
|
||||||
|
@ -435,7 +435,7 @@ public class LRUCache<K, T> implements Cloneable {
|
||||||
* is for debugging purposes only.
|
* is for debugging purposes only.
|
||||||
*/
|
*/
|
||||||
protected String toStringContents() {
|
protected String toStringContents() {
|
||||||
StringBuffer result = new StringBuffer();
|
StringBuilder result = new StringBuilder();
|
||||||
int length = fEntryTable.size();
|
int length = fEntryTable.size();
|
||||||
Object[] unsortedKeys = new Object[length];
|
Object[] unsortedKeys = new Object[length];
|
||||||
String[] unsortedToStrings = new String[length];
|
String[] unsortedToStrings = new String[length];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
|
* Copyright (c) 2007, 2016 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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
|
||||||
|
@ -201,7 +201,7 @@ public abstract class AbstractScannerExtensionConfiguration implements IScannerE
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments) {
|
protected static IMacro createFunctionStyleMacro(String name, String value, String[] arguments) {
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
buf.append(name);
|
buf.append(name);
|
||||||
buf.append('(');
|
buf.append('(');
|
||||||
for (int i = 0; i < arguments.length; i++) {
|
for (int i = 0; i < arguments.length; i++) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2011 Tomasz Wesolowski and others
|
* Copyright (c) 2011, 2016 Tomasz Wesolowski 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
|
||||||
|
@ -50,7 +50,7 @@ public class SegmentMatcher {
|
||||||
singleSegment = true;
|
singleSegment = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
StringBuffer regexpBuffer = new StringBuffer("^"); //$NON-NLS-1$
|
StringBuilder regexpBuffer = new StringBuilder("^"); //$NON-NLS-1$
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int lengthOfFirstSegment = 0;
|
int lengthOfFirstSegment = 0;
|
||||||
char currentChar;
|
char currentChar;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2015 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
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2013 Symbian Software Systems and others.
|
* Copyright (c) 2007, 2016 Symbian 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
|
||||||
|
@ -42,7 +42,7 @@ public class CompositeCPPFunctionSpecialization extends CompositeCPPFunction imp
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer result = new StringBuffer();
|
StringBuilder result = new StringBuilder();
|
||||||
result.append(getName()+" "+ASTTypeUtil.getParameterTypeString(getType())); //$NON-NLS-1$
|
result.append(getName()+" "+ASTTypeUtil.getParameterTypeString(getType())); //$NON-NLS-1$
|
||||||
return result.toString();
|
return result.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2014 Wind River Systems, Inc. and others.
|
* Copyright (c) 2007, 2016 Wind River Systems, Inc. and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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 MacroDefinitionParser {
|
||||||
} catch (OffsetLimitReachedException e) {
|
} catch (OffsetLimitReachedException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
Token t= tl.first();
|
Token t= tl.first();
|
||||||
if (t == null) {
|
if (t == null) {
|
||||||
return CharArrayUtils.EMPTY;
|
return CharArrayUtils.EMPTY;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2009 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
|
||||||
|
@ -21,7 +21,7 @@ public class TraceUtil {
|
||||||
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
|
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
|
||||||
String first, String second, String third) {
|
String first, String second, String third) {
|
||||||
if (log.isTracing()) {
|
if (log.isTracing()) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (preface != null) buffer.append(preface);
|
if (preface != null) buffer.append(preface);
|
||||||
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
||||||
if (first != null) buffer.append(first);
|
if (first != null) buffer.append(first);
|
||||||
|
@ -33,7 +33,7 @@ public class TraceUtil {
|
||||||
|
|
||||||
public static void outputTrace(IParserLogService log, String preface, IProblem problem) {
|
public static void outputTrace(IParserLogService log, String preface, IProblem problem) {
|
||||||
if (log.isTracing()) {
|
if (log.isTracing()) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (preface != null) buffer.append(preface);
|
if (preface != null) buffer.append(preface);
|
||||||
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
||||||
log.traceLog(buffer.toString());
|
log.traceLog(buffer.toString());
|
||||||
|
@ -43,7 +43,7 @@ public class TraceUtil {
|
||||||
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
|
public static void outputTrace(IParserLogService log, String preface, IProblem problem,
|
||||||
char[] first, String second, String third) {
|
char[] first, String second, String third) {
|
||||||
if (log.isTracing()) {
|
if (log.isTracing()) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (preface != null) buffer.append(preface);
|
if (preface != null) buffer.append(preface);
|
||||||
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
if (problem != null) buffer.append(problem.getMessageWithLocation());
|
||||||
if (first != null) buffer.append(first);
|
if (first != null) buffer.append(first);
|
||||||
|
@ -73,7 +73,7 @@ public class TraceUtil {
|
||||||
|
|
||||||
public static void outputTrace(IParserLogService logService, String preface, String data) {
|
public static void outputTrace(IParserLogService logService, String preface, String data) {
|
||||||
if (logService.isTracing()) {
|
if (logService.isTracing()) {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (preface != null) buffer.append(preface);
|
if (preface != null) buffer.append(preface);
|
||||||
if (data != null) buffer.append(data);
|
if (data != null) buffer.append(data);
|
||||||
logService.traceLog(buffer.toString());
|
logService.traceLog(buffer.toString());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 QNX Software Systems and others.
|
* Copyright (c) 2000, 2016 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* 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 CDescriptorEvent extends EventObject {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
switch (getType()) {
|
switch (getType()) {
|
||||||
case CDTPROJECT_ADDED :
|
case CDTPROJECT_ADDED :
|
||||||
buf.append("CDTPROJECT_ADDED"); //$NON-NLS-1$
|
buf.append("CDTPROJECT_ADDED"); //$NON-NLS-1$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2013 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
|
||||||
|
@ -294,7 +294,7 @@ public class CommandLauncher implements ICommandLauncher {
|
||||||
|
|
||||||
@SuppressWarnings("nls")
|
@SuppressWarnings("nls")
|
||||||
private String getCommandLineQuoted(String[] commandArgs, boolean quote) {
|
private String getCommandLineQuoted(String[] commandArgs, boolean quote) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
if (commandArgs != null) {
|
if (commandArgs != null) {
|
||||||
for (String commandArg : commandArgs) {
|
for (String commandArg : commandArgs) {
|
||||||
if (quote && (commandArg.contains(" ") || commandArg.contains("\"") || commandArg.contains("\\"))) {
|
if (quote && (commandArg.contains(" ") || commandArg.contains("\"") || commandArg.contains("\\"))) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2010, 2012 IBM Corporation and others.
|
* Copyright (c) 2010, 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
|
||||||
|
@ -99,7 +99,7 @@ public abstract class EFSExtensionProvider {
|
||||||
Path p = new Path(path);
|
Path p = new Path(path);
|
||||||
String pathString = p.toString(); // to convert any backslashes to slashes if we are on Windows
|
String pathString = p.toString(); // to convert any backslashes to slashes if we are on Windows
|
||||||
final int length = pathString.length();
|
final int length = pathString.length();
|
||||||
StringBuffer pathBuf = new StringBuffer(length + 1);
|
StringBuilder pathBuf = new StringBuilder(length + 1);
|
||||||
|
|
||||||
// force the path to be absolute including Windows where URI path is represented as "/C:/path"
|
// force the path to be absolute including Windows where URI path is represented as "/C:/path"
|
||||||
if (length > 0 && (pathString.charAt(0) != '/')) {
|
if (length > 0 && (pathString.charAt(0) != '/')) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
* Copyright (c) 2006, 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
|
||||||
|
@ -276,7 +276,7 @@ public final class IndentManipulation {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer buf= new StringBuffer();
|
StringBuilder buf= new StringBuilder();
|
||||||
|
|
||||||
for (int i= 0; i < nLines; i++) {
|
for (int i= 0; i < nLines; i++) {
|
||||||
IRegion region= tracker.getLineInformation(i);
|
IRegion region= tracker.getLineInformation(i);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2009 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
|
||||||
|
@ -77,7 +77,7 @@ public class PathEntryVariableChangeEvent extends EventObject {
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String[] typeStrings = {"VARIABLE_CHANGED", "VARIABLE_CREATED", "VARIABLE_DELETED"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
String[] typeStrings = {"VARIABLE_CHANGED", "VARIABLE_CREATED", "VARIABLE_DELETED"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
StringBuffer sb = new StringBuffer(getClass().getName());
|
StringBuilder sb = new StringBuilder(getClass().getName());
|
||||||
sb.append("[variable = "); //$NON-NLS-1$
|
sb.append("[variable = "); //$NON-NLS-1$
|
||||||
sb.append(variableName);
|
sb.append(variableName);
|
||||||
sb.append(", type = "); //$NON-NLS-1$
|
sb.append(", type = "); //$NON-NLS-1$
|
||||||
|
|
|
@ -485,7 +485,7 @@ public class BuildRunnerHelper implements Closeable {
|
||||||
* Compose command line that presumably will be run by launcher.
|
* Compose command line that presumably will be run by launcher.
|
||||||
*/
|
*/
|
||||||
private static String guessCommandLine(String command, String[] args) {
|
private static String guessCommandLine(String command, String[] args) {
|
||||||
StringBuffer buf = new StringBuffer(command + ' ');
|
StringBuilder buf = new StringBuilder(command + ' ');
|
||||||
if (args != null) {
|
if (args != null) {
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
buf.append(arg);
|
buf.append(arg);
|
||||||
|
|
|
@ -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
|
||||||
|
@ -27,7 +27,7 @@ public class ConsoleOutputSniffer {
|
||||||
*/
|
*/
|
||||||
private class ConsoleOutputStream extends OutputStream {
|
private class ConsoleOutputStream extends OutputStream {
|
||||||
// Stream's private buffer for the stream's read contents.
|
// Stream's private buffer for the stream's read contents.
|
||||||
private StringBuffer currentLine = new StringBuffer();
|
private StringBuilder currentLine = new StringBuilder();
|
||||||
private OutputStream outputStream = null;
|
private OutputStream outputStream = null;
|
||||||
|
|
||||||
public ConsoleOutputStream(OutputStream outputStream) {
|
public ConsoleOutputStream(OutputStream outputStream) {
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class CCodeFormatter extends CodeFormatter {
|
||||||
if (tabs == 0 && spaces == 0) {
|
if (tabs == 0 && spaces == 0) {
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
}
|
}
|
||||||
StringBuffer buffer= new StringBuffer(tabs + spaces);
|
StringBuilder buffer= new StringBuilder(tabs + spaces);
|
||||||
for (int i= 0; i < tabs; i++) {
|
for (int i= 0; i < tabs; i++) {
|
||||||
buffer.append('\t');
|
buffer.append('\t');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2008 Symbian Software Limited and others.
|
* Copyright (c) 2007, 2016 Symbian Software Limited 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
|
||||||
|
@ -373,7 +373,7 @@ public class ProcessArgument {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer b = new StringBuffer(name);
|
StringBuilder b = new StringBuilder(name);
|
||||||
b.append(":"); //$NON-NLS-1$
|
b.append(":"); //$NON-NLS-1$
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ProcessParameter.SIMPLE:
|
case ProcessParameter.SIMPLE:
|
||||||
|
|
|
@ -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
|
||||||
|
@ -208,7 +208,7 @@ public class WeakHashSet<T> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer("{"); //$NON-NLS-1$
|
StringBuilder buffer = new StringBuilder("{"); //$NON-NLS-1$
|
||||||
for (int i = 0, length = this.values.length; i < length; i++) {
|
for (int i = 0, length = this.values.length; i < length; i++) {
|
||||||
HashableWeakReference<T> value = this.values[i];
|
HashableWeakReference<T> value = this.values[i];
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -104,7 +104,7 @@ public class AR {
|
||||||
* <code>offset</code> not in string table bounds.
|
* <code>offset</code> not in string table bounds.
|
||||||
*/
|
*/
|
||||||
private String nameFromStringTable(long offset) throws IOException {
|
private String nameFromStringTable(long offset) throws IOException {
|
||||||
StringBuffer name = new StringBuffer(0);
|
StringBuilder name = new StringBuilder(0);
|
||||||
long pos = efile.getFilePointer();
|
long pos = efile.getFilePointer();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2012 Intel Corporation and others.
|
* Copyright (c) 2004, 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
|
||||||
|
@ -151,7 +151,7 @@ public class Addr32 implements IAddress, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public String toHexAddressString() {
|
public String toHexAddressString() {
|
||||||
String addressString = Long.toString(address, 16);
|
String addressString = Long.toString(address, 16);
|
||||||
StringBuffer sb = new StringBuffer(CHARS_NUM);
|
StringBuilder sb = new StringBuilder(CHARS_NUM);
|
||||||
int count = DIGITS_NUM - addressString.length();
|
int count = DIGITS_NUM - addressString.length();
|
||||||
sb.append("0x"); //$NON-NLS-1$
|
sb.append("0x"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
@ -166,7 +166,7 @@ public class Addr32 implements IAddress, Serializable {
|
||||||
*/
|
*/
|
||||||
public String toOctalAddressString() {
|
public String toOctalAddressString() {
|
||||||
String addressString = Long.toString(address, 8);
|
String addressString = Long.toString(address, 8);
|
||||||
StringBuffer sb = new StringBuffer(OCTAL_CHARS_NUM);
|
StringBuilder sb = new StringBuilder(OCTAL_CHARS_NUM);
|
||||||
int count = OCTAL_DIGITS_NUM - addressString.length();
|
int count = OCTAL_DIGITS_NUM - addressString.length();
|
||||||
sb.append("0"); //$NON-NLS-1$
|
sb.append("0"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
@ -179,7 +179,7 @@ public class Addr32 implements IAddress, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public String toBinaryAddressString() {
|
public String toBinaryAddressString() {
|
||||||
String addressString = Long.toString(address, 2);
|
String addressString = Long.toString(address, 2);
|
||||||
StringBuffer sb = new StringBuffer(BINARY_CHARS_NUM);
|
StringBuilder sb = new StringBuilder(BINARY_CHARS_NUM);
|
||||||
int count = BINARY_DIGITS_NUM - addressString.length();
|
int count = BINARY_DIGITS_NUM - addressString.length();
|
||||||
sb.append("0b"); //$NON-NLS-1$
|
sb.append("0b"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2015 Intel Corporation and others.
|
* Copyright (c) 2004, 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
|
||||||
|
@ -169,7 +169,7 @@ public class Addr64 implements IAddress, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public String toHexAddressString() {
|
public String toHexAddressString() {
|
||||||
String addressString = address.toString(16);
|
String addressString = address.toString(16);
|
||||||
StringBuffer sb = new StringBuffer(CHARS_NUM);
|
StringBuilder sb = new StringBuilder(CHARS_NUM);
|
||||||
int count = DIGITS_NUM - addressString.length();
|
int count = DIGITS_NUM - addressString.length();
|
||||||
sb.append("0x"); //$NON-NLS-1$
|
sb.append("0x"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
@ -184,7 +184,7 @@ public class Addr64 implements IAddress, Serializable {
|
||||||
*/
|
*/
|
||||||
public String toOctalAddressString() {
|
public String toOctalAddressString() {
|
||||||
String addressString = address.toString(8);
|
String addressString = address.toString(8);
|
||||||
StringBuffer sb = new StringBuffer(OCTAL_CHARS_NUM);
|
StringBuilder sb = new StringBuilder(OCTAL_CHARS_NUM);
|
||||||
int count = OCTAL_DIGITS_NUM - addressString.length();
|
int count = OCTAL_DIGITS_NUM - addressString.length();
|
||||||
sb.append("0"); //$NON-NLS-1$
|
sb.append("0"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
@ -197,7 +197,7 @@ public class Addr64 implements IAddress, Serializable {
|
||||||
@Override
|
@Override
|
||||||
public String toBinaryAddressString() {
|
public String toBinaryAddressString() {
|
||||||
String addressString = address.toString(2);
|
String addressString = address.toString(2);
|
||||||
StringBuffer sb = new StringBuffer(BINARY_CHARS_NUM);
|
StringBuilder sb = new StringBuilder(BINARY_CHARS_NUM);
|
||||||
int count = BINARY_DIGITS_NUM - addressString.length();
|
int count = BINARY_DIGITS_NUM - addressString.length();
|
||||||
sb.append("0b"); //$NON-NLS-1$
|
sb.append("0b"); //$NON-NLS-1$
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
|
|
|
@ -116,7 +116,7 @@ public class CygPath {
|
||||||
}
|
}
|
||||||
if (ipath.isAbsolute() && !ipath.toFile().exists() && ipath.segment(0).length() == 1) {
|
if (ipath.isAbsolute() && !ipath.toFile().exists() && ipath.segment(0).length() == 1) {
|
||||||
// look like it could be /c/... path
|
// look like it could be /c/... path
|
||||||
StringBuffer drive = new StringBuffer(ipath.segment(0));
|
StringBuilder drive = new StringBuilder(ipath.segment(0));
|
||||||
drive.append(':');
|
drive.append(':');
|
||||||
ipath = ipath.removeFirstSegments(1);
|
ipath = ipath.removeFirstSegments(1);
|
||||||
ipath = ipath.makeAbsolute();
|
ipath = ipath.makeAbsolute();
|
||||||
|
|
|
@ -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
|
||||||
|
@ -78,7 +78,7 @@ public class Objdump {
|
||||||
public byte[] getOutput(int limitBytes) throws IOException {
|
public byte[] getOutput(int limitBytes) throws IOException {
|
||||||
Process objdump = ProcessFactory.getFactory().exec(args);
|
Process objdump = ProcessFactory.getFactory().exec(args);
|
||||||
try {
|
try {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
BufferedReader stdout = new BufferedReader(new InputStreamReader(
|
BufferedReader stdout = new BufferedReader(new InputStreamReader(
|
||||||
objdump.getInputStream()));
|
objdump.getInputStream()));
|
||||||
char[] buf = new char[4096];
|
char[] buf = new char[4096];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2005, 2013 Intel Corporation and others.
|
* Copyright (c) 2005, 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
|
||||||
|
@ -84,7 +84,7 @@ public class CdtVariableResolver {
|
||||||
if(value == null || value.length == 0)
|
if(value == null || value.length == 0)
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
for(int i = 0; i < value.length; i++){
|
for(int i = 0; i < value.length; i++){
|
||||||
buffer.append(value[i]);
|
buffer.append(value[i]);
|
||||||
if(listDelimiter != null && !EMPTY_STRING.equals(listDelimiter) && i < value.length -1 )
|
if(listDelimiter != null && !EMPTY_STRING.equals(listDelimiter) && i < value.length -1 )
|
||||||
|
@ -113,7 +113,7 @@ public class CdtVariableResolver {
|
||||||
|
|
||||||
final Pattern pattern = Pattern.compile(".*?("+RE_BSLASH+"*)("+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+").*"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
final Pattern pattern = Pattern.compile(".*?("+RE_BSLASH+"*)("+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+").*"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer(string);
|
StringBuilder buffer = new StringBuilder(string);
|
||||||
int limit=string.length();
|
int limit=string.length();
|
||||||
for (Matcher matcher = pattern.matcher(buffer);matcher.matches();matcher = pattern.matcher(buffer)) {
|
for (Matcher matcher = pattern.matcher(buffer);matcher.matches();matcher = pattern.matcher(buffer)) {
|
||||||
String bSlashes=matcher.group(1);
|
String bSlashes=matcher.group(1);
|
||||||
|
@ -223,7 +223,7 @@ public class CdtVariableResolver {
|
||||||
static public String[] resolveToStringList(String string, IVariableSubstitutor substitutor)
|
static public String[] resolveToStringList(String string, IVariableSubstitutor substitutor)
|
||||||
throws CdtVariableException{
|
throws CdtVariableException{
|
||||||
|
|
||||||
StringBuffer buffer = new StringBuffer(string);
|
StringBuilder buffer = new StringBuilder(string);
|
||||||
final Pattern pattern = Pattern.compile("^"+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+"$"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
final Pattern pattern = Pattern.compile("^"+RE_VPREFIX+"("+RE_VNAME+")"+RE_VSUFFIX+"$"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
Matcher matcher = pattern.matcher(buffer);
|
Matcher matcher = pattern.matcher(buffer);
|
||||||
if (matcher.matches()) {
|
if (matcher.matches()) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007, 2015 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
|
||||||
|
@ -105,7 +105,7 @@ public class SupplierBasedCdtVariableSubstitutor implements IVariableSubstitutor
|
||||||
else if(values.length == 1)
|
else if(values.length == 1)
|
||||||
result = values[0];
|
result = values[0];
|
||||||
else if((delimiter = getDelimiter()) != null){
|
else if((delimiter = getDelimiter()) != null){
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
for(int i = 0; i < values.length; i++){
|
for(int i = 0; i < values.length; i++){
|
||||||
buffer.append(values[i]);
|
buffer.append(values[i]);
|
||||||
if(i < values.length-1)
|
if(i < values.length-1)
|
||||||
|
|
|
@ -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
|
||||||
|
@ -101,7 +101,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("FILE HEADER VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("FILE HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||||
|
|
||||||
buffer.append("f_magic = ").append(f_magic).append(NL); //$NON-NLS-1$
|
buffer.append("f_magic = ").append(f_magic).append(NL); //$NON-NLS-1$
|
||||||
|
@ -152,7 +152,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append("magic = ").append(magic).append(NL); //$NON-NLS-1$
|
buffer.append("magic = ").append(magic).append(NL); //$NON-NLS-1$
|
||||||
buffer.append("vstamp = ").append(vstamp).append(NL); //$NON-NLS-1$
|
buffer.append("vstamp = ").append(vstamp).append(NL); //$NON-NLS-1$
|
||||||
|
@ -281,7 +281,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("SECTION HEADER VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("SECTION HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append(new String(s_name)).append(NL);
|
buffer.append(new String(s_name)).append(NL);
|
||||||
buffer.append("s_paddr = ").append(s_paddr).append(NL); //$NON-NLS-1$
|
buffer.append("s_paddr = ").append(s_paddr).append(NL); //$NON-NLS-1$
|
||||||
|
@ -343,7 +343,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("RELOC VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("RELOC VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append("r_vaddr = ").append(r_vaddr); //$NON-NLS-1$
|
buffer.append("r_vaddr = ").append(r_vaddr); //$NON-NLS-1$
|
||||||
buffer.append(" r_symndx = ").append(r_symndx).append(NL); //$NON-NLS-1$
|
buffer.append(" r_symndx = ").append(r_symndx).append(NL); //$NON-NLS-1$
|
||||||
|
@ -372,7 +372,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (l_lnno == 0) {
|
if (l_lnno == 0) {
|
||||||
buffer.append("Function address = ").append(l_addr).append(NL); //$NON-NLS-1$
|
buffer.append("Function address = ").append(l_addr).append(NL); //$NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
|
@ -648,7 +648,7 @@ public class Coff {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
FileHeader header = null;
|
FileHeader header = null;
|
||||||
header = getFileHeader();
|
header = getFileHeader();
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class Exe {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
buffer.append("EXE HEADER VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("EXE HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append("signature "); //$NON-NLS-1$
|
buffer.append("signature "); //$NON-NLS-1$
|
||||||
|
@ -156,7 +156,7 @@ public class Exe {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append(rfile).append(NL);
|
buffer.append(rfile).append(NL);
|
||||||
buffer.append(ehdr);
|
buffer.append(ehdr);
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class PE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("DOS STUB VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("DOS STUB VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append("e_lfanew = ").append(e_lfanew).append(NL); //$NON-NLS-1$
|
buffer.append("e_lfanew = ").append(e_lfanew).append(NL); //$NON-NLS-1$
|
||||||
buffer.append(new String(dos_message)).append(NL);
|
buffer.append(new String(dos_message)).append(NL);
|
||||||
|
@ -268,7 +268,7 @@ public class PE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("NT OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
|
buffer.append("NT OPTIONAL HEADER VALUES").append(NL); //$NON-NLS-1$
|
||||||
buffer.append("ImageBase = ").append(ImageBase).append(NL); //$NON-NLS-1$
|
buffer.append("ImageBase = ").append(ImageBase).append(NL); //$NON-NLS-1$
|
||||||
buffer.append("SexctionAlignement = ").append(SectionAlignment).append(NL); //$NON-NLS-1$
|
buffer.append("SexctionAlignement = ").append(SectionAlignment).append(NL); //$NON-NLS-1$
|
||||||
|
@ -306,7 +306,7 @@ public class PE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("rva = ").append(rva).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
|
buffer.append("rva = ").append(rva).append(" "); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
buffer.append("size = ").append(size).append(NL); //$NON-NLS-1$
|
buffer.append("size = ").append(size).append(NL); //$NON-NLS-1$
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
|
@ -339,7 +339,7 @@ public class PE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
buffer.append("rva = ").append(rva); //$NON-NLS-1$
|
buffer.append("rva = ").append(rva); //$NON-NLS-1$
|
||||||
buffer.append(" timestamp = ").append(timestamp); //$NON-NLS-1$
|
buffer.append(" timestamp = ").append(timestamp); //$NON-NLS-1$
|
||||||
buffer.append(" forwarder = ").append(forwarder); //$NON-NLS-1$
|
buffer.append(" forwarder = ").append(forwarder); //$NON-NLS-1$
|
||||||
|
@ -699,7 +699,7 @@ public class PE {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
if (exeHeader != null) {
|
if (exeHeader != null) {
|
||||||
buffer.append(exeHeader);
|
buffer.append(exeHeader);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -93,7 +93,7 @@ public class PEArchive {
|
||||||
* <code>offset</code> not in string table bounds.
|
* <code>offset</code> not in string table bounds.
|
||||||
*/
|
*/
|
||||||
private String nameFromStringTable(long offset) throws IOException {
|
private String nameFromStringTable(long offset) throws IOException {
|
||||||
StringBuffer name = new StringBuffer(0);
|
StringBuilder name = new StringBuilder(0);
|
||||||
long pos = rfile.getFilePointer();
|
long pos = rfile.getFilePointer();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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 DebugType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
if (this instanceof DebugArrayType) {
|
if (this instanceof DebugArrayType) {
|
||||||
DebugArrayType arrayType = (DebugArrayType)this;
|
DebugArrayType arrayType = (DebugArrayType)this;
|
||||||
int size = arrayType.getSize();
|
int size = arrayType.getSize();
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class Dwarf {
|
||||||
byte offsetSize;
|
byte offsetSize;
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("Length: " + length).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
sb.append("Length: " + length).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
sb.append("Version: " + version).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
sb.append("Version: " + version).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
sb.append("Abbreviation: " + abbreviationOffset).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
sb.append("Abbreviation: " + abbreviationOffset).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
@ -125,7 +125,7 @@ public class Dwarf {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("name: " + Long.toHexString(name)); //$NON-NLS-1$
|
sb.append("name: " + Long.toHexString(name)); //$NON-NLS-1$
|
||||||
sb.append(" value: " + Long.toHexString(form)); //$NON-NLS-1$
|
sb.append(" value: " + Long.toHexString(form)); //$NON-NLS-1$
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
@ -141,7 +141,7 @@ public class Dwarf {
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(attribute.toString()).append(' ');
|
sb.append(attribute.toString()).append(' ');
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
Class<? extends Object> clazz = value.getClass();
|
Class<? extends Object> clazz = value.getClass();
|
||||||
|
@ -670,7 +670,7 @@ public class Dwarf {
|
||||||
case DwarfConstants.DW_FORM_string :
|
case DwarfConstants.DW_FORM_string :
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = in.get()) != -1) {
|
while ((c = in.get()) != -1) {
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -699,7 +699,7 @@ public class Dwarf {
|
||||||
} else if (offset < 0 || offset > data.capacity()) {
|
} else if (offset < 0 || offset > data.capacity()) {
|
||||||
obj = ""; // $NON-NLS-1$
|
obj = ""; // $NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
data.position((int) offset);
|
data.position((int) offset);
|
||||||
while (data.hasRemaining()) {
|
while (data.hasRemaining()) {
|
||||||
byte c = data.get();
|
byte c = data.get();
|
||||||
|
@ -727,7 +727,7 @@ public class Dwarf {
|
||||||
} else if (offset < 0 || offset > data.capacity()) {
|
} else if (offset < 0 || offset > data.capacity()) {
|
||||||
obj = ""; // $NON-NLS-1$
|
obj = ""; // $NON-NLS-1$
|
||||||
} else {
|
} else {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
data.position((int) offset);
|
data.position((int) offset);
|
||||||
while (data.hasRemaining()) {
|
while (data.hasRemaining()) {
|
||||||
byte c = data.get();
|
byte c = data.get();
|
||||||
|
@ -914,7 +914,7 @@ public class Dwarf {
|
||||||
{
|
{
|
||||||
String str;
|
String str;
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while (data.hasRemaining()) {
|
while (data.hasRemaining()) {
|
||||||
byte c = data.get();
|
byte c = data.get();
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
|
||||||
String debugName = ""; //$NON-NLS-1$
|
String debugName = ""; //$NON-NLS-1$
|
||||||
if (data.hasRemaining()) {
|
if (data.hasRemaining()) {
|
||||||
int c;
|
int c;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = data.get()) != -1) {
|
while ((c = data.get()) != -1) {
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -1049,7 +1049,7 @@ public class DwarfReader extends Dwarf implements ISymbolReader, ICompileOptions
|
||||||
if (macros == null)
|
if (macros == null)
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (String option: macros) {
|
for (String option: macros) {
|
||||||
sb.append(option);
|
sb.append(option);
|
||||||
sb.append(" "); //$NON-NLS-1$
|
sb.append(" "); //$NON-NLS-1$
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class Stabs {
|
||||||
}
|
}
|
||||||
|
|
||||||
String makeString(long offset) {
|
String makeString(long offset) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for (; offset < stabstrData.length; offset++) {
|
for (; offset < stabstrData.length; offset++) {
|
||||||
byte b = stabstrData[(int) offset];
|
byte b = stabstrData[(int) offset];
|
||||||
if (b == 0) {
|
if (b == 0) {
|
||||||
|
@ -754,7 +754,7 @@ public class Stabs {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
DebugType parseStabCrossRefType(String name, Reader reader) throws IOException {
|
DebugType parseStabCrossRefType(String name, Reader reader) throws IOException {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
int c = reader.read();
|
int c = reader.read();
|
||||||
if (c == 's') {
|
if (c == 's') {
|
||||||
sb.append("struct "); //$NON-NLS-1$
|
sb.append("struct "); //$NON-NLS-1$
|
||||||
|
@ -794,7 +794,7 @@ public class Stabs {
|
||||||
reader.reset();
|
reader.reset();
|
||||||
}
|
}
|
||||||
int c;
|
int c;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
// get the width
|
// get the width
|
||||||
//int width = 0;
|
//int width = 0;
|
||||||
|
@ -854,7 +854,7 @@ public class Stabs {
|
||||||
case 'R' :
|
case 'R' :
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
// get the fp-Type
|
// get the fp-Type
|
||||||
//int fpType = 0;
|
//int fpType = 0;
|
||||||
|
@ -895,7 +895,7 @@ public class Stabs {
|
||||||
//DebugType type = parseStabType(name, reader);
|
//DebugType type = parseStabType(name, reader);
|
||||||
parseStabType(name, reader);
|
parseStabType(name, reader);
|
||||||
int c = reader.read(); // semicolon
|
int c = reader.read(); // semicolon
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
int nbits = 0;
|
int nbits = 0;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
|
@ -930,7 +930,7 @@ public class Stabs {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c == ';') {
|
if (c == ';') {
|
||||||
break;
|
break;
|
||||||
|
@ -997,7 +997,7 @@ public class Stabs {
|
||||||
DebugType parseStabEnumType(String name, Reader reader) throws IOException {
|
DebugType parseStabEnumType(String name, Reader reader) throws IOException {
|
||||||
List<DebugEnumField> list = new ArrayList<DebugEnumField>();
|
List<DebugEnumField> list = new ArrayList<DebugEnumField>();
|
||||||
String fieldName = null;
|
String fieldName = null;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
int c;
|
int c;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c == ':') {
|
if (c == ':') {
|
||||||
|
@ -1037,7 +1037,7 @@ public class Stabs {
|
||||||
*/
|
*/
|
||||||
DebugType parseStabStructType(String name, TypeNumber typeNumber, boolean union, Reader reader) throws IOException {
|
DebugType parseStabStructType(String name, TypeNumber typeNumber, boolean union, Reader reader) throws IOException {
|
||||||
int c;
|
int c;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (!Character.isDigit((char) c)) {
|
if (!Character.isDigit((char) c)) {
|
||||||
reader.reset();
|
reader.reset();
|
||||||
|
@ -1064,7 +1064,7 @@ public class Stabs {
|
||||||
|
|
||||||
void parseStabStructField(DebugStructType structType, Reader reader) throws IOException {
|
void parseStabStructField(DebugStructType structType, Reader reader) throws IOException {
|
||||||
// get the field name.
|
// get the field name.
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
int c;
|
int c;
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
if (c != ':') {
|
if (c != ':') {
|
||||||
|
@ -1143,7 +1143,7 @@ public class Stabs {
|
||||||
return new DebugUnknownType(name);
|
return new DebugUnknownType(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
// read the lowerBound.
|
// read the lowerBound.
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
|
@ -1277,7 +1277,7 @@ public class Stabs {
|
||||||
DebugType type = parseStabType("", reader); //$NON-NLS-1$
|
DebugType type = parseStabType("", reader); //$NON-NLS-1$
|
||||||
c = reader.read();
|
c = reader.read();
|
||||||
if (c == ',') {
|
if (c == ',') {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
|
@ -1297,7 +1297,7 @@ public class Stabs {
|
||||||
case 'i' :
|
case 'i' :
|
||||||
{
|
{
|
||||||
int val = 0;
|
int val = 0;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
|
@ -1319,7 +1319,7 @@ public class Stabs {
|
||||||
case 'r' :
|
case 'r' :
|
||||||
{
|
{
|
||||||
double val = 0;
|
double val = 0;
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
sb.append((char) c);
|
sb.append((char) c);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class StabsReader implements ISymbolReader {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String makeString(long offset) {
|
private String makeString(long offset) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
for (; offset < stabstrData.length; offset++) {
|
for (; offset < stabstrData.length; offset++) {
|
||||||
byte b = stabstrData[(int) offset];
|
byte b = stabstrData[(int) offset];
|
||||||
if (b == 0) {
|
if (b == 0) {
|
||||||
|
@ -120,7 +120,7 @@ public class StabsReader implements ISymbolReader {
|
||||||
char driveLetter = path.charAt(10);
|
char driveLetter = path.charAt(10);
|
||||||
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
|
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer(path);
|
StringBuilder buf = new StringBuilder(path);
|
||||||
buf.delete(0, 11);
|
buf.delete(0, 11);
|
||||||
buf.insert(0, driveLetter);
|
buf.insert(0, driveLetter);
|
||||||
buf.insert(1, ':');
|
buf.insert(1, ':');
|
||||||
|
@ -133,7 +133,7 @@ public class StabsReader implements ISymbolReader {
|
||||||
char driveLetter = path.charAt(2);
|
char driveLetter = path.charAt(2);
|
||||||
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
|
driveLetter = (Character.isLowerCase(driveLetter)) ? Character.toUpperCase(driveLetter) : driveLetter;
|
||||||
|
|
||||||
StringBuffer buf = new StringBuffer(path);
|
StringBuilder buf = new StringBuilder(path);
|
||||||
buf.delete(0, 3);
|
buf.delete(0, 3);
|
||||||
buf.insert(0, driveLetter);
|
buf.insert(0, driveLetter);
|
||||||
buf.insert(1, ':');
|
buf.insert(1, ':');
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -61,7 +61,7 @@ public class TypeNumber {
|
||||||
if (c == -1) {
|
if (c == -1) {
|
||||||
return;
|
return;
|
||||||
} else if (ch == '(') {
|
} else if (ch == '(') {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
ch = (char)c;
|
ch = (char)c;
|
||||||
if (ch == ')') {
|
if (ch == ')') {
|
||||||
|
@ -83,7 +83,7 @@ public class TypeNumber {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (Character.isDigit(ch)) {
|
} else if (Character.isDigit(ch)) {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(ch);
|
sb.append(ch);
|
||||||
reader.mark(1);
|
reader.mark(1);
|
||||||
while ((c = reader.read()) != -1) {
|
while ((c = reader.read()) != -1) {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -80,7 +80,7 @@ public class DebugDump implements IDebugEntryRequestor {
|
||||||
}
|
}
|
||||||
|
|
||||||
String printTabs() {
|
String printTabs() {
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < bracket; i++) {
|
for (int i = 0; i < bracket; i++) {
|
||||||
sb.append('\t');
|
sb.append('\t');
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
@ -43,7 +43,7 @@ public class DebugSym implements Comparable<Object> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append("Type:").append(type).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append("Type:").append(type).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
buf.append("Name: ").append(name).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
buf.append("Name: ").append(name).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
buf.append("\taddress:").append("0x").append(Long.toHexString(addr)).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
buf.append("\taddress:").append("0x").append(Long.toHexString(addr)).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2000, 2008 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
|
||||||
|
@ -91,7 +91,7 @@ public class AR {
|
||||||
* <code>offset</code> not in string table bounds.
|
* <code>offset</code> not in string table bounds.
|
||||||
*/
|
*/
|
||||||
private String nameFromStringTable(long offset) throws IOException {
|
private String nameFromStringTable(long offset) throws IOException {
|
||||||
StringBuffer name = new StringBuffer(0);
|
StringBuilder name = new StringBuilder(0);
|
||||||
long pos = efile.getFilePointer();
|
long pos = efile.getFilePointer();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -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
|
||||||
|
@ -367,7 +367,7 @@ public class Elf {
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuilder str = new StringBuilder();
|
||||||
//Most string symbols will be less than 50 bytes in size
|
//Most string symbols will be less than 50 bytes in size
|
||||||
byte [] tmp = new byte[50];
|
byte [] tmp = new byte[50];
|
||||||
|
|
||||||
|
|
|
@ -321,7 +321,7 @@ public class ElfHelper {
|
||||||
|
|
||||||
String full_usage = new String(sections[i].loadSectionData());
|
String full_usage = new String(sections[i].loadSectionData());
|
||||||
String usage = getSubUsage(full_usage, file.getName());
|
String usage = getSubUsage(full_usage, file.getName());
|
||||||
StringBuffer buffer = new StringBuffer(usage);
|
StringBuilder buffer = new StringBuilder(usage);
|
||||||
|
|
||||||
for (int j = 0; j < buffer.length(); j++) {
|
for (int j = 0; j < buffer.length(); j++) {
|
||||||
if (buffer.charAt(j) == '%') {
|
if (buffer.charAt(j) == '%') {
|
||||||
|
|
|
@ -210,7 +210,7 @@ public class EnvVarOperationProcessor {
|
||||||
*/
|
*/
|
||||||
static public String convertToString(List<String> list, String delimiter){
|
static public String convertToString(List<String> list, String delimiter){
|
||||||
Iterator<String> iter = list.iterator();
|
Iterator<String> iter = list.iterator();
|
||||||
StringBuffer buffer = new StringBuffer();
|
StringBuilder buffer = new StringBuilder();
|
||||||
|
|
||||||
while(iter.hasNext()){
|
while(iter.hasNext()){
|
||||||
buffer.append(iter.next());
|
buffer.append(iter.next());
|
||||||
|
|
|
@ -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
|
||||||
|
@ -80,7 +80,7 @@ public class AR {
|
||||||
* <code>offset</code> not in string table bounds.
|
* <code>offset</code> not in string table bounds.
|
||||||
*/
|
*/
|
||||||
// private String nameFromStringTable(long offset) throws IOException {
|
// private String nameFromStringTable(long offset) throws IOException {
|
||||||
// StringBuffer name = new StringBuffer(0);
|
// StringBuilder name = new StringBuilder(0);
|
||||||
// long pos = efile.getFilePointer();
|
// long pos = efile.getFilePointer();
|
||||||
//
|
//
|
||||||
// try {
|
// try {
|
||||||
|
|
|
@ -1278,7 +1278,7 @@ public class MachO {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
private String getCStr() throws IOException {
|
private String getCStr() throws IOException {
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuilder str = new StringBuilder();
|
||||||
while( true ) {
|
while( true ) {
|
||||||
byte tmp = efile.readByte();
|
byte tmp = efile.readByte();
|
||||||
if (tmp == 0)
|
if (tmp == 0)
|
||||||
|
@ -1291,7 +1291,7 @@ public class MachO {
|
||||||
private String getLCStr(int len) throws IOException {
|
private String getLCStr(int len) throws IOException {
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
StringBuffer str = new StringBuffer();
|
StringBuilder str = new StringBuilder();
|
||||||
for (; len > 0; len--) {
|
for (; len > 0; len--) {
|
||||||
byte tmp = efile.readByte();
|
byte tmp = efile.readByte();
|
||||||
if (tmp == 0)
|
if (tmp == 0)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue