From 27ccbc7b0b659c988671bd8808320d3135e15d75 Mon Sep 17 00:00:00 2001 From: Jay Arthanareeswaran Date: Tue, 15 Sep 2015 10:18:05 +0530 Subject: Bug 477291 - [1.9] Support JRE 9 in JSR199 implementation --- .../src/org/eclipse/jdt/apt/tests/TestAll.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'org.eclipse.jdt.apt.tests') diff --git a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/TestAll.java b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/TestAll.java index 0487245648..8298b12a5c 100644 --- a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/TestAll.java +++ b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/TestAll.java @@ -1,10 +1,14 @@ /******************************************************************************* - * Copyright (c) 2005, 2014 BEA Systems, Inc. + * Copyright (c) 2005, 2015 BEA Systems, Inc. * 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 * + * This is an implementation of an early-draft specification developed under the Java + * Community Process (JCP) and is made available for testing and evaluation purposes + * only. The code is not compatible with any specification of the JCP. + * * Contributors: * wharley@bea.com - initial API and implementation * het@google.com - Bug 441790 @@ -24,7 +28,11 @@ import junit.framework.TestSuite; * the name of an annotation processor factory class implemented in this plugin. */ public class TestAll extends TestCase { - + + static { + System.setProperty("modules", "java.base"); + } + public TestAll(String testName) { super(testName); -- cgit v1.2.3 From 4853bfa39b4537870df1c5f0503a1078575fae46 Mon Sep 17 00:00:00 2001 From: Jay Arthanareeswaran Date: Fri, 9 Sep 2016 11:34:13 +0530 Subject: Bug 486013 - 'new Boolean' is deprecated. Altering the test to use Boolean.valueOf() --- .../src/org/eclipse/jdt/apt/tests/ExceptionHandlingTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'org.eclipse.jdt.apt.tests') diff --git a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ExceptionHandlingTests.java b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ExceptionHandlingTests.java index 8c198d85f4..cf28f6f4fa 100644 --- a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ExceptionHandlingTests.java +++ b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ExceptionHandlingTests.java @@ -1,10 +1,14 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 BEA Systems, Inc. + * Copyright (c) 2006, 2016 BEA Systems, Inc. * 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 * + * This is an implementation of an early-draft specification developed under the Java + * Community Process (JCP) and is made available for testing and evaluation purposes + * only. The code is not compatible with any specification of the JCP. + * * Contributors: * sbandow@bea.com - initial API and implementation * @@ -36,7 +40,7 @@ public class ExceptionHandlingTests extends APTTestBase { IProject project = env.getProject( getProjectName() ); IPath srcRoot = getSourcePath(); - IPath testPath = env.addClass(srcRoot, "test", "Test", getCodeForTest("booleanValue = new Boolean(true)")); + IPath testPath = env.addClass(srcRoot, "test", "Test", getCodeForTest("booleanValue = Boolean.valueOf(true)")); fullBuild( project.getFullPath() ); expectingOnlySpecificProblemFor(testPath, new ExpectedProblem("Test", "Type mismatch: cannot convert from Boolean to boolean", testPath)); -- cgit v1.2.3 From 392774ce958ca42825bfc9dcbd30f9655a11e87e Mon Sep 17 00:00:00 2001 From: Jay Arthanareeswaran Date: Thu, 8 Sep 2016 21:19:09 +0530 Subject: Handle the warnings in tests due to deprecation of AST.JLS8. --- .../apt/core/internal/env/BaseProcessorEnv.java | 12 +- .../jdt/apt/tests/ReadAnnotationTests2.java | 2 +- .../core/tests/dom/StandAloneASTParserTest.java | 10 +- .../jdt/core/tests/dom/ASTConverter15JLS8Test.java | 51 +- .../jdt/core/tests/dom/ASTConverterAST8Test.java | 804 ++++++++++----------- .../core/tests/dom/ASTConverterBugsTestJLS8.java | 5 +- .../tests/dom/ASTConverterJavadocFlattener.java | 5 +- .../jdt/core/tests/dom/ASTConverterTest.java | 4 +- .../jdt/core/tests/dom/ASTConverterTestAST8_2.java | 562 +++++++------- .../eclipse/jdt/core/tests/dom/ASTMatcherTest.java | 69 +- .../jdt/core/tests/dom/ASTModelBridgeTests.java | 23 +- .../org/eclipse/jdt/core/tests/dom/ASTTest.java | 41 +- .../eclipse/jdt/core/tests/dom/ASTVisitorTest.java | 32 +- .../jdt/core/tests/dom/AbstractASTTests.java | 3 + .../jdt/core/tests/dom/ConverterTestSetup.java | 15 +- .../org/eclipse/jdt/core/tests/dom/SampleASTs.java | 14 +- .../tests/dom/TypeAnnotationsConverterTest.java | 2 +- .../jdt/core/tests/dom/TypeBindingTests308.java | 10 +- .../tests/model/ExternalAnnotations17Test.java | 33 +- .../tests/model/ExternalAnnotations18Test.java | 77 +- .../jdt/core/tests/model/JavaProjectTests.java | 2 +- .../core/tests/model/NullAnnotationModelTests.java | 8 +- .../jdt/core/tests/model/ReconcilerTests.java | 37 +- .../describing/ASTRewritingMethodDeclTest.java | 1 + .../describing/ASTRewritingStatementsTest.java | 18 +- .../tests/rewrite/describing/ASTRewritingTest.java | 5 +- .../ASTRewritingTypeAnnotationsTest.java | 10 +- .../describing/ASTRewritingTypeDeclTest.java | 11 +- .../rewrite/describing/ImportRewrite18Test.java | 29 +- .../rewrite/describing/ImportRewriteTest.java | 4 +- .../performance/SecondaryTypesPerformanceTest.java | 2 +- 31 files changed, 1014 insertions(+), 887 deletions(-) (limited to 'org.eclipse.jdt.apt.tests') diff --git a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java index 7967042b28..ae53ed7689 100644 --- a/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java +++ b/org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2015 BEA Systems Inc. and others + * Copyright (c) 2005, 2016 BEA Systems Inc. and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -83,7 +83,7 @@ import com.sun.mirror.util.Types; public class BaseProcessorEnv implements AnnotationProcessorEnvironment { static{ - final AST ast = AST.newAST(AST.JLS8); + final AST ast = AST.newAST(AST.JLS9); EMPTY_AST_UNIT = ast.newCompilationUnit(); } public static final CompilationUnit EMPTY_AST_UNIT; @@ -492,7 +492,7 @@ public class BaseProcessorEnv implements AnnotationProcessorEnvironment } final BindingRequestor requestor = new BindingRequestor(); - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setResolveBindings(true); parser.setBindingsRecovery(true); parser.setProject(_javaProject); @@ -702,7 +702,7 @@ public class BaseProcessorEnv implements AnnotationProcessorEnvironment if( astUnit != null ) return astUnit; else{ // Note: very expensive operation. we are re-compiling a file with binding information. - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setResolveBindings(true); parser.setBindingsRecovery(true); parser.setSource(unit); @@ -848,7 +848,7 @@ public class BaseProcessorEnv implements AnnotationProcessorEnvironment String bogusKey = BindingKey.createTypeBindingKey("java.lang.Object"); //$NON-NLS-1$ String[] keys = new String[] {bogusKey}; - ASTParser p = ASTParser.newParser( AST.JLS8 ); + ASTParser p = ASTParser.newParser( AST.JLS9 ); p.setResolveBindings(true); p.setBindingsRecovery(true); p.setProject( javaProject ); @@ -877,7 +877,7 @@ public class BaseProcessorEnv implements AnnotationProcessorEnvironment } CompilationUnitRequestor requestor = new CompilationUnitRequestor(); - ASTParser p = ASTParser.newParser( AST.JLS8 ); + ASTParser p = ASTParser.newParser( AST.JLS9 ); p.setResolveBindings(true); p.setBindingsRecovery(true); p.setProject( javaProject ); diff --git a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java index 8a6cceaa3d..ba36acf4b3 100644 --- a/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java +++ b/org.eclipse.jdt.apt.tests/src/org/eclipse/jdt/apt/tests/ReadAnnotationTests2.java @@ -184,7 +184,7 @@ public class ReadAnnotationTests2 extends BuilderTests { } final BindingRequestor requestor = new BindingRequestor(); - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setResolveBindings(true); parser.setProject(javaProj); parser.setIgnoreMethodBodies(true); diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java index d75b500be4..30b9c3f43f 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java @@ -53,7 +53,7 @@ public class StandAloneASTParserTest extends AbstractRegressionTest { super(name); } - private static final int JLS_LATEST = AST.JLS8; + private static final int JLS_LATEST = AST.JLS9; public ASTNode runConversion( int astLevel, @@ -602,7 +602,7 @@ public class StandAloneASTParserTest extends AbstractRegressionTest { "}\n"; Map options = JavaCore.getOptions(); JavaCore.setComplianceOptions(JavaCore.VERSION_1_7, options); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setCompilerOptions(options); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(source.toCharArray()); @@ -626,7 +626,7 @@ public class StandAloneASTParserTest extends AbstractRegressionTest { "}\n"; Map options = JavaCore.getOptions(); JavaCore.setComplianceOptions(JavaCore.VERSION_1_7, options); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setCompilerOptions(options); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(source.toCharArray()); @@ -649,7 +649,7 @@ public class StandAloneASTParserTest extends AbstractRegressionTest { */ public void testBug480545() { String input = "class Test2 { void f(Test2... xs) {} }"; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setSource(input.toCharArray()); Map options = JavaCore.getOptions(); JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, options); @@ -662,7 +662,7 @@ public class StandAloneASTParserTest extends AbstractRegressionTest { " public static final if ËŠ = new if(null, null, null, null);\n"+ " }\n" + "}"; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setSource(input.toCharArray()); parser.setResolveBindings(true); parser.setStatementsRecovery(true); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java index 171aac256b..ad8744c95e 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2014 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { public void setUpSuite() throws Exception { super.setUpSuite(); - this.ast = AST.newAST(AST.JLS8); + this.ast = AST.newAST(getJLS8()); } public ASTConverter15JLS8Test(String name) { @@ -392,7 +392,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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"; @@ -412,7 +412,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); CompilationUnit compilationUnit = (CompilationUnit) result; assertProblemsSize(compilationUnit, 0); @@ -441,7 +441,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); char[] source = sourceUnit.getSource().toCharArray(); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); CompilationUnit compilationUnit = (CompilationUnit) result; @@ -465,7 +465,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); char[] source = sourceUnit.getSource().toCharArray(); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); CompilationUnit compilationUnit = (CompilationUnit) result; @@ -495,7 +495,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); char[] source = sourceUnit.getSource().toCharArray(); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); CompilationUnit compilationUnit = (CompilationUnit) result; @@ -526,7 +526,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); char[] source = sourceUnit.getSource().toCharArray(); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); CompilationUnit compilationUnit = (CompilationUnit) result; @@ -2230,7 +2230,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; assertProblemsSize(unit, 0); @@ -3254,7 +3254,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { "}"; this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); this.workingCopy.getBuffer().setContents(contents.toCharArray()); - ASTNode node = runConversion(AST.JLS8, this.workingCopy, true); + ASTNode node = runConversion(getJLS8(), this.workingCopy, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit compilationUnit = (CompilationUnit) node; String expectedOutput = "Dead code"; @@ -4304,6 +4304,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { /** * https://bugs.eclipse.org/bugs/show_bug.cgi?id=84358 + * @deprecated references deprecated code */ public void test0139() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0139", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ @@ -5912,7 +5913,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No node", node); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; @@ -7522,7 +7523,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { IType type = sourceUnit.getType("Test3");//$NON-NLS-1$ assertNotNull("Should not be null", type); - ASTParser parser= ASTParser.newParser(AST.JLS8); + ASTParser parser= ASTParser.newParser(getJLS8()); parser.setProject(type.getJavaProject()); IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null); if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) { @@ -7550,7 +7551,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { IType type = sourceUnit.getType("Test3");//$NON-NLS-1$ assertNotNull("Should not be null", type); - ASTParser parser= ASTParser.newParser(AST.JLS8); + ASTParser parser= ASTParser.newParser(getJLS8()); parser.setSource(sourceUnit); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setResolveBindings(true); @@ -8132,7 +8133,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertNotNull("Not a compilation unit", result); } @@ -8271,7 +8272,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, false); + ASTNode node = runConversion(getJLS8(), sourceUnit, false); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -8301,7 +8302,7 @@ public class ASTConverter15JLS8Test 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.JLS8, sourceUnit, false); + ASTNode node = runConversion(getJLS8(), sourceUnit, false); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -8341,7 +8342,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { "}"; this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); this.workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), 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"; @@ -8379,7 +8380,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { "}"; this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); this.workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9451,7 +9452,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { } CompilationUnitRequestor requestor = new CompilationUnitRequestor(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setResolveBindings(true); parser.setProject(getJavaProject("Converter15")); parser.setKind(ASTParser.K_COMPILATION_UNIT); @@ -9627,7 +9628,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { "}"; this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); this.workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), this.workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9681,7 +9682,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { "}"; this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); this.workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), 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"); @@ -10756,7 +10757,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { BindingKey.createTypeBindingKey(typeName) }; final BindingRequestor requestor = new BindingRequestor(); - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(getJLS8()); parser.setResolveBindings(true); parser.setProject(javaProject); // this doesn't really do a parse; it's a type lookup @@ -10791,7 +10792,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { BindingKey.createTypeBindingKey(typeName) }; final BindingRequestor requestor = new BindingRequestor(); - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(getJLS8()); parser.setResolveBindings(true); parser.setProject(javaProject); // this doesn't really do a parse; it's a type lookup @@ -10829,7 +10830,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { BindingKey.createTypeBindingKey(typeName) }; final BindingRequestor requestor = new BindingRequestor(); - final ASTParser parser = ASTParser.newParser(AST.JLS8); + final ASTParser parser = ASTParser.newParser(getJLS8()); parser.setResolveBindings(true); parser.setProject(javaProject); // this doesn't really do a parse; it's a type lookup @@ -11252,7 +11253,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup { //IType type2 = sourceUnit2.getType("TestAnnotationWithStringDefault");//$NON-NLS-1$ assertNotNull("Should not be null", type); - ASTParser parser= ASTParser.newParser(AST.JLS8); + ASTParser parser= ASTParser.newParser(getJLS8()); 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/ASTConverterAST8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java index 9952e1226c..c4cea87e47 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -25,7 +25,7 @@ public class ASTConverterAST8Test extends ConverterTestSetup { public void setUpSuite() throws Exception { super.setUpSuite(); - this.ast = AST.newAST(AST.JLS8); + this.ast = AST.newAST(getJLS8()); } public ASTConverterAST8Test(String name) { @@ -50,7 +50,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); // check that we have the right tree CompilationUnit unit = this.ast.newCompilationUnit(); @@ -119,7 +119,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); @@ -134,7 +134,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); @@ -155,7 +155,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); @@ -179,7 +179,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); @@ -206,7 +206,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation(); @@ -236,7 +236,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node; @@ -257,7 +257,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ArrayCreation arrayCreation = this.ast.newArrayCreation(); @@ -278,7 +278,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ArrayCreation arrayCreation = this.ast.newArrayCreation(); @@ -301,7 +301,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ArrayCreation arrayCreation = this.ast.newArrayCreation(); @@ -317,7 +317,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ArrayCreation arrayCreation = this.ast.newArrayCreation(); @@ -333,7 +333,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ ArrayCreation arrayCreation = this.ast.newArrayCreation(); @@ -354,7 +354,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -371,7 +371,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -390,7 +390,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -408,7 +408,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -426,7 +426,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -444,7 +444,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -462,7 +462,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -480,7 +480,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -498,7 +498,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -516,7 +516,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -534,7 +534,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -552,7 +552,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -570,7 +570,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -588,7 +588,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -606,7 +606,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -623,7 +623,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -640,7 +640,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -657,7 +657,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -674,7 +674,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -695,7 +695,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -716,7 +716,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -739,7 +739,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -762,7 +762,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -785,7 +785,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -808,7 +808,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -831,7 +831,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -853,7 +853,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -875,7 +875,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -897,7 +897,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -919,7 +919,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ BooleanLiteral literal = this.ast.newBooleanLiteral(false); @@ -933,7 +933,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ BooleanLiteral literal = this.ast.newBooleanLiteral(true); @@ -947,7 +947,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ NullLiteral literal = this.ast.newNullLiteral(); @@ -961,7 +961,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ CharacterLiteral literal = this.ast.newCharacterLiteral(); @@ -976,7 +976,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -990,7 +990,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1004,7 +1004,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1018,7 +1018,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1032,7 +1032,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1046,7 +1046,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1063,7 +1063,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1077,7 +1077,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ /* @@ -1102,7 +1102,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1126,7 +1126,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1150,7 +1150,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1174,7 +1174,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1198,7 +1198,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1222,7 +1222,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1246,7 +1246,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1270,7 +1270,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1294,7 +1294,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1318,7 +1318,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1342,7 +1342,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1366,7 +1366,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1390,7 +1390,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1414,7 +1414,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1438,7 +1438,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1462,7 +1462,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1486,7 +1486,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1509,7 +1509,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1539,7 +1539,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1561,7 +1561,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1583,7 +1583,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1606,7 +1606,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1630,7 +1630,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1657,7 +1657,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1684,7 +1684,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1700,7 +1700,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1717,7 +1717,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1734,7 +1734,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1752,7 +1752,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1767,7 +1767,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1797,7 +1797,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1829,7 +1829,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1856,7 +1856,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1880,7 +1880,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -1899,7 +1899,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1919,7 +1919,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1947,7 +1947,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ @@ -1970,7 +1970,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1987,7 +1987,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2006,7 +2006,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); ForStatement forStatement = (ForStatement) node; BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0); @@ -2022,7 +2022,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); ForStatement forStatement = (ForStatement) node; ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0); @@ -2038,7 +2038,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2055,7 +2055,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2072,7 +2072,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2136,7 +2136,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2150,7 +2150,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2170,7 +2170,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2186,7 +2186,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2202,7 +2202,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2226,7 +2226,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2253,7 +2253,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2280,7 +2280,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2307,7 +2307,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2343,7 +2343,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2370,7 +2370,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2397,7 +2397,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode expression = getASTNodeToCompare((CompilationUnit) result); assertNotNull("Expression should not be null", expression); //$NON-NLS-1$ InfixExpression infixExpression = this.ast.newInfixExpression(); @@ -2433,7 +2433,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2450,7 +2450,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2467,7 +2467,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2485,7 +2485,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2512,7 +2512,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2537,7 +2537,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2569,7 +2569,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2584,7 +2584,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2599,7 +2599,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2614,7 +2614,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2630,7 +2630,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2649,7 +2649,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2668,7 +2668,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2688,7 +2688,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2715,7 +2715,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2758,7 +2758,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2801,7 +2801,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2830,7 +2830,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2859,7 +2859,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -2888,7 +2888,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2909,7 +2909,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2954,7 +2954,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2978,7 +2978,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2993,7 +2993,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3008,7 +3008,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3024,7 +3024,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3038,7 +3038,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3053,7 +3053,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3068,7 +3068,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3086,7 +3086,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3126,7 +3126,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3144,7 +3144,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3159,7 +3159,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3174,7 +3174,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3189,7 +3189,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3201,7 +3201,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3214,7 +3214,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -3234,7 +3234,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -3253,7 +3253,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -3266,7 +3266,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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; @@ -3282,7 +3282,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("Expression should not be null", result); //$NON-NLS-1$ assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$ } @@ -3292,7 +3292,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3311,7 +3311,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3325,7 +3325,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3344,7 +3344,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3366,7 +3366,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3389,7 +3389,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3427,7 +3427,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3465,7 +3465,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ } @@ -3475,7 +3475,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3536,7 +3536,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3595,7 +3595,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3631,7 +3631,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3666,7 +3666,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3700,7 +3700,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3736,7 +3736,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node; @@ -3806,7 +3806,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3825,7 +3825,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3852,7 +3852,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3878,7 +3878,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3903,7 +3903,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -3936,7 +3936,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -4043,7 +4043,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4073,7 +4073,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4102,7 +4102,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$ FieldDeclaration fieldDeclaration = (FieldDeclaration) node2; @@ -4122,7 +4122,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0); assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$ ReturnStatement returnStatement = (ReturnStatement) node2; @@ -4145,7 +4145,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4175,7 +4175,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0); assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$ ReturnStatement returnStatement = (ReturnStatement) node2; @@ -4193,7 +4193,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4254,7 +4254,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement ifStatement = (IfStatement) node2; @@ -4272,7 +4272,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement ifStatement = (IfStatement) node2; @@ -4290,7 +4290,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement ifStatement = (IfStatement) node2; @@ -4308,7 +4308,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement ifStatement = (IfStatement) node2; @@ -4326,7 +4326,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement ifStatement = (IfStatement) node2; @@ -4344,7 +4344,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("IfStatement", node2 instanceof WhileStatement); //$NON-NLS-1$ WhileStatement whileStatement = (WhileStatement) node2; @@ -4362,7 +4362,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2); assertTrue("DoStatement", node2 instanceof DoStatement); //$NON-NLS-1$ DoStatement statement = (DoStatement) node2; @@ -4380,7 +4380,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$ ForStatement statement = (ForStatement) node2; @@ -4398,7 +4398,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1); assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$ IfStatement statement = (IfStatement) node2; @@ -4416,7 +4416,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -4440,7 +4440,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4461,7 +4461,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4483,7 +4483,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4506,7 +4506,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -4530,7 +4530,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -4551,7 +4551,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); CompilationUnit unit = (CompilationUnit) result; assertProblemsSize(unit, 0); @@ -4577,7 +4577,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$ ReturnStatement returnStatement = (ReturnStatement) node2; @@ -4603,7 +4603,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4632,7 +4632,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -4662,7 +4662,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1); assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$ ForStatement forStatement = (ForStatement) node2; @@ -4678,7 +4678,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0); assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$ FieldDeclaration fieldDeclaration = (FieldDeclaration) node2; @@ -4700,7 +4700,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0); assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$ FieldDeclaration fieldDeclaration = (FieldDeclaration) node2; @@ -4726,7 +4726,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0); assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$ FieldDeclaration fieldDeclaration = (FieldDeclaration) node2; @@ -4760,7 +4760,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$ TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2; @@ -4848,7 +4848,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4863,7 +4863,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4878,7 +4878,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4894,7 +4894,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4908,7 +4908,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4923,7 +4923,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4938,7 +4938,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4956,7 +4956,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -4996,7 +4996,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5014,7 +5014,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5029,7 +5029,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5044,7 +5044,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5059,7 +5059,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5071,7 +5071,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5084,7 +5084,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -5104,7 +5104,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -5123,7 +5123,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull("Expression should not be null", node); //$NON-NLS-1$ Javadoc actualJavadoc = ((Initializer) node).getJavadoc(); @@ -5137,7 +5137,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0); checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$ ForStatement forStatement = (ForStatement) labeledStatement.getBody(); @@ -5156,7 +5156,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0); checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$ ForStatement forStatement = (ForStatement) labeledStatement.getBody(); @@ -5175,7 +5175,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0); assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$ ReturnStatement returnStatement = (ReturnStatement) node2; @@ -5262,7 +5262,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0); assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$ ReturnStatement returnStatement = (ReturnStatement) node2; @@ -5290,7 +5290,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -5320,7 +5320,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -5345,7 +5345,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$ ExpressionStatement expressionStatement = (ExpressionStatement) node2; @@ -5380,7 +5380,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0); assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$ VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2; @@ -5411,7 +5411,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5427,7 +5427,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true, true, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5449,7 +5449,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true, true, false); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5470,7 +5470,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5491,7 +5491,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No compilation unit", result); //$NON-NLS-1$ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ } @@ -5501,7 +5501,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -5536,7 +5536,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5574,7 +5574,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5615,7 +5615,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5651,7 +5651,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5694,7 +5694,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5713,7 +5713,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5732,7 +5732,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -5758,7 +5758,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -5786,7 +5786,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -5803,7 +5803,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5826,7 +5826,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5854,7 +5854,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5878,7 +5878,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5908,7 +5908,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5930,7 +5930,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5951,7 +5951,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5971,7 +5971,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5996,7 +5996,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -6027,7 +6027,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -6052,7 +6052,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -6083,7 +6083,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No compilation unit", result); //$NON-NLS-1$ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ } @@ -6093,7 +6093,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -6122,7 +6122,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6141,7 +6141,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6171,7 +6171,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6196,7 +6196,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6231,7 +6231,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No compilation unit", result); //$NON-NLS-1$ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ } @@ -6242,7 +6242,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6269,7 +6269,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6296,7 +6296,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6322,7 +6322,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6348,7 +6348,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6370,7 +6370,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6396,7 +6396,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6414,7 +6414,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6438,7 +6438,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6462,7 +6462,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6480,7 +6480,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6505,7 +6505,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6528,7 +6528,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6552,7 +6552,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6576,7 +6576,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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(); @@ -6663,7 +6663,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6852,7 +6852,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6872,7 +6872,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6885,7 +6885,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6917,7 +6917,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6953,7 +6953,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -6984,7 +6984,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7009,7 +7009,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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; @@ -7040,7 +7040,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + runConversion(getJLS8(), sourceUnit, false); } /** @@ -7049,7 +7049,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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; @@ -7067,7 +7067,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7092,7 +7092,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7135,7 +7135,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7154,7 +7154,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7182,7 +7182,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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; @@ -7205,7 +7205,7 @@ public class ASTConverterAST8Test 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.JLS8, source, "Test.java", project, true); //$NON-NLS-1$ + ASTNode result = runConversion(getJLS8(), 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; @@ -7230,7 +7230,7 @@ public class ASTConverterAST8Test 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.JLS8, source, "Object.java", project, true); //$NON-NLS-1$ + ASTNode result = runConversion(getJLS8(), 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; @@ -7251,7 +7251,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7272,7 +7272,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7297,7 +7297,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7320,7 +7320,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7345,7 +7345,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7394,7 +7394,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7439,7 +7439,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7470,7 +7470,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("No result", result); //$NON-NLS-1$ assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; @@ -7487,7 +7487,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7523,7 +7523,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No result", result); //$NON-NLS-1$ assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; @@ -7536,7 +7536,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7574,7 +7574,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7587,7 +7587,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7621,7 +7621,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7646,7 +7646,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7672,7 +7672,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7696,7 +7696,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7723,7 +7723,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7750,7 +7750,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7777,7 +7777,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -7794,7 +7794,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7823,7 +7823,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7864,7 +7864,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7904,7 +7904,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7937,7 +7937,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -7964,7 +7964,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertNotNull("No compilation unit", result); //$NON-NLS-1$ assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$ } @@ -7974,7 +7974,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8012,7 +8012,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8052,7 +8052,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8086,7 +8086,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8119,7 +8119,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8140,7 +8140,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8150,7 +8150,7 @@ public class ASTConverterAST8Test extends ConverterTestSetup { assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; IBinding binding; - if (node.getAST().apiLevel() < AST.JLS8) { + if (node.getAST().apiLevel() < getJLS8()) { List thrownExceptions = internalThrownExceptions(methodDeclaration); assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$ Name name = (Name) thrownExceptions.get(0); @@ -8171,7 +8171,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8207,7 +8207,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8262,7 +8262,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8380,7 +8380,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8411,7 +8411,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8430,7 +8430,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8484,7 +8484,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8520,7 +8520,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8546,7 +8546,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8572,7 +8572,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8598,7 +8598,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8624,7 +8624,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8657,7 +8657,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8690,7 +8690,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8724,7 +8724,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8736,7 +8736,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8760,7 +8760,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8793,7 +8793,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8812,7 +8812,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8831,7 +8831,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8849,7 +8849,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8867,7 +8867,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8885,7 +8885,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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(); @@ -8939,7 +8939,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8963,7 +8963,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -8986,7 +8986,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9012,7 +9012,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9033,7 +9033,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9054,7 +9054,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9075,7 +9075,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9096,7 +9096,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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(); @@ -9117,7 +9117,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9138,7 +9138,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9159,7 +9159,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9185,7 +9185,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9210,7 +9210,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9229,7 +9229,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9252,7 +9252,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9275,7 +9275,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9294,7 +9294,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -9308,7 +9308,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9336,7 +9336,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9354,7 +9354,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9372,7 +9372,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9390,7 +9390,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9408,7 +9408,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9421,7 +9421,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9446,7 +9446,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9469,7 +9469,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9488,7 +9488,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9507,7 +9507,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9527,7 +9527,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9547,7 +9547,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9568,7 +9568,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9600,7 +9600,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9624,7 +9624,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -9654,7 +9654,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ @@ -9688,7 +9688,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ @@ -9720,7 +9720,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -9745,7 +9745,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ @@ -9762,7 +9762,7 @@ public class ASTConverterAST8Test 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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ @@ -9778,7 +9778,7 @@ public class ASTConverterAST8Test extends ConverterTestSetup { public void test0401() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit("Converter18" , "src", "testBug496596", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - ASTNode result = runConversion(AST.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 2, 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/ASTConverterBugsTestJLS8.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java index 121898910c..0cc8fc54a4 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. + * Copyright (c) 2011, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,6 +29,9 @@ import org.eclipse.jdt.core.dom.AST; @SuppressWarnings("rawtypes") public class ASTConverterBugsTestJLS8 extends ASTConverterBugsTest { +/** + * @deprecated + */ public ASTConverterBugsTestJLS8(String name) { super(name); this.testLevel = AST.JLS8; diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java index eda547bbae..e7f04376f9 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocFlattener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -57,8 +57,9 @@ public void reset() { this.buffer.setLength(0); } -/* +/** * @see ASTVisitor#visit(ArrayType) + * @deprecated */ public boolean visit(ArrayType node) { if (node.getAST().apiLevel() < AST.JLS8) { diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java index 73b6419bb0..11437ce060 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8330,7 +8330,7 @@ public class ASTConverterTest extends ConverterTestSetup { assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; IBinding binding; - if (node.getAST().apiLevel() < AST.JLS8) { + if (node.getAST().apiLevel() < getJLS8()) { List thrownExceptions = internalThrownExceptions(methodDeclaration); assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$ Name name = (Name) thrownExceptions.get(0); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java index 466c9e8068..01dd01a6db 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java @@ -114,7 +114,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { public void setUpSuite() throws Exception { super.setUpSuite(); - this.ast = AST.newAST(AST.JLS8); + this.ast = AST.newAST(getJLS8()); } public ASTConverterTestAST8_2(String name) { @@ -149,7 +149,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ @@ -175,7 +175,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -188,7 +188,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -222,7 +222,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -253,7 +253,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -284,7 +284,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -317,7 +317,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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; @@ -348,7 +348,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode((CompilationUnit) result, 0, 0); assertNotNull(node); @@ -382,7 +382,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; assertProblemsSize(compilationUnit, 0); @@ -469,7 +469,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -486,7 +486,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -503,7 +503,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -533,7 +533,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -542,7 +542,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$ MethodDeclaration methodDeclaration = (MethodDeclaration) node; IBinding binding; - if (node.getAST().apiLevel() < AST.JLS8) { + if (node.getAST().apiLevel() < getJLS8()) { List throwsException = internalThrownExceptions(methodDeclaration); assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$ Name name = (Name) throwsException.get(0); @@ -563,7 +563,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -589,7 +589,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit2, true); + result = runConversion(getJLS8(), 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$ @@ -606,7 +606,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -628,7 +628,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -661,7 +661,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -686,7 +686,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -730,7 +730,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -757,7 +757,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -785,7 +785,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -813,7 +813,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -840,7 +840,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -864,7 +864,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -891,7 +891,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -912,7 +912,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -937,7 +937,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -962,7 +962,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1011,7 +1011,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1032,7 +1032,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1054,7 +1054,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1083,7 +1083,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1107,7 +1107,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1131,7 +1131,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1157,7 +1157,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1179,7 +1179,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1195,7 +1195,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, false, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1216,7 +1216,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1256,7 +1256,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1284,7 +1284,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1313,7 +1313,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1337,7 +1337,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1360,7 +1360,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1371,7 +1371,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1382,7 +1382,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1393,7 +1393,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1412,7 +1412,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -1430,7 +1430,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1518,7 +1518,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1535,7 +1535,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -1551,7 +1551,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1571,7 +1571,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1596,7 +1596,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1624,7 +1624,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1645,7 +1645,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1672,7 +1672,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1701,7 +1701,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -1729,7 +1729,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1743,7 +1743,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); char[] source = sourceUnit.getSource().toCharArray(); assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; @@ -1780,7 +1780,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -1799,7 +1799,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); CompilationUnit compilationUnit = (CompilationUnit) result; char[] source = sourceUnit.getSource().toCharArray(); ASTNode node = getASTNode(compilationUnit, 0, 0, 0); @@ -1820,7 +1820,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; ASTNode node = getASTNode(compilationUnit, 0, 0, 0); assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$ @@ -1842,7 +1842,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; ASTNode node = getASTNode(compilationUnit, 0, 1, 0); assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ @@ -1874,7 +1874,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; char[] source = sourceUnit.getSource().toCharArray(); ASTNode node = getASTNode(compilationUnit, 0, 0, 0); @@ -1898,7 +1898,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; char[] source = sourceUnit.getSource().toCharArray(); ASTNode node = getASTNode(compilationUnit, 0, 0, 0); @@ -1923,7 +1923,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; ASTNode node = getASTNode(compilationUnit, 0, 1, 0); assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ @@ -1962,7 +1962,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; ASTNode node = getASTNode(compilationUnit, 0, 2, 0); assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ @@ -1979,7 +1979,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; ASTNode node = getASTNode(compilationUnit, 0, 0, 0); assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ @@ -2006,7 +2006,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 0); @@ -2027,7 +2027,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 2); @@ -2050,7 +2050,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 0, 0); @@ -2071,7 +2071,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 1, 0); @@ -2095,7 +2095,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 1, 0); @@ -2119,7 +2119,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 1, 0); @@ -2144,7 +2144,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit compilationUnit = (CompilationUnit) result; assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(compilationUnit, 0, 1, 0); @@ -2173,7 +2173,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -2222,7 +2222,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2261,7 +2261,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2289,7 +2289,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -2329,7 +2329,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -2367,7 +2367,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -2410,7 +2410,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, memberTypes.length); IType memberType = memberTypes[0]; ISourceRange sourceRange = memberType.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -2441,7 +2441,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, memberTypes.length); IType memberType = memberTypes[0]; ISourceRange sourceRange = memberType.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2471,7 +2471,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -2502,7 +2502,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 3, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); assertNotNull(result); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ @@ -2575,7 +2575,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, initializers.length); IInitializer init = initializers[1]; ISourceRange sourceRange = init.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); assertNotNull(result); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ @@ -2639,7 +2639,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2655,7 +2655,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2672,7 +2672,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2698,7 +2698,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2718,7 +2718,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2729,7 +2729,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { checkSourceRange(type, "Class[][]", source); assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$ ArrayType arrayType = (ArrayType) type; - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { Type componentType = componentType(arrayType); assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$ checkSourceRange(componentType, "Class[]", source); @@ -2749,7 +2749,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2760,7 +2760,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { checkSourceRange(type, "Class[][][]", source); assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$ ArrayType arrayType = (ArrayType) type; - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { Type componentType = componentType(arrayType); assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$ checkSourceRange(componentType, "Class[][]", source); @@ -2784,7 +2784,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2795,7 +2795,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { checkSourceRange(type, "Class[][]", source); assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$ ArrayType arrayType = (ArrayType) type; - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { Type componentType = componentType(arrayType); assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$ checkSourceRange(componentType, "Class[]", source); @@ -2819,7 +2819,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2830,7 +2830,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { checkSourceRange(type, "Class[][][][]", source); assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$ ArrayType arrayType = (ArrayType) type; - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { Type componentType = componentType(arrayType); assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$ checkSourceRange(componentType, "Class[][][]", source); @@ -2858,7 +2858,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$< @@ -2869,7 +2869,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { checkSourceRange(type, "Class[]", source); assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$ ArrayType arrayType = (ArrayType) type; - type = this.ast.apiLevel() < AST.JLS8 ? componentType(arrayType) : arrayType.getElementType(); + type = this.ast.apiLevel() < getJLS8() ? componentType(arrayType) : arrayType.getElementType(); assertTrue("is an array type", !type.isArrayType()); //$NON-NLS-1$ checkSourceRange(type, "Class", source); } @@ -2878,7 +2878,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ } @@ -2887,7 +2887,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -2925,7 +2925,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit result = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); IProblem[] problems= result.getProblems(); assertTrue(problems.length == 1); assertEquals("Invalid warning", "Javadoc: Missing tag for parameter a", problems[0].getMessage()); @@ -2939,7 +2939,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull(result); assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ } @@ -2949,7 +2949,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'i' in initializer VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 0, 0); @@ -2963,7 +2963,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'j' in 'then' block in initializer IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 0, 1); @@ -2979,7 +2979,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'i' in 'foo()' VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 1, 0); @@ -2993,7 +2993,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'j' in 'then' block in 'foo()' IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1); @@ -3009,7 +3009,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'j' in 'else' block in 'foo()' IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1); @@ -3025,7 +3025,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // first 'new Object(){...}' in 'foo()' ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 2); @@ -3040,7 +3040,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'B' in 'foo()' TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3); @@ -3054,7 +3054,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // second 'new Object(){...}' in 'foo()' ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 4); @@ -3069,7 +3069,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'field' in 'B' in 'foo()' TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3); @@ -3087,7 +3087,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // 'bar()' in 'B' in 'foo()' TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3); @@ -3104,7 +3104,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // top level type A TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0); @@ -3117,7 +3117,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // member type B in A TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0, 0); @@ -3130,7 +3130,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // local type E in foo() in A TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 0); @@ -3144,7 +3144,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // anonymous type new Object() {...} in foo() in A ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1); @@ -3159,7 +3159,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // type F in anonymous type new Object() {...} in foo() in A ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1); @@ -3175,7 +3175,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // local type C in bar() in B in A MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0); @@ -3190,7 +3190,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // anonymous type new Object() {...} in bar() in B in A MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0); @@ -3206,7 +3206,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // type D in anonymous type new Object() {...} in bar() in B in A MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0); @@ -3223,7 +3223,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit unit = (CompilationUnit)runConversion(getJLS8(), sourceUnit, true); // unreachable type G in foo() in A IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 2); @@ -3240,7 +3240,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3258,7 +3258,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3275,7 +3275,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3295,7 +3295,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3315,7 +3315,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3335,7 +3335,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3355,7 +3355,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3375,7 +3375,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3396,7 +3396,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -3412,7 +3412,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$ } @@ -3423,7 +3423,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$ } @@ -3434,7 +3434,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3458,14 +3458,14 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setSource(source); parser.setSourceRange(declaration.getStartPosition(), declaration.getLength()); @@ -3492,7 +3492,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ assertNotNull("No comments", unit.getCommentList()); @@ -3501,7 +3501,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setSource(source); parser.setSourceRange(declaration.getStartPosition(), declaration.getLength()); @@ -3528,14 +3528,14 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setSource(source); parser.setSourceRange(declaration.getStartPosition(), declaration.getLength()); @@ -3562,7 +3562,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ assertNotNull("No comments", unit.getCommentList()); @@ -3570,7 +3570,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { ASTNode node = getASTNode(unit, 0, 0, 0); assertNotNull("No node", node); ASTNode statement = node; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_STATEMENTS); parser.setSource(source); parser.setSourceRange(statement.getStartPosition(), statement.getLength()); @@ -3597,7 +3597,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ assertNotNull("No comments", unit.getCommentList()); @@ -3607,7 +3607,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_EXPRESSION); parser.setSource(source); parser.setSourceRange(expression.getStartPosition(), expression.getLength()); @@ -3677,7 +3677,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3726,7 +3726,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3765,7 +3765,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3793,7 +3793,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3832,7 +3832,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 2, methods.length); IMethod method = methods[1]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3870,7 +3870,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, methods.length); IMethod method = methods[0]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3911,7 +3911,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, memberTypes.length); IType memberType = memberTypes[0]; ISourceRange sourceRange = memberType.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -3940,7 +3940,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 1, memberTypes.length); IType memberType = memberTypes[0]; ISourceRange sourceRange = memberType.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3969,7 +3969,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 3, methods.length); IMethod method = methods[2]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -3998,7 +3998,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { assertEquals("wrong size", 5, methods.length); IMethod method = methods[3]; ISourceRange sourceRange = method.getSourceRange(); - ASTNode result = runConversion(AST.JLS8, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false); assertNotNull(result); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ @@ -4079,7 +4079,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { type = classFile.getType(); initializers = type.getInitializers(); assertEquals("wrong size", 0, initializers.length); - ASTNode result = runConversion(AST.JLS8, classFile, position, false); + ASTNode result = runConversion(getJLS8(), classFile, position, false); assertNotNull(result); assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ @@ -4145,7 +4145,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -4170,7 +4170,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -4195,7 +4195,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -4218,7 +4218,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("No compilation unit", result); } /** @@ -4226,7 +4226,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("No compilation unit", result); } /** @@ -4234,7 +4234,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("No compilation unit", result); } /** @@ -4242,7 +4242,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertNotNull("No compilation unit", result); } /** @@ -4262,7 +4262,7 @@ public class ASTConverterTestAST8_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.JLS8 + // TODO improve test for getJLS8() } finally { sourceUnit.discardWorkingCopy(); } @@ -4296,7 +4296,7 @@ public class ASTConverterTestAST8_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.JLS8 + // TODO improve test for getJLS8() } finally { sourceUnit.discardWorkingCopy(); } @@ -4316,7 +4316,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " Object field;\n" + "}" ); - // TODO improve test for AST.JLS8 + // TODO improve test for getJLS8() CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null); ASTNode node = getASTNode(unit, 0, 0); assertNotNull("No node", node); @@ -4340,7 +4340,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { try { ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor(); sourceUnit.becomeWorkingCopy(pbRequestor, null); - // TODO improve test for AST.JLS8 + // TODO improve test for getJLS8() CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null); ASTNode node = getASTNode(unit, 0); assertNotNull("No node", node); @@ -4375,7 +4375,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " }\n" + "}" ); - // TODO improve test for AST.JLS8 + // TODO improve test for getJLS8() CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null); ASTNode node = getASTNode(unit, 0); assertNotNull("No node", node); @@ -4406,7 +4406,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}" ); sourceUnit.reconcile(ICompilationUnit.NO_AST, false/* don't force pb detection*/, null, null); - // TODO improve test for AST.JLS8 + // TODO improve test for getJLS8() CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null); ASTNode node = getASTNode(unit, 0); assertNotNull("No node", node); @@ -4434,7 +4434,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " Object field;\n" + "}" ); - // TODO improve test for AST.JLS8 + // TODO improve test for getJLS8() CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null); assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void")); } finally { @@ -4447,7 +4447,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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); @@ -4486,7 +4486,7 @@ public class ASTConverterTestAST8_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.JLS8, source, "Test.java", project, options, true); //$NON-NLS-1$ + ASTNode result = runConversion(getJLS8(), 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; @@ -4506,7 +4506,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -4535,7 +4535,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -4703,7 +4703,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); final CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ unit.accept(new GetKeyVisitor()); @@ -4714,7 +4714,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -4731,7 +4731,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); CompilationUnit unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ ASTNode node = getASTNode(unit, 0, 0); @@ -4741,7 +4741,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + result = runConversion(getJLS8(), sourceUnit, true); unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ node = getASTNode(unit, 0, 0); @@ -4751,7 +4751,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + result = runConversion(getJLS8(), sourceUnit, true); unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ node = getASTNode(unit, 0, 0); @@ -4762,7 +4762,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + result = runConversion(getJLS8(), sourceUnit, true); unit = (CompilationUnit) result; assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$ node = getASTNode(unit, 0); @@ -4777,7 +4777,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -4820,7 +4820,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -4845,7 +4845,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ } @@ -4854,7 +4854,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ } @@ -4863,7 +4863,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ } @@ -4873,7 +4873,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, false); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -4885,7 +4885,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + CompilationUnit result = (CompilationUnit) runConversion(getJLS8(), sourceUnit, true); assertEquals("Got errors", 0, result.getProblems().length); TypeDeclaration declaration = (TypeDeclaration) result.types().get(0); Block body = declaration.getMethods()[0].getBody(); @@ -4916,7 +4916,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -4939,7 +4939,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -4968,7 +4968,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -4997,7 +4997,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5022,7 +5022,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5066,7 +5066,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5094,7 +5094,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5122,7 +5122,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5150,7 +5150,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5178,7 +5178,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5205,7 +5205,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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 ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5259,7 +5259,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5275,7 +5275,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5290,7 +5290,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ } @@ -5299,7 +5299,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5310,7 +5310,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { * No binding when there is no unit name set */ public void test0571() throws JavaModelException { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); String source = "public class A {public boolean foo() {}}"; parser.setSource(source.toCharArray()); parser.setProject(getJavaProject("Converter")); @@ -5327,7 +5327,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { * No binding when there is no unit name set */ public void test0572() throws JavaModelException { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); String source = "public class A {public boolean foo() {}}"; parser.setSource(source.toCharArray()); parser.setProject(getJavaProject("Converter")); @@ -5347,7 +5347,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, pos, true); + ASTNode result = runConversion(getJLS8(), 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); @@ -5366,7 +5366,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5395,7 +5395,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; final IProblem[] problems = unit.getProblems(); @@ -5432,7 +5432,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) result; assertProblemsSize(unit, 0); @@ -6435,7 +6435,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setSource(source); ASTNode root = parser.createAST(null); @@ -6506,7 +6506,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + final ASTNode result = runConversion(getJLS8(), 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"); @@ -6742,7 +6742,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents.toCharArray()); - ASTNode node = runConversion(AST.JLS8, workingCopy, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 1, "Dead code"); @@ -6777,7 +6777,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents.toCharArray()); - ASTNode node = runConversion(AST.JLS8, workingCopy, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedOutput = "Dead code"; @@ -6852,13 +6852,13 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, false); + ASTNode result = runConversion(getJLS8(), 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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_STATEMENTS); parser.setSource(source); parser.setSourceRange(statement.getStartPosition(), statement.getLength()); @@ -7125,7 +7125,7 @@ public class ASTConverterTestAST8_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.JLS8, source, "Test.java", project); //$NON-NLS-1$ + ASTNode result = runConversion(getJLS8(), 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; @@ -7147,7 +7147,7 @@ public class ASTConverterTestAST8_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.JLS8, source, "Object.java", project); //$NON-NLS-1$ + ASTNode result = runConversion(getJLS8(), 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; @@ -7222,7 +7222,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { * http://dev.eclipse.org/bugs/show_bug.cgi?id=125270 */ public void test0628() throws JavaModelException { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_EXPRESSION); String source = "{\"red\", \"yellow\"}"; parser.setSource(source.toCharArray()); @@ -7243,7 +7243,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; String expectedOutput = @@ -7262,7 +7262,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; String expectedOutput = @@ -7275,7 +7275,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) result; String expectedOutput = @@ -7336,7 +7336,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { public void test0633() { String src = "switch (state) {case 4:double M0,M1;}"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); parser.setSource (source); ASTNode result = parser.createAST (null); @@ -7380,7 +7380,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_COMPILATION_UNIT); parser.setSource (source); parser.setStatementsRecovery(true); @@ -8092,7 +8092,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); CompilationUnit unit = (CompilationUnit) result; @@ -8239,7 +8239,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " int d;\n" + " }"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); parser.setStatementsRecovery(true); parser.setSource (source); @@ -8272,7 +8272,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " int d;\n" + " }"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); parser.setStatementsRecovery(false); parser.setSource (source); @@ -8333,7 +8333,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " int d;\n" + " }"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); parser.setStatementsRecovery(true); parser.setSource (source); @@ -8359,7 +8359,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setStatementsRecovery(true); parser.setBindingsRecovery(true); @@ -8961,7 +8961,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertNotNull(result); } @@ -8983,7 +8983,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedError = @@ -9026,7 +9026,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedError = @@ -9096,7 +9096,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedError = @@ -9188,7 +9188,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), 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()); @@ -9254,7 +9254,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true, true, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9294,7 +9294,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents); - ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true); + ASTNode node = runConversion(getJLS8(), 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"; @@ -9321,7 +9321,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true, true); + ASTNode node = runConversion(getJLS8(), 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()); @@ -9375,7 +9375,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) node; node = getASTNode(unit, 0); @@ -9409,7 +9409,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "}"; workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); workingCopy.getBuffer().setContents(contents.toCharArray()); - ASTNode node = runConversion(AST.JLS8, workingCopy, true); + ASTNode node = runConversion(getJLS8(), workingCopy, true); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit unit = (CompilationUnit) node; String expectedOutput = "Dead code"; @@ -9495,7 +9495,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) node; assertProblemsSize(compilationUnit, 0); @@ -9512,7 +9512,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit compilationUnit = (CompilationUnit) node; assertProblemsSize(compilationUnit, 0); @@ -9527,7 +9527,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) node; assertProblemsSize( @@ -9555,7 +9555,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9572,7 +9572,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { ArrayCreation arrayCreation = (ArrayCreation) node; ArrayType arrayType = arrayCreation.getType(); checkSourceRange(arrayType, "String[0][b[10]][]", sourceUnit.getSource()); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { node = componentType(arrayType); assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType()); arrayType = (ArrayType)node; @@ -9592,7 +9592,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9617,7 +9617,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode node = runConversion(getJLS8(), sourceUnit, true, true); assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$ CompilationUnit unit = (CompilationUnit) node; assertProblemsSize(unit, 0); @@ -9744,7 +9744,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { IField field = type.getField("i"); assertNotNull("No field", field); ISourceRange sourceRange = field.getNameRange(); - ASTNode result = runConversion(AST.JLS8, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); + ASTNode result = runConversion(getJLS8(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false); assertNotNull(result); } /** @@ -9769,7 +9769,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true); assertNotNull(result); ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean"); assertNull("Should be null", typeBinding); @@ -9799,7 +9799,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true, true, true); + ASTNode result = runConversion(getJLS8(), sourceUnit, true, true, true); assertNotNull(result); ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean"); assertNull("Should be null", typeBinding); @@ -9816,7 +9816,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { IType type = unit.getType("X"); IMethod method = type.getMethod("foo", new String[0]); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setSource(unit); Hashtable options = JavaCore.getOptions(); @@ -9861,7 +9861,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ASTRequestor requestor = new ASTRequestor() {}; ICompilationUnit[] cus = new ICompilationUnit[2]; cus[0] = unit; @@ -9882,7 +9882,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ASTRequestor requestor = new ASTRequestor() {}; ICompilationUnit[] cus = new ICompilationUnit[2]; cus[0] = unit; @@ -9902,7 +9902,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(unit.getSource().toCharArray()); Map options = JavaCore.getOptions(); @@ -9927,7 +9927,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setSource(unit.getSource().toCharArray()); Map options = JavaCore.getOptions(); @@ -10045,7 +10045,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(workingCopy.getJavaProject()); parser.setResolveBindings(true); parser.setKind(ASTParser.K_COMPILATION_UNIT); @@ -10087,7 +10087,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(workingCopy.getJavaProject()); parser.setResolveBindings(true); parser.setKind(ASTParser.K_COMPILATION_UNIT); @@ -10130,7 +10130,7 @@ public class ASTConverterTestAST8_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.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(workingCopy.getJavaProject()); parser.setResolveBindings(true); parser.setKind(ASTParser.K_COMPILATION_UNIT); @@ -10161,7 +10161,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { final char[] source = ("void foo() {\n" + " Integer I = new ${cursor}\n" + "}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10185,7 +10185,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " Integer I = new ${cursor}\n" + " }\n" + "}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10207,7 +10207,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { final char[] source = ("{\n" + " Integer I = new ${cursor}\n" + "}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10232,7 +10232,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { "{\n" + " Integer I = new ${cursor}\n" + "}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10261,7 +10261,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " Integer I = new ${cursor}\n" + " };\"\n" + "}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_COMPILATION_UNIT); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10278,7 +10278,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { final char[] source = ("Integer i = new Integer() {\n" + " Integer I = new ${cursor}\n" + "};").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10292,7 +10292,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { */ public void test0708() throws JavaModelException { final char[] source = ("System.out.println()\nint i;\n").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_STATEMENTS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10337,7 +10337,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { */ public void test0710() throws JavaModelException { final char[] source = (";").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10352,7 +10352,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { */ public void test0711() throws JavaModelException { final char[] source = (";void foo() {}").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10367,7 +10367,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { */ public void test0712() throws JavaModelException { final char[] source = (";void foo() {};").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(true); parser.setSource(source); @@ -10390,7 +10390,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " if (condition) appendAndExecute(new AddCommand(...));\n" + " }\n" + " }").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(false); parser.setSource(source); @@ -10439,7 +10439,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " }\n" + " }\n" + " }").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(false); parser.setSource(source); @@ -10453,7 +10453,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { */ public void test0715() throws JavaModelException { final char[] source = ("System.out.println()\nint i;\n").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_STATEMENTS); parser.setStatementsRecovery(true); parser.setIgnoreMethodBodies(true); @@ -10470,7 +10470,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { public void test0716() { String src = "switch (state) {case 4:double M0,M1;}"; char[] source = src.toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); parser.setIgnoreMethodBodies(true); parser.setSource (source); @@ -10502,7 +10502,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " if (condition) appendAndExecute(new AddCommand());\n" + " }\n" + " }").toCharArray(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS); parser.setStatementsRecovery(false); parser.setIgnoreMethodBodies(true); @@ -10615,7 +10615,7 @@ public class ASTConverterTestAST8_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.JLS8, sourceUnit, true); + ASTNode result = runConversion(getJLS8(), 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$ @@ -10696,7 +10696,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396 */ public void test0723() { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_STATEMENTS); String src = "int j;\nfor {};\nj=1000;"; char[] source = src.toCharArray(); @@ -10718,7 +10718,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396 */ public void test0724() { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setKind (ASTParser.K_COMPILATION_UNIT); String src = "public class X { void foo() {int j;\nfor {};\nj=1000;}}"; char[] source = src.toCharArray(); @@ -10797,8 +10797,8 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup { " public static final native long /*int*/ realpath(byte[] path, byte[] realPath);\n" + "}" ); - // TODO improve test for AST.JLS8 - CompilationUnit unit = sourceUnit.reconcile(AST.JLS8, false, null, null); + // TODO improve test for getJLS8() + CompilationUnit unit = sourceUnit.reconcile(getJLS8(), false, null, null); assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void")); } finally { sourceUnit.discardWorkingCopy(); 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 aa7c155774..4450153fae 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, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -48,7 +48,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS2)); suite.addTest(new ASTMatcherTest(methods[i].getName(), JLS3_INTERNAL)); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898 - suite.addTest(new ASTMatcherTest(methods[i].getName(), AST.JLS8)); + suite.addTest(new ASTMatcherTest(methods[i].getName(), getJLS8())); } } return suite; @@ -118,6 +118,13 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T this.API_LEVEL = apiLevel; } + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } + /** * @deprecated (not really - just suppressing the warnings * that come from testing Javadoc.getComment()) @@ -140,7 +147,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T this.S1 = this.ast.newContinueStatement(); this.S2 = this.ast.newBreakStatement(); this.B1 = this.ast.newBlock(); - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { this.R1 = this.ast.newSimpleType(this.ast.newSimpleName("XYZ")); this.Q1 = this.ast.newSimpleName("XYZ"); } @@ -242,7 +249,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T this.EC2 = this.ast.newEnumConstantDeclaration(); this.EC2.setName(this.ast.newSimpleName("G")); //$NON-NLS-1$ } - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { this.T3 = this.ast.newSimpleType(this.ast.newSimpleName("U")); //$NON-NLS-1$ this.T4 = this.ast.newSimpleType(this.ast.newSimpleName("V")); //$NON-NLS-1$ } @@ -721,7 +728,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T /** @deprecated using deprecated code */ public void testNameQualifiedType() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } Type x1 = this.ast.newNameQualifiedType(this.ast.newQualifiedName(this.N2, this.N3), this.N1); @@ -881,7 +888,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794 public void testCreationReference() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } CreationReference x1 = this.ast.newCreationReference(); @@ -946,7 +953,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794 public void testExpressionMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } ExpressionMethodReference x1 = this.ast.newExpressionMethodReference(); @@ -1063,14 +1070,14 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T x1.typeParameters().add(this.TP1); x1.typeParameters().add(this.TP2); x1.setReturnType2(this.T1); - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { x1.setReceiverType(this.R1); } } x1.setName(this.N1); x1.parameters().add(this.V1); x1.parameters().add(this.V2); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x1.thrownExceptions().add(this.N2); x1.thrownExceptions().add(this.N3); } else { @@ -1188,7 +1195,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T basicMatch(x1); } public void testSuperMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } SuperMethodReference x1 = this.ast.newSuperMethodReference(); @@ -1416,7 +1423,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898 public void testSingleVariableDeclarationVarargsAnnotation() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } SingleVariableDeclaration x1 = this.ast.newSingleVariableDeclaration(); @@ -1429,7 +1436,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 public void testQualifiedTypeAnnotation() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } QualifiedType x1 = this.ast.newQualifiedType(this.T1, this.N1); @@ -1441,7 +1448,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 public void testParameterizedQualifiedTypeAnnotation() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } QualifiedType qualifiedType = this.ast.newQualifiedType(this.T1, this.N1); @@ -1458,7 +1465,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations1() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // simpleType with Annotations @@ -1469,7 +1476,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations2() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // Type arguments at parameterized types @@ -1484,7 +1491,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations3() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // type arguments in constructor invocation @@ -1497,7 +1504,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations4() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // annotated simple type at class inheritance @@ -1511,7 +1518,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations5() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // constructor invocation results @@ -1524,7 +1531,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations6() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // simple type in cast expression @@ -1537,7 +1544,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations7() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // simple type type tests @@ -1551,7 +1558,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations8() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // annotations on wildcard type @@ -1564,7 +1571,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations9() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // annotations on constructor declaration - implying on the object returned. @@ -1577,7 +1584,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations10() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // annotations on constructor declaration - implying on the object returned. @@ -1592,7 +1599,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations11() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } // annotated simple type at class inheritance @@ -1607,7 +1614,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768 public void testTypeAnnotations12() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } VariableDeclarationFragment x1 = this.ast.newVariableDeclarationFragment(); @@ -1630,7 +1637,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794 public void testTypeMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } TypeMethodReference x1 = this.ast.newTypeMethodReference(); @@ -1641,7 +1648,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793 public void testLambdaExpressions1() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } LambdaExpression x1 = this.ast.newLambdaExpression(); @@ -1654,7 +1661,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793 public void testLambdaExpressions2() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } LambdaExpression x1 = this.ast.newLambdaExpression(); @@ -1664,7 +1671,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793 public void testLambdaExpressions3() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } LambdaExpression x1 = this.ast.newLambdaExpression(); @@ -1674,7 +1681,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T // https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793 public void testLambdaExpressions4() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } LambdaExpression x1 = this.ast.newLambdaExpression(); @@ -1688,7 +1695,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T basicMatch(x1); } public void testIntersectionType() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } IntersectionType x1 = this.ast.newIntersectionType(); 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 5f326400e3..eb0e1e6095 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, 2015 IBM Corporation and others. + * Copyright (c) 2004, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -79,6 +79,13 @@ public class ASTModelBridgeTests extends AbstractASTTests { ); } + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } + /* * Removes the marker comments "*start*" and "*end*" from the given contents, * builds an AST from the resulting source, and returns the AST node that was delimited @@ -532,7 +539,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { this.workingCopies = new ICompilationUnit[2]; this.workingCopies[1] = getWorkingCopy("/P/src/Bar.java", barSource, this.wcOwner); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(getJavaProject("P")); parser.setSource(this.workingCopies[1]); parser.setResolveBindings(true); @@ -1309,7 +1316,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { "}"); this.workingCopy.makeConsistent(null); IMethod method = this.workingCopy.getType("X").getMethod("foo", new String[]{"QString;", "I"}); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(getJavaProject("P")); IBinding[] bindings = parser.createBindings(method.getParameters(), null); assertBindingsEqual( @@ -1328,7 +1335,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { " void foo(String str, int i) {}\n" + "}"); IMethod method = getClassFile("/P/lib/A.class").getType().getMethod("foo", new String[] {"Ljava.lang.String;", "I"}); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(getJavaProject("P")); IBinding[] bindings = parser.createBindings(method.getParameters(), null); assertBindingsEqual( @@ -1360,7 +1367,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { ); IJavaElement elem= this.workingCopies[0].codeSelect(xSource.indexOf("foo"), 0)[0]; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(getJavaProject("P")); IBinding[] bindings = parser.createBindings(new IJavaElement[]{ elem }, null); assertBindingsEqual( @@ -1392,7 +1399,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { IType typeA = javaProject.findType("p.A"); IJavaElement[] elems= typeA.getMethod("foo", new String[]{"I", "Z"}).getParameters(); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(javaProject); IBinding[] bindings = parser.createBindings(elems, null); assertBindingsEqual( @@ -2622,7 +2629,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { javaProject.findType("lib.A").getTypeParameters()[0], javaProject.findType("lib.A").getTypeParameters()[1] }; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(javaProject); IBinding[] bindings = parser.createBindings(elements, null); assertBindingsEqual( @@ -2655,7 +2662,7 @@ public class ASTModelBridgeTests extends AbstractASTTests { method.getTypeParameters()[0], method.getTypeParameters()[1] }; - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setProject(javaProject); IBinding[] bindings = parser.createBindings(elements, null); assertBindingsEqual( 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 7f0ef7aaf2..4830f263ef 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 @@ -748,7 +748,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase suite.addTest(new ASTTest(methods[i].getName(), AST.JLS2)); suite.addTest(new ASTTest(methods[i].getName(), JLS3_INTERNAL)); suite.addTest(new ASTTest(methods[i].getName(), AST.JLS4)); - suite.addTest(new ASTTest(methods[i].getName(), AST.JLS8)); + suite.addTest(new ASTTest(methods[i].getName(), getJLS8())); } } return suite; @@ -757,6 +757,13 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase AST ast; int API_LEVEL; + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } + public ASTTest(String name) { super(name.substring(0, name.indexOf(" - JLS"))); name.indexOf(" - JLS"); @@ -2084,7 +2091,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.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { assertTrue(getArrayComponentType(x).getParent() == x); } else { assertTrue(x.getElementType().getParent() == x); @@ -2103,7 +2110,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getDimensions() == 1); assertTrue(x.getElementType() == x2); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { genericPropertyTest(x, new Property("ComponentType", true, Type.class) { //$NON-NLS-1$ public ASTNode sample(AST targetAst, boolean parented) { SimpleType result = targetAst.newSimpleType( @@ -3218,7 +3225,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase } previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x.setExtraDimensions(1); } else { x.extraDimensions().add(this.ast.newDimension()); @@ -3227,7 +3234,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getExtraDimensions() == 1); previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x.setExtraDimensions(0); } else { x.extraDimensions().remove(0); @@ -3330,7 +3337,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase } }); - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { genericPropertyListTest(x, x.extraDimensions(), new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$ public ASTNode sample(AST targetAst, boolean parented) { @@ -3388,7 +3395,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(this.ast.modificationCount() == previousCount); previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { setExtraDimensions(x, 1); } else { x.extraDimensions().add(this.ast.newDimension()); @@ -3397,7 +3404,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getExtraDimensions() == 1); previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { setExtraDimensions(x, 0); } else { x.extraDimensions().remove(0); @@ -3406,7 +3413,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getExtraDimensions() == 0); // check that property cannot be set negative - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { try { setExtraDimensions(x, -1); fail(); @@ -3431,7 +3438,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase } }); - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { genericPropertyListTest(x, x.extraDimensions(), new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$ public ASTNode sample(AST targetAst, boolean parented) { @@ -3510,7 +3517,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getExtraDimensions() == 0); assertTrue(x.getJavadoc() == null); assertTrue(x.parameters().size() == 0); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { assertTrue(x.thrownExceptions().size() == 0); } else { assertTrue(x.thrownExceptionTypes().size() == 0); @@ -3550,7 +3557,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase } previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x.setExtraDimensions(1); } else { x.extraDimensions().add(this.ast.newDimension()); @@ -3559,7 +3566,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase assertTrue(x.getExtraDimensions() == 1); previousCount = this.ast.modificationCount(); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x.setExtraDimensions(0); } else { x.extraDimensions().remove(0); @@ -3637,7 +3644,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase }); } - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { genericPropertyListTest(x, x.extraDimensions(), new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$ public ASTNode sample(AST targetAst, boolean parented) { @@ -3675,7 +3682,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase } }); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { genericPropertyListTest(x, x.thrownExceptions(), new Property("ThrownExceptions", true, Name.class) { //$NON-NLS-1$ public ASTNode sample(AST targetAst, boolean parented) { @@ -3742,7 +3749,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase x.parameters().add(this.ast.newSingleVariableDeclaration()); assertTrue(!x.isVarargs()); // only last param counts } - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { try { x.setExtraDimensions(-1); fail("Should fail"); @@ -8855,7 +8862,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase try { node = this.ast.createInstance(nodeType); } catch (IllegalArgumentException e) { - if (this.API_LEVEL < AST.JLS8 && e.getCause() instanceof UnsupportedOperationException) { + if (this.API_LEVEL < getJLS8() && e.getCause() instanceof UnsupportedOperationException) { continue; } else { throw new AssertionFailedError("missing node type: " + nodeType); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java index d47d83f598..67af0153b2 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -32,7 +32,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS2)); suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS3)); suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS4)); - suite.addTest(new ASTVisitorTest(methods[i].getName(), AST.JLS8)); + suite.addTest(new ASTVisitorTest(methods[i].getName(), getJLS8())); } } return suite; @@ -299,7 +299,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T this.EC2.setName(this.ast.newSimpleName("d")); //$NON-NLS-1$ this.EC2S = "[(ECD[(nSddnS)]ECD)]"; //$NON-NLS-1$ } - if (this.ast.apiLevel() >= AST.JLS8) { + if (this.ast.apiLevel() >= getJLS8()) { this.T3 = this.ast.newSimpleType(this.ast.newSimpleName("W")); //$NON-NLS-1$ this.T3S = "[(tS[(nSWWnS)]tS)]"; //$NON-NLS-1$ this.T4 = this.ast.newSimpleType(this.ast.newSimpleName("X")); //$NON-NLS-1$ @@ -312,6 +312,12 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T this.ast = null; super.tearDown(); } + /** + * @deprecated + */ + protected static int getJLS8() { + return getJLS8(); + } class TestVisitor extends ASTVisitor { @@ -1154,13 +1160,13 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T this.b.setLength(0); x1.accept(v1); String result = this.b.toString(); - String expected = this.ast.apiLevel() < AST.JLS8 ? "[(tA[(tPcharchartP)]tA)]" : "[(tA[(tPcharchartP)][(@ED@ED)]tA)]"; + String expected = this.ast.apiLevel() < getJLS8() ? "[(tA[(tPcharchartP)]tA)]" : "[(tA[(tPcharchartP)][(@ED@ED)]tA)]"; assertTrue(expected.equals(result)); //$NON-NLS-1$ } /** @deprecated using deprecated code */ public void testNameQualifiedType() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } QualifiedName q = this.ast.newQualifiedName(this.N2, this.N3); @@ -1252,7 +1258,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T this.b.setLength(0); x1.accept(v1); String result = this.b.toString(); - String dim = this.ast.apiLevel() < AST.JLS8 ? "" : "[(@ED@ED)]"; + String dim = this.ast.apiLevel() < getJLS8() ? "" : "[(@ED@ED)]"; assertTrue(result.equals("[(eAC"+"[(tA"+this.T1S+ dim +"tA)]"+this.E1S+this.E2S+"[(eAIeAI)]eAC)]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ } public void testArrayInitializer() { @@ -1449,7 +1455,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T } public void testCreationReference() { - if (this.ast.apiLevel() < AST.JLS8) + if (this.ast.apiLevel() < getJLS8()) return; CreationReference x1 = this.ast.newCreationReference(); x1.setType(this.T1); @@ -1521,7 +1527,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T assertTrue(result.equals("[(ED"+this.JD1S+this.MOD1S+this.MOD2S+this.N1S+this.T1S+this.T2S+this.EC1S+this.EC2S+this.FD1S+this.FD2S+"ED)]")); //$NON-NLS-1$ //$NON-NLS-2$ } public void testExpressionMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) + if (this.ast.apiLevel() < getJLS8()) return; ExpressionMethodReference x1 = this.ast.newExpressionMethodReference(); x1.setExpression(this.E1); @@ -1542,7 +1548,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T assertTrue(result.equals("[(sEX"+this.E1S+"sEX)]")); //$NON-NLS-1$ //$NON-NLS-2$ } public void testExtraDimension() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } Dimension x1 = this.ast.newDimension(); @@ -1760,7 +1766,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T x1.setName(this.N1); x1.parameters().add(this.V1); x1.parameters().add(this.V2); - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { x1.thrownExceptions().add(this.N2); x1.thrownExceptions().add(this.N3); } else { @@ -1774,7 +1780,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T String result = this.b.toString(); if (this.ast.apiLevel() == AST.JLS2) { assertEquals("[(MD"+this.JD1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$ - } else if (this.ast.apiLevel() < AST.JLS8) { + } else if (this.ast.apiLevel() < getJLS8()) { assertEquals("[(MD"+this.JD1S+this.MOD1S+this.MOD2S+this.TP1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$ } else { assertEquals("[(MD"+this.JD1S+this.MOD1S+this.MOD2S+this.TP1S+this.T1S+this.N1S+this.V1S+this.V2S+this.T3S+this.T4S+this.B1S+"MD)]", result); //$NON-NLS-1$ //$NON-NLS-2$ @@ -2067,7 +2073,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T } } public void testSuperMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) { + if (this.ast.apiLevel() < getJLS8()) { return; } SuperMethodReference x1 = this.ast.newSuperMethodReference(); @@ -2226,7 +2232,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T assertTrue(result.equals("[(eTL"+this.T1S+"eTL)]")); //$NON-NLS-1$ //$NON-NLS-2$ } public void testTypeMethodReference() { - if (this.ast.apiLevel() < AST.JLS8) + if (this.ast.apiLevel() < getJLS8()) return; TypeMethodReference x1 = this.ast.newTypeMethodReference(); x1.setType(this.T1); 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 19e1d8573d..564c9771b3 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 @@ -483,6 +483,9 @@ public class AbstractASTTests extends ModifyingResourceTests implements DefaultM return new ASTNode[] {unit}; return nodes; } + /** + * @deprecated references deprecated old AST level + */ 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); 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 03befafb7a..fce0fc29f9 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 @@ -46,6 +46,13 @@ public abstract class ConverterTestSetup extends AbstractASTTests { */ /*package*/ static final int JLS4_INTERNAL = AST.JLS4; + /** + * Internal synonym for deprecated constant AST.JSL8 + * to alleviate deprecation warnings. + * @deprecated + */ + /*package*/ static final int JLS8_INTERNAL = AST.JLS8; + static int getJLS3() { return JLS3_INTERNAL; } @@ -53,7 +60,10 @@ public abstract class ConverterTestSetup extends AbstractASTTests { static int getJLS4() { return JLS4_INTERNAL; } - + + static int getJLS8() { + return JLS8_INTERNAL; + } protected AST ast; public static List TEST_SUITES = null; public static boolean PROJECT_SETUP = false; @@ -559,6 +569,9 @@ public abstract class ConverterTestSetup extends AbstractASTTests { return runJLS8Conversion(unit, resolveBindings, checkJLS2, false); } + /** + * @deprecated references deprecated old AST level + */ public ASTNode runJLS8Conversion(ICompilationUnit unit, boolean resolveBindings, boolean checkJLS2, boolean bindingRecovery) { // Create parser 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 59aeff5a88..c2208830c8 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 @@ -29,7 +29,13 @@ public class SampleASTs { * @deprecated */ /*package*/ static final int JLS4_INTERNAL = AST.JLS4; - + + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } /** * Returns a subtree of sample of AST nodes. The sample includes * one of each kind (except for BlockComment and LineComment, @@ -93,7 +99,7 @@ public class SampleASTs { pmt.typeArguments().add(qt); md.setReturnType2(pmt); } - if (target.apiLevel() >= AST.JLS8) { + if (target.apiLevel() >= getJLS8()) { Dimension ed = target.newDimension(); md.extraDimensions().add(ed); } @@ -180,7 +186,7 @@ public class SampleASTs { z.add(booleanLiteral); CastExpression castExpression = target.newCastExpression(); z.add(castExpression); - if (target.apiLevel() >= AST.JLS8) { + if (target.apiLevel() >= getJLS8()) { IntersectionType it = target.newIntersectionType(); castExpression.setType(it); } @@ -198,7 +204,7 @@ public class SampleASTs { z.add(infixExpression); InstanceofExpression instanceofExpression = target.newInstanceofExpression(); z.add(instanceofExpression); - if (target.apiLevel() >= AST.JLS8) { + if (target.apiLevel() >= getJLS8()) { LambdaExpression lambdaExpression = target.newLambdaExpression(); z.add(lambdaExpression); } diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java index ce4e062652..35284aaf70 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java @@ -23,7 +23,7 @@ public class TypeAnnotationsConverterTest extends ConverterTestSetup { public void setUpSuite() throws Exception { super.setUpSuite(); - this.ast = AST.newAST(AST.JLS8); + this.ast = AST.newAST(AST.JLS9); } public TypeAnnotationsConverterTest(String name) { diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java index 40cdcd1afc..ed4309ab69 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2015 IBM Corporation and others. + * Copyright (c) 2013, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -78,7 +78,13 @@ public class TypeBindingTests308 extends ConverterTestSetup { } public void setUpSuite() throws Exception { super.setUpSuite(); - this.ast = AST.newAST(AST.JLS8); + this.ast = AST.newAST(getAST8()); + } + /** + * @deprecated + */ + protected int getAST8() { + return AST.JLS8; } public TypeBindingTests308(String testName){ super(testName); diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java index a891bec2e5..247ed90461 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations17Test.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 GK Software AG, and others. + * Copyright (c) 2015, 2016 GK Software AG, 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 @@ -57,6 +57,13 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { return buildModelTestSuite(ExternalAnnotations17Test.class, BYTECODE_DECLARATION_ORDER); } + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } + /** * @deprecated indirectly uses deprecated class PackageAdmin */ @@ -148,7 +155,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(933) Null type mismatch: required '@NonNull String' but the provided value is specified as @Nullable", @@ -165,7 +172,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { }, null); IPackageFragment fragment = this.root.getPackageFragment("test1"); ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { @@ -214,7 +221,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(933) Null type mismatch: required '@NonNull String' but the provided value is specified as @Nullable", @@ -250,7 +257,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { "}\n"; ICompilationUnit cu = fragment.createCompilationUnit("Test1.java", test1Content, true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(cu); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -282,7 +289,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { assertTrue("file should exist", annotationFile.exists()); // check that the error is gone: - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertNoProblems(reconciled.getProblems()); } @@ -312,7 +319,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { "}\n"; ICompilationUnit cu = fragment.createCompilationUnit("Test1.java", test1Content, true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(cu); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -344,7 +351,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { assertTrue("file should exist", annotationFile.exists()); // check that the error is even worse now: - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(933) Null type mismatch: required '@NonNull Lib1' but the provided value is specified as @Nullable", @@ -378,7 +385,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(912) Null type safety: The expression of type 'Lib1' needs unchecked conversion to conform to '@NonNull Lib1'", @@ -387,7 +394,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { // acquire library AST: IType type = this.project.findType("libs.Lib1"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -417,7 +424,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { assertTrue("file should exist", annotationFile.exists()); // check that the error has gone: - reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertNoProblems(reconciled.getProblems()); } @@ -457,7 +464,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(912) Null type safety: The expression of type 'Lib1' needs unchecked conversion to conform to '@NonNull Lib1'", @@ -505,7 +512,7 @@ public class ExternalAnnotations17Test extends ExternalAnnotations18Test { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(912) Null type safety: The expression of type 'Lib1' needs unchecked conversion to conform to '@NonNull Lib1'", diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java index bc2e744172..fc428a1b18 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ExternalAnnotations18Test.java @@ -156,6 +156,13 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { ContainerInitializer.setInitializer(new TestContainerInitializer()); } + /** + * @deprecated + */ + static int getJLS8() { + return AST.JLS8; + } + /** * @deprecated indirectly uses deprecated class PackageAdmin */ @@ -402,7 +409,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { }, null); IPackageFragment fragment = this.root.getPackageFragment("test1"); ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertNoProblems(problems); } @@ -465,7 +472,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertNoProblems(problems); } @@ -531,7 +538,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Iterator<@NonNull capture#of ?>'. Type 'Iterator' doesn't seem to be designed with null type annotations in mind", @@ -592,7 +599,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(955) Null type safety (type annotations): The expression of type 'String[]' needs unchecked conversion to conform to '@Nullable String @Nullable[]'", @@ -638,7 +645,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", @@ -689,7 +696,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", @@ -740,7 +747,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", @@ -794,7 +801,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", @@ -841,7 +848,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull Exception' but this expression has type '@Nullable Exception'", @@ -918,7 +925,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(955) Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to '@NonNull String'", }, new int[] { 8 }); @@ -926,7 +933,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Lib1"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -955,7 +962,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { assertTrue("file should exist", annotationFile.exists()); // check that the error is even worse now: - reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", }, new int[] { 8 }); @@ -989,7 +996,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(953) Null type mismatch (type annotations): required 'Lib1' but this expression has type 'Lib1'", }, new int[] { 7 }); @@ -997,7 +1004,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Lib1"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1027,7 +1034,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { assertTrue("file should exist", annotationFile.exists()); // check that the error is resolved now: - reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertNoProblems(reconciled.getProblems()); } @@ -1059,7 +1066,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(910) Null type mismatch: required '@NonNull String' but the provided value is null", }, new int[] { 7 }); @@ -1067,7 +1074,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Lib1"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1097,7 +1104,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { assertTrue("file should exist", annotationFile.exists()); // check that the error is resolved now: - reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertNoProblems(reconciled.getProblems()); // invert annotation: @@ -1110,7 +1117,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { assertTrue("file should exist", annotationFile.exists()); // check that the error is back now: - reconciled = cu.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = cu.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(910) Null type mismatch: required '@NonNull String' but the provided value is null", }, new int[] { 7 }); @@ -1146,7 +1153,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Collectors"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1201,7 +1208,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Collectors"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1253,7 +1260,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Collections"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1307,7 +1314,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Collections"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1362,7 +1369,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Thread"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1417,7 +1424,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Thread"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1472,7 +1479,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { // acquire library AST: IType type = this.project.findType("libs.Thread"); ICompilationUnit libWorkingCopy = type.getClassFile().getWorkingCopy(this.wcOwner, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(libWorkingCopy); parser.setResolveBindings(true); parser.setStatementsRecovery(false); @@ -1558,7 +1565,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertEquals("number of problems", 4, problems.length); @@ -1573,7 +1580,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled2 = unit2.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled2 = unit2.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertNoProblems(reconciled2.getProblems()); assertEquals("number of log entries", 0, listener.loggedStatus.size()); @@ -1609,7 +1616,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots", null); IPackageFragment fragment = this.root.getPackageFragment("test1"); ICompilationUnit unit = fragment.getCompilationUnit("Test1.java").getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertNoProblems(problems); } finally { @@ -1652,7 +1659,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots.zip", null); IPackageFragment fragment = this.root.getPackageFragment("test1"); ICompilationUnit unit = fragment.getCompilationUnit("Reconcile2.java").getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertNoProblems(problems); } finally { @@ -1686,7 +1693,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { addProjectDependencyWithExternalAnnotations(this.project, "/Lib", "annots.zip", null); IPackageFragment fragment = this.root.getPackageFragment("test1"); ICompilationUnit unit = fragment.getCompilationUnit("Reconcile3.java").getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(964) Null constraint mismatch: The type '@Nullable B' is not a valid substitute for the type parameter '@NonNull R'", "Pb(964) Null constraint mismatch: The type '@Nullable String' is not a valid substitute for the type parameter '@NonNull V'", @@ -1722,7 +1729,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", "Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib1<@NonNull String>'. Type 'Lib1' doesn't seem to be designed with null type annotations in mind", @@ -1733,7 +1740,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " \n" + " \n" + "\n"); - reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(953) Null type mismatch (type annotations): required '@NonNull String' but this expression has type '@Nullable String'", }, new int[] { 8 }); @@ -1786,7 +1793,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { " }\n" + "}\n", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); assertProblems(reconciled.getProblems(), new String[] { "Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib1<@NonNull String>'. Type 'Lib1' doesn't seem to be designed with null type annotations in mind", "Pb(980) Unsafe interpretation of method return type as '@NonNull' based on the receiver type 'Lib2<@NonNull String>'. Type 'Lib2' doesn't seem to be designed with null type annotations in mind", @@ -1834,7 +1841,7 @@ public class ExternalAnnotations18Test extends ModifyingResourceTests { "}\n" + "", true, new NullProgressMonitor()).getWorkingCopy(new NullProgressMonitor()); - CompilationUnit reconciled = unit.reconcile(AST.JLS8, true, null, new NullProgressMonitor()); + CompilationUnit reconciled = unit.reconcile(getJLS8(), true, null, new NullProgressMonitor()); IProblem[] problems = reconciled.getProblems(); assertProblems(problems, new String[] { "Pb(149) Dead code" 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 ef9d23cd36..32d1a2965a 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 @@ -2633,7 +2633,7 @@ public void testBug351697() throws Exception { proj.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null); try { - ASTParser parser= ASTParser.newParser(AST.JLS8); + ASTParser parser= ASTParser.newParser(AST.JLS9); parser.setSource(unit); parser.setResolveBindings(true); ASTNode node = parser.createAST(null); 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 986b852419..593ae48f96 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 @@ -288,7 +288,7 @@ public class NullAnnotationModelTests extends ReconcilerTests { "Buildpath problem: the type invalid, which is configured as a null annotation type, cannot be resolved\n" + "----------\n"); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setProject(p); parser.setResolveBindings(true); parser.setSource(unit); @@ -351,7 +351,7 @@ public class NullAnnotationModelTests extends ReconcilerTests { assertEquals("Should have no markers", 0, markers.length); // Challenge CompilationUnitResolver: - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setProject(p); parser.setResolveBindings(true); parser.setSource(unit); @@ -422,7 +422,7 @@ public class NullAnnotationModelTests extends ReconcilerTests { assertEquals("Unexpected marker path", "/P/p1/C1.java", markers[0].getResource().getFullPath().toString()); // Challenge CompilationUnitResolver: - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setProject(p); parser.setResolveBindings(true); parser.setSource(unit); @@ -475,7 +475,7 @@ public class NullAnnotationModelTests extends ReconcilerTests { final ICompilationUnit unit = getCompilationUnit("/P/p1/C1.java").getWorkingCopy(this.wcOwner, null); assertNoProblem(c1SourceString.toCharArray(), unit); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setProject(p); parser.setResolveBindings(true); parser.setSource(unit); 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 320248b5d7..573dae8e1a 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, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -76,7 +76,7 @@ public class ReconcilerTests extends ModifyingResourceTests { } } - /*package*/ static final int JLS_LATEST = AST.JLS8; + /*package*/ static final int JLS_LATEST = AST.JLS9; static class ReconcileParticipant extends CompilationParticipant { IJavaElementDelta delta; @@ -87,10 +87,13 @@ public class ReconcilerTests extends ModifyingResourceTests { public boolean isActive(IJavaProject project) { return true; } + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { this.delta = context.getDelta(); try { - this.ast = context.getAST8(); + this.ast = context.getAST(JLS_LATEST); } catch (JavaModelException e) { assertNull("Unexpected exception", e); } @@ -106,10 +109,13 @@ public class ReconcilerTests extends ModifyingResourceTests { public boolean isActive(IJavaProject project) { return true; } + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { this.delta = context.getDelta(); try { - this.ast = context.getAST8(); + this.ast = context.getAST(JLS_LATEST); 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) { @@ -127,10 +133,13 @@ public class ReconcilerTests extends ModifyingResourceTests { public boolean isActive(IJavaProject project) { return true; } + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { this.delta = context.getDelta(); try { - this.ast = context.getAST8(); + this.ast = context.getAST(JLS_LATEST); 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) { @@ -2988,6 +2997,9 @@ public void testReconcileParticipant04() throws CoreException { */ public void testReconcileParticipant05() throws CoreException { new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { try { setWorkingCopyContents( @@ -3023,6 +3035,9 @@ public void testReconcileParticipant05() throws CoreException { */ public void testReconcileParticipant06() throws CoreException { new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { try { setWorkingCopyContents( @@ -3106,6 +3121,9 @@ public void testReconcileParticipant08() throws CoreException { // reconcile with a participant adding a list of problems new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { context.putProblems("test.marker", new CategorizedProblem[] {}); } @@ -3124,6 +3142,9 @@ public void testReconcileParticipant08() throws CoreException { public void testReconcileParticipant09() throws CoreException { this.workingCopy.makeConsistent(null); new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { assertTrue("Participant should not be notified of a reconcile", false); } @@ -3139,6 +3160,9 @@ public void testReconcileParticipant10() throws CoreException { this.workingCopy.makeConsistent(null); final boolean[] participantReconciled = new boolean[1]; new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { participantReconciled[0] = true; } @@ -3156,6 +3180,9 @@ public void testReconcileParticipant10() throws CoreException { */ public void testReconcileParticipant11() throws CoreException { new ReconcileParticipant() { + /** + * @deprecated + */ public void reconcile(ReconcileContext context) { context.resetAST(); } diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java index fbce7ed59d..373a4d4b73 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMethodDeclTest.java @@ -65,6 +65,7 @@ public class ASTRewritingMethodDeclTest extends ASTRewritingTest { return ast.apiLevel() < AST.JLS3 ? INTERNAL_METHOD_RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY; } + /** @deprecated using deprecated code */ private ASTNode createNewExceptionType(AST ast, String name) { return ast.apiLevel() < AST.JLS8 ? ast.newSimpleName(name) : (ASTNode) ast.newSimpleType(ast.newSimpleName(name)); } diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java index e8b1af766d..0ccf485b90 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingStatementsTest.java @@ -34,6 +34,7 @@ import org.eclipse.jdt.core.dom.Block; import org.eclipse.jdt.core.dom.BooleanLiteral; import org.eclipse.jdt.core.dom.BreakStatement; import org.eclipse.jdt.core.dom.CatchClause; +import org.eclipse.jdt.core.dom.ChildListPropertyDescriptor; import org.eclipse.jdt.core.dom.ClassInstanceCreation; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.ConstructorInvocation; @@ -1443,7 +1444,6 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { assertEqualString(preview, buf.toString()); } - @SuppressWarnings("deprecation") public void testDoStatement2_since_4() throws Exception { createProject("P_17", JavaCore.VERSION_1_7); IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src"); @@ -1491,7 +1491,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { VariableDeclarationExpression resource = ast.newVariableDeclarationExpression(fragment); resource.setType(ast.newSimpleType(ast.newSimpleName("Reader"))); - rewrite.getListRewrite(newTry, this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY).insertLast(resource, null); + rewrite.getListRewrite(newTry, getResourcesProperty()).insertLast(resource, null); rewrite.replace(doStatement.getBody(), newTry, null); } @@ -5010,7 +5010,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { VariableDeclarationExpression resource = ast.newVariableDeclarationExpression(fragment); resource.setType(ast.newSimpleType(ast.newSimpleName("Reader"))); - rewrite.getListRewrite(tryStatement, this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY).insertLast(resource, null); + rewrite.getListRewrite(tryStatement, getResourcesProperty()).insertLast(resource, null); } { // replace catch, remove finally TryStatement tryStatement= (TryStatement) blockStatements.get(1); @@ -5051,6 +5051,12 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { deleteProject("P_17"); } } + /** + * @deprecated + */ + protected ChildListPropertyDescriptor getResourcesProperty() { + return this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY; + } public void testTryStatementWithResources2_since_4() throws Exception { createProject("P_17", JavaCore.VERSION_1_7); @@ -5152,7 +5158,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { (VariableDeclarationFragment) rewrite.createCopyTarget(fragment)); newVariableDeclarationExpression.setType((Type) rewrite.createCopyTarget(variableDeclarationStatement.getType())); - ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY); + ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty()); listRewrite.insertLast(newVariableDeclarationExpression, null); rewrite.remove(variableDeclarationStatement, null); @@ -5230,7 +5236,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { VariableDeclarationExpression newVariableDeclarationExpression = ast.newVariableDeclarationExpression(fragment); newVariableDeclarationExpression.setType(ast.newSimpleType(ast.newSimpleName("FileReader"))); - ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY); + ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty()); listRewrite.insertLast(newVariableDeclarationExpression, null); String preview = evaluateRewrite(cu, rewrite); @@ -5305,7 +5311,7 @@ public class ASTRewritingStatementsTest extends ASTRewritingTest { VariableDeclarationExpression newVariableDeclarationExpression = ast.newVariableDeclarationExpression(fragment); newVariableDeclarationExpression.setType(ast.newSimpleType(ast.newSimpleName("FileReader"))); - ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, this.apiLevel < AST.JLS9 ? TryStatement.RESOURCES_PROPERTY : TryStatement.RESOURCES2_PROPERTY); + ListRewrite listRewrite = rewrite.getListRewrite(tryStatement, getResourcesProperty()); listRewrite.insertLast(newVariableDeclarationExpression, null); String preview = evaluateRewrite(cu, rewrite); 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 2d46ab6575..2ced82717a 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 @@ -59,7 +59,10 @@ public class ASTRewritingTest extends AbstractJavaModelTests { /** @deprecated using deprecated code */ private final static int JLS4_INTERNAL = AST.JLS4; - private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, AST.JLS8 }; + /** @deprecated using deprecated code */ + private final static int JLS8_INTERNAL = AST.JLS8; + + private final static int[] JLS_LEVELS = { JLS2_INTERNAL, JLS3_INTERNAL, JLS4_INTERNAL, JLS8_INTERNAL }; private static final String ONLY_AST_STRING = "_only"; private static final String SINCE_AST_STRING = "_since"; diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java index 750c4e033a..ceef7af50d 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2013, 2015 IBM Corporation and others. + * Copyright (c) 2013, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -29,7 +29,13 @@ public class ASTRewritingTypeAnnotationsTest extends ASTRewritingTest { } public static Test suite() { - return createSuite(ASTRewritingTypeAnnotationsTest.class, AST.JLS8); + return createSuite(ASTRewritingTypeAnnotationsTest.class, getAST8()); + } + /** + * @deprecated references deprecated old AST level + */ + protected static int getAST8() { + return AST.JLS8; } public void testCastAnnotations() throws Exception { diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java index 14b716de56..7c0373903d 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeDeclTest.java @@ -86,7 +86,12 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest { public static Test suite() { return createSuite(ASTRewritingTypeDeclTest.class); } - + /** + * @deprecated references deprecated old AST level + */ + protected static int getAST8() { + return AST.JLS8; + } /** @deprecated using deprecated code */ public void testTypeDeclChanges_only_2() throws Exception { IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null); @@ -1940,7 +1945,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest { buf.append(" interface IC {}\n"); buf.append("}\n"); ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null); - CompilationUnit astRoot= createAST(AST.JLS8, cu, true, false); + CompilationUnit astRoot= createAST(getAST8(), cu, true, false); List types = astRoot.types(); TypeDeclaration typeDeclaration = (((TypeDeclaration) types.get(0)).getTypes())[0]; ITypeBinding iTypeBinding = typeDeclaration.resolveBinding(); @@ -1954,7 +1959,7 @@ public class ASTRewritingTypeDeclTest extends ASTRewritingTest { buf.append(" interface IC {}\n"); buf.append("}\n"); ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null); - CompilationUnit astRoot= createAST(AST.JLS8, cu, true, false); + CompilationUnit astRoot= createAST(getAST8(), cu, true, false); List types = astRoot.types(); TypeDeclaration outerTypeDeclaration = (TypeDeclaration) types.get(0); TypeDeclaration memberTypeDeclaration = (outerTypeDeclaration.getTypes())[0]; diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java index ec3300a5c6..1f6e8665cf 100644 --- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java +++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewrite18Test.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014, 2015 IBM Corporation and others. + * Copyright (c) 2014, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -86,7 +86,12 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { waitUntilIndexesReady(); } - + /** + * @deprecated + */ + protected static int getJLS8() { + return AST.JLS8; + } protected void tearDown() throws Exception { deleteProject(PROJECT); super.tearDown(); @@ -110,7 +115,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack2/pack3"); createFile("/" + PROJECT + "/src/pack2/pack3/B.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java")); parser.setResolveBindings(true); parser.setStatementsRecovery(true); @@ -168,7 +173,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack3/pack4"); createFile("/" + PROJECT + "/src/pack3/pack4/B.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java")); parser.setResolveBindings(true); parser.setStatementsRecovery(true); @@ -225,7 +230,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack3/pack4"); createFile("/" + PROJECT + "/src/pack3/pack4/B.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(getCompilationUnit("/" + PROJECT + "/src/pack1/A.java")); parser.setResolveBindings(true); parser.setStatementsRecovery(true); @@ -286,7 +291,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack2"); createFile("/" + PROJECT + "/src/pack2/B1.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -400,7 +405,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack4"); createFile("/" + PROJECT + "/src/pack4/D1.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -471,7 +476,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack4"); createFile("/" + PROJECT + "/src/pack4/D1.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -525,7 +530,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack2"); createFile("/" + PROJECT + "/src/pack2/B1.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -579,7 +584,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFolder("/" + PROJECT + "/src/pack2"); createFile("/" + PROJECT + "/src/pack2/B.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -686,7 +691,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { "}"; createFile("/" + PROJECT + "/src/pack2/Annot2.java", contents); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); parser.setSource(cu); parser.setResolveBindings(true); @@ -774,7 +779,7 @@ public class ImportRewrite18Test extends AbstractJavaModelTests { createFile("/" + PROJECT + "/src/pack1/X.java", contents); ICompilationUnit cu = getCompilationUnit("/" + PROJECT + "/src/pack1/X.java"); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(getJLS8()); parser.setSource(cu); parser.setResolveBindings(true); parser.setStatementsRecovery(true); 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 1afdbda126..4e4995094a 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 @@ -4929,7 +4929,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests { "}\n"; ICompilationUnit cu = pack1.createCompilationUnit("X.java", contents, false, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setSource(cu); parser.setResolveBindings(true); parser.setStatementsRecovery(true); @@ -4954,7 +4954,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests { "}\n"; ICompilationUnit cu = pack1.createCompilationUnit("X.java", contents, false, null); - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setSource(cu); parser.setResolveBindings(true); parser.setStatementsRecovery(true); diff --git a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java index c42b8c8af6..f1a7950c63 100644 --- a/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java +++ b/org.eclipse.jdt.core.tests.performance/src/org/eclipse/jdt/core/tests/performance/SecondaryTypesPerformanceTest.java @@ -81,7 +81,7 @@ public class SecondaryTypesPerformanceTest extends PerformanceTestCase { classpathList.add(testScratchArea); for (int i = 0; i<10; ++i) { - ASTParser parser = ASTParser.newParser(AST.JLS8); + ASTParser parser = ASTParser.newParser(AST.JLS9); parser.setResolveBindings(true); parser.setStatementsRecovery(true); parser.setBindingsRecovery(true); -- cgit v1.2.3