Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2019-07-02 05:45:03 -0400
committerSarika Sinha2019-07-03 05:14:30 -0400
commit1d58555841ff864b4a406f5a0c2f38db486aa6a8 (patch)
tree35ce298796fc68627ec95d0c0b393151be7a49e1
parent39cebd69fe5aa5eb9aafb5a0040d3e7c9389f897 (diff)
downloadeclipse.jdt.core-1d58555841ff864b4a406f5a0c2f38db486aa6a8.tar.gz
eclipse.jdt.core-1d58555841ff864b4a406f5a0c2f38db486aa6a8.tar.xz
eclipse.jdt.core-1d58555841ff864b4a406f5a0c2f38db486aa6a8.zip
Bug 548699 - [dom] proposal for a new API for AST for previewI20190703-0640
Change-Id: I821aca059451b5a8a8c619ee9085ade8cf2f7f73 Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
-rw-r--r--org.eclipse.jdt.apt.core/src/org/eclipse/jdt/apt/core/internal/env/BaseProcessorEnv.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter10Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter11Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter12Test.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java6
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTMatcherTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTParserTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java4
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTTest.java30
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTVisitorTest.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java2
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ImportRewriteTest.java4
-rw-r--r--org.eclipse.jdt.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java42
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java2
-rw-r--r--org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java8
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java6
-rw-r--r--org.eclipse.jdt.core/pom.xml2
37 files changed, 113 insertions, 89 deletions
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 be0bd51346..a772cef6fe 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, 2018 BEA Systems Inc. and others
+ * Copyright (c) 2005, 2019 BEA Systems Inc. and others
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -86,7 +86,7 @@ import com.sun.mirror.util.Types;
public class BaseProcessorEnv implements AnnotationProcessorEnvironment
{
static{
- final AST ast = AST.newAST(AST.JLS11);
+ final AST ast = AST.newAST(AST.JLS11, false);
EMPTY_AST_UNIT = ast.newCompilationUnit();
}
public static final CompilationUnit EMPTY_AST_UNIT;
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter10Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter10Test.java
index 5cc95861cf..e3d1479c3e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter10Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter10Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 IBM Corporation and others.
+ * Copyright (c) 2018, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -36,7 +36,7 @@ public class ASTConverter10Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST_INTERNAL_JLS11);
+ this.ast = AST.newAST(AST_INTERNAL_JLS11, true);
}
public ASTConverter10Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter11Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter11Test.java
index 7c99dcba61..1da181839d 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter11Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter11Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2018 IBM Corporation and others.
+ * Copyright (c) 2018, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -26,7 +26,7 @@ public class ASTConverter11Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST_INTERNAL_JLS11);
+ this.ast = AST.newAST(AST_INTERNAL_JLS11, true);
}
public ASTConverter11Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter12Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter12Test.java
index 7efc9f1f36..9751f23fe5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter12Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter12Test.java
@@ -44,7 +44,7 @@ public class ASTConverter12Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getAST12());
+ this.ast = AST.newAST(getAST12(), true);
}
public ASTConverter12Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
index 21383f0431..0b779715ec 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 IBM Corporation and others.
+ * Copyright (c) 2011, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -44,7 +44,7 @@ public class ASTConverter15JLS4Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS4());
+ this.ast = AST.newAST(getJLS4(), false);
}
public ASTConverter15JLS4Test(String name) {
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 546c5a585a..942eaaf0eb 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2011, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -44,7 +44,7 @@ public class ASTConverter15JLS8Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS8());
+ this.ast = AST.newAST(getJLS8(), false);
}
public ASTConverter15JLS8Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
index 00cd53b3be..b33268d5dc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -47,7 +47,7 @@ public class ASTConverter15Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTConverter15Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
index 7df3973cc8..fad064448d 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter16Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -33,7 +33,7 @@ public class ASTConverter16Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTConverter16Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
index fbd94db0af..93176e7302 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -63,7 +63,7 @@ public class ASTConverter17Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS4());
+ this.ast = AST.newAST(getJLS4(), false);
}
public ASTConverter17Test(String name) {
@@ -458,7 +458,7 @@ public class ASTConverter17Test extends ConverterTestSetup {
* Binary literals with underscores
*/
public void test0012() throws JavaModelException {
- AST localAst= AST.newAST(getJLS4());
+ AST localAst= AST.newAST(getJLS4(), false);
NumberLiteral literal= localAst.newNumberLiteral();
try {
literal.setToken("0b1010");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
index 81294496d7..568caf7cb1 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -40,7 +40,7 @@ public class ASTConverter18Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getAST8());
+ this.ast = AST.newAST(getAST8(), false);
}
public ASTConverter18Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java
index 1193890dff..74a2b6c99f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter9Test.java
@@ -48,7 +48,7 @@ public class ASTConverter9Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getAST9());
+ this.ast = AST.newAST(getAST9(), false);
}
/**
* @deprecated
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
index f4d1f0ef49..a86f1d8cfc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -28,7 +28,7 @@ public class ASTConverterAST3Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTConverterAST3Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
index 4b77b6e96a..8d2f911f09 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 IBM Corporation and others.
+ * Copyright (c) 2013, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -28,7 +28,7 @@ public class ASTConverterAST4Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS4());
+ this.ast = AST.newAST(getJLS4(), false);
}
public ASTConverterAST4Test(String name) {
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 9e617b11bd..8fe1f1dc7f 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2011, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -28,7 +28,7 @@ public class ASTConverterAST8Test extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS8());
+ this.ast = AST.newAST(getJLS8(), false);
}
public ASTConverterAST8Test(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
index ab9fedc04b..00ea0a5ad4 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBindingsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -487,7 +487,7 @@ public class ASTConverterBindingsTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTConverterBindingsTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
index 713b1267ec..39131fd81a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -58,7 +58,7 @@ public class ASTConverterRecoveryTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public void test0001() throws JavaModelException {
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 dfafd6d6a9..9e33ef5673 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -31,7 +31,7 @@ public class ASTConverterTest extends ConverterTestSetup {
/** @deprecated using deprecated code */
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS2);
+ this.ast = AST.newAST(AST.JLS2, false);
}
public ASTConverterTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
index cfd4957d27..8919e0c559 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -38,7 +38,7 @@ public class ASTConverterTest2 extends ConverterTestSetup {
/** @deprecated using deprecated code */
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST.JLS2);
+ this.ast = AST.newAST(AST.JLS2, false);
}
public ASTConverterTest2(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
index e7de571719..b0dced2a2f 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -120,7 +120,7 @@ public class ASTConverterTestAST3_2 extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTConverterTestAST3_2(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
index bd092ec0e9..fb679ff126 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST4_2.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2017 IBM Corporation and others.
+ * Copyright (c) 2011, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -117,7 +117,7 @@ public class ASTConverterTestAST4_2 extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS4());
+ this.ast = AST.newAST(getJLS4(), false);
}
public ASTConverterTestAST4_2(String name) {
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 59bca4a222..cbb10deed2 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2018 IBM Corporation and others.
+ * Copyright (c) 2011, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -118,7 +118,7 @@ public class ASTConverterTestAST8_2 extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS8());
+ this.ast = AST.newAST(getJLS8(), false);
}
public ASTConverterTestAST8_2(String name) {
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 6b421b9407..7c1aad5075 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -136,7 +136,7 @@ public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.T
protected void setUp() throws Exception {
super.setUp();
- this.ast = AST.newAST(this.API_LEVEL);
+ this.ast = AST.newAST(this.API_LEVEL, true);
this.N1 = this.ast.newSimpleName("N"); //$NON-NLS-1$
this.N2 = this.ast.newSimpleName("M"); //$NON-NLS-1$
this.N3 = this.ast.newSimpleName("O"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
index 1c472672bb..5747a47255 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTNodeFinderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -30,7 +30,7 @@ public class ASTNodeFinderTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTNodeFinderTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTParserTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTParserTest.java
index 420cc2c4ce..82c5d57653 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTParserTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTParserTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -54,7 +54,7 @@ public class ASTParserTest extends org.eclipse.jdt.core.tests.junit.extension.Te
protected void setUp() throws Exception {
super.setUp();
- this.ast = AST.newAST(this.API_LEVEL);
+ this.ast = AST.newAST(this.API_LEVEL, true);
this.parser = ASTParser.newParser(this.API_LEVEL);
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
index 0181039cb1..23085d8494 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTPositionsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -28,7 +28,7 @@ public class ASTPositionsTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getJLS3());
+ this.ast = AST.newAST(getJLS3(), false);
}
public ASTPositionsTest(String name) {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
index 85f3f50061..3ed0c55983 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTStructuralPropertyTest.java
@@ -64,7 +64,7 @@ public class ASTStructuralPropertyTest extends org.eclipse.jdt.core.tests.junit.
protected void setUp() throws Exception {
super.setUp();
- this.ast = AST.newAST(this.API_LEVEL);
+ this.ast = AST.newAST(this.API_LEVEL, true);
this.parser = ASTParser.newParser(this.API_LEVEL);
}
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 43c975a04f..79d7bddbfa 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
@@ -786,7 +786,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
protected void setUp() throws Exception {
super.setUp();
- this.ast = AST.newAST(this.API_LEVEL);
+ this.ast = AST.newAST(this.API_LEVEL, true);
}
protected void tearDown() throws Exception {
@@ -814,7 +814,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
*/
public void testExampleSnippets() {
{
- AST localAst = AST.newAST(this.ast.apiLevel());
+ AST localAst = AST.newAST(this.ast.apiLevel(), true);
CompilationUnit cu = localAst.newCompilationUnit();
// package com.example;
@@ -1154,7 +1154,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
// check that a child from a different AST is detected
try {
- AST newAST = AST.newAST(node.getAST().apiLevel());
+ AST newAST = AST.newAST(node.getAST().apiLevel(), true);
prop.set(prop.sample(newAST, false));
assertTrue(false);
} catch (RuntimeException e) {
@@ -1261,7 +1261,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
// check that a child from a different AST is detected
try {
- AST newAST = AST.newAST(node.getAST().apiLevel());
+ AST newAST = AST.newAST(node.getAST().apiLevel(), true);
children.add(prop.sample(newAST, false));
assertTrue(false);
} catch (RuntimeException e) {
@@ -1318,9 +1318,9 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(a0.apiLevel() == AST.JLS2);
AST a1 = new AST(new HashMap()); // deprecated, but still 2.0
assertTrue(a1.apiLevel() == AST.JLS2);
- AST a2 = AST.newAST(AST.JLS2);
+ AST a2 = AST.newAST(AST.JLS2, false);
assertTrue(a2.apiLevel() == AST.JLS2);
- AST a3 = AST.newAST(JLS3_INTERNAL);
+ AST a3 = AST.newAST(JLS3_INTERNAL, false);
assertTrue(a3.apiLevel() == JLS3_INTERNAL);
// modification count is always non-negative
@@ -1761,43 +1761,43 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
}
public void testStringLiteralUnicode() {
- AST localAst = AST.newAST(this.ast.apiLevel());
+ AST localAst = AST.newAST(this.ast.apiLevel(), true);
StringLiteral literal = localAst.newStringLiteral();
literal.setEscapedValue("\"hello\\u0026\\u0050worl\\u0064\""); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("hello&Pworld")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setEscapedValue("\"hello\\nworld\""); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("hello\nworld")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setLiteralValue("hello\nworld"); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("hello\nworld")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setLiteralValue("\n"); //$NON-NLS-1$
assertTrue(literal.getEscapedValue().equals("\"\\n\"")); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("\n")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setEscapedValue("\"hello\\\"world\""); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("hello\"world")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setLiteralValue("hello\\u0026world"); //$NON-NLS-1$
assertTrue(literal.getLiteralValue().equals("hello\\u0026world")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setLiteralValue("hello\\u0026world"); //$NON-NLS-1$
assertTrue(literal.getEscapedValue().equals("\"hello\\\\u0026world\"")); //$NON-NLS-1$
- localAst = AST.newAST(this.ast.apiLevel());
+ localAst = AST.newAST(this.ast.apiLevel(), true);
literal = localAst.newStringLiteral();
literal.setLiteralValue("\\u0001"); //$NON-NLS-1$
assertTrue(literal.getEscapedValue().equals("\"\\\\u0001\"")); //$NON-NLS-1$
@@ -6402,7 +6402,7 @@ public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase
assertTrue(y.subtreeMatch(new CheckPositionsMatcher(), x));
// different AST clone
- AST newAST = AST.newAST(this.ast.apiLevel());
+ AST newAST = AST.newAST(this.ast.apiLevel(), true);
ASTNode z = ASTNode.copySubtree(newAST, x);
assertTrue(x.subtreeMatch(new CheckPositionsMatcher(), z));
assertTrue(z.subtreeMatch(new CheckPositionsMatcher(), x));
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 c5e62c6311..670faf9a4b 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
@@ -160,7 +160,7 @@ public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.T
protected void setUp() throws Exception {
super.setUp();
- this.ast = AST.newAST(this.API_LEVEL);
+ this.ast = AST.newAST(this.API_LEVEL, true);
this.N1 = this.ast.newSimpleName("N"); //$NON-NLS-1$
this.N1S = "[(nSNNnS)]"; //$NON-NLS-1$
this.N2 = this.ast.newSimpleName("M"); //$NON-NLS-1$
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 dd4ad11a64..1da23d2ee1 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
@@ -26,7 +26,7 @@ public class TypeAnnotationsConverterTest extends ConverterTestSetup {
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(AST_INTERNAL_JLS11);
+ this.ast = AST.newAST(AST_INTERNAL_JLS11, false);
}
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 57abd105bc..829dcf912b 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
@@ -81,7 +81,7 @@ public class TypeBindingTests308 extends ConverterTestSetup {
}
public void setUpSuite() throws Exception {
super.setUpSuite();
- this.ast = AST.newAST(getAST8());
+ this.ast = AST.newAST(getAST8(), false);
}
/**
* @deprecated
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 37880715a2..ecf0daa3ce 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
@@ -2584,7 +2584,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
- AST ast= AST.newAST(JLS3_INTERNAL);
+ AST ast= AST.newAST(JLS3_INTERNAL, false);
ImportRewrite importsRewrite= newImportsRewrite(cu2, order, threshold, threshold, true);
{
IJavaElement[] elements= cu1.codeSelect(content.indexOf("IOException"), "IOException".length());
@@ -2657,7 +2657,7 @@ public class ImportRewriteTest extends AbstractJavaModelTests {
String[] order= new String[] { "java.util", "java.io", "java.net" };
int threshold= 99;
- AST ast= AST.newAST(JLS3_INTERNAL);
+ AST ast= AST.newAST(JLS3_INTERNAL, false);
ImportRewrite importsRewrite= newImportsRewrite(cu2, order, threshold, threshold, true);
{
IJavaElement[] elements= cu1.codeSelect(content.indexOf("Map"), "Map".length());
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index 75de8d609c..a65e83294a 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.18.100.qualifier
+Bundle-Version: 3.19.0.qualifier
Bundle-Activator: org.eclipse.jdt.core.JavaCore
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
index c41807dc1a..90d0ed434e 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
@@ -89,7 +89,7 @@ import org.eclipse.text.edits.TextEdit;
* read-only AST.
* </p>
* <p>
- * Clients may create instances of this class using {@link #newAST(int)},
+ * Clients may create instances of this class using {@link #newAST(int, boolean)},
* but this class is not intended to be subclassed.
* </p>
*
@@ -359,7 +359,7 @@ public final class AST {
IProgressMonitor monitor) {
ASTConverter converter = new ASTConverter(options, isResolved, monitor);
- AST ast = AST.newAST(level);
+ AST ast = AST.newAST(level, JavaCore.ENABLED.equals(options.get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES)));
String sourceModeSetting = (String) options.get(JavaCore.COMPILER_SOURCE);
long sourceLevel = CompilerOptions.versionToJdkLevel(sourceModeSetting);
if (sourceLevel == 0) {
@@ -400,7 +400,7 @@ public final class AST {
* Creates a new Java abstract syntax tree
* (AST) following the specified set of API rules.
* <p>
- * Clients should use this method specifying {@link #JLS11} as the
+ * Clients should use this method specifying {@link #JLS13} as the
* AST level in all cases, even when dealing with source of earlier JDK versions like 1.3 or 1.4.
* </p>
*
@@ -410,10 +410,33 @@ public final class AST {
* <ul>
* <li>the API level is not one of the <code>JLS*</code> level constants</li>
* </ul>
+ * @deprecated Clients should port their code to use the latest JLS* AST API and call
+ * {@link #newAST(int, boolean) AST.newAST(AST.JLS13, false)} instead of using this constructor.
* @since 3.0
*/
public static AST newAST(int level) {
- return new AST(level);
+ return new AST(level, false);
+ }
+
+ /**
+ * Creates a new Java abstract syntax tree
+ * (AST) following the specified set of API rules.
+ * <p>
+ * Clients should use this method specifying {@link #JLS13} as the
+ * AST level in all cases, even when dealing with source of earlier JDK versions like 1.3 or 1.4.
+ * </p>
+ *
+ * @param level the API level; one of the <code>JLS*</code> level constants
+ * @param previewEnabled <code>true</code> if preview feature is enabled else <code>false</code>
+ * @return new AST instance following the specified set of API rules.
+ * @exception IllegalArgumentException if:
+ * <ul>
+ * <li>the API level is not one of the <code>JLS*</code> level constants</li>
+ * </ul>
+ * @since 3.19 BETA_JAVA13
+ */
+ public static AST newAST(int level, boolean previewEnabled) {
+ return new AST(level, previewEnabled);
}
/**
@@ -782,7 +805,7 @@ public final class AST {
*
* @see JavaCore#getDefaultOptions()
* @deprecated Clients should port their code to use the latest JLS* AST API and call
- * {@link #newAST(int) AST.newAST(AST.JLS9)} instead of using this constructor.
+ * {@link #newAST(int, boolean) AST.newAST(AST.JLS13, false)} instead of using this constructor.
*/
public AST() {
this(JavaCore.getDefaultOptions());
@@ -795,7 +818,8 @@ public final class AST {
* @param level the API level; one of the <code>JLS*</code> level constants
* @since 3.0
*/
- private AST(int level) {
+ private AST(int level, boolean previewEnabled) {
+ this.previewEnabled = previewEnabled;
switch(level) {
case JLS2_INTERNAL :
case JLS3_INTERNAL :
@@ -896,7 +920,7 @@ public final class AST {
null/*taskTag*/,
null/*taskPriorities*/,
true/*taskCaseSensitive*/,
- this.previewEnabled);
+ previewEnabled);
break;
default:
throw new IllegalArgumentException("Unsupported JLS level"); //$NON-NLS-1$
@@ -926,10 +950,10 @@ public final class AST {
* value type: <code>String</code>)
* @see JavaCore#getDefaultOptions()
* @deprecated Clients should port their code to use the latest JLS* AST API and call
- * {@link #newAST(int) AST.newAST(AST.JLS9)} instead of using this constructor.
+ * {@link #newAST(int, boolean) AST.newAST(AST.JLS13, false)} instead of using this constructor.
*/
public AST(Map options) {
- this(JLS2);
+ this(JLS2, false);
Object sourceLevelOption = options.get(JavaCore.COMPILER_SOURCE);
long sourceLevel = ClassFileConstants.JDK1_3;
if (JavaCore.VERSION_1_4.equals(sourceLevelOption)) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
index 9472e747ce..66d1215404 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
@@ -1339,7 +1339,7 @@ public class ASTParser {
converter.compilationUnitSourceLength = this.rawSource.length;
converter.scanner.setSource(this.rawSource);
- AST ast = AST.newAST(this.apiLevel);
+ AST ast = AST.newAST(this.apiLevel, JavaCore.ENABLED.equals(this.compilerOptions.get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES)));
ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
ast.setBindingResolver(new BindingResolver());
if ((this.bits & CompilationUnitResolver.STATEMENT_RECOVERY) != 0) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index 0eca446b39..0a4e071e39 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -293,7 +293,7 @@ class CompilationUnitResolver extends Compiler {
IProgressMonitor monitor,
boolean fromJavaProject) {
BindingResolver resolver = null;
- AST ast = AST.newAST(apiLevel);
+ AST ast = AST.newAST(apiLevel, JavaCore.ENABLED.equals(options.get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES)));
String sourceModeSetting = (String) options.get(JavaCore.COMPILER_SOURCE);
long sourceLevel = CompilerOptions.versionToJdkLevel(sourceModeSetting);
if (sourceLevel == 0) {
@@ -916,7 +916,7 @@ class CompilationUnitResolver extends Compiler {
CompilationResult compilationResult = unit.compilationResult;
org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;
char[] contents = sourceUnit.getContents();
- AST ast = AST.newAST(apiLevel);
+ AST ast = AST.newAST(apiLevel, JavaCore.ENABLED.equals(this.options.getMap().get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES)));
ast.setFlag(flags | AST.RESOLVED_BINDINGS);
ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
ASTConverter converter = new ASTConverter(compilerOptions, true/*need to resolve bindings*/, this.monitor);
@@ -1051,7 +1051,7 @@ class CompilationUnitResolver extends Compiler {
CompilationResult compilationResult = unit.compilationResult;
org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit = compilationResult.compilationUnit;
char[] contents = sourceUnit.getContents();
- AST ast = AST.newAST(apiLevel);
+ AST ast = AST.newAST(apiLevel, JavaCore.ENABLED.equals(compilerOptions.get(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES)));
ast.setFlag(flags | AST.RESOLVED_BINDINGS);
ast.setDefaultNodeFlag(ASTNode.ORIGINAL);
ASTConverter converter = new ASTConverter(compilerOptions, true/*need to resolve bindings*/, this.monitor);
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
index 2530489df4..62addd9e69 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ICompilationUnit.java
@@ -602,7 +602,7 @@ boolean isWorkingCopy();
* </p>
*
* @param astLevel either {@link #NO_AST} if no AST is wanted,
- * or the {@linkplain AST#newAST(int) AST API level} of the AST if one is wanted
+ * or the {@linkplain AST#newAST(int, boolean) AST API level} of the AST if one is wanted
* @param forceProblemDetection boolean indicating whether problem should be
* recomputed even if the source hasn't changed
* @param owner the owner of working copies that take precedence over the
@@ -671,7 +671,7 @@ CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, WorkingCo
* </p>
*
* @param astLevel either {@link #NO_AST} if no AST is wanted,
- * or the {@linkplain AST#newAST(int) AST API level} of the AST if one is wanted
+ * or the {@linkplain AST#newAST(int, boolean) AST API level} of the AST if one is wanted
* @param forceProblemDetection boolean indicating whether problem should be
* recomputed even if the source hasn't changed
* @param enableStatementsRecovery if <code>true</code> statements recovery is enabled.
@@ -750,7 +750,7 @@ CompilationUnit reconcile(int astLevel, boolean forceProblemDetection, boolean e
* </p>
*
* @param astLevel either {@link #NO_AST} if no AST is wanted,
- * or the {@linkplain AST#newAST(int) AST API level} of the AST if one is wanted
+ * or the {@linkplain AST#newAST(int, boolean) AST API level} of the AST if one is wanted
* @param reconcileFlags the given reconcile flags
* @param owner the owner of working copies that take precedence over the
* original compilation units, or <code>null</code> if the primary working
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index f6a19a6851..2fe996a072 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
- <version>3.18.100-SNAPSHOT</version>
+ <version>3.19.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>

Back to the top