Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2012-03-15 20:24:23 +0000
committerStephan Herrmann2012-03-15 20:24:23 +0000
commitb9e1052de320ec521ce6aa3c18158a229dfd03c0 (patch)
tree5d7a8871bb37b71b6149aae1f569b7d290466930 /org.eclipse.jdt.core.tests.model/src/org
parent99f162cd8a14966f21404f76702385d0e45435fb (diff)
downloadorg.eclipse.objectteams-b9e1052de320ec521ce6aa3c18158a229dfd03c0.tar.gz
org.eclipse.objectteams-b9e1052de320ec521ce6aa3c18158a229dfd03c0.tar.xz
org.eclipse.objectteams-b9e1052de320ec521ce6aa3c18158a229dfd03c0.zip
Update jdt.core & tests to v20120314-0818 (candidate for 3.8 M6)
Diffstat (limited to 'org.eclipse.jdt.core.tests.model/src/org')
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java11
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java5
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java53
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java802
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java10
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java5
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java64
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java44
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java8
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java546
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java8
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java36
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java61
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java79
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java18
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java27
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java15
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java17
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java17
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java5
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java32
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java11
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java80
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CodeCorrectionTests.java3
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java13
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java348
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java45
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java28
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java46
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java16
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java69
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java34
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java3
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java104
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java15
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java13
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java15
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java10
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java6
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java16
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java13
46 files changed, 1803 insertions, 968 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
index cfc5de45e..4347c7b65 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -54,6 +54,13 @@ public class APIDocumentationTests extends AbstractASTTests {
// TESTS_NUMBERS = new int[] { 78, 79, 80 };
// TESTS_RANGE = new int[] { 83304, -1 };
}
+
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
/**
* Helper class able to analyze JavaCore options javadocs.
@@ -142,7 +149,7 @@ public void test001() throws CoreException, IllegalArgumentException, IllegalAcc
// fetch default option values
Hashtable realDefaultValues = JavaCore.getDefaultOptions();
// load documented values in a map
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setSource(org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(javaCoreSourceFile, null));
ASTNode rootNode = parser.createAST(null);
final JavaCoreJavadocAnalyzer analyzer = new JavaCoreJavadocAnalyzer();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
index 9c7b8e99d..9b73eb2b3 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -4767,6 +4767,7 @@ public class ASTConverter15JLS4Test extends ConverterTestSetup {
" RED, GREEN(), BLUE(17);\n" +
" X() {}\n" +
" X(int i) {}\n" +
+ " @SuppressWarnings(\"incomplete-switch\")\n" +
" public static void main(String[] args) {\n" +
" for (X x : X.values()) {\n" +
" switch(x) {\n" +
@@ -11282,7 +11283,7 @@ public class ASTConverter15JLS4Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
CompilationUnit unit = (CompilationUnit) buildAST(
- AST.JLS3,
+ getJLS3(),
contents,
this.workingCopy,
false,
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
index fd388a619..dac0e8dad 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -40,10 +40,10 @@ import org.eclipse.jdt.core.tests.util.Util;
public class ASTConverter15Test extends ConverterTestSetup {
ICompilationUnit workingCopy;
-
+
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTConverter15Test(String name) {
@@ -394,7 +394,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0006() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0006", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
final String expectedOutput = "Package annotations must be in file package-info.java";
@@ -414,7 +414,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0007() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0007", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertProblemsSize(compilationUnit, 0);
@@ -443,7 +443,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0009() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0009", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -467,7 +467,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0010() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0010", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -497,7 +497,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0011() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0011", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -528,7 +528,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void test0012() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0012", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -2232,7 +2232,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
*/
public void test0072() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15", "src", "test0072", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 0);
@@ -3262,7 +3262,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
this.workingCopy.getBuffer().setContents(contents.toCharArray());
- ASTNode node = runConversion(AST.JLS3, this.workingCopy, true);
+ ASTNode node = runConversion(getJLS3(), this.workingCopy, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit compilationUnit = (CompilationUnit) node;
String expectedOutput = "Dead code";
@@ -4770,6 +4770,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
" RED, GREEN(), BLUE(17);\n" +
" X() {}\n" +
" X(int i) {}\n" +
+ " @SuppressWarnings(\"incomplete-switch\")\n" +
" public static void main(String[] args) {\n" +
" for (X x : X.values()) {\n" +
" switch(x) {\n" +
@@ -5920,7 +5921,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99510
public void test0191() throws CoreException, IOException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0191", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No node", node);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
@@ -7488,7 +7489,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
assertNotNull("Should not be null", type);
- ASTParser parser= ASTParser.newParser(AST.JLS3);
+ ASTParser parser= ASTParser.newParser(getJLS3());
parser.setProject(type.getJavaProject());
IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
@@ -7516,7 +7517,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
assertNotNull("Should not be null", type);
- ASTParser parser= ASTParser.newParser(AST.JLS3);
+ ASTParser parser= ASTParser.newParser(getJLS3());
parser.setSource(sourceUnit);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setResolveBindings(true);
@@ -8098,7 +8099,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
*/
public void test0247() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0247", "EclipseCompiler.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertNotNull("Not a compilation unit", result);
}
@@ -8237,7 +8238,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
public void test0251() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0251", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, false);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -8267,7 +8268,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
public void test0252() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0252", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, false);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -8307,7 +8308,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
this.workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, this.workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), this.workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedError = "List cannot be resolved to a type";
@@ -8345,7 +8346,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
this.workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, this.workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), this.workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9417,7 +9418,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
}
CompilationUnitRequestor requestor = new CompilationUnitRequestor();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setResolveBindings(true);
parser.setProject(getJavaProject("Converter15"));
parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -9593,7 +9594,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
this.workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, this.workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), this.workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9647,7 +9648,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
"}";
this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
this.workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, this.workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), this.workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 1, "Bar2 cannot be resolved to a type");
@@ -10722,7 +10723,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
BindingKey.createTypeBindingKey(typeName)
};
final BindingRequestor requestor = new BindingRequestor();
- final ASTParser parser = ASTParser.newParser(AST.JLS3);
+ final ASTParser parser = ASTParser.newParser(getJLS3());
parser.setResolveBindings(true);
parser.setProject(javaProject);
// this doesn't really do a parse; it's a type lookup
@@ -10757,7 +10758,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
BindingKey.createTypeBindingKey(typeName)
};
final BindingRequestor requestor = new BindingRequestor();
- final ASTParser parser = ASTParser.newParser(AST.JLS3);
+ final ASTParser parser = ASTParser.newParser(getJLS3());
parser.setResolveBindings(true);
parser.setProject(javaProject);
// this doesn't really do a parse; it's a type lookup
@@ -10795,7 +10796,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
BindingKey.createTypeBindingKey(typeName)
};
final BindingRequestor requestor = new BindingRequestor();
- final ASTParser parser = ASTParser.newParser(AST.JLS3);
+ final ASTParser parser = ASTParser.newParser(getJLS3());
parser.setResolveBindings(true);
parser.setProject(javaProject);
// this doesn't really do a parse; it's a type lookup
@@ -11218,7 +11219,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
//IType type2 = sourceUnit2.getType("TestAnnotationWithStringDefault");//$NON-NLS-1$
assertNotNull("Should not be null", type);
- ASTParser parser= ASTParser.newParser(AST.JLS3);
+ ASTParser parser= ASTParser.newParser(getJLS3());
parser.setProject(type.getJavaProject());
IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
index 7a3f1d401..93db9fd16 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,7 +29,7 @@ public class ASTConverter16Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTConverter16Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
index 451c687b8..6daa07aad 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,10 +21,10 @@ import org.eclipse.jdt.core.jdom.*;
import org.eclipse.jdt.core.util.IModifierConstants;
public class ASTConverterAST3Test extends ConverterTestSetup {
-
+
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTConverterAST3Test(String name) {
@@ -41,7 +41,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0001() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0001", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
// check that we have the right tree
CompilationUnit unit = this.ast.newCompilationUnit();
@@ -110,7 +110,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0002() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0002", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -125,7 +125,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0003() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0003", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -146,7 +146,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0004() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0004", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -170,7 +170,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0005() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0005", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -197,7 +197,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0006() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0006", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -227,7 +227,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0007() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0007", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node;
@@ -248,7 +248,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0008() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0008", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -269,7 +269,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0009() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0009", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -292,7 +292,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0010() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0010", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -308,7 +308,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0011() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0011", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -324,7 +324,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0012() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0012", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -345,7 +345,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0013() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0013", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -362,7 +362,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0014() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0014", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -381,7 +381,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0015() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0015", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -399,7 +399,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0016() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0016", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -417,7 +417,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0017() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0017", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -435,7 +435,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0018() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0018", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -453,7 +453,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0019() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0019", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -471,7 +471,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0020() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0020", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -489,7 +489,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0021() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0021", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -507,7 +507,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0022() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0022", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -525,7 +525,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0023() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0023", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -543,7 +543,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0024() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0024", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -561,7 +561,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0025() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0025", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -579,7 +579,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0026() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0026", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Assignment assignment = this.ast.newAssignment();
@@ -597,7 +597,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0027() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0027", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
PrefixExpression prefixExpression = this.ast.newPrefixExpression();
@@ -614,7 +614,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0028() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0028", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
PrefixExpression prefixExpression = this.ast.newPrefixExpression();
@@ -631,7 +631,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0029() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0029", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -648,7 +648,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0030() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0030", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
PostfixExpression postfixExpression = this.ast.newPostfixExpression();
@@ -665,7 +665,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0031() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0031", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -686,7 +686,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0032() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0032", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -707,7 +707,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0033() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0033", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -730,7 +730,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0034() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0034", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -753,7 +753,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0035() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0035", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -776,7 +776,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0036() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0036", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -799,7 +799,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0037() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0037", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -822,7 +822,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0038() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0038", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -844,7 +844,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0039() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0039", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -866,7 +866,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0040() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0040", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -888,7 +888,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0041() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0041", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -910,7 +910,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0042() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0042", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
BooleanLiteral literal = this.ast.newBooleanLiteral(false);
@@ -924,7 +924,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0043() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0043", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
BooleanLiteral literal = this.ast.newBooleanLiteral(true);
@@ -938,7 +938,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0044() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0044", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NullLiteral literal = this.ast.newNullLiteral();
@@ -952,7 +952,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0045() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0045", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
CharacterLiteral literal = this.ast.newCharacterLiteral();
@@ -967,7 +967,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0046() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0046", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("1.00001");//$NON-NLS-1$
@@ -981,7 +981,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0047() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0047", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("1.00001f");//$NON-NLS-1$
@@ -995,7 +995,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0048() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0048", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("30000");//$NON-NLS-1$
@@ -1009,7 +1009,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0049() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0049", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("-2147483648");//$NON-NLS-1$
@@ -1023,7 +1023,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0050() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0050", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
@@ -1037,7 +1037,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0051() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0051", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
@@ -1054,7 +1054,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0052() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0052", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
NumberLiteral literal = this.ast.newNumberLiteral("-9223372036854775808L");//$NON-NLS-1$
@@ -1068,7 +1068,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0053() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0053", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
/*
@@ -1093,7 +1093,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0054() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0054", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1117,7 +1117,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0055() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0055", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1141,7 +1141,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0056() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0056", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1165,7 +1165,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0057() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0057", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1189,7 +1189,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0058() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0058", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1213,7 +1213,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0059() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0059", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1237,7 +1237,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0060() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0060", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1261,7 +1261,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0061() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0061", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1285,7 +1285,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0062() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0062", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1309,7 +1309,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0063() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0063", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1333,7 +1333,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0064() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0064", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1357,7 +1357,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0065() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0065", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1381,7 +1381,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0066() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0066", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1405,7 +1405,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0067() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0067", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1429,7 +1429,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0068() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0068", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1453,7 +1453,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0069() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0069", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1477,7 +1477,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0070() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0070", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1500,7 +1500,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0071() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0071", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1530,7 +1530,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0072() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0072", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1552,7 +1552,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0073() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0073", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1574,7 +1574,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0074() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0074", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1597,7 +1597,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0075() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0075", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1621,7 +1621,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0076() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0076", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1648,7 +1648,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0077() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0077", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
@@ -1675,7 +1675,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0078() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0078", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
@@ -1691,7 +1691,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0079() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0079", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
@@ -1708,7 +1708,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0080() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0080", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
MethodInvocation methodInvocation = this.ast.newMethodInvocation();
@@ -1725,7 +1725,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0081() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0081", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
MethodInvocation methodInvocation = this.ast.newMethodInvocation();
@@ -1743,7 +1743,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0082() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0082", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1758,7 +1758,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0083() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0083", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1788,7 +1788,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0084() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0084", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1820,7 +1820,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0085() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0085", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1847,7 +1847,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0086() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0086", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1871,7 +1871,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0087() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0087", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -1890,7 +1890,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0088() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0088", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1910,7 +1910,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0089() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0089", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1938,7 +1938,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0090() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0090", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1961,7 +1961,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0091() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0091", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1978,7 +1978,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0092() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0092", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
MethodDeclaration method = (MethodDeclaration)((TypeDeclaration) ((CompilationUnit) result).types().get(0)).bodyDeclarations().get(0);
SingleVariableDeclaration node = (SingleVariableDeclaration) method.parameters().get(0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
@@ -1997,7 +1997,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0093() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0093", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
ForStatement forStatement = (ForStatement) node;
BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2013,7 +2013,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0094() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0094", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
ForStatement forStatement = (ForStatement) node;
ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2029,7 +2029,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0095() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0095", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
ForStatement forStatement = (ForStatement) labeledStatement.getBody();
ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2046,7 +2046,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0096() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0096", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
ForStatement forStatement = (ForStatement) labeledStatement.getBody();
BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2063,7 +2063,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0097() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0097", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
SwitchStatement switchStatement = this.ast.newSwitchStatement();
@@ -2127,7 +2127,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0098() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0098", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
EmptyStatement emptyStatement = this.ast.newEmptyStatement();
@@ -2141,7 +2141,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0099() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0099", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
DoStatement doStatement = this.ast.newDoStatement();
@@ -2161,7 +2161,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0100() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0100", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
WhileStatement whileStatement = this.ast.newWhileStatement();
@@ -2177,7 +2177,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0101() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0101", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
WhileStatement whileStatement = this.ast.newWhileStatement();
@@ -2193,7 +2193,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0102() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0102", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2217,7 +2217,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0103() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0103", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2244,7 +2244,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0104() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0104", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2271,7 +2271,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0105() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0105", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2298,7 +2298,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0106() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0106", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2334,7 +2334,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0107() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0107", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2361,7 +2361,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0108() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0108", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2388,7 +2388,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0109() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0109", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2424,7 +2424,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0110() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0110", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ReturnStatement returnStatement = this.ast.newReturnStatement();
@@ -2441,7 +2441,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0111() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0111", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ReturnStatement returnStatement = this.ast.newReturnStatement();
@@ -2458,7 +2458,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0112() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0112", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
SynchronizedStatement synchronizedStatement = this.ast.newSynchronizedStatement();
@@ -2476,7 +2476,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0113() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0113", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
TryStatement tryStatement = this.ast.newTryStatement();
@@ -2503,7 +2503,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0114() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0114", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
TryStatement tryStatement = this.ast.newTryStatement();
@@ -2528,7 +2528,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0115() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0115", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
TryStatement tryStatement = this.ast.newTryStatement();
@@ -2560,7 +2560,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0116() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0116", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2575,7 +2575,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0117() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0117", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2590,7 +2590,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0118() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0118", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ThrowStatement throwStatement = this.ast.newThrowStatement();
@@ -2605,7 +2605,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0119() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0119", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
IfStatement ifStatement = this.ast.newIfStatement();
@@ -2621,7 +2621,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0120() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0120", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
IfStatement ifStatement = this.ast.newIfStatement();
@@ -2640,7 +2640,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0121() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0121", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
IfStatement ifStatement = this.ast.newIfStatement();
@@ -2659,7 +2659,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0122() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0122", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
IfStatement ifStatement = this.ast.newIfStatement();
@@ -2679,7 +2679,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0123() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0123", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
IfStatement ifStatement = this.ast.newIfStatement();
@@ -2706,7 +2706,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0124() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0124", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
@@ -2746,7 +2746,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0125() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0125", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
@@ -2786,7 +2786,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0126() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0126", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -2814,7 +2814,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0127() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0127", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -2842,7 +2842,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0128() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0128", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -2870,7 +2870,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0129() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0129", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -2891,7 +2891,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0130() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0130", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -2933,7 +2933,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0131() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0131", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -2957,7 +2957,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0132() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0132", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -2972,7 +2972,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0133() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0133", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -2987,7 +2987,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0134() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0134", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -3003,7 +3003,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0135() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0135", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3017,7 +3017,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0136() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0136", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3032,7 +3032,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0137() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0137", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -3047,7 +3047,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0138() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0138", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3065,7 +3065,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0139() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0139", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3084,7 +3084,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0140() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0140", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3105,7 +3105,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0141() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0141", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3123,7 +3123,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0142() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0142", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3138,7 +3138,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0143() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0143", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3153,7 +3153,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0144() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0144", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3168,7 +3168,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0145() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0145", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
checkSourceRange(node, "{}", source); //$NON-NLS-1$
@@ -3180,7 +3180,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0146() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0146", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
checkSourceRange(node, "static {}", source); //$NON-NLS-1$
@@ -3193,7 +3193,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0147() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0147", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3213,7 +3213,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0148() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0148", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3232,7 +3232,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0149() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0149", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3245,7 +3245,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0150() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0150", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -3261,7 +3261,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0151() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0151", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
}
@@ -3271,7 +3271,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0152() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0152", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -3290,7 +3290,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0153() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0153", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3304,7 +3304,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0154() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0154", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3323,7 +3323,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0155() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0155", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3345,7 +3345,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0156() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0156", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3368,7 +3368,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0157() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0157.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3406,7 +3406,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0158() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0158.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3444,7 +3444,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0159() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0159", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
@@ -3454,7 +3454,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0160() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0160", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3515,7 +3515,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0161() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0161", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3574,7 +3574,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0162() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0162", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3610,7 +3610,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0163() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0163", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
assertTrue("Not an anonymous type declaration", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
@@ -3645,7 +3645,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0164() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0164", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Not an type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -3679,7 +3679,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0165() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0165", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Not an type declaration", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
@@ -3715,7 +3715,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0166() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0166", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
@@ -3785,7 +3785,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0167() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0167", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Instance of VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
@@ -3804,7 +3804,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0168() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0168.test1", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3831,7 +3831,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0169() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0169", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3857,7 +3857,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0170() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test0170.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3882,7 +3882,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0171() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0171", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -3915,7 +3915,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0172() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0172", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4022,7 +4022,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0173() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0173", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4052,7 +4052,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0174() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0174", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4081,7 +4081,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0175() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0175", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4101,7 +4101,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0176() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0176", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4124,7 +4124,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0177() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0177", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 1);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("Not an expressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
@@ -4154,7 +4154,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0178() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0178", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4172,7 +4172,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0179() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0179", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4191,7 +4191,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0180() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0180", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4212,7 +4212,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0181() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0181", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4233,7 +4233,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0182() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0182", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement ifStatement = (IfStatement) node2;
@@ -4251,7 +4251,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0183() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0183", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement ifStatement = (IfStatement) node2;
@@ -4269,7 +4269,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0184() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0184", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement ifStatement = (IfStatement) node2;
@@ -4287,7 +4287,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0185() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0185", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement ifStatement = (IfStatement) node2;
@@ -4305,7 +4305,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0186() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0186", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement ifStatement = (IfStatement) node2;
@@ -4323,7 +4323,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0187() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0187", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("IfStatement", node2 instanceof WhileStatement); //$NON-NLS-1$
WhileStatement whileStatement = (WhileStatement) node2;
@@ -4341,7 +4341,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0188() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0188", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
assertTrue("DoStatement", node2 instanceof DoStatement); //$NON-NLS-1$
DoStatement statement = (DoStatement) node2;
@@ -4359,7 +4359,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0189() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0189", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
ForStatement statement = (ForStatement) node2;
@@ -4377,7 +4377,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0190() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0190", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
IfStatement statement = (IfStatement) node2;
@@ -4395,7 +4395,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0191() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0191", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4419,7 +4419,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0192() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0192", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4440,7 +4440,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0193() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0193", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4462,7 +4462,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0194() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0194", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4485,7 +4485,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0195() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0195", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4509,7 +4509,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0196() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0196", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4530,7 +4530,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0197() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0197", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 0);
@@ -4556,7 +4556,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0198() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0198", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4582,7 +4582,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0199() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0199", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4611,7 +4611,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0200() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0200", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4641,7 +4641,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0201() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0201", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) node2;
@@ -4657,7 +4657,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0202() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0202", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4679,7 +4679,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0203() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0203", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4705,7 +4705,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0204() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0204", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4739,7 +4739,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0205() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0205", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
@@ -4827,7 +4827,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0207() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0207", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4842,7 +4842,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0208() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0208", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4857,7 +4857,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0209() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0209", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
@@ -4873,7 +4873,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0210() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0210", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4887,7 +4887,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0211() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0211", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4902,7 +4902,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0212() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0212", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
@@ -4917,7 +4917,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0213() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0213", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4935,7 +4935,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0214() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0214", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4954,7 +4954,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0215() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0215", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4975,7 +4975,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0216() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0216", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -4993,7 +4993,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0217() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0217", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5008,7 +5008,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0218() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0218", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5023,7 +5023,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0219() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0219", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
assertTrue("The node is not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
@@ -5038,7 +5038,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0220() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0220", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
checkSourceRange(node, "{}", source); //$NON-NLS-1$
@@ -5050,7 +5050,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0221() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0221", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
checkSourceRange(node, "static {}", source); //$NON-NLS-1$
@@ -5063,7 +5063,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0222() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0222", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5083,7 +5083,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0223() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0223", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5102,7 +5102,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0224() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0224", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5116,7 +5116,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0225() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0225", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5135,7 +5135,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0226() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0226", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5154,7 +5154,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0227() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0227", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5241,7 +5241,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0228() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0228", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5269,7 +5269,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0229() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0229", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5299,7 +5299,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0230() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0230", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5324,7 +5324,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0231() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0231", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5359,7 +5359,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0232() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0232", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -5390,7 +5390,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0233() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0233", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("Expression should not be null", result); //$NON-NLS-1$
assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5406,7 +5406,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0234() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true, true);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5428,7 +5428,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0234_2() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0234", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true, false);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5449,7 +5449,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0235() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0235", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
@@ -5470,7 +5470,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0237() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.framework", "TestCase.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
@@ -5480,7 +5480,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0238() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0238", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -5515,7 +5515,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0239() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0239", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -5553,7 +5553,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0240() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0240", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5594,7 +5594,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0241() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0241", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0);
@@ -5630,7 +5630,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0242() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0242", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
@@ -5673,7 +5673,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0243() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0243", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5692,7 +5692,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0244() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0244", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5711,7 +5711,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0245() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0245", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5737,7 +5737,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0246() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0246", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5765,7 +5765,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0247() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0247", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -5782,7 +5782,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0248() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0248", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5805,7 +5805,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0249() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0249", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 2, 1);
@@ -5833,7 +5833,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0250() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0250", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -5857,7 +5857,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0251() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0251", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5887,7 +5887,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0252() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0252", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
@@ -5909,7 +5909,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0253() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0253", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5930,7 +5930,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0254() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0254", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 1, 0);
@@ -5950,7 +5950,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0255() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0255", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -5975,7 +5975,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0256() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0256", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6006,7 +6006,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0257() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0257", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6031,7 +6031,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0258() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0258", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -6062,7 +6062,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0259() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0259", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
@@ -6072,7 +6072,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0260() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0260", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -6101,7 +6101,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0261() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0261", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6120,7 +6120,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0262() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0262", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6150,7 +6150,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0263() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0263", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6175,7 +6175,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0264() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0264", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6210,7 +6210,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0265() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0265", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
@@ -6221,7 +6221,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0266() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0266", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6248,7 +6248,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0267() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0267", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6275,7 +6275,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0268() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0268", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6301,7 +6301,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0269() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0269", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6327,7 +6327,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0270() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0270", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6349,7 +6349,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0271() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0271", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6375,7 +6375,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0272() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0272", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6393,7 +6393,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0273() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0273", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6417,7 +6417,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0274() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0274", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6441,7 +6441,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0275() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0275", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6459,7 +6459,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0276() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0276", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6484,7 +6484,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0277() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0277", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6507,7 +6507,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0278() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0278", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6531,7 +6531,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0279() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0279", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6555,7 +6555,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0280() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0280", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
AST newAst = result.getAST();
@@ -6642,7 +6642,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0281() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0281", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6663,7 +6663,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0282() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0282", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6684,7 +6684,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0283() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0283", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6705,7 +6705,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0284() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0284", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6726,7 +6726,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0285() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0285", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6747,7 +6747,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0286() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0286", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6768,7 +6768,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0287() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0287", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6789,7 +6789,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0288() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0288", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6810,7 +6810,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0289() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0289", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6831,7 +6831,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0290() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0290", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6851,7 +6851,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0291() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0291", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -6864,7 +6864,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0292() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0292", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6896,7 +6896,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0293() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0293", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6932,7 +6932,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0294() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0294", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6963,7 +6963,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0295() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0295", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -6988,7 +6988,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0296() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0296", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7019,7 +7019,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0297() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0297", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- runConversion(AST.JLS3, sourceUnit, false);
+ runConversion(getJLS3(), sourceUnit, false);
}
/**
@@ -7028,7 +7028,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0298() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0298", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7046,7 +7046,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0299() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0299", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7071,7 +7071,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0300() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0300", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7093,7 +7093,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0301() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0301", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7114,7 +7114,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0302() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0302", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7133,7 +7133,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0303() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0303", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7161,7 +7161,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0304() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0304", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7184,7 +7184,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project, true); //$NON-NLS-1$
+ ASTNode result = runConversion(getJLS3(), source, "Test.java", project, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7209,7 +7209,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Object.java", project, true); //$NON-NLS-1$
+ ASTNode result = runConversion(getJLS3(), source, "Object.java", project, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7230,7 +7230,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0307() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0307", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7251,7 +7251,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0308() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0308", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7276,7 +7276,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0309() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0309", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7299,7 +7299,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0310() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0310", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7324,7 +7324,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0311() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0311", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7373,7 +7373,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0312() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0312", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7418,7 +7418,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0313() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0313", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7449,7 +7449,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0314() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0314", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No result", result); //$NON-NLS-1$
assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7466,7 +7466,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0315() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0315", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7502,7 +7502,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0316() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Hello.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No result", result); //$NON-NLS-1$
assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7515,7 +7515,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0317() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0317", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7553,7 +7553,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0318() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0318", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
@@ -7566,7 +7566,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0319() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0319", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7600,7 +7600,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0320() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0320", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7625,7 +7625,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0321() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0321", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7657,7 +7657,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0322() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0322", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7681,7 +7681,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0323() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0323", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7708,7 +7708,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0324() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0324", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7735,7 +7735,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0325() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0325", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7762,7 +7762,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0326() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0326", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
char[] source = sourceUnit.getSource().toCharArray();
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
@@ -7779,7 +7779,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0327() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0327", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7808,7 +7808,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0328() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0328", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7849,7 +7849,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0329() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0329", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7889,7 +7889,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0330() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0330", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7922,7 +7922,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0331() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0331", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7949,7 +7949,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0332() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0332", "LocalSelectionTransfer.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
}
@@ -7959,7 +7959,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0333() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0333", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7999,7 +7999,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0334() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0334", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8049,7 +8049,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0335() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0335", "ExceptionTestCaseTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8083,7 +8083,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0336() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0336", "SorterTest.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8116,7 +8116,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0337() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0337", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8137,7 +8137,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0338() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0338", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8160,7 +8160,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0339() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0339", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8196,7 +8196,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0340() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "p3", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8251,7 +8251,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0341() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0341", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8369,7 +8369,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0343() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0343", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8400,7 +8400,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
project.setOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
project.setOption(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
project.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8419,7 +8419,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0345() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0345", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8473,7 +8473,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0346() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0346", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8509,7 +8509,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0347() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0347", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8535,7 +8535,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0348() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0348", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8561,7 +8561,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0349() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0349", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8587,7 +8587,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0350() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0350", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8613,7 +8613,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0351() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0351", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8646,7 +8646,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0352() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0352", "Test2.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8679,7 +8679,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0353() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0353", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8713,7 +8713,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0354() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0354", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8725,7 +8725,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0355() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0355", "Foo.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8749,7 +8749,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0356() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0356", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8782,7 +8782,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0357() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0357", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8801,7 +8801,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0358() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0358", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8820,7 +8820,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0359() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0359", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8838,7 +8838,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0360() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0360", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8856,7 +8856,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0361() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0361", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8874,7 +8874,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0362() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0362", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
ForStatement forStatement = this.ast.newForStatement();
@@ -8928,7 +8928,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0363() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0363", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8952,7 +8952,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0364() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0364", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -8975,7 +8975,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0365() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0365", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9001,7 +9001,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0366() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0366", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9022,7 +9022,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0367() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0367", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9043,7 +9043,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0368() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0368", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9064,7 +9064,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0369() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0369", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9085,7 +9085,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0370() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0370", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull("Expression should not be null", node); //$NON-NLS-1$
DoStatement doStatement = this.ast.newDoStatement();
@@ -9106,7 +9106,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0371() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0371", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9127,7 +9127,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0372() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0372", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9148,7 +9148,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0373() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0373", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9174,7 +9174,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0374() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0374", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9199,7 +9199,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0375() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0375", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9218,7 +9218,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0376() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0376", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9241,7 +9241,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0377() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0377", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9264,7 +9264,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0378() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0378", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9283,7 +9283,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0379() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0379", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
@@ -9297,7 +9297,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0380() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0380", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9325,7 +9325,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0381() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0381", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9343,7 +9343,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0382() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0382", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9361,7 +9361,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0383() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0383", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9379,7 +9379,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0384() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0384", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9397,7 +9397,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0385() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0385", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9410,7 +9410,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0386() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0386", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9435,7 +9435,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0387() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0387", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9458,7 +9458,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0388() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0388", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9477,7 +9477,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0389() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0389", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9496,7 +9496,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0390() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0390", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9516,7 +9516,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0391() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0391", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9536,7 +9536,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0392() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0392", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9557,7 +9557,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0393() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0393", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9587,7 +9587,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0394() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0394", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9611,7 +9611,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0395() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0395", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -9641,7 +9641,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0396() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0396", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9673,7 +9673,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0397() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0397", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9705,7 +9705,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0398() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0398", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull(node);
assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
@@ -9730,7 +9730,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
*/
public void test0399() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0399", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9747,7 +9747,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void test0400() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0400", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
index 37d6d4468..977b2d665 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@ import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
public class ASTConverterBindingsTest extends ConverterTestSetup {
private static final boolean DEBUG = false;
-
+
static class BindingsCollector extends ASTVisitor {
public ArrayList arrayList;
@@ -473,7 +473,7 @@ public class ASTConverterBindingsTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTConverterBindingsTest(String name) {
@@ -509,10 +509,10 @@ public class ASTConverterBindingsTest extends ConverterTestSetup {
compilationUnitscollector.toArray(units);
for (int j = 0; j < length; j++) {
ICompilationUnit currentUnit = units[j];
- ASTNode result = runConversion(AST.JLS3, currentUnit, true);
+ ASTNode result = runConversion(getJLS3(), currentUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
CompilationUnit unit = (CompilationUnit) result;
- result = runConversion(AST.JLS3, currentUnit, true);
+ result = runConversion(getJLS3(), currentUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
if (DEBUG) {
if (unit.types().size() > 0 ) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
index 7a2d63e47..31cea217c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -616,7 +616,7 @@ public void testBug214002b() throws CoreException, IOException {
);
ICompilationUnit cuA = getCompilationUnit("P/A.java");
try {
- runConversion(AST.JLS3, cuA, true, true, true);
+ runConversion(getJLS3(), cuA, true, true, true);
} catch(IllegalArgumentException e) {
assertTrue("Unexpected IllegalArgumentException", false);
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
index 36e9184c5..6dd1c0222 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import junit.framework.TestSuite;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.AST;
/**
* Test suite to verify that DOM/AST bugs are fixed.
@@ -30,7 +29,7 @@ public class ASTConverterBugsTestJLS3 extends ASTConverterBugsTest {
public ASTConverterBugsTestJLS3(String name) {
super(name);
- this.testLevel = AST.JLS3;
+ this.testLevel = getJLS3();
}
public static Test suite() {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
index 441bc783e..f131b4012 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1155,7 +1155,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
String sourceLevel = null;
String complianceLevel = null;
if (this.currentProject != null) {
- if (this.astLevel == AST.JLS3) {
+ if (this.astLevel == getJLS3()) {
complianceLevel = this.currentProject.getOption(JavaCore.COMPILER_COMPLIANCE, true);
sourceLevel = this.currentProject.getOption(JavaCore.COMPILER_SOURCE, true);
this.currentProject.setOption(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5);
@@ -2074,7 +2074,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug70892_JLS3() throws JavaModelException {
int level = this.astLevel;
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
verifyComments("testBug70892");
this.astLevel = level;
}
@@ -2109,7 +2109,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug79809() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.java",
"package javadoc.b79809;\n" +
"/**\n" +
@@ -2127,7 +2127,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug79809b() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79809/Test.java",
"package javadoc.b79809;\n" +
"\n" +
@@ -2149,7 +2149,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug79904() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b79904/Test.java",
"package javadoc.b79904;\n" +
"/**\n" +
@@ -2172,7 +2172,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug80221() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter/src/javadoc/b80221/Test.java",
"package javadoc.b80221;\n" +
"public class Test {\n" +
@@ -2193,7 +2193,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug80257() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b80257/Test.java",
"package javadoc.b80257;\n" +
"import java.util.*;\n" +
@@ -2250,14 +2250,14 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
* @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=83804"
*/
public void testBug83804() throws CoreException, JavaModelException {
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "package-info.java");
this.workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804", "Test.java");
verifyWorkingCopiesComments();
}
public void testBug83804a() throws CoreException, JavaModelException {
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies = new ICompilationUnit[2];
this.workingCopies[0] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "package-info.java");
this.workingCopies[1] = getCompilationUnit("Converter15", "src", "javadoc.b83804a", "Test.java");
@@ -2270,7 +2270,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug84049() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b84049/Test.java",
"package javadoc.b84049;\n" +
"public class Test {\n" +
@@ -2306,7 +2306,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug87845() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b87845/Test.java",
"package javadoc.b87845;\n" +
"public class Test {\n" +
@@ -2381,7 +2381,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug93880_15a() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.java",
"/**\n" +
" * Javadoc\n" +
@@ -2405,7 +2405,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_15b() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2427,7 +2427,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_15c() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2449,7 +2449,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_15d() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2473,7 +2473,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_15e() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/* (non-javadoc)\n" +
" * No comment\n" +
@@ -2497,7 +2497,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_14a() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/Test.java",
"/**\n" +
" * Javadoc\n" +
@@ -2518,7 +2518,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_14b() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2537,7 +2537,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_14c() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2556,7 +2556,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_14d() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/**\n" +
" * Javadoc for all package\n" +
@@ -2577,7 +2577,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug93880_14e() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b93880/package-info.java",
"/* (non-javadoc)\n" +
" * No comment\n" +
@@ -2603,7 +2603,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug94150() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b94150/Category.java",
"package javadoc.b94150;\n" +
"public enum Category {\n" +
@@ -2654,7 +2654,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug99507b() throws JavaModelException {
String source = "/**\n@param country*/";
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(source.toCharArray());
parser.createAST(null);
@@ -2873,7 +2873,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug106581() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b106581/A.java",
"package javadoc.b106581;\n" +
"public class A {\n" +
@@ -2908,7 +2908,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug108622() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b108622/Test.java",
"package javadoc.b108622;\n" +
"/**\n" +
@@ -2957,7 +2957,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug113108a() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
@@ -2994,7 +2994,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug113108b() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
@@ -3031,7 +3031,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
}
public void testBug113108c() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b113108/Test.java",
"package javadoc.b113108;\n" +
"/** C0 */\n" +
@@ -3073,7 +3073,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug125676() throws JavaModelException {
this.workingCopies = new ICompilationUnit[3];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125676/A.java",
"package javadoc.b125676;\n" +
"public class A {\n" +
@@ -3136,7 +3136,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
*/
public void testBug125903() throws JavaModelException {
this.workingCopies = new ICompilationUnit[1];
- this.astLevel = AST.JLS3;
+ this.astLevel = getJLS3();
this.workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b125903/Test.java",
"package javadoc.b125903;\n" +
"/**\n" +
@@ -3244,7 +3244,7 @@ public class ASTConverterJavadocTest extends ConverterTestSetup {
" String b = \"b\"; //$NON-NLS-1$\n" +
"}\n"
);
- CompilationUnit compilUnit = (CompilationUnit) runConversion(AST.JLS3, this.workingCopies[0], true);
+ CompilationUnit compilUnit = (CompilationUnit) runConversion(getJLS3(), this.workingCopies[0], true);
verifyWorkingCopiesComments();
if (this.docCommentSupport.equals(JavaCore.ENABLED)) {
// Verify comment type
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
index 90df04bd3..03c13beeb 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -54,7 +54,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public void test0001() throws JavaModelException {
@@ -71,7 +71,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -138,7 +138,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -206,7 +206,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -274,7 +274,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -316,7 +316,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -373,7 +373,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -419,7 +419,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -472,7 +472,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -534,7 +534,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -587,7 +587,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -640,7 +640,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -693,7 +693,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -739,7 +739,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -789,7 +789,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -834,7 +834,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -879,7 +879,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -923,7 +923,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -1006,7 +1006,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -1046,7 +1046,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
"}\n");
char[] source = this.workingCopies[0].getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
@@ -1089,7 +1089,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
" synchronized new Object();\n" +
" }\n" +
"}\n");
- ASTNode result = runConversion(AST.JLS3, this.workingCopies[0], true, true);
+ ASTNode result = runConversion(getJLS3(), this.workingCopies[0], true, true);
assertASTNodeEquals(
"package test;\n" +
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
index ba0d20344..8e299a871 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -5239,7 +5239,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
"}";
addLibrary(p, "test0571.jar", "test0571.zip", new String[] {"X.java", source }, "1.4");
IClassFile classFile = getClassFile("P", "/P/test0571.jar", "", "X$Y.class");
- CompilationUnit unit = (CompilationUnit) runConversion(AST.JLS3, classFile, 0, true);
+ CompilationUnit unit = (CompilationUnit) runConversion(getJLS3(), classFile, 0, true);
IProblem[] problems = unit.getProblems();
StringBuffer buffer = new StringBuffer();
for (int i = 0, length = problems.length; i < length; i++)
@@ -5530,7 +5530,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
" }\n" +
"}"
);
- ASTNode cu = workingCopy.reconcile(AST.JLS3, true, true, null, null);
+ ASTNode cu = workingCopy.reconcile(getJLS3(), true, true, null, null);
assertNotNull("Should get an AST", cu);
} finally {
if (workingCopy != null)
@@ -5555,7 +5555,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
);
// Create parser
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setSource(workingCopy);
parser.setFocalPosition(0);
parser.setResolveBindings(true);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
index 8f7991f48..d33456bce 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -115,7 +115,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTConverterTestAST3_2(String name) {
@@ -135,7 +135,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0401() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0401", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -161,7 +161,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0402() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0402", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 0);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
assertNotNull(node);
@@ -174,7 +174,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0403() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0403", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
assertNotNull(node);
@@ -208,7 +208,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0404() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0404", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
assertNotNull(node);
@@ -239,7 +239,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0405() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0405", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
ASTNode node = getASTNode((CompilationUnit) result, 1, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
assertNotNull(node);
@@ -270,7 +270,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0406() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0406", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
@@ -303,7 +303,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0407() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0407", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
CompilationUnit unit = (CompilationUnit) result;
@@ -334,7 +334,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0408() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0408", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
assertNotNull(node);
@@ -368,7 +368,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0409", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
assertProblemsSize(compilationUnit, 0);
@@ -454,7 +454,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0410() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0410", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull(node);
@@ -471,7 +471,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0411() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
assertNotNull(node);
@@ -488,7 +488,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0412() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0412", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -518,7 +518,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0413() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0413", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -540,7 +540,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0414() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0414", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -566,7 +566,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- result = runConversion(AST.JLS3, sourceUnit2, true);
+ result = runConversion(getJLS3(), sourceUnit2, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit2 = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit2.getProblems().length); //$NON-NLS-1$
@@ -583,7 +583,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0415() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0415", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -605,7 +605,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0416() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0416", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -638,7 +638,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0417() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0417", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -663,7 +663,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0418() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0418", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -684,7 +684,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0419() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0419", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -707,7 +707,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0420() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0420", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -734,7 +734,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0421() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0421", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -762,7 +762,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0422() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0422", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -790,7 +790,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0423() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0423", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -817,7 +817,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0424() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0424", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -841,7 +841,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0425() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0425", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -868,7 +868,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0426() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0426", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -889,7 +889,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0427() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0427", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -914,7 +914,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0428() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0428", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -939,7 +939,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0429() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0429", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -965,7 +965,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0430() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0430", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -988,7 +988,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0431() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0431", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1009,7 +1009,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0432() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0432", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1031,7 +1031,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0433() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0433", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1060,7 +1060,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0434() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0434", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1084,7 +1084,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0435() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0435", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1108,7 +1108,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0436() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0436", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 1, "The type A.CInner is not visible"); //$NON-NLS-1$
@@ -1134,7 +1134,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0437() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0437", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 1, "The type CInner is not visible"); //$NON-NLS-1$
@@ -1156,7 +1156,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0438() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0438", "D.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1172,7 +1172,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0439() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0439", "E.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, false, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, false, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1193,7 +1193,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0440() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0440", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1233,7 +1233,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0441() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0441", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1261,7 +1261,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0442() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0442", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1290,7 +1290,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0443() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0443", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
@@ -1314,7 +1314,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0444() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0444", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
@@ -1337,7 +1337,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0445() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0445", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -1348,7 +1348,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0446() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0446", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$<
@@ -1359,7 +1359,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0447() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0447", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 3, unit.getProblems().length); //$NON-NLS-1$<
@@ -1370,7 +1370,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0448() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0448", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1389,7 +1389,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0449() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0449", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -1407,7 +1407,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0450() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0450", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
@@ -1495,7 +1495,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0451() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0451", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$
@@ -1512,7 +1512,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0452() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "NO_WORKING.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0);
@@ -1528,7 +1528,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0453() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0453", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0,0);
@@ -1548,7 +1548,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0454() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0454", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0,1);
@@ -1573,7 +1573,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0455() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0455", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1601,7 +1601,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0456() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0456", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1622,7 +1622,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0457() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0457", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1649,7 +1649,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0458() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0458", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1678,7 +1678,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0459() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0459", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1706,7 +1706,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0460() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0460", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
assertTrue("Has error", compilationUnit.getProblems().length == 0); //$NON-NLS-1$
@@ -1720,7 +1720,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0461() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0461", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
char[] source = sourceUnit.getSource().toCharArray();
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1757,7 +1757,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0462() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "", "Test462.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
assertTrue("Has error", compilationUnit.getProblems().length == 0); //$NON-NLS-1$
@@ -1776,7 +1776,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0463() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0463", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1797,7 +1797,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0464() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0464", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1819,7 +1819,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0465() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0465", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1851,7 +1851,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0466", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1875,7 +1875,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
JavaCore.setOptions(newOptions);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0467", "Assert.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
char[] source = sourceUnit.getSource().toCharArray();
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1900,7 +1900,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0468() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0468", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1939,7 +1939,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0469() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "codeManipulation", "bug.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1956,7 +1956,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0470() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0470", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1983,7 +1983,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0471() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0471", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 0);
@@ -2004,7 +2004,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0472() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "junit.textui", "ResultPrinter.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 2);
@@ -2027,7 +2027,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0473", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -2048,7 +2048,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0474() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0474", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2072,7 +2072,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0475() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0475", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2096,7 +2096,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0476() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0476", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2121,7 +2121,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0477() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0477", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit compilationUnit = (CompilationUnit) result;
assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2150,7 +2150,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -2199,7 +2199,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -2238,7 +2238,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2266,7 +2266,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2306,7 +2306,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -2344,7 +2344,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2387,7 +2387,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, memberTypes.length);
IType memberType = memberTypes[0];
ISourceRange sourceRange = memberType.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2418,7 +2418,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, memberTypes.length);
IType memberType = memberTypes[0];
ISourceRange sourceRange = memberType.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -2448,7 +2448,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
@@ -2479,7 +2479,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 3, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2552,7 +2552,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, initializers.length);
IInitializer init = initializers[1];
ISourceRange sourceRange = init.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -2616,7 +2616,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0489() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0489", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$<
@@ -2632,7 +2632,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0490() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0490", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2649,7 +2649,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
JavaCore.setOptions(newOptions);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0491", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2675,7 +2675,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
JavaCore.setOptions(newOptions);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0492", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2695,7 +2695,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0493() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0493", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2721,7 +2721,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0494() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0494", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2751,7 +2751,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0495() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0495", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2781,7 +2781,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0496() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0496", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2815,7 +2815,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0497() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0497", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$<
@@ -2835,7 +2835,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0498() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0498", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
}
@@ -2844,7 +2844,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0499() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0499", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -2882,7 +2882,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
project.setOption(JavaCore.COMPILER_PB_INVALID_JAVADOC, JavaCore.ERROR);
project.setOption(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS, JavaCore.ERROR);
project.setOption(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS, JavaCore.ERROR);
- CompilationUnit result = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit result = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
IProblem[] problems= result.getProblems();
assertTrue(problems.length == 1);
assertEquals("Invalid warning", "Javadoc: Missing tag for parameter a", problems[0].getMessage());
@@ -2896,7 +2896,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0501() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0501", "JavaEditor.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull(result);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
}
@@ -2906,7 +2906,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502a() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'i' in initializer
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 0, 0);
@@ -2920,7 +2920,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502b() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'j' in 'then' block in initializer
IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 0, 1);
@@ -2936,7 +2936,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502c() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'i' in 'foo()'
VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 1, 0);
@@ -2950,7 +2950,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502d() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'j' in 'then' block in 'foo()'
IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -2966,7 +2966,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502e() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'j' in 'else' block in 'foo()'
IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -2982,7 +2982,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502f() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// first 'new Object(){...}' in 'foo()'
ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 2);
@@ -2997,7 +2997,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502g() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'B' in 'foo()'
TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3011,7 +3011,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502h() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// second 'new Object(){...}' in 'foo()'
ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 4);
@@ -3026,7 +3026,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502i() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'field' in 'B' in 'foo()'
TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3044,7 +3044,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0502j() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0502", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// 'bar()' in 'B' in 'foo()'
TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3061,7 +3061,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503a() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// top level type A
TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0);
@@ -3074,7 +3074,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503b() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// member type B in A
TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0, 0);
@@ -3087,7 +3087,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503c() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// local type E in foo() in A
TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 0);
@@ -3101,7 +3101,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503d() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// anonymous type new Object() {...} in foo() in A
ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3116,7 +3116,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503e() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// type F in anonymous type new Object() {...} in foo() in A
ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3132,7 +3132,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503f() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// local type C in bar() in B in A
MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3147,7 +3147,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503g() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// anonymous type new Object() {...} in bar() in B in A
MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3163,7 +3163,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503h() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// type D in anonymous type new Object() {...} in bar() in B in A
MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3180,7 +3180,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0503i() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0503", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- CompilationUnit unit = (CompilationUnit)runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit unit = (CompilationUnit)runConversion(getJLS3(), sourceUnit, true);
// unreachable type G in foo() in A
IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 2);
@@ -3197,7 +3197,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0504() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0504", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3215,7 +3215,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0505() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0505", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -3232,7 +3232,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0506() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0506", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3252,7 +3252,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0507() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0507", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3272,7 +3272,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0508() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0508", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 1, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3292,7 +3292,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0509() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0509", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3312,7 +3312,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0510() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0510", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3332,7 +3332,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0511() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0511", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
@@ -3353,7 +3353,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0512() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0512", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0);
assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$
@@ -3369,7 +3369,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0513() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0513", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
}
@@ -3380,7 +3380,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0514() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0514", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
}
@@ -3391,7 +3391,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0515() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0515", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -3415,14 +3415,14 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0516() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0516", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
assertNotNull("No node", node);
assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
MethodDeclaration declaration = (MethodDeclaration) node;
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setSource(source);
parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3449,7 +3449,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0517() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0517", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
assertNotNull("No comments", unit.getCommentList());
@@ -3458,7 +3458,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertNotNull("No node", node);
assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
FieldDeclaration declaration = (FieldDeclaration) node;
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setSource(source);
parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3485,14 +3485,14 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0518() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0518", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
assertNotNull("No node", node);
assertTrue("not an initializer", node.getNodeType() == ASTNode.INITIALIZER);
Initializer declaration = (Initializer) node;
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setSource(source);
parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3519,7 +3519,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0519() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0519", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
assertNotNull("No comments", unit.getCommentList());
@@ -3527,7 +3527,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ASTNode node = getASTNode(unit, 0, 0, 0);
assertNotNull("No node", node);
ASTNode statement = node;
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_STATEMENTS);
parser.setSource(source);
parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -3554,7 +3554,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0520() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0520", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
assertNotNull("No comments", unit.getCommentList());
@@ -3564,7 +3564,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertTrue("not a block", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT);
ExpressionStatement expressionStatement = (ExpressionStatement) node;
Expression expression = expressionStatement.getExpression();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_EXPRESSION);
parser.setSource(source);
parser.setSourceRange(expression.getStartPosition(), expression.getLength());
@@ -3634,7 +3634,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -3683,7 +3683,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
@@ -3722,7 +3722,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3750,7 +3750,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3789,7 +3789,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 2, methods.length);
IMethod method = methods[1];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
@@ -3827,7 +3827,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, methods.length);
IMethod method = methods[0];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3868,7 +3868,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, memberTypes.length);
IType memberType = memberTypes[0];
ISourceRange sourceRange = memberType.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3897,7 +3897,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 1, memberTypes.length);
IType memberType = memberTypes[0];
ISourceRange sourceRange = memberType.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
@@ -3926,7 +3926,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 3, methods.length);
IMethod method = methods[2];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
@@ -3955,7 +3955,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("wrong size", 5, methods.length);
IMethod method = methods[3];
ISourceRange sourceRange = method.getSourceRange();
- ASTNode result = runConversion(AST.JLS3, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -4036,7 +4036,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
type = classFile.getType();
initializers = type.getInitializers();
assertEquals("wrong size", 0, initializers.length);
- ASTNode result = runConversion(AST.JLS3, classFile, position, false);
+ ASTNode result = runConversion(getJLS3(), classFile, position, false);
assertNotNull(result);
assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
@@ -4102,7 +4102,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0533() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0533", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4127,7 +4127,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0534() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0534", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4152,7 +4152,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0535() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0535", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4175,7 +4175,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0536() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0536", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result);
}
/**
@@ -4183,7 +4183,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0537a() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result);
}
/**
@@ -4191,7 +4191,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0537b() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result);
}
/**
@@ -4199,7 +4199,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0537c() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0537", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertNotNull("No compilation unit", result);
}
/**
@@ -4219,7 +4219,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
assertNotNull("No level 2 compilation unit", unit);
assertEquals("Compilation unit has wrong AST level (2)", AST.JLS2, unit.getAST().apiLevel());
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
} finally {
sourceUnit.discardWorkingCopy();
}
@@ -4253,7 +4253,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
sourceUnit.becomeWorkingCopy(null, null);
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
assertNull("Unexpected compilation unit", unit);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
} finally {
sourceUnit.discardWorkingCopy();
}
@@ -4273,7 +4273,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Object field;\n" +
"}"
);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
ASTNode node = getASTNode(unit, 0, 0);
assertNotNull("No node", node);
@@ -4297,7 +4297,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
try {
ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
sourceUnit.becomeWorkingCopy(pbRequestor, null);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
ASTNode node = getASTNode(unit, 0);
assertNotNull("No node", node);
@@ -4332,7 +4332,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
"}"
);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
ASTNode node = getASTNode(unit, 0);
assertNotNull("No node", node);
@@ -4363,7 +4363,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}"
);
sourceUnit.reconcile(ICompilationUnit.NO_AST, false/* don't force pb detection*/, null, null);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
ASTNode node = getASTNode(unit, 0);
assertNotNull("No node", node);
@@ -4391,7 +4391,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Object field;\n" +
"}"
);
- // TODO improve test for AST.JLS3
+ // TODO improve test for getJLS3()
CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void"));
} finally {
@@ -4404,7 +4404,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0539() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0539", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 1, 0);
@@ -4443,7 +4443,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_4);
options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project, options, true); //$NON-NLS-1$
+ ASTNode result = runConversion(getJLS3(), source, "Test.java", project, options, true); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -4463,7 +4463,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0541() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0541", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4492,7 +4492,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0542() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0542", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4660,7 +4660,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0543() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0543", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
unit.accept(new GetKeyVisitor());
@@ -4671,7 +4671,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0544() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0544", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4688,7 +4688,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0545() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0545", "First.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0);
@@ -4698,7 +4698,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("Wrong key", "Ltest0545/First$Test;", typeBinding.getKey());
sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Second.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- result = runConversion(AST.JLS3, sourceUnit, true);
+ result = runConversion(getJLS3(), sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
node = getASTNode(unit, 0, 0);
@@ -4708,7 +4708,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
assertEquals("Wrong key", "Ltest0545/Second$Test;", typeBinding.getKey());
sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Third.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- result = runConversion(AST.JLS3, sourceUnit, true);
+ result = runConversion(getJLS3(), sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
node = getASTNode(unit, 0, 0);
@@ -4719,7 +4719,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- result = runConversion(AST.JLS3, sourceUnit, true);
+ result = runConversion(getJLS3(), sourceUnit, true);
unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
node = getASTNode(unit, 0);
@@ -4734,7 +4734,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0546() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0546", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
final CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 1, 0, 0);
@@ -4777,7 +4777,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0547() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0547", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -4802,7 +4802,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0548() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0548", "PaletteStackEditPart.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4811,7 +4811,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0549() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0549", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4820,7 +4820,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0550() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0550", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -4830,7 +4830,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0551() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0551", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -4842,7 +4842,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0552() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.java");
char[] source = sourceUnit.getSource().toCharArray();
- CompilationUnit result = (CompilationUnit) runConversion(AST.JLS3, sourceUnit, true);
+ CompilationUnit result = (CompilationUnit) runConversion(getJLS3(), sourceUnit, true);
assertEquals("Got errors", 0, result.getProblems().length);
TypeDeclaration declaration = (TypeDeclaration) result.types().get(0);
Block body = declaration.getMethods()[0].getBody();
@@ -4873,7 +4873,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0553() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0553", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -4896,7 +4896,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0554() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0554", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -4925,7 +4925,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0555() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0555", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -4954,7 +4954,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0556() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0556", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -4979,7 +4979,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0557() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0557", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5023,7 +5023,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0559() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0559", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5051,7 +5051,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0560() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0560", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5079,7 +5079,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0561() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0561", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5107,7 +5107,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0562() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0562", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5135,7 +5135,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0563() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0563", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5162,7 +5162,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0564() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0564", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5189,7 +5189,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0565() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0565", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5216,7 +5216,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0566() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0566", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5232,7 +5232,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0567() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0567", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5247,7 +5247,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0568() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0568", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
}
@@ -5256,7 +5256,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0570() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0570", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5267,7 +5267,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* No binding when there is no unit name set
*/
public void test0571() throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
String source = "public class A {public boolean foo() {}}";
parser.setSource(source.toCharArray());
parser.setProject(getJavaProject("Converter"));
@@ -5284,7 +5284,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* No binding when there is no unit name set
*/
public void test0572() throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
String source = "public class A {public boolean foo() {}}";
parser.setSource(source.toCharArray());
parser.setProject(getJavaProject("Converter"));
@@ -5304,7 +5304,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0573", "Z.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
String source = sourceUnit.getSource();
int pos = source.indexOf("his.ba");
- ASTNode result = runConversion(AST.JLS3, sourceUnit, pos, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, pos, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0, 0, 0);
@@ -5323,7 +5323,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0574() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0574", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5352,7 +5352,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0575() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0575", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
final IProblem[] problems = unit.getProblems();
@@ -5389,7 +5389,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0578() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0578", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 0);
@@ -6392,7 +6392,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0607() throws JavaModelException {
final char[] source = "private static Category[] values = new Category[]{v1, v2, v3};".toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setSource(source);
ASTNode root = parser.createAST(null);
@@ -6463,7 +6463,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0610() throws JavaModelException {
final ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0610", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- final ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ final ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 1, "The type Test is deprecated");
@@ -6699,7 +6699,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents.toCharArray());
- ASTNode node = runConversion(AST.JLS3, workingCopy, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 1, "Dead code");
@@ -6734,7 +6734,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents.toCharArray());
- ASTNode node = runConversion(AST.JLS3, workingCopy, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedOutput = "Dead code";
@@ -6809,13 +6809,13 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0619() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0619", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, false);
final CompilationUnit unit = (CompilationUnit) result;
assertProblemsSize(unit, 0);
ASTNode node = getASTNode(unit, 0, 0, 0);
assertNotNull("No node", node);
ASTNode statement = node;
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_STATEMENTS);
parser.setSource(source);
parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -7082,7 +7082,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Test.java", project); //$NON-NLS-1$
+ ASTNode result = runConversion(getJLS3(), source, "Test.java", project); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7104,7 +7104,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" public void foo(int arg) {}\n" + //$NON-NLS-1$
"}").toCharArray(); //$NON-NLS-1$
IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
- ASTNode result = runConversion(AST.JLS3, source, "Object.java", project); //$NON-NLS-1$
+ ASTNode result = runConversion(getJLS3(), source, "Object.java", project); //$NON-NLS-1$
assertNotNull("No compilation unit", result); //$NON-NLS-1$
assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7179,7 +7179,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
* http://dev.eclipse.org/bugs/show_bug.cgi?id=125270
*/
public void test0628() throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_EXPRESSION);
String source = "{\"red\", \"yellow\"}";
parser.setSource(source.toCharArray());
@@ -7200,7 +7200,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0629() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0629", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
String expectedOutput =
@@ -7219,7 +7219,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0630() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0630", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
String expectedOutput =
@@ -7232,7 +7232,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0631() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0631", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) result;
String expectedOutput =
@@ -7293,7 +7293,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0633() {
String src = "switch (state) {case 4:double M0,M1;}";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_STATEMENTS);
parser.setSource (source);
ASTNode result = parser.createAST (null);
@@ -7337,7 +7337,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_COMPILATION_UNIT);
parser.setSource (source);
parser.setStatementsRecovery(true);
@@ -8049,7 +8049,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0653() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0653", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
CompilationUnit unit = (CompilationUnit) result;
@@ -8196,7 +8196,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int d;\n" +
" }";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_STATEMENTS);
parser.setStatementsRecovery(true);
parser.setSource (source);
@@ -8229,7 +8229,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int d;\n" +
" }";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_STATEMENTS);
parser.setStatementsRecovery(false);
parser.setSource (source);
@@ -8290,7 +8290,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" int d;\n" +
" }";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_STATEMENTS);
parser.setStatementsRecovery(true);
parser.setSource (source);
@@ -8316,7 +8316,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0659() throws CoreException, JavaModelException {
IJavaProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0], "bin");
try {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setStatementsRecovery(true);
parser.setBindingsRecovery(true);
@@ -8918,7 +8918,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0669() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0669", "UIPerformChangeOperation.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertNotNull(result);
}
@@ -8940,7 +8940,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedError =
@@ -8983,7 +8983,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedError =
@@ -9053,7 +9053,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedError =
@@ -9145,7 +9145,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertTrue("no binding recovery", unit.getAST().hasBindingsRecovery());
@@ -9211,7 +9211,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9251,7 +9251,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents);
- ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedError = "Constructor call must be the first statement in a constructor";
@@ -9278,7 +9278,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0676() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0676", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true, true, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true, true, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
assertTrue("no binding recovery", unit.getAST().hasBindingsRecovery());
@@ -9332,7 +9332,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0677() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0677", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) node;
node = getASTNode(unit, 0);
@@ -9366,7 +9366,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
workingCopy.getBuffer().setContents(contents.toCharArray());
- ASTNode node = runConversion(AST.JLS3, workingCopy, true);
+ ASTNode node = runConversion(getJLS3(), workingCopy, true);
assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
CompilationUnit unit = (CompilationUnit) node;
String expectedOutput = "Dead code";
@@ -9452,7 +9452,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0680() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0680", "SAMPLE_UTF8.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) node;
assertProblemsSize(compilationUnit, 0);
@@ -9469,7 +9469,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0681() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "Sample", "Sample.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit compilationUnit = (CompilationUnit) node;
assertProblemsSize(compilationUnit, 0);
@@ -9484,7 +9484,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0682() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0682", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(
@@ -9512,7 +9512,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0683() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0683", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9544,7 +9544,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0684() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0684", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9569,7 +9569,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0685() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0685", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode node = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode node = runConversion(getJLS3(), sourceUnit, true, true);
assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) node;
assertProblemsSize(unit, 0);
@@ -9696,7 +9696,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
IField field = type.getField("i");
assertNotNull("No field", field);
ISourceRange sourceRange = field.getNameRange();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
assertNotNull(result);
}
/**
@@ -9721,7 +9721,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newClasspathEntries.toArray(newClasspath);
project.setRawClasspath(newClasspath, null);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0689", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true);
assertNotNull(result);
ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
assertNull("Should be null", typeBinding);
@@ -9751,7 +9751,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
newClasspathEntries.toArray(newClasspath);
project.setRawClasspath(newClasspath, null);
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0690", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true, true, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true, true, true);
assertNotNull(result);
ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
assertNull("Should be null", typeBinding);
@@ -9768,7 +9768,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
IType type = unit.getType("X");
IMethod method = type.getMethod("foo", new String[0]);
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setSource(unit);
Hashtable options = JavaCore.getOptions();
@@ -9813,7 +9813,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0693", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ICompilationUnit unit2 = getCompilationUnit("Converter" , "src", "test0693", "Y.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
ASTRequestor requestor = new ASTRequestor() {};
ICompilationUnit[] cus = new ICompilationUnit[2];
cus[0] = unit;
@@ -9834,7 +9834,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0694", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ICompilationUnit unit2 = getCompilationUnit("Converter" , "src", "test0694", "Y.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
ASTRequestor requestor = new ASTRequestor() {};
ICompilationUnit[] cus = new ICompilationUnit[2];
cus[0] = unit;
@@ -9854,7 +9854,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0695() throws JavaModelException {
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0695", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(unit.getSource().toCharArray());
Map options = JavaCore.getOptions();
@@ -9879,7 +9879,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0696() throws JavaModelException {
ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0696", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(unit.getSource().toCharArray());
Map options = JavaCore.getOptions();
@@ -9997,7 +9997,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
IVariableBinding variableBinding = fragment.resolveBinding();
final String key = variableBinding.getKey();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setProject(workingCopy.getJavaProject());
parser.setResolveBindings(true);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10039,7 +10039,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
IVariableBinding variableBinding = fragment.resolveBinding();
final String key = variableBinding.getKey();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setProject(workingCopy.getJavaProject());
parser.setResolveBindings(true);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10082,7 +10082,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
IVariableBinding variableBinding = fragment.resolveBinding();
final String key = variableBinding.getKey();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setProject(workingCopy.getJavaProject());
parser.setResolveBindings(true);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10113,7 +10113,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
final char[] source = ("void foo() {\n" +
" Integer I = new ${cursor}\n" +
"}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10137,7 +10137,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Integer I = new ${cursor}\n" +
" }\n" +
"}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10159,7 +10159,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
final char[] source = ("{\n" +
" Integer I = new ${cursor}\n" +
"}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10184,7 +10184,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
"{\n" +
" Integer I = new ${cursor}\n" +
"}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10213,7 +10213,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" Integer I = new ${cursor}\n" +
" };\"\n" +
"}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10230,7 +10230,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
final char[] source = ("Integer i = new Integer() {\n" +
" Integer I = new ${cursor}\n" +
"};").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10244,7 +10244,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0708() throws JavaModelException {
final char[] source = ("System.out.println()\nint i;\n").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_STATEMENTS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10289,7 +10289,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0710() throws JavaModelException {
final char[] source = (";").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10304,7 +10304,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0711() throws JavaModelException {
final char[] source = (";void foo() {}").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10319,7 +10319,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0712() throws JavaModelException {
final char[] source = (";void foo() {};").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(true);
parser.setSource(source);
@@ -10342,7 +10342,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" if (condition) appendAndExecute(new AddCommand(...));\n" +
" }\n" +
" }").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(false);
parser.setSource(source);
@@ -10391,7 +10391,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
" }\n" +
" }").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(false);
parser.setSource(source);
@@ -10405,7 +10405,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
*/
public void test0715() throws JavaModelException {
final char[] source = ("System.out.println()\nint i;\n").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_STATEMENTS);
parser.setStatementsRecovery(true);
parser.setIgnoreMethodBodies(true);
@@ -10422,7 +10422,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0716() {
String src = "switch (state) {case 4:double M0,M1;}";
char[] source = src.toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind (ASTParser.K_STATEMENTS);
parser.setIgnoreMethodBodies(true);
parser.setSource (source);
@@ -10454,7 +10454,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" if (condition) appendAndExecute(new AddCommand());\n" +
" }\n" +
" }").toCharArray();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
parser.setStatementsRecovery(false);
parser.setIgnoreMethodBodies(true);
@@ -10567,7 +10567,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0720() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0720", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
@@ -10584,7 +10584,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void test0721() throws JavaModelException {
ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0721", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
char[] source = sourceUnit.getSource().toCharArray();
- ASTNode result = runConversion(AST.JLS3, sourceUnit, true);
+ ASTNode result = runConversion(getJLS3(), sourceUnit, true);
assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
CompilationUnit unit = (CompilationUnit) result;
ASTNode node = getASTNode(unit, 0);
@@ -10624,7 +10624,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
" }\n" +
"}\n";
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(getJLS3());
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(source.toCharArray());
CompilationUnit resultCompilationUnit = (CompilationUnit) parser.createAST(null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
index 3e8435b12..a19d1969d 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10595,7 +10595,7 @@ public class ASTConverterTestAST4_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
TryStatement statement = (TryStatement) buildAST(
- AST.JLS3,
+ getJLS3(),
contents,
workingCopy,
false,
@@ -10628,7 +10628,7 @@ public class ASTConverterTestAST4_2 extends ConverterTestSetup {
"}";
workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
TryStatement statement = (TryStatement) buildAST(
- AST.JLS3,
+ getJLS3(),
contents,
workingCopy,
false,
@@ -10695,7 +10695,7 @@ public class ASTConverterTestAST4_2 extends ConverterTestSetup {
"public class one {}";
workingCopy = getWorkingCopy("/Converter/src/one/two/one.java", true/*resolve*/);
CompilationUnit unit = (CompilationUnit) buildAST(
- AST.JLS3,
+ getJLS3(),
contents,
workingCopy,
true,
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
index c03724251..32a444755 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,13 +15,19 @@ import java.lang.reflect.Method;
import junit.framework.Test;
import org.eclipse.jdt.core.dom.*;
-import org.eclipse.jdt.core.dom.ASTNode;
/**
* Test suite for <code>ASTMatcher</code> and <code>ASTNode.subtreeMatch</code>.
*/
public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
/** @deprecated using deprecated code */
public static Test suite() {
// TODO (frederic) use buildList + setAstLevel(init) instead...
@@ -32,7 +38,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
for (int i = 0, max = methods.length; i < max; i++) {
if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$
suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS2));
- suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS3));
+ suite.addTest(new ASTMatcherTest(methods[i].getName(), JLS3_INTERNAL));
}
}
return suite;
@@ -183,7 +189,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
this.MPARM1 = this.ast.newMethodRefParameter();
this.MPARM1.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
this.PT1 = this.ast.newParameterizedType(this.ast.newSimpleType(this.ast.newSimpleName("Z"))); //$NON-NLS-1$
this.PT1S = "[(tM[(tS[(nSZZnS)]tS)]tM)]"; //$NON-NLS-1$
@@ -234,7 +240,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
case AST.JLS2:
name = "JLS2 - " + name;
break;
- case AST.JLS3:
+ case JLS3_INTERNAL:
name = "JLS3 - " + name;
break;
}
@@ -805,7 +811,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
}
public void testConstructorInvocation() {
ConstructorInvocation x1 = this.ast.newConstructorInvocation();
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.typeArguments().add(this.PT1);
}
x1.arguments().add(this.E1);
@@ -885,7 +891,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
public void testFieldDeclaration() {
FieldDeclaration x1 = this.ast.newFieldDeclaration(this.W1);
x1.setJavadoc(this.JD1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.modifiers().add(this.MOD1);
x1.modifiers().add(this.MOD2);
}
@@ -927,7 +933,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
public void testInitializer() {
Initializer x1 = this.ast.newInitializer();
x1.setJavadoc(this.JD1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.modifiers().add(this.MOD1);
x1.modifiers().add(this.MOD2);
}
@@ -992,7 +998,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
public void testMethodInvocation() {
MethodInvocation x1 = this.ast.newMethodInvocation();
x1.setExpression(this.N1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.typeArguments().add(this.PT1);
}
x1.setName(this.N2);
@@ -1025,7 +1031,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
}
public void testPackageDeclaration() {
PackageDeclaration x1 = this.ast.newPackageDeclaration();
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.setJavadoc(this.JD1);
x1.annotations().add(this.ANO1);
x1.annotations().add(this.ANO2);
@@ -1055,7 +1061,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
}
public void testSingleVariableDeclaration() {
SingleVariableDeclaration x1 = this.ast.newSingleVariableDeclaration();
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.modifiers().add(this.MOD1);
x1.modifiers().add(this.MOD2);
}
@@ -1072,7 +1078,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
public void testSuperConstructorInvocation() {
SuperConstructorInvocation x1 = this.ast.newSuperConstructorInvocation();
x1.setExpression(this.N1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.typeArguments().add(this.PT1);
}
x1.arguments().add(this.E1);
@@ -1088,7 +1094,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
public void testSuperMethodInvocation() {
SuperMethodInvocation x1 = this.ast.newSuperMethodInvocation();
x1.setQualifier(this.N1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.typeArguments().add(this.PT1);
}
x1.setName(this.N2);
@@ -1225,7 +1231,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
}
public void testVariableDeclarationExpression() {
VariableDeclarationExpression x1 = this.ast.newVariableDeclarationExpression(this.W1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.modifiers().add(this.MOD1);
x1.modifiers().add(this.MOD2);
}
@@ -1235,7 +1241,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
}
public void testVariableDeclarationStatement() {
VariableDeclarationStatement x1 = this.ast.newVariableDeclarationStatement(this.W1);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x1.modifiers().add(this.MOD1);
x1.modifiers().add(this.MOD2);
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
index ccf0c1281..5a94b556e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.tests.model.AbstractJavaSearchTests;
+import org.eclipse.jdt.core.tests.util.Util;
import junit.framework.Test;
@@ -32,6 +33,20 @@ public class ASTModelBridgeTests extends AbstractASTTests {
ICompilationUnit workingCopy;
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
+ protected void checkSourceRange(int start, int length, String expectedContents, String source) {
+ assertTrue("length == 0", length != 0); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("start == -1", start != -1); //$NON-NLS-1$
+ String actualContentsString = source.substring(start, start + length);
+ assertSourceEquals("Unexpected source", Util.convertToIndependantLineDelimiter(expectedContents), Util.convertToIndependantLineDelimiter(actualContentsString));
+ }
+
public ASTModelBridgeTests(String name) {
super(name);
}
@@ -44,7 +59,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
// All specified tests which do not belong to the class are skipped...
static {
// TESTS_PREFIX = "testBug86380";
-// TESTS_NAMES = new String[] { "testAnnotation9" };
+// TESTS_NAMES = new String[] { "testLocalVariable7" };
// TESTS_NUMBERS = new int[] { 83230 };
// TESTS_RANGE = new int[] { 83304, -1 };
}
@@ -83,7 +98,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
private IBinding[] createBindings(String contents, IJavaElement element) throws JavaModelException {
this.workingCopy.getBuffer().setContents(contents);
this.workingCopy.makeConsistent(null);
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setProject(getJavaProject("P"));
IJavaElement[] elements = new IJavaElement[] {element};
return parser.createBindings(elements, null);
@@ -91,7 +106,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
private IBinding[] createBinaryBindings(String contents, IJavaElement element) throws CoreException {
createClassFile("/P/lib", "A.class", contents);
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setProject(getJavaProject("P"));
IJavaElement[] elements = new IJavaElement[] {element};
return parser.createBindings(elements, null);
@@ -732,7 +747,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
* (test several kinds of elements)
*/
public void testCreateBindings01() throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(getJavaProject("P"));
WorkingCopyOwner owner = new WorkingCopyOwner() {};
@@ -783,7 +798,7 @@ public class ASTModelBridgeTests extends AbstractASTTests {
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=297757
*/
public void testCreateBindings23() throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setProject(getJavaProject("P"));
WorkingCopyOwner owner = new WorkingCopyOwner() {};
this.workingCopies = new ICompilationUnit[3];
@@ -1653,6 +1668,40 @@ public class ASTModelBridgeTests extends AbstractASTTests {
}
/*
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=368646
+ */
+ public void testLocalVariable7() throws JavaModelException {
+ final String source = "public class X {\n" +
+ " public void m(String strX) {\n" +
+ " String strB = strX;\n" +
+ " }\n" +
+ "}";
+ ASTNode node = buildAST(source);
+ final boolean[] checked = new boolean[1];
+ node.accept(new ASTVisitor() {
+ public boolean visit(VariableDeclarationFragment fragment) {
+ final IVariableBinding binding = fragment.resolveBinding();
+ final IJavaElement javaElement = binding.getJavaElement();
+ assertNotNull("No java element", javaElement);
+ final int type = javaElement.getElementType();
+ assertEquals("Wrong type", IJavaElement.LOCAL_VARIABLE, type);
+ ILocalVariable variable = (ILocalVariable) javaElement;
+ ISourceRange range = variable.getNameRange();
+ checkSourceRange(range.getOffset(), range.getLength(), "strB", source);
+ try {
+ range = variable.getSourceRange();
+ checkSourceRange(range.getOffset(), range.getLength(), "String strB = strX;", source);
+ } catch(JavaModelException e) {
+ assertTrue("failed to retrieve the source range", false);
+ }
+ checked[0] = true;
+ return true;
+ }
+ });
+ assertTrue("Not checked", checked[0]);
+ }
+
+ /*
* Ensures that the IJavaElement of an IBinding representing a member type is correct.
*/
public void testMemberType() throws JavaModelException {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
index 90e6d3c84..38a26d7da 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ public class ASTNodeFinderTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTNodeFinderTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
index ecfd7e0ea..5c28ac178 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,7 +25,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS3);
+ this.ast = AST.newAST(getJLS3());
}
public ASTPositionsTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
index f8725c02f..5afe3a7be 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java
@@ -29,6 +29,13 @@ import org.eclipse.jdt.core.dom.*;
public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
class CheckPositionsMatcher extends ASTMatcher {
public CheckPositionsMatcher() {
@@ -737,7 +744,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
for (int i = 0, max = methods.length; i < max; i++) {
if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$
suite.addTest(new ASTTest(methods[i].getName(), AST.JLS2));
- suite.addTest(new ASTTest(methods[i].getName(), AST.JLS3));
+ suite.addTest(new ASTTest(methods[i].getName(), JLS3_INTERNAL));
suite.addTest(new ASTTest(methods[i].getName(), AST.JLS4));
}
}
@@ -770,7 +777,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
case AST.JLS2:
name = "JLS2 - " + name;
break;
- case AST.JLS3:
+ case JLS3_INTERNAL:
name = "JLS3 - " + name;
break;
}
@@ -1281,7 +1288,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
public void testAST() {
assertSame(AST.JLS2, 2);
- assertSame(AST.JLS3, 3);
+ assertSame(JLS3_INTERNAL, 3);
AST a0 = new AST(); // deprecated, but still 2.0
assertTrue(a0.apiLevel() == AST.JLS2);
@@ -1289,8 +1296,8 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(a1.apiLevel() == AST.JLS2);
AST a2 = AST.newAST(AST.JLS2);
assertTrue(a2.apiLevel() == AST.JLS2);
- AST a3 = AST.newAST(AST.JLS3);
- assertTrue(a3.apiLevel() == AST.JLS3);
+ AST a3 = AST.newAST(JLS3_INTERNAL);
+ assertTrue(a3.apiLevel() == JLS3_INTERNAL);
// modification count is always non-negative
assertTrue(this.ast.modificationCount() >= 0);
@@ -1494,7 +1501,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
fd.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
assertTrue(x.isDeclaration() == false);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
AnnotationTypeDeclaration atd = this.ast.newAnnotationTypeDeclaration();
atd.setName(x);
assertTrue(x.isDeclaration() == true);
@@ -1502,7 +1509,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.isDeclaration() == false);
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
AnnotationTypeMemberDeclaration atmd = this.ast.newAnnotationTypeMemberDeclaration();
atmd.setName(x);
assertTrue(x.isDeclaration() == true);
@@ -2375,7 +2382,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
previousCount = this.ast.modificationCount();
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.getJavadoc() == null);
assertTrue(x.annotations().isEmpty());
}
@@ -2385,7 +2392,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
// make sure that reading did not change modification count
assertTrue(this.ast.modificationCount() == previousCount);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyTest(x, new Property("Javadoc", false, Javadoc.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
Javadoc result = targetAst.newJavadoc();
@@ -2439,7 +2446,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
assertTrue(x.isOnDemand() == false);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.isStatic() == false);
}
assertTrue(x.getName().getParent() == x);
@@ -2473,7 +2480,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(this.ast.modificationCount() > previousCount);
assertTrue(x.isOnDemand() == true);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
x.setStatic(true);
assertTrue(this.ast.modificationCount() > previousCount);
assertTrue(x.isStatic() == true);
@@ -2669,7 +2676,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeParameters(),
new Property("TypeParameters", true, TypeParameter.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -2713,7 +2720,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
});
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyTest(x, new Property("SuperclassType", false, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
SimpleType result = targetAst.newSimpleType(targetAst.newSimpleName("foo")); //$NON-NLS-1$
@@ -2731,7 +2738,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
});
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.superInterfaceTypes(),
new Property("SuperInterfaceTypes", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -2777,7 +2784,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
EnumConstantDeclaration c1 = null;
EnumConstantDeclaration c2 = null;
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
c1 = this.ast.newEnumConstantDeclaration();
c2 = this.ast.newEnumConstantDeclaration();
x.bodyDeclarations().add(c1);
@@ -3166,7 +3173,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(this.ast.modificationCount() > previousCount);
assertTrue(x.getExtraDimensions() == 0);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
previousCount = this.ast.modificationCount();
x.setVarargs(true);
assertTrue(this.ast.modificationCount() > previousCount);
@@ -3178,7 +3185,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.isVarargs() == false);
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.modifiers(), new Property("Modifiers", true, IExtendedModifier.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
Modifier result = targetAst.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
@@ -3453,7 +3460,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
tJavadocComment(x);
tModifiers(x);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeParameters(),
new Property("TypeParameters", true, TypeParameter.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -3501,7 +3508,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
});
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyTest(x, new Property("ReturnType2", false, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
SimpleType result = targetAst.newSimpleType(
@@ -3585,7 +3592,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
// check isVariableArity convenience method
x.parameters().clear();
assertTrue(!x.isVarargs()); // 0 params
@@ -4095,7 +4102,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.getParent() == null);
assertTrue(x.getNodeType() == ASTNode.METHOD_REF_PARAMETER);
assertTrue(x.getType().getParent() == x);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.isVarargs() == false);
}
assertTrue(x.getName() == null);
@@ -4104,7 +4111,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
// make sure that reading did not change modification count
assertTrue(this.ast.modificationCount() == previousCount);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
previousCount = this.ast.modificationCount();
x.setVarargs(true);
assertTrue(this.ast.modificationCount() > previousCount);
@@ -4196,7 +4203,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
previousCount = this.ast.modificationCount();
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.typeArguments().isEmpty());
}
assertTrue(x.getName().getParent() == x);
@@ -4234,7 +4241,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeArguments(),
new Property("TypeArguments", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -4378,7 +4385,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.getModifiers() == Modifier.NONE);
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.modifiers(), new Property("Modifiers", true, IExtendedModifier.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
Modifier result = targetAst.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
@@ -4537,7 +4544,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
});
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyTest(x, new Property("Declaration", true, AbstractTypeDeclaration.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
AbstractTypeDeclaration result = targetAst.newTypeDeclaration();
@@ -4609,7 +4616,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.getModifiers() == Modifier.NONE);
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.modifiers(), new Property("Modifiers", true, IExtendedModifier.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
Modifier result = targetAst.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD);
@@ -5275,7 +5282,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
* @deprecated (Uses getLeadingComment() which is deprecated)
*/
public void testTryStatement() {
- if (this.ast.apiLevel() <= AST.JLS3) {
+ if (this.ast.apiLevel() <= JLS3_INTERNAL) {
// node type introduced in 4.0 API
try {
final TryStatement x = this.ast.newTryStatement();
@@ -6581,7 +6588,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
previousCount = this.ast.modificationCount();
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.typeArguments().isEmpty());
}
assertTrue(x.arguments().isEmpty());
@@ -6591,7 +6598,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
// make sure that reading did not change modification count
assertTrue(this.ast.modificationCount() == previousCount);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeArguments(),
new Property("TypeArguments", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -6640,7 +6647,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
assertTrue(x.getExpression() == null);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.typeArguments().isEmpty());
}
assertTrue(x.arguments().isEmpty());
@@ -6682,7 +6689,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeArguments(),
new Property("TypeArguments", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -6871,7 +6878,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
previousCount = this.ast.modificationCount();
assertTrue(x.getAST() == this.ast);
assertTrue(x.getParent() == null);
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
assertTrue(x.typeArguments().isEmpty());
}
assertTrue(x.getName().getParent() == x);
@@ -6901,7 +6908,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeArguments(),
new Property("TypeArguments", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -7681,7 +7688,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
});
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyListTest(x, x.typeArguments(),
new Property("TypeArguments", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
@@ -7712,7 +7719,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
});
}
- if (this.ast.apiLevel() >= AST.JLS3) {
+ if (this.ast.apiLevel() >= JLS3_INTERNAL) {
genericPropertyTest(x, new Property("Type", true, Type.class) { //$NON-NLS-1$
public ASTNode sample(AST targetAst, boolean parented) {
SimpleType result = targetAst.newSimpleType(targetAst.newSimpleName("foo")); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
index 29c14132a..20432e932 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/AbstractASTTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -61,6 +61,12 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM
/** @deprecated Using deprecated code */
private static final int AST_INTERNAL_JLS2 = AST.JLS2;
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int AST_INTERNAL_JLS3 = AST.JLS3;
public static final int astInternalJLS2() {
return AST_INTERNAL_JLS2;
}
@@ -300,7 +306,7 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM
* and returns the AST node that was delimited by the astStart and astEnd of the marker info.
*/
protected ASTNode buildAST(MarkerInfo markerInfo, IClassFile classFile, boolean reportErrors) throws JavaModelException {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS3);
parser.setSource(classFile);
parser.setResolveBindings(true);
CompilationUnit unit = (CompilationUnit) parser.createAST(null);
@@ -373,13 +379,13 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM
CompilationUnit unit;
if (cu.isWorkingCopy()) {
cu.getBuffer().setContents(newContents);
- unit = cu.reconcile(AST.JLS3, flags, null, null);
+ unit = cu.reconcile(AST_INTERNAL_JLS3, flags, null, null);
} else {
IBuffer buffer = cu.getBuffer();
buffer.setContents(newContents);
buffer.save(null, false);
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS3);
parser.setSource(cu);
parser.setResolveBindings(true);
parser.setStatementsRecovery((flags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
@@ -461,7 +467,7 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM
protected ASTNode[] buildASTs(String newContents, ICompilationUnit cu, boolean reportErrors, boolean enableStatementRecovery, boolean bindingRecovery) throws JavaModelException {
String option = cu.getJavaProject().getOption(JavaCore.COMPILER_COMPLIANCE, true);
long jdkLevel = CompilerOptions.versionToJdkLevel(option);
- int JLSLevel = AST.JLS3;
+ int JLSLevel = AST_INTERNAL_JLS3;
if (jdkLevel >= ClassFileConstants.JDK1_7) {
JLSLevel = AST.JLS4;
}
@@ -654,7 +660,7 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM
}
protected void resolveASTs(ICompilationUnit[] cus, String[] bindingKeys, ASTRequestor requestor, IJavaProject project, WorkingCopyOwner owner) {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST_INTERNAL_JLS3);
parser.setResolveBindings(true);
parser.setProject(project);
parser.setWorkingCopyOwner(owner);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
index 3aadde1b1..8016c80d7 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -38,6 +38,13 @@ import org.eclipse.jdt.core.tests.util.Util;
public class BatchASTCreationTests extends AbstractASTTests {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
public class TestASTRequestor extends ASTRequestor {
public ArrayList asts = new ArrayList();
public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
@@ -205,7 +212,7 @@ public class BatchASTCreationTests extends AbstractASTTests {
}
private void createASTs(ICompilationUnit[] cus, TestASTRequestor requestor) {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.createASTs(cus, new String[] {}, requestor, null);
}
@@ -1736,7 +1743,7 @@ public void test073() throws CoreException, IOException {
" return this.m.equals(p);\n" +
" }\n" +
"}");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(project);
class Requestor extends ASTRequestor {
@@ -1883,7 +1890,7 @@ public void test078() throws CoreException, IOException {
" }\n" +
" }\n" +
"}");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(project);
final IBinding[] bindings = new IBinding[1];
@@ -1939,7 +1946,7 @@ public void test079() throws CoreException, IOException {
"}");
ICompilationUnit compilationUnits[] = new ICompilationUnit[1];
compilationUnits[0] = getCompilationUnit("P079", "src", "test", "Test.java");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(project);
final IBinding[] bindings = new IBinding[1];
@@ -1997,7 +2004,7 @@ public void test080() throws CoreException, IOException {
"}");
ICompilationUnit compilationUnits[] = new ICompilationUnit[1];
compilationUnits[0] = getCompilationUnit(projectName, "src", "test", "Test.java");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(project);
final IBinding[] bindings = new IBinding[1];
@@ -2045,7 +2052,7 @@ public void test081() throws CoreException, IOException {
BindingKey.createTypeBindingKey(typeName)
};
final BindingRequestor requestor = new BindingRequestor();
- final ASTParser parser = ASTParser.newParser(AST.JLS3);
+ final ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(javaProject);
// this doesn't really do a parse; it's a type lookup
@@ -2074,7 +2081,7 @@ public void test082() throws CoreException, IOException {
BindingKey.createTypeBindingKey(typeName)
};
final BindingRequestor requestor = new BindingRequestor();
- final ASTParser parser = ASTParser.newParser(AST.JLS3);
+ final ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setResolveBindings(true);
parser.setProject(javaProject);
// this doesn't really do a parse; it's a type lookup
@@ -2225,7 +2232,7 @@ public void test082() throws CoreException, IOException {
"}",
});
TestASTRequestor requestor = new TestASTRequestor();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setIgnoreMethodBodies(true);
parser.createASTs(this.workingCopies, new String[] {}, requestor, null);
// statement declaring i should not be in the AST
@@ -2257,7 +2264,7 @@ public void test082() throws CoreException, IOException {
"}",
});
TestASTRequestor requestor = new TestASTRequestor();
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setIgnoreMethodBodies(true);
parser.setResolveBindings(true);
parser.setProject(getJavaProject("P"));
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
index aa9aaa29f..0a5987276 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ConverterTestSetup.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,12 @@ import org.eclipse.jdt.core.dom.*;
import org.eclipse.jdt.core.tests.util.Util;
public abstract class ConverterTestSetup extends AbstractASTTests {
-
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
protected AST ast;
static List TEST_SUITES = null;
static boolean PROJECT_SETUP = false;
@@ -432,7 +437,7 @@ public abstract class ConverterTestSetup extends AbstractASTTests {
parser.createAST(null);
}
- parser = ASTParser.newParser(AST.JLS3);
+ parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setSource(unit);
parser.setResolveBindings(resolveBindings);
parser.setBindingsRecovery(bindingRecovery);
@@ -665,4 +670,8 @@ public abstract class ConverterTestSetup extends AbstractASTTests {
}
}
}
+
+ static int getJLS3() {
+ return JLS3_INTERNAL;
+ }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
index 855148e62..fa3174830 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,6 +37,13 @@ import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
static class Result implements Comparable {
long length;
long time;
@@ -158,7 +165,7 @@ public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
case AST.JLS2 :
System.out.print("JLS2");
break;
- case AST.JLS3 :
+ case JLS3_INTERNAL :
System.out.print("JLS3");
break;
}
@@ -234,7 +241,7 @@ public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
public void test0000() throws JavaModelException {
try {
RESOLVE_BINDINGS = true;
- final int apiLevel = AST.JLS3;
+ final int apiLevel = JLS3_INTERNAL;
ASTParser parser = ASTParser.newParser(apiLevel);
parser.setResolveBindings(RESOLVE_BINDINGS);
int length = this.compilationUnits.length;
@@ -270,7 +277,7 @@ public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
public void test0001() throws JavaModelException {
try {
RESOLVE_BINDINGS = true;
- final int apiLevel = AST.JLS3;
+ final int apiLevel = JLS3_INTERNAL;
ASTParser parser = ASTParser.newParser(apiLevel);
parser.setResolveBindings(RESOLVE_BINDINGS);
long totalTime = 0;
@@ -309,7 +316,7 @@ public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
public void test0002() throws JavaModelException {
try {
RESOLVE_BINDINGS = false;
- final int apiLevel = AST.JLS3;
+ final int apiLevel = JLS3_INTERNAL;
ASTParser parser = ASTParser.newParser(apiLevel);
parser.setResolveBindings(RESOLVE_BINDINGS);
long totalTime = 0;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
index 5a1900bd3..22c86c464 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/SampleASTs.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,6 +17,13 @@ import org.eclipse.jdt.core.dom.*;
public class SampleASTs {
/**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
+ /**
* Returns a subtree of sample of AST nodes. The sample includes
* one of each kind (except for BlockComment and LineComment,
* which cannot be connected directly to a CompilationUnit),
@@ -50,7 +57,7 @@ public class SampleASTs {
Initializer in = target.newInitializer();
td.bodyDeclarations().add(in);
- if (target.apiLevel() >= AST.JLS3) {
+ if (target.apiLevel() >= JLS3_INTERNAL) {
EnumDeclaration ed = target.newEnumDeclaration();
td.bodyDeclarations().add(ed);
EnumConstantDeclaration ec = target.newEnumConstantDeclaration();
@@ -70,7 +77,7 @@ public class SampleASTs {
ArrayType at = target.newArrayType(pt);
fd.setType(at);
- if (target.apiLevel() >= AST.JLS3) {
+ if (target.apiLevel() >= JLS3_INTERNAL) {
SimpleType st = target.newSimpleType(qn);
QualifiedType qt = target.newQualifiedType(st, target.newSimpleName("x")); //$NON-NLS-1$
WildcardType wt = target.newWildcardType();
@@ -103,7 +110,7 @@ public class SampleASTs {
b.statements().add(expressionStatement);
ForStatement forStatement = target.newForStatement();
b.statements().add(forStatement);
- if (target.apiLevel() >= AST.JLS3) {
+ if (target.apiLevel() >= JLS3_INTERNAL) {
EnhancedForStatement foreachStatement = target.newEnhancedForStatement();
b.statements().add(foreachStatement);
}
@@ -201,7 +208,7 @@ public class SampleASTs {
z.add(variableDeclarationExpression);
// annotations
- if (target.apiLevel() >= AST.JLS3) {
+ if (target.apiLevel() >= JLS3_INTERNAL) {
AnnotationTypeDeclaration atd = target.newAnnotationTypeDeclaration();
cu.types().add(atd);
atd.bodyDeclarations().add(target.newAnnotationTypeMemberDeclaration());
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
index 537f730fd..e33db135c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AllJavaModelTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -130,6 +130,9 @@ private static Class[] getAllTestClasses() {
// Access restrictions tests
AccessRestrictionsTests.class,
+ // Ignore optional problems from source folders tests
+ IgnoreOptionalProblemsFromSourceFoldersTests.class,
+
// Signature tests
SignatureTests.class,
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
index 0d6ad4d14..26a62e12b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AttachSourceTests.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.jdt.core.tests.model;
+import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -50,6 +51,7 @@ import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
import org.eclipse.jdt.internal.core.ExternalFoldersManager;
import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
+import org.eclipse.jdt.internal.core.JavaModelManager;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.util.Util;
@@ -499,11 +501,39 @@ public void testExternalFolder5() throws Exception {
"}"
};
org.eclipse.jdt.core.tests.util.Util.createSourceDir(pathsAndContents, externalFolder + "/src228639/src");
+
createExternalFolder("externalFolder/src228639/META-INF");
createExternalFolder("externalFolder/lib/META-INF");
String externalLib = externalFolder + "/lib";
- IJavaProject javaProject = createJavaProject("P", new String[0], new String[] {externalLib}, "");
+ IJavaProject javaProject = null;
+ try {
+ javaProject = createJavaProject("P", new String[0], new String[] {externalLib}, "");
+ }
+ catch (Exception e) {
+ IFolder folder = getFolder(externalLib);
+ System.out.println("---------- This information is logged for debugging purposes as this test fails sporadically.---------");
+ System.out.println("Failing when creating Link folder for: " + externalFolder);
+ System.out.println("Existing? " + folder.exists());
+ IProject externalFolderProject = JavaModelManager.getExternalManager().getExternalFoldersProject();
+ IFile externalProjectFile = externalFolderProject.getFile(".project");
+ if (externalProjectFile.exists()) {
+ System.out.println("External Folder Project exists with following content:");
+ BufferedInputStream bs = new BufferedInputStream(externalProjectFile.getContents());
+ int available = 0;
+ while ((available = bs.available()) > 0) {
+ byte[] contents = new byte[available];
+ bs.read(contents);
+ System.out.println(new String(contents));
+ }
+ bs.close();
+ }
+ else {
+ System.out.println("External folders project doesn't exist.");
+ }
+ System.out.println("---------- Debug information ends ---------");
+ throw e;
+ }
IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(externalLib);
attachSource(root, externalFolder + "/src228639", "");
IType type = root.getPackageFragment("p").getClassFile("X.class").getType();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
index ab7614778..183581e6c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -54,6 +54,13 @@ public static Test suite() {
return suite;
}
+/**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
/* (non-Javadoc)
* @see org.eclipse.jdt.core.tests.model.AbstractJavaModelTests#setUp()
*/
@@ -1210,7 +1217,7 @@ public void testBug152841() throws Exception{
"}";
ICompilationUnit cu= pack.createCompilationUnit("Test.java", source, true, null);
- ASTParser parser= ASTParser.newParser(AST.JLS3);
+ ASTParser parser= ASTParser.newParser(JLS3_INTERNAL);
parser.setSource(cu);
parser.setResolveBindings(true);
parser.createAST(null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
index fcbe28f28..77a5b58b2 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClasspathTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,9 +69,12 @@ import org.eclipse.jdt.internal.core.ClasspathEntry;
import org.eclipse.jdt.internal.core.JavaModelManager;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.UserLibraryClasspathContainer;
+import org.eclipse.jdt.internal.core.builder.State;
import org.eclipse.team.core.RepositoryProvider;
public class ClasspathTests extends ModifyingResourceTests {
+ private static final IClasspathAttribute ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE = JavaCore.newClasspathAttribute(IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS, "true");
+ private static final IClasspathAttribute ATTR_IGNORE_OPTIONAL_PROBLEMS_FALSE = JavaCore.newClasspathAttribute(IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS, "false");
public class TestContainer implements IClasspathContainer {
IPath path;
@@ -339,6 +342,8 @@ public static Test suite() {
suite.addTest(new ClasspathTests("testBug274737"));
suite.addTest(new ClasspathTests("testBug357425"));
suite.addTest(new ClasspathTests("testBug287164"));
+ suite.addTest(new ClasspathTests("testBug220928a"));
+ suite.addTest(new ClasspathTests("testBug220928b"));
return suite;
}
public void setUpSuite() throws Exception {
@@ -7342,4 +7347,77 @@ public void testBug287164() throws CoreException {
}
}
+/**
+ * @bug220928: [buildpath] Should be able to ignore warnings from certain source folders
+ *
+ * Verify that adding the {@link IClasspathAttribute#IGNORE_OPTIONAL_PROBLEMS} attribute is
+ * correctly reflected by the {@link ClasspathEntry#ignoreOptionalProblems()} method.
+ *
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=220928"
+ */
+public void testBug220928a() throws CoreException {
+ ClasspathEntry entry;
+
+ entry = (ClasspathEntry) JavaCore.newSourceEntry(new Path("/P/src"));
+ assertFalse(entry.ignoreOptionalProblems());
+
+ entry = (ClasspathEntry) JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ assertTrue(entry.ignoreOptionalProblems());
+
+ entry = (ClasspathEntry) JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_FALSE });
+ assertFalse(entry.ignoreOptionalProblems());
+}
+
+/**
+ * @bug220928: [buildpath] Should be able to ignore warnings from certain source folders
+ *
+ * Verify that value of the {@link IClasspathAttribute#IGNORE_OPTIONAL_PROBLEMS} attribute is
+ * correctly saved on workspace save.
+ *
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=220928"
+ */
+public void testBug220928b() throws CoreException {
+ boolean autoBuild = getWorkspace().isAutoBuilding();
+ IWorkspaceDescription preferences = getWorkspace().getDescription();
+ try {
+ // ensure that the workspace auto-build is ON
+ preferences.setAutoBuilding(true);
+ getWorkspace().setDescription(preferences);
+
+ IJavaProject project = createJavaProject("P", new String[] {}, "bin");
+ createFolder("/P/src");
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1];
+ State state;
+
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"));
+ getJavaProject("P").setRawClasspath(newCP, null);
+ simulateExitRestart();
+ state = (State) JavaModelManager.getJavaModelManager().getLastBuiltState(getJavaProject("P").getProject(), null);
+ assertFalse(state.sourceLocations[0].ignoreOptionalProblems);
+
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ getJavaProject("P").setRawClasspath(newCP, null);
+ simulateExitRestart();
+ state = (State) JavaModelManager.getJavaModelManager().getLastBuiltState(getJavaProject("P").getProject(), null);
+ assertTrue(state.sourceLocations[0].ignoreOptionalProblems);
+
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_FALSE });
+ getJavaProject("P").setRawClasspath(newCP, null);
+ simulateExitRestart();
+ state = (State) JavaModelManager.getJavaModelManager().getLastBuiltState(getJavaProject("P").getProject(), null);
+ assertFalse(state.sourceLocations[0].ignoreOptionalProblems);
+ } finally {
+ preferences.setAutoBuilding(autoBuild);
+ getWorkspace().setDescription(preferences);
+ deleteProject("P");
+ }
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CodeCorrectionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CodeCorrectionTests.java
index d55fa60d7..62da35b2e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CodeCorrectionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CodeCorrectionTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -804,6 +804,7 @@ public void testWarningTokens() {
assertEquals("wrong token", "hiding", CorrectionEngine.getWarningToken(IProblem.TypeParameterHidingType));
assertEquals("wrong token", "nls", CorrectionEngine.getWarningToken(IProblem.NonExternalizedStringLiteral));
assertEquals("wrong token", "incomplete-switch", CorrectionEngine.getWarningToken(IProblem.MissingEnumConstantCase));
+ assertEquals("wrong token", "incomplete-switch", CorrectionEngine.getWarningToken(IProblem.MissingEnumDefaultCase));
assertEquals("wrong token", "unused", CorrectionEngine.getWarningToken(IProblem.UnusedImport));
assertEquals("wrong token", "unused", CorrectionEngine.getWarningToken(IProblem.LocalVariableIsNeverUsed));
assertEquals("wrong token", "unused", CorrectionEngine.getWarningToken(IProblem.ArgumentIsNeverUsed));
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
index 51dd8ba5e..7d83147a6 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompilationUnitTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,6 +43,13 @@ public class CompilationUnitTests extends ModifyingResourceTests {
public CompilationUnitTests(String name) {
super(name);
}
+/**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
public void setUpSuite() throws Exception {
super.setUpSuite();
@@ -514,7 +521,7 @@ public void testDeprecatedFlag10() throws CoreException {
"public class D extends p2.C {}\n");
ICompilationUnit cuD = getCompilationUnit("/P/src/p/D.java");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setProject(this.testProject);
parser.setSource(cuD);
parser.setResolveBindings(true);
@@ -565,7 +572,7 @@ public void testDeprecatedFlag11() throws CoreException {
"public class D extends p2.C {}\n");
ICompilationUnit cuD = getCompilationUnit("/P/src/p/D.java");
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setWorkingCopyOwner(myWCOwner);
parser.setProject(this.testProject);
parser.setSource(cuD);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java
new file mode 100644
index 000000000..ba3b3708e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.model;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.ASTRequestor;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+
+public class IgnoreOptionalProblemsFromSourceFoldersTests extends ModifyingResourceTests {
+ private static final IClasspathAttribute ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE = JavaCore.newClasspathAttribute(IClasspathAttribute.IGNORE_OPTIONAL_PROBLEMS, "true");
+
+ public static Test suite() {
+ return buildModelTestSuite(IgnoreOptionalProblemsFromSourceFoldersTests.class);
+ }
+
+ public IgnoreOptionalProblemsFromSourceFoldersTests(String name) {
+ super(name);
+ }
+
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
+ // ignore optional errors
+ public void test001() throws CoreException {
+ ICompilationUnit unit = null;
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile file = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ unit = (ICompilationUnit) JavaCore.create(file);
+
+ ProblemRequestor problemRequestor = new ProblemRequestor();
+ WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor);
+ unit.getWorkingCopy(owner, null);
+ assertProblems("Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ problemRequestor);
+ } finally {
+ if (unit != null) {
+ unit.discardWorkingCopy();
+ }
+ deleteProject("P");
+ }
+ }
+
+ // two different source folders ignore only from one
+ public void test002() throws CoreException {
+ ICompilationUnit x = null;
+ ICompilationUnit y = null;
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 2];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ newCP[originalCP.length + 1] = JavaCore.newSourceEntry(new Path("/P/src2"));
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile fileX = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ x = (ICompilationUnit) JavaCore.create(fileX);
+ createFolder("/P/src2/q");
+ IFile fileY = createFile("/P/src2/q/Y.java",
+ "package q;\n" +
+ "public class Y {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ y = (ICompilationUnit) JavaCore.create(fileY);
+
+ ProblemRequestor problemRequestorX = new ProblemRequestor();
+ WorkingCopyOwner ownerX = newWorkingCopyOwner(problemRequestorX);
+ x.getWorkingCopy(ownerX, null);
+ assertProblems("Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ problemRequestorX);
+
+ ProblemRequestor problemRequestorY = new ProblemRequestor();
+ WorkingCopyOwner ownerY = newWorkingCopyOwner(problemRequestorY);
+ y.getWorkingCopy(ownerY, null);
+ assertProblems("Unexpected problems value",
+ "----------\n" +
+ "1. ERROR in /P/src2/q/Y.java\n" +
+ "The value of the local variable i is not used\n" +
+ "----------\n",
+ problemRequestorY);
+ } finally {
+ if (x != null) {
+ x.discardWorkingCopy();
+ }
+ if (y != null) {
+ y.discardWorkingCopy();
+ }
+ deleteProject("P");
+ }
+ }
+
+ // two different source folders ignore from both
+ public void test003() throws CoreException {
+ ICompilationUnit x = null;
+ ICompilationUnit y = null;
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 2];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ newCP[originalCP.length + 1] = JavaCore.newSourceEntry(new Path("/P/src2"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile fileX = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ x = (ICompilationUnit) JavaCore.create(fileX);
+ createFolder("/P/src2/q");
+ IFile fileY = createFile("/P/src2/q/Y.java",
+ "package q;\n" +
+ "public class Y {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ y = (ICompilationUnit) JavaCore.create(fileY);
+
+ ProblemRequestor problemRequestorX = new ProblemRequestor();
+ WorkingCopyOwner ownerX = newWorkingCopyOwner(problemRequestorX);
+ x.getWorkingCopy(ownerX, null);
+ assertProblems("Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ problemRequestorX);
+
+ ProblemRequestor problemRequestorY = new ProblemRequestor();
+ WorkingCopyOwner ownerY = newWorkingCopyOwner(problemRequestorY);
+ y.getWorkingCopy(ownerY, null);
+ assertProblems("Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ problemRequestorY);
+ } finally {
+ if (x != null) {
+ x.discardWorkingCopy();
+ }
+ if (y != null) {
+ y.discardWorkingCopy();
+ }
+ deleteProject("P");
+ }
+ }
+
+ // non-optional errors cannot be ignored
+ public void test004() throws CoreException {
+ ICompilationUnit unit = null;
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile file = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ " public void bar() {\n" +
+ " a++;\n" +
+ " }\n" +
+ "}");
+ unit = (ICompilationUnit) JavaCore.create(file);
+
+ ProblemRequestor problemRequestor = new ProblemRequestor();
+ WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor);
+ unit.getWorkingCopy(owner, null);
+ assertProblems("Unexpeted problems",
+ "----------\n" +
+ "1. ERROR in /P/src/p/X.java\n" +
+ "a cannot be resolved to a variable\n" +
+ "----------\n",
+ problemRequestor);
+ } finally {
+ if (unit != null) {
+ unit.discardWorkingCopy();
+ }
+ deleteProject("P");
+ }
+ }
+
+ // task tags cannot be ignored
+ public void test005() throws CoreException {
+ ICompilationUnit unit = null;
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+ project.setOption(JavaCore.COMPILER_TASK_TAGS, "TODO");
+ project.setOption(JavaCore.COMPILER_TASK_PRIORITIES, "NORMAL");
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile file = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ " public void bar() {\n" +
+ " // TODO nothing\n" +
+ " }\n" +
+ "}");
+ unit = (ICompilationUnit) JavaCore.create(file);
+
+ ProblemRequestor problemRequestor = new ProblemRequestor();
+ WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor);
+ unit.getWorkingCopy(owner, null);
+ assertProblems("Unexpeted problems",
+ "----------\n" +
+ "1. WARNING in /P/src/p/X.java\n" +
+ "TODO nothing\n" +
+ "----------\n",
+ problemRequestor);
+ } finally {
+ if (unit != null) {
+ unit.discardWorkingCopy();
+ }
+ deleteProject("P");
+ }
+ }
+
+ /**
+ * createASTs() should not respect this option.
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=372377
+ */
+ public void test006() throws CoreException {
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {}, new String[] { "JCL_LIB" }, "bin");
+ project.setOption(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+
+ IClasspathEntry[] originalCP = project.getRawClasspath();
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length + 1];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[originalCP.length] = JavaCore.newSourceEntry(new Path("/P/src"), null, null, null,
+ new IClasspathAttribute[] { ATTR_IGNORE_OPTIONAL_PROBLEMS_TRUE });
+ project.setRawClasspath(newCP, null);
+
+ createFolder("/P/src/p");
+ IFile file = createFile("/P/src/p/X.java",
+ "package p;\n" +
+ "public class X {\n" +
+ " public void foo() {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}");
+ ICompilationUnit unit = (ICompilationUnit) JavaCore.create(file);
+
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+ parser.setProject(project);
+ parser.setSource(unit);
+ parser.setResolveBindings(true);
+
+ class Requestor extends ASTRequestor {
+ CompilationUnit cuAST;
+ public void acceptAST(ICompilationUnit source,
+ CompilationUnit ast) {
+ this.cuAST = ast;
+ }
+ }
+ Requestor requestor = new Requestor();
+ parser.createASTs(new ICompilationUnit[] {unit}, new String[0], requestor, null);
+ IProblem[] problems = requestor.cuAST.getProblems();
+ assertEquals("Should have 1 problem", 1, problems.length);
+ } finally {
+ deleteProject("P");
+ }
+ }
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
index a7388ab91..a4da2e367 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaProjectTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2487,4 +2487,47 @@ public void testBug360317() throws IOException, CoreException {
this.deleteProject("P");
}
}
+/**
+ * @bug 347386: Cannot delete package from java project (two source and output folders)
+ * @test Verify that when source folders are set specific output location, deleted packge fragments
+ * are not recreated as part of output generation.
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=347386"
+ */
+public void testBug347386() throws CoreException {
+ try {
+ IJavaProject proj = this.createJavaProject("P", new String[] {"src"}, "bin");
+ proj.getProject().open(null);
+ createFolder("/P/src1");
+ IFolder toDelete = createFolder("/P/src/com");
+ createFolder("/P/src1/com");
+
+ IClasspathEntry[] originalCP = proj.getRawClasspath();
+
+ IClasspathEntry[] newCP = new IClasspathEntry[originalCP.length+1];
+ System.arraycopy(originalCP, 0, newCP, 0, originalCP.length);
+ newCP[0] =
+ JavaCore.newSourceEntry(
+ new Path("/P/src"),
+ new IPath[] {},
+ new Path("/P/src"));
+
+ newCP[1] =
+ JavaCore.newSourceEntry(
+ new Path("/P/src1"),
+ new IPath[] {},
+ new Path("/P/src1"));
+
+ proj.setRawClasspath(newCP, null);
+ proj.getResolvedClasspath(true);
+ proj.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ waitForAutoBuild();
+
+ deleteResource(toDelete);
+ proj.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ waitForAutoBuild();
+ assertFalse("Folder is not removed", toDelete.exists());
+ } finally {
+ this.deleteProject("P");
+ }
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
index 0caa88863..0052f7a6b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
@@ -453,4 +453,32 @@ public class JavaSearchBugsTests2 extends AbstractJavaSearchTests {
deleteProject(project);
}
}
+
+ /**
+ * @bug 342393: Anonymous class' occurrence count is incorrect when two methods in a class have the same name.
+ * @test Search for Enumerators with anonymous types
+ *
+ * @throws CoreException
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=342393"
+ */
+ public void testBug342393() throws CoreException {
+ try {
+ IJavaProject project = createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB"}, "bin", "1.5");
+ String content = "package b342393;\n" + "class Generic {\n"
+ + "enum A {\n" + "ONE {\n" + "A getSquare() {\n"
+ + "return ONE;\n" + "}\n" + "},\n" + "TWO {\n"
+ + "A getSquare() {\n" + "return TWO;\n" + "}\n" + "};\n"
+ + "abstract A getSquare();\n" + "}\n" + "}";
+ createFolder("/P/b342393");
+ createFile("/P/b342393/Generic.java", content);
+ IJavaSearchScope scope = SearchEngine. createJavaSearchScope(
+ new IJavaElement[] { project }, IJavaSearchScope.SOURCES);
+ search("getSquare", METHOD, DECLARATIONS, EXACT_RULE, scope, this.resultCollector);
+ assertSearchResults("b342393/Generic.java A b342393.Generic$A.ONE:<anonymous>#1.getSquare() [getSquare] EXACT_MATCH\n" +
+ "b342393/Generic.java A b342393.Generic$A.TWO:<anonymous>#1.getSquare() [getSquare] EXACT_MATCH\n" +
+ "b342393/Generic.java A b342393.Generic$A.getSquare() [getSquare] EXACT_MATCH");
+ } finally {
+ deleteProject("P");
+ }
+ }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
index 82e5422f0..0ecffea49 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/NullAnnotationModelTests.java
@@ -30,6 +30,7 @@ import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaModelMarker;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
@@ -53,7 +54,7 @@ public class NullAnnotationModelTests extends ReconcilerTests {
}
static {
-// TESTS_NAMES = new String[] { "testMissingAnnotation5" };
+// TESTS_NAMES = new String[] { "testConvertedSourceType1" };
}
public void setUp() throws Exception {
@@ -67,18 +68,17 @@ public class NullAnnotationModelTests extends ReconcilerTests {
return FileLocator.toFileURL(libEntry).getPath();
}
- // DISABLED due to dysfunctional global default after Bug 366063 - Compiler should not add synthetic @NonNull annotations
- public void _testConvertedSourceType1() throws CoreException, InterruptedException {
+ public void testConvertedSourceType1() throws CoreException, InterruptedException {
try {
// Resources creation
IJavaProject p = createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB", this.ANNOTATION_LIB}, "bin", "1.5");
p.setOption(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
- p.setOption(JavaCore.COMPILER_NONNULL_IS_DEFAULT, JavaCore.ENABLED);
this.createFolder("/P/p1");
String c1SourceString =
"package p1;\n" +
"import org.eclipse.jdt.annotation.*;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
"public class C1 {\n" +
" public String foo(@Nullable Object arg) {\n" + // this is consumed via SourceTypeConverter
" return arg == null ? \"\" : arg.toString();\n" +
@@ -91,6 +91,7 @@ public class NullAnnotationModelTests extends ReconcilerTests {
this.createFolder("/P/p2");
String c2SourceString =
"package p2;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
"public class C2 {\n" +
" String bar(p1.C1 c, C2 c2) {;\n" +
" return c.foo(null);\n" + // don't complain despite default nonnull, foo has explicit @Nullable
@@ -109,31 +110,30 @@ public class NullAnnotationModelTests extends ReconcilerTests {
getCompilationUnit("/P/p2/C2.java").getWorkingCopy(this.wcOwner, null);
assertProblems("Unexpected problems", "----------\n" +
- "1. WARNING in /P/p2/C2.java (at line 7)\n" +
+ "1. WARNING in /P/p2/C2.java (at line 8)\n" +
" return arg == null ? null : arg.toString();\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Potential type mismatch: required \'@NonNull String\' but nullness of the provided value is unknown\n" +
+ "Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" +
"----------\n");
} finally {
deleteProject("P");
}
}
- // DISABLED due to dysfunctional global default after Bug 366063 - Compiler should not add synthetic @NonNull annotations
- public void _testBinaryType1() throws CoreException, InterruptedException, IOException {
+ public void testBinaryType1() throws CoreException, InterruptedException, IOException {
try {
// Resources creation
IJavaProject p = createJavaProject("P", new String[] {""},
new String[] {"JCL15_LIB", this.ANNOTATION_LIB, testJarPath("example.jar")},
"bin", "1.5");
p.setOption(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
- p.setOption(JavaCore.COMPILER_NONNULL_IS_DEFAULT, JavaCore.ENABLED);
// example.jar contains p1/C1.java just like testConvertedSourceType1()
this.createFolder("/P/p2");
String c2SourceString =
"package p2;\n" +
+ "@org.eclipse.jdt.annotation.NonNullByDefault\n" +
"public class C2 {\n" +
" String bar(p1.C1 c) {;\n" +
" return c.foo(null);\n" + // don't complain despite default nonnull, foo has explicit @Nullable
@@ -152,10 +152,10 @@ public class NullAnnotationModelTests extends ReconcilerTests {
getCompilationUnit("/P/p2/C2.java").getWorkingCopy(this.wcOwner, null);
assertProblems("Unexpected problems", "----------\n" +
- "1. WARNING in /P/p2/C2.java (at line 7)\n" +
+ "1. WARNING in /P/p2/C2.java (at line 8)\n" +
" return arg == null ? null : arg.toString();\n" +
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
- "Potential type mismatch: required \'@NonNull String\' but nullness of the provided value is unknown\n" +
+ "Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" +
"----------\n");
} finally {
deleteProject("P");
@@ -486,4 +486,28 @@ public class NullAnnotationModelTests extends ReconcilerTests {
deleteProject("P");
}
}
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=372012
+ // no problem should be created for a compilation unit in a package missing package-info when the warning is enabled
+ public void testBug372012() throws JavaModelException, IOException, CoreException, InterruptedException {
+ try {
+ // Resources creation
+ IJavaProject p = createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB", this.ANNOTATION_LIB}, "bin", "1.5");
+ p.setOption(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
+ p.setOption(JavaCore.COMPILER_NONNULL_ANNOTATION_NAME, "in.valid");
+ p.setOption(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION, JavaCore.ERROR);
+
+ this.createFolder("/P/p1");
+ String c1SourceString =
+ "package p1;\n" +
+ "public class C1 {\n" +
+ " public String foo(Object arg) {\n" +
+ " return arg == null ? \"\" : arg.toString();\n" +
+ " }\n" +
+ "}\n";
+
+ assertNoProblem(c1SourceString.toCharArray(), getCompilationUnit("/P/p1/C1.java"));
+ } finally {
+ deleteProject("P");
+ }
+ }
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
index acb35f474..16b8801ad 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,6 +69,14 @@ static {
public static Test suite() {
return buildModelTestSuite(ReconcilerStatementsRecoveryTests.class);
}
+
+/**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
protected void assertProblems(String message, String expected) {
assertProblems(message, expected, this.problemRequestor);
}
@@ -83,7 +91,7 @@ protected void assertNoProblem(char[] source, ICompilationUnit unit) throws Inte
// Reconcile again to see if error goes away
this.problemRequestor.initialize(source);
unit.getBuffer().setContents(source); // need to set contents again to be sure that following reconcile will be really done
- unit.reconcile(AST.JLS3,
+ unit.reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -260,7 +268,7 @@ public void testStatementsRecovery02() throws CoreException {
" UnknownType name\n" +
" }\n" +
"}");
- this.workingCopy.reconcile(AST.JLS3, false, false, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, false, false, null, null);
assertWorkingCopyDeltas(
"Unexpected delta after syntax error",
"[Working copy] X.java[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
@@ -325,7 +333,7 @@ public void testStatementsRecovery04() throws CoreException {
" UnknownType name\n" +
" }\n" +
"}");
- this.workingCopy.reconcile(AST.JLS3, false, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, false, true, null, null);
assertWorkingCopyDeltas(
"Unexpected delta after syntax error",
"[Working copy] X.java[*]: {CONTENT | FINE GRAINED | AST AFFECTED}"
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
index 7cd8658b7..926394f26 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,6 +69,13 @@ public class ReconcilerTests extends ModifyingResourceTests {
super.acceptProblem(problem);
}
}
+
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
static class ReconcileParticipant extends CompilationParticipant {
IJavaElementDelta delta;
@@ -82,7 +89,7 @@ public class ReconcilerTests extends ModifyingResourceTests {
public void reconcile(ReconcileContext context) {
this.delta = context.getDelta();
try {
- this.ast = context.getAST3();
+ this.ast = context.getAST4();
} catch (JavaModelException e) {
assertNull("Unexpected exception", e);
}
@@ -101,7 +108,7 @@ public class ReconcilerTests extends ModifyingResourceTests {
public void reconcile(ReconcileContext context) {
this.delta = context.getDelta();
try {
- this.ast = context.getAST3();
+ this.ast = context.getAST4();
assertTrue("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0);
} catch (JavaModelException e) {
@@ -122,7 +129,7 @@ public class ReconcilerTests extends ModifyingResourceTests {
public void reconcile(ReconcileContext context) {
this.delta = context.getDelta();
try {
- this.ast = context.getAST3();
+ this.ast = context.getAST4();
assertFalse("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0);
} catch (JavaModelException e) {
@@ -173,7 +180,7 @@ protected void assertNoProblem(char[] source, ICompilationUnit unit) throws Inte
// Reconcile again to see if error goes away
this.problemRequestor.initialize(source);
unit.getBuffer().setContents(source); // need to set contents again to be sure that following reconcile will be really done
- unit.reconcile(AST.JLS3,
+ unit.reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -784,7 +791,7 @@ public void testBroadcastAST1() throws JavaModelException {
"import p2.*;\n" +
"public class X {\n" +
"}");
- this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+ this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
"package p1;\n" +
@@ -798,7 +805,7 @@ public void testBroadcastAST1() throws JavaModelException {
* (case of a working copy being reconciled with NO changes, creating AST and forcing problem detection)
*/
public void testBroadcastAST2() throws JavaModelException {
- this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null/*primary owner*/, null/*no progress*/);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
"package p1;\n" +
@@ -814,7 +821,7 @@ public void testBroadcastAST2() throws JavaModelException {
* has NO changes and NO problem detection is requested)
*/
public void testBroadcastAST3() throws JavaModelException {
- this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+ this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
assertASTNodeEquals(
"Unexpected ast",
"null",
@@ -828,13 +835,13 @@ public void testBroadcastAST4() throws CoreException {
JavaCore.run(
new IWorkspaceRunnable() {
public void run(IProgressMonitor monitor) throws CoreException {
- ReconcilerTests.this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null/*primary owner*/, monitor);
+ ReconcilerTests.this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null/*primary owner*/, monitor);
setWorkingCopyContents(
"package p1;\n" +
"import p2.*;\n" +
"public class X {\n" +
"}");
- ReconcilerTests.this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, monitor);
+ ReconcilerTests.this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, monitor);
}
},
null/*no progress*/);
@@ -856,7 +863,7 @@ public void testBroadcastAST5() throws JavaModelException {
"import p2.*;\n" +
"public class X {\n" +
"}");
- this.workingCopy.reconcile(AST.JLS3, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+ this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
org.eclipse.jdt.core.dom.CompilationUnit compilationUnit = this.deltaListener.getCompilationUnitAST(this.workingCopy);
String newContents =
"package p1;\n" +
@@ -2915,7 +2922,7 @@ public void testReconcileParticipant04() throws CoreException {
" }\n" +
"}"
);
- org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(AST.JLS3, false, null, null);
+ org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(AST.JLS4, false, null, null);
assertSame(
"Unexpected participant ast",
participant.ast,
@@ -3107,7 +3114,7 @@ public void testReconcileParticipant11() throws CoreException {
" }\n" +
"}"
);
- this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null, null);
assertWorkingCopyDeltas(
"Unexpected delta",
"X[*]: {CHILDREN | FINE GRAINED}\n" +
@@ -3775,7 +3782,7 @@ public void testBug114338() throws CoreException {
" return false;\n" +
" }\n" +
"}");
- this.workingCopy.reconcile(AST.JLS3, true, this.wcOwner, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, this.wcOwner, null);
assertProblems(
"Unexpected problems",
"----------\n" +
@@ -3794,7 +3801,7 @@ public void testBug114338() throws CoreException {
" }\n" +
"}";
setWorkingCopyContents(contents);
- this.workingCopy.reconcile(AST.JLS3, true, this.wcOwner, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, this.wcOwner, null);
assertProblems(
"Unexpected problems",
"----------\n" +
@@ -3830,7 +3837,7 @@ public void testBug36032a() throws CoreException, InterruptedException {
this.problemRequestor.initialize(sourceChars);
this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(this.wcOwner, null);
this.workingCopy.getBuffer().setContents(source);
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
// Add new secondary type
@@ -3850,7 +3857,7 @@ public void testBug36032a() throws CoreException, InterruptedException {
sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopy.getBuffer().setContents(source);
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
} finally {
deleteProject("P");
@@ -3885,14 +3892,14 @@ public void testBug36032b() throws CoreException, InterruptedException {
this.problemRequestor.initialize(sourceChars);
this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(this.wcOwner, null);
this.workingCopy.getBuffer().setContents(source);
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
// Delete secondary type => should get a problem
waitUntilIndexesReady();
deleteFile("/P/Bar.java");
this.problemRequestor.initialize(source.toCharArray());
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertEquals("Working copy should not find secondary type 'Bar'!", 1, this.problemRequestor.problemCount);
assertProblems("Working copy should have problem!",
"----------\n" +
@@ -3913,7 +3920,7 @@ public void testBug36032b() throws CoreException, InterruptedException {
sourceChars = source.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopy.getBuffer().setContents(source);
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
} finally {
deleteProject("P");
@@ -3960,7 +3967,7 @@ public void testBug36032c() throws CoreException, InterruptedException {
this.problemRequestor.initialize(sourceChars);
this.workingCopy = getCompilationUnit("/P2/test/Test2.java").getWorkingCopy(this.wcOwner, null);
this.workingCopy.getBuffer().setContents(source);
- this.workingCopy.reconcile(AST.JLS3, true, null, null);
+ this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
assertNoProblem(sourceChars, this.workingCopy);
} finally {
deleteProject("P1");
@@ -4032,7 +4039,7 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
sourceChars = source1.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[0].getBuffer().setContents(source1);
- this.workingCopies[0].reconcile(AST.JLS3,
+ this.workingCopies[0].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4042,7 +4049,7 @@ public void testBug118823() throws CoreException, InterruptedException, IOExcept
sourceChars = source2.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[1].getBuffer().setContents(source2);
- this.workingCopies[1].reconcile(AST.JLS3,
+ this.workingCopies[1].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4099,7 +4106,7 @@ public void testBug118823b() throws CoreException, InterruptedException {
sourceChars = source1.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[0].getBuffer().setContents(source1);
- this.workingCopies[0].reconcile(AST.JLS3,
+ this.workingCopies[0].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4110,7 +4117,7 @@ public void testBug118823b() throws CoreException, InterruptedException {
sourceChars = source2.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[1].getBuffer().setContents(source2);
- this.workingCopies[1].reconcile(AST.JLS3,
+ this.workingCopies[1].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4174,7 +4181,7 @@ public void testBug118823c() throws CoreException, InterruptedException {
sourceChars = source1.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[0].getBuffer().setContents(source1);
- this.workingCopies[0].reconcile(AST.JLS3,
+ this.workingCopies[0].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4185,7 +4192,7 @@ public void testBug118823c() throws CoreException, InterruptedException {
sourceChars = source2.toCharArray();
this.problemRequestor.initialize(sourceChars);
this.workingCopies[1].getBuffer().setContents(source2);
- this.workingCopies[1].reconcile(AST.JLS3,
+ this.workingCopies[1].reconcile(JLS3_INTERNAL,
true, // force problem detection to see errors if any
null, // do not use working copy owner to not use working copies in name lookup
null);
@@ -4401,7 +4408,7 @@ public void testIgnoreMethodBodies1() throws CoreException {
" int i = 0;\n" +
" }\n" +
"}");
- org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(AST.JLS3, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
+ org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
// X.foo() not returning any value should not be reported
assertProblems("Working copy should have problems:",
"----------\n" +
@@ -4449,7 +4456,7 @@ public void testIgnoreMethodBodies2() throws CoreException {
" }/*end*/;" +
" }\n" +
"}");
- org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(AST.JLS3, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
+ org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
// methods with anonymous classes should have their statements intact
assertASTNodeEquals(
"Unexpected ast",
@@ -4481,7 +4488,7 @@ public void testIgnoreMethodBodies3() throws CoreException {
" }\n" +
"}");
org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(
- AST.JLS3,
+ JLS3_INTERNAL,
ICompilationUnit.IGNORE_METHOD_BODIES | ICompilationUnit.ENABLE_STATEMENTS_RECOVERY,
null,
null);
@@ -4516,7 +4523,7 @@ public void testIgnoreMethodBodies4() throws CoreException {
" }\n" +
"}");
org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(
- AST.JLS3,
+ JLS3_INTERNAL,
ICompilationUnit.IGNORE_METHOD_BODIES,
null,
null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
index 0d2de1a29..18af11f90 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -64,6 +64,14 @@ private void sortUnit(ICompilationUnit unit, String expectedResult, boolean test
private void sortUnit(int apiLevel, ICompilationUnit unit, String expectedResult, boolean testPositions) throws CoreException {
this.sortUnit(apiLevel, unit, expectedResult, testPositions, new DefaultJavaElementComparator(1,2,3,4,5,6,7,8,9));
}
+
+/**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
/** @deprecated */
private void oldAPISortUnit(ICompilationUnit unit, String expectedResult, boolean testPositions, Comparator comparator) throws CoreException {
String initialSource = unit.getSource();
@@ -1223,7 +1231,7 @@ public void test019() throws CoreException {
"public enum X {\n" +
" A, B, C, Z;\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1253,7 +1261,7 @@ public void test020() throws CoreException {
" \n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1299,7 +1307,7 @@ public void test021() throws CoreException {
" \n" +
" public void method2() { }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1671,7 +1679,7 @@ public void test023() throws CoreException {
" int id() default 0;\n" +
" String name();\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1705,7 +1713,7 @@ public void test024() throws CoreException {
" }\n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1757,7 +1765,7 @@ public void test025() throws CoreException {
" return null;\n" +
" }\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -1895,7 +1903,7 @@ public void test029() throws CoreException {
"public enum X {\n" +
" Z, A, C, B;\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult, false, new Comparator() {
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult, false, new Comparator() {
public int compare(Object o1, Object o2) {
BodyDeclaration bodyDeclaration1 = (BodyDeclaration) o1;
BodyDeclaration bodyDeclaration2 = (BodyDeclaration) o2;
@@ -1933,7 +1941,7 @@ public void test030() throws CoreException {
" public <K> I<K<K,T> bar3(C<T,K> c);\n" +
" public <K,E> I<K<K,E> bar3(C<T,K> c, C<T,E> c2);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/I.java"), expectedResult);
} finally {
deleteFile("/P/src/I.java");
}
@@ -1963,7 +1971,7 @@ public void test031() throws CoreException {
" public <S> I<S> foo3(C<T,I<S>> c);\n" +
" public I<T> foo(A<T> A);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/I.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/I.java"), expectedResult);
} finally {
deleteFile("/P/src/I.java");
}
@@ -1985,7 +1993,7 @@ public void test032() throws CoreException {
" <K> List<Map<K,T> foo(Map<T,K> m);\n" +
" <K,E> List<Map<K,E> bar(Map<T,K> m, Map<T,E> e);\n" +
"}";
- sortUnit(AST.JLS3, this.getCompilationUnit("/P/src/X.java"), expectedResult);
+ sortUnit(JLS3_INTERNAL, this.getCompilationUnit("/P/src/X.java"), expectedResult);
} finally {
deleteFile("/P/src/X.java");
}
@@ -2010,7 +2018,7 @@ public void test033() throws CoreException {
String source = unit.getSource();
Document document = new Document(source);
CompilerOptions options = new CompilerOptions(unit.getJavaProject().getOptions(true));
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setCompilerOptions(options.getMap());
parser.setSource(unit);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -2061,7 +2069,7 @@ public void test034() throws CoreException {
unit = this.getCompilationUnit("/P/src/X.java");
unit.becomeWorkingCopy(null);
CompilerOptions options = new CompilerOptions(unit.getJavaProject().getOptions(true));
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setCompilerOptions(options.getMap());
parser.setSource(unit);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
index 9edc39e5e..a0f688e06 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2255,6 +2255,7 @@ public void testSuperTypeHierarchyWithMissingBinary() throws JavaModelException
assertHierarchyEquals(
"Focus: Z [in Z.java [in q3 [in src [in TypeHierarchy]]]]\n" +
"Super types:\n" +
+ " Y49809 [in Y49809.class [in p49809 [in test49809.jar [in TypeHierarchy]]]]\n" +
"Sub types:\n",
hierarchy
);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
index 4bb846e28..6625053c1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeResolveTests.java
@@ -33,6 +33,7 @@ import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.tests.util.Util;
import org.eclipse.jdt.internal.core.LocalVariable;
+import org.eclipse.jdt.internal.core.SourceType;
public class TypeResolveTests extends ModifyingResourceTests {
ICompilationUnit cu;
@@ -700,4 +701,107 @@ public void testParamAnnotations8() throws CoreException, IOException {
deleteProject("P");
}
}
+/**
+ * @bug 342393: Anonymous class' occurrence count is incorrect when two methods in a class have the same name.
+ *
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=342393"
+ */
+public void testBug342393() throws Exception {
+ try {
+ IJavaProject project = createJavaProject("Test342393", new String[] {"src"}, new String[] {"JCL15_LIB"}, "bin", "1.5");
+ project.open(null);
+ String fileContent = "package p;\n"
+ + "public class Test {\n"
+ + "Test() {\n"
+ + " class A {\n"
+ + " // one \n"
+ + " public void foo() {\n"
+ + " Throwable a1 = new Throwable(){ // two \n"
+ + " };\n"
+ + " Throwable b1 = new Throwable(){ // three \n"
+ + " };\n"
+ + " }\n"
+ + " public void bar() {\n"
+ + " Throwable b2 = new Throwable(){ // four\n"
+ + " Throwable bi2 = new Throwable() { // five\n"
+ + " };\n"
+ + " };\n"
+ + " }\n"
+ + " class B {\n"
+ + " Throwable t1 = new Throwable() { // six\n"
+ + " };\n"
+ + " Throwable t2 = new Throwable() { // seven\n"
+ + " };\n"
+ + " }\n"
+ + " };\n"
+ + " {\n"
+ + " Throwable a3 = new Throwable(){ // eight\n"
+ + " Throwable ai3 = new Throwable() { // nine\n"
+ + " };\n"
+ + " };\n"
+ + " }\n"
+ + "}\n"
+ + "public static void main(String[] args) throws Exception {\n"
+ + " Throwable c1 = new Throwable() { // ten\n"
+ + " };\n"
+ + " Throwable c2 = new Throwable() { // eleven\n"
+ + " };\n"
+ + "}\n"
+ + "}\n";
+ createFolder("/Test342393/src/p");
+ createFile( "/Test342393/src/p/Test.java", fileContent);
+
+ ICompilationUnit unit = getCompilationUnit("/Test342393/src/p/Test.java");
+ int index = fileContent.indexOf("// one");
+ IJavaElement element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A", ((SourceType)element.getParent()).getFullyQualifiedName());
+ index = fileContent.indexOf("// two");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$1", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// three");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$2", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// four");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$3", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// five");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$3$1", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// six");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$B$1", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// seven");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$A$B$2", ((SourceType)element).getFullyQualifiedName());
+
+ String handleId = ((SourceType)element).getHandleMemento();
+ IJavaElement newElement = JavaCore.create(handleId);
+ assertEquals("Incorrect Element", element, newElement);
+
+ index = fileContent.indexOf("// eight");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$1", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// nine");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$1$1", ((SourceType)element).getFullyQualifiedName());
+
+ handleId = ((SourceType)element).getHandleMemento();
+ newElement = JavaCore.create(handleId);
+ assertEquals("Incorrect Element", element, newElement);
+
+ index = fileContent.indexOf("// ten");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$2", ((SourceType)element).getFullyQualifiedName());
+ index = fileContent.indexOf("// eleven");
+ element = unit.getElementAt(index);
+ assertEquals("Incorrect Type selected", "p.Test$3", ((SourceType)element).getFullyQualifiedName());
+
+ handleId = ((SourceType)element).getHandleMemento();
+ newElement = JavaCore.create(handleId);
+ assertEquals("Incorrect Element", element, newElement);
+ }
+ finally {
+ deleteProject("Test342393");
+ }
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
index 62fd5b8e7..10827ba28 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,6 +29,13 @@ import junit.framework.Test;
*/
public class WorkingCopyOwnerTests extends ModifyingResourceTests {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
ICompilationUnit workingCopy = null;
public class TestWorkingCopyOwner extends WorkingCopyOwner {
@@ -81,7 +88,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
private void assertProblems(String expectedProblems, String path, String source, WorkingCopyOwner owner) throws JavaModelException {
this.workingCopy = getWorkingCopy(path, source);
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
parser.setSource(this.workingCopy);
parser.setResolveBindings(true);
parser.setWorkingCopyOwner(owner);
@@ -1058,7 +1065,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
" int field;\n" +
"}"
);
- CompilationUnit ast = this.workingCopy.reconcile(AST.JLS3, false, null, null);
+ CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, false, null, null);
assertASTNodeEquals(
"Unexpected AST",
"public class X {\n" +
@@ -1081,7 +1088,7 @@ public class WorkingCopyOwnerTests extends ModifyingResourceTests {
" int field;\n" +
"}"
);
- CompilationUnit ast = this.workingCopy.reconcile(AST.JLS3, true/*force resolution*/, null, null);
+ CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, true/*force resolution*/, null, null);
TypeDeclaration type = (TypeDeclaration) ast.types().get(0);
assertNull("Unexpected binding", type.resolveBinding());
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
index 085f81423..a4d892d93 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,6 +32,13 @@ public class ASTRewritingTest extends AbstractJavaModelTests {
/** @deprecated using deprecated code */
private static final int AST_INTERNAL_JLS2 = AST.JLS2;
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
protected IJavaProject project1;
protected IPackageFragmentRoot sourceFolder;
@@ -102,11 +109,11 @@ public class ASTRewritingTest extends AbstractJavaModelTests {
}
protected CompilationUnit createAST3(ICompilationUnit cu) {
- return createAST(AST.JLS3, cu, false);
+ return createAST(JLS3_INTERNAL, cu, false);
}
protected CompilationUnit createAST3(ICompilationUnit cu, boolean statementsRecovery) {
- return createAST(AST.JLS3, cu, statementsRecovery);
+ return createAST(JLS3_INTERNAL, cu, statementsRecovery);
}
protected CompilationUnit createAST(int JLSLevel, ICompilationUnit cu, boolean statementsRecovery) {
return createAST(JLSLevel, cu, false, statementsRecovery);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
index d3037e209..f96f005c4 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,6 +39,13 @@ import org.osgi.service.prefs.BackingStoreException;
public class ImportRewriteTest extends AbstractJavaModelTests {
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
private static final Class THIS= ImportRewriteTest.class;
protected IPackageFragmentRoot sourceFolder;
@@ -609,7 +616,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
buf.append("}\n");
ICompilationUnit cuT= test1.createCompilationUnit("T.java", buf.toString(), false, null);
- ASTParser parser= ASTParser.newParser(AST.JLS3);
+ ASTParser parser= ASTParser.newParser(JLS3_INTERNAL);
parser.setSource(cuT);
parser.setResolveBindings(true);
CompilationUnit astRoot= (CompilationUnit) parser.createAST(null);
@@ -1063,7 +1070,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
- AST ast= AST.newAST(AST.JLS3);
+ AST ast= AST.newAST(JLS3_INTERNAL);
ImportRewrite importsRewrite= newImportsRewrite(cu2, order, threshold, threshold, true);
{
IJavaElement[] elements= cu1.codeSelect(content.indexOf("IOException"), "IOException".length());
@@ -1136,7 +1143,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
- AST ast= AST.newAST(AST.JLS3);
+ AST ast= AST.newAST(JLS3_INTERNAL);
ImportRewrite importsRewrite= newImportsRewrite(cu2, order, threshold, threshold, true);
{
IJavaElement[] elements= cu1.codeSelect(content.indexOf("Map"), "Map".length());
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
index 21a479803..bc3c2f6d1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingCopyTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -424,7 +424,7 @@ public class ASTRewritingModifyingCopyTest extends ASTRewritingModifyingTest {
"}");
ICompilationUnit cu = pack1.createCompilationUnit("Test.java", buf.toString(), false, null);
- ASTParser astParser = ASTParser.newParser(AST.JLS3);
+ ASTParser astParser = ASTParser.newParser(getJLS3());
astParser.setSource(cu);
ASTNode root = astParser.createAST(new NullProgressMonitor());
AST ast = root.getAST();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
index f95ec0a41..69afdff2e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingInsertTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -528,7 +528,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("}\n");
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -564,7 +564,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("}\n");
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -600,7 +600,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("}\n");
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -633,7 +633,7 @@ public class ASTRewritingModifyingInsertTest extends ASTRewritingModifyingTest {
buf.append("package test0016;\n");
ICompilationUnit cu= pack1.createCompilationUnit("package-info.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
index 7dee24ce6..db9cf0add 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingOtherTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -198,7 +198,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("@A(X.class) public class C {}");
ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, true, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, true, getJLS3());
astRoot.recordModifications();
{
// change to interface
@@ -224,7 +224,7 @@ public class ASTRewritingModifyingOtherTest extends ASTRewritingModifyingTest {
buf.append("public @A(X.class) class C {}");
ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, true, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, true, getJLS3());
astRoot.recordModifications();
{
// change to interface
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
index 6b04e4b39..3ecd23a99 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingReplaceTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -247,7 +247,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -279,7 +279,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -311,7 +311,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -343,7 +343,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -376,7 +376,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -409,7 +409,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
@@ -442,7 +442,7 @@ public class ASTRewritingModifyingReplaceTest extends ASTRewritingModifyingTest
ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
- CompilationUnit astRoot= createCU(cu, false, AST.JLS3);
+ CompilationUnit astRoot= createCU(cu, false, getJLS3());
astRoot.recordModifications();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
index 436c2d7f7..a98f29f13 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/modifying/ASTRewritingModifyingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -40,6 +40,13 @@ public abstract class ASTRewritingModifyingTest extends AbstractJavaModelTests {
/** @deprecated using deprecated code */
private static final int AST_INTERNAL_JLS2 = AST.JLS2;
+
+ /**
+ * Internal synonynm for deprecated constant AST.JSL3
+ * to alleviate deprecation warnings.
+ * @deprecated
+ */
+ /*package*/ static final int JLS3_INTERNAL = AST.JLS3;
protected IJavaProject javaProject;
protected IPackageFragmentRoot sourceFolder;
@@ -212,4 +219,8 @@ public abstract class ASTRewritingModifyingTest extends AbstractJavaModelTests {
buffer.append("\");");
return buffer.toString();
}
+
+ static int getJLS3() {
+ return JLS3_INTERNAL;
+ }
}

Back to the top