more apiLevel consistency after JLS3 has been deprecated.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTNodeCreator.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTNodeCreator.java
index 66af933..e17bcca 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTNodeCreator.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ASTNodeCreator.java
@@ -436,7 +436,7 @@
*/
public static Expression createExpression(AST ast, String expr)
{
- ASTParser parser = ASTParser.newParser(AST.JLS4);
+ ASTParser parser = ASTParser.newParser(ast.apiLevel());
parser.setKind(ASTParser.K_EXPRESSION);
parser.setSource(expr.toCharArray());
ASTNode parsedNode = parser.createAST(null);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/MethodMappingBindingTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/MethodMappingBindingTest.java
index ee3e500..958e521 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/MethodMappingBindingTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/MethodMappingBindingTest.java
@@ -50,7 +50,7 @@
public class MethodMappingBindingTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _team;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/TypeBindingTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/TypeBindingTest.java
index 9dc93d9..e2a74cb 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/TypeBindingTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/bindings/TypeBindingTest.java
@@ -48,7 +48,7 @@
public class TypeBindingTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _cuTA;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/AnchoredTypeTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/AnchoredTypeTest.java
index e4e778f..7924dc9 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/AnchoredTypeTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/AnchoredTypeTest.java
@@ -46,7 +46,7 @@
public class AnchoredTypeTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest.java
index ccd3c67..63b72d7 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest.java
@@ -57,7 +57,7 @@
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
// Java class used for all within tests
private TypeDeclaration _role;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest2.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest2.java
index 20d2f4e..377b4a3 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest2.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseCallMessageSendTest2.java
@@ -46,7 +46,7 @@
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
// Java class used for all within tests
private TypeDeclaration _role;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseConstructorInvocationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseConstructorInvocationTest.java
index c6eb64f..3044fcb 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseConstructorInvocationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/BaseConstructorInvocationTest.java
@@ -51,7 +51,7 @@
public class BaseConstructorInvocationTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private TypeDeclaration _typeDecl;
private TypeDeclaration _role;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CallinMappingDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CallinMappingDeclarationTest.java
index ef8f3ba..faff61a 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CallinMappingDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CallinMappingDeclarationTest.java
@@ -54,7 +54,7 @@
public class CallinMappingDeclarationTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CalloutMappingDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CalloutMappingDeclarationTest.java
index 9e7efc8..a1af7f6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CalloutMappingDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/CalloutMappingDeclarationTest.java
@@ -54,7 +54,7 @@
public class CalloutMappingDeclarationTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -408,7 +408,7 @@
_testObj = (CalloutMappingDeclaration)_role.bodyDeclarations().get(9);
CalloutMappingDeclaration clonedTestObject =
- (CalloutMappingDeclaration)ASTNode.copySubtree(AST.newAST(AST.JLS3), _testObj);
+ (CalloutMappingDeclaration)ASTNode.copySubtree(AST.newAST(AST.JLS4), _testObj);
boolean actual = _testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
assertTrue("Copy of subtree not correct", actual);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/DOMRegressionTests.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/DOMRegressionTests.java
index 708d7e8..1eb2a3b 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/DOMRegressionTests.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/DOMRegressionTests.java
@@ -31,7 +31,7 @@
public class DOMRegressionTests extends FileBasedDOMTest {
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
public DOMRegressionTests(String name) {
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/FieldAccessSpecTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/FieldAccessSpecTest.java
index b1f032d..647582b 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/FieldAccessSpecTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/FieldAccessSpecTest.java
@@ -44,7 +44,7 @@
public class FieldAccessSpecTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -163,7 +163,7 @@
_testObj = (FieldAccessSpec)mapping.getBaseMappingElement();
FieldAccessSpec clonedTestObject =
- (FieldAccessSpec)ASTNode.copySubtree(AST.newAST(AST.JLS3), _testObj);
+ (FieldAccessSpec)ASTNode.copySubtree(AST.newAST(AST.JLS4), _testObj);
boolean actual = _testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
assertTrue("Copy of subtree not correct", actual);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/GuardPredicateTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/GuardPredicateTest.java
index 0b39418..be84eda 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/GuardPredicateTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/GuardPredicateTest.java
@@ -45,7 +45,7 @@
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/LiftingTypeTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/LiftingTypeTest.java
index b135fcf..631c0c3 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/LiftingTypeTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/LiftingTypeTest.java
@@ -46,7 +46,7 @@
public class LiftingTypeTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -113,7 +113,7 @@
{
_testObj = (LiftingType)_variableDecl.getType();
LiftingType clonedTestObject =
- (LiftingType)ASTNode.copySubtree(AST.newAST(AST.JLS3), _testObj);
+ (LiftingType)ASTNode.copySubtree(AST.newAST(AST.JLS4), _testObj);
boolean actual = _testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/MethodSpecTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/MethodSpecTest.java
index bffc783..820f5e6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/MethodSpecTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/MethodSpecTest.java
@@ -47,7 +47,7 @@
public class MethodSpecTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -157,7 +157,7 @@
_testObj = (MethodSpec)mapping.getRoleMappingElement();
MethodSpec clonedTestObject =
- (MethodSpec)ASTNode.copySubtree(AST.newAST(AST.JLS3), _testObj);
+ (MethodSpec)ASTNode.copySubtree(AST.newAST(AST.JLS4), _testObj);
boolean actual = _testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
assertTrue("Copy of subtree not correct", actual);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCallinTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCallinTest.java
index ed6298f..4bde1a4 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCallinTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCallinTest.java
@@ -45,7 +45,7 @@
public class ParameterMappingCallinTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -153,7 +153,7 @@
ParameterMapping testObj = (ParameterMapping)parameterMappings.get(1);
ParameterMapping clonedTestObject =
- (ParameterMapping)ASTNode.copySubtree(AST.newAST(AST.JLS3), testObj);
+ (ParameterMapping)ASTNode.copySubtree(AST.newAST(AST.JLS4), testObj);
boolean actual = testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
assertTrue("Copy of subtree not correct", actual);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCalloutTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCalloutTest.java
index 4343b64..dd717a7 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCalloutTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/ParameterMappingCalloutTest.java
@@ -49,7 +49,7 @@
public class ParameterMappingCalloutTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -247,7 +247,7 @@
ParameterMapping testObj = (ParameterMapping)parameterMappings.get(2);
ParameterMapping clonedTestObject =
- (ParameterMapping)ASTNode.copySubtree(AST.newAST(AST.JLS3), testObj);
+ (ParameterMapping)ASTNode.copySubtree(AST.newAST(AST.JLS4), testObj);
boolean actual = testObj.subtreeMatch(new ASTMatcher(), clonedTestObject);
assertTrue("Copy of subtree not correct", actual);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/PrecedenceDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/PrecedenceDeclarationTest.java
index 8c3acfe..2a9abf1 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/PrecedenceDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/PrecedenceDeclarationTest.java
@@ -41,7 +41,7 @@
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/RoleTypeDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/RoleTypeDeclarationTest.java
index dffabf9..24e1627 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/RoleTypeDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/RoleTypeDeclarationTest.java
@@ -45,7 +45,7 @@
public class RoleTypeDeclarationTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleTeam;
@@ -217,7 +217,7 @@
public void testCopySubtree1()
{
RoleTypeDeclaration clonedTestObject =
- (RoleTypeDeclaration)ASTNode.copySubtree(AST.newAST(AST.JLS3), _testObj1);
+ (RoleTypeDeclaration)ASTNode.copySubtree(AST.newAST(AST.JLS4), _testObj1);
boolean actual = _testObj1.subtreeMatch(new ASTMatcher(), clonedTestObject);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperConstructorInvocationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperConstructorInvocationTest.java
index 82305fe..1ceaacc 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperConstructorInvocationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperConstructorInvocationTest.java
@@ -50,7 +50,7 @@
public class TSuperConstructorInvocationTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
/** Java class used for all within tests */
private TypeDeclaration _role;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperMessageSendTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperMessageSendTest.java
index 646a6cf..11b6c7d 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperMessageSendTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/TSuperMessageSendTest.java
@@ -51,7 +51,7 @@
public class TSuperMessageSendTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
/** Java class used for all within tests */
private TypeDeclaration _role;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/WithinStatementTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/WithinStatementTest.java
index 7f5d5a4..a15a203 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/WithinStatementTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/converter/WithinStatementTest.java
@@ -49,7 +49,7 @@
public class WithinStatementTest extends FileBasedDOMTest
{
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTParser _parser;
private ICompilationUnit _simpleClass;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewriteFlattenerTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewriteFlattenerTest.java
index 313c621..fec864d 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewriteFlattenerTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewriteFlattenerTest.java
@@ -59,7 +59,7 @@
public class ASTRewriteFlattenerTest extends TestCase {
public static final String TEST_PROJECT = "DOM_AST";
- private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS3;
+ private static final int JAVA_LANGUAGE_SPEC_LEVEL = AST.JLS4;
private ASTRewriteFlattener _rewriteFlattener;
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTeamTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTeamTest.java
index 5a3d18b..1eefca6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTeamTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTeamTest.java
@@ -188,7 +188,7 @@
" }\n" +
"}\n";
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_STATEMENTS);
parser.setSource(generated.toCharArray());
@@ -203,7 +203,7 @@
" protected class OtherRole {}\n" +
" void foo() { System.out.println(this); }\n" +
"}\n";
- parser = ASTParser.newParser(AST.JLS3);
+ parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(existing.toCharArray());
CompilationUnit _astCU = (CompilationUnit)parser.createAST(null);
@@ -245,7 +245,7 @@
" }\n" +
"}\n";
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_STATEMENTS);
parser.setSource(generated.toCharArray());
@@ -261,7 +261,7 @@
" protected class OtherRole {}\n" +
" void foo() { System.out.println(this); }\n" +
"}\n";
- parser = ASTParser.newParser(AST.JLS3);
+ parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(existing.toCharArray());
CompilationUnit _astCU = (CompilationUnit)parser.createAST(null);
@@ -302,7 +302,7 @@
" void bar() { nop(); }\n" +
"}\n";
- ASTParser parser = ASTParser.newParser(AST.JLS3);
+ ASTParser parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_STATEMENTS);
parser.setSource(generated.toCharArray());
@@ -315,7 +315,7 @@
// create a CU to copy into:
String existing =
"import javax.swing.JFrame;\n";
- parser = ASTParser.newParser(AST.JLS3);
+ parser = ASTParser.newParser(AST.JLS4);
parser.setKind(ASTParser.K_COMPILATION_UNIT);
parser.setSource(existing.toCharArray());
CompilationUnit _astCU = (CompilationUnit)parser.createAST(null);
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTest.java
index ce66289..edc0f7b 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/ASTRewritingModifyingTest.java
@@ -43,7 +43,7 @@
public CompilationUnit createCU(ICompilationUnit unit, boolean resolveBindings) {
try {
- ASTParser c = ASTParser.newParser(AST.JLS3);
+ ASTParser c = ASTParser.newParser(AST.JLS4);
c.setSource(unit);
c.setResolveBindings(resolveBindings);
ASTNode result = c.createAST(null);
@@ -58,7 +58,7 @@
if (source == null) {
throw new IllegalArgumentException();
}
- ASTParser c = ASTParser.newParser(AST.JLS3);
+ ASTParser c = ASTParser.newParser(AST.JLS4);
c.setSource(source);
ASTNode result = c.createAST(null);
return (CompilationUnit) result;