Merge remote-tracking branch 'origin/master' into BETA_JAVA14
Change-Id: Iddd0c6592c93f6b3b5cc058971bc3bf95912f89a
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
index 15e637a..aa343a7 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.java
@@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
+ * 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:
* IBM Corporation - initial API and implementation
* Bug Menot - Bug 445867
@@ -352,7 +356,7 @@
ITypeRoot typeRoot = (ITypeRoot) codeAssist;
ASTNode root = SharedASTProviderCore.getAST(typeRoot, SharedASTProviderCore.WAIT_NO, null);
if (root == null) {
- ASTParser parser = ASTParser.newParser(AST.JLS13);
+ ASTParser parser = ASTParser.newParser(AST.JLS14);
parser.setSource(typeRoot);
parser.setFocalPosition(hoverRegion.getOffset());
root = parser.createAST(null);
diff --git a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
index da3d78d..1c89b9f 100644
--- a/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
+++ b/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java
@@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
+ * 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -74,7 +78,7 @@
@Override
public void run() {
lineNumber[0] = textSelection.getStartLine() + 1;
- ASTParser parser = ASTParser.newParser(AST.JLS13);
+ ASTParser parser = ASTParser.newParser(AST.JLS14);
parser.setSource(document.get().toCharArray());
Map<String, String> options = JavaCore.getOptions();
options.put(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, JavaCore.ENABLED);
diff --git a/org.eclipse.jdt.debug/.settings/.api_filters b/org.eclipse.jdt.debug/.settings/.api_filters
index 481e672..efed310 100644
--- a/org.eclipse.jdt.debug/.settings/.api_filters
+++ b/org.eclipse.jdt.debug/.settings/.api_filters
@@ -8,13 +8,6 @@
<message_argument value="expressions()"/>
</message_arguments>
</filter>
- <filter comment="For Java 13" id="640712815">
- <message_arguments>
- <message_argument value="TextBlock"/>
- <message_argument value="ASTInstructionCompiler"/>
- <message_argument value="getEscapedValue()"/>
- </message_arguments>
- </filter>
<filter comment="preview related API" id="640712815">
<message_arguments>
<message_argument value="TextBlock"/>
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java
index 6046616..617191f 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.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
@@ -8,6 +8,10 @@
*
* SPDX-License-Identifier: EPL-2.0
*
+ * 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:
* IBM Corporation - initial API and implementation
* Jesper Steen Moller - Bugs 341232, 427089
@@ -399,7 +403,7 @@
private CompilationUnit parseCompilationUnit(char[] source,
String unitName, IJavaProject project, Map<String, String> extraCompileOptions) {
- ASTParser parser = ASTParser.newParser(AST.JLS13);
+ ASTParser parser = ASTParser.newParser(AST.JLS14);
parser.setSource(source);
parser.setUnitName(unitName);
parser.setProject(project);
diff --git a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
index d41c6b2..762a4dd 100644
--- a/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
+++ b/org.eclipse.jdt.debug/eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTInstructionCompiler.java
@@ -8,6 +8,9 @@
*
* SPDX-License-Identifier: EPL-2.0
*
+ * 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:
* IBM Corporation - initial API and implementation
@@ -4091,7 +4094,7 @@
storeInstruction(); // jump
statementsDefault = new ArrayList<>();
} else {
- if (node.getAST().apiLevel() == AST.JLS13) {
+ if (node.getAST().apiLevel() >= AST.JLS14) {
for (Object expression : switchCase.expressions()) {
if (expression instanceof StringLiteral || expression instanceof TextBlock) {
push(new SendMessage("equals", "(Ljava/lang/Object;)Z", 1, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
index 8197339..ac0efad 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java
@@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
+ * 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.
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -232,6 +236,8 @@
String version = vMInstall.getJavaVersion();
if (version == null) {
return null;
+ } else if (version.startsWith(JavaCore.VERSION_14)) {
+ return JavaCore.VERSION_14;
} else if (version.startsWith(JavaCore.VERSION_13)) {
return JavaCore.VERSION_13;
} else if (version.startsWith(JavaCore.VERSION_12)) {
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
index b550dbc..408e84c 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java
@@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
+ * 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.
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -844,7 +848,10 @@
*/
public static URL getDefaultJavadocLocation(String version) {
try {
- if (version.startsWith(JavaCore.VERSION_13)) {
+ if (version.startsWith(JavaCore.VERSION_14)) {
+ // Needs an update after Java 14 release
+ return new URL("https://docs.oracle.com/en/java/javase/13/docs/api/"); //$NON-NLS-1$
+ } else if (version.startsWith(JavaCore.VERSION_13)) {
return new URL("https://docs.oracle.com/en/java/javase/13/docs/api/"); //$NON-NLS-1$
} else if (version.startsWith(JavaCore.VERSION_12)) {
return new URL("https://docs.oracle.com/en/java/javase/12/docs/api/"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
index fc0e141..4c21954 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/EnvironmentsManager.java
@@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
+ * 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.
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -196,7 +200,9 @@
private String getExecutionEnvironmentCompliance(IExecutionEnvironment executionEnvironment) {
String desc = executionEnvironment.getId();
- if (desc.indexOf(JavaCore.VERSION_13) != -1) {
+ if (desc.indexOf(JavaCore.VERSION_14) != -1) {
+ return JavaCore.VERSION_14;
+ } else if (desc.indexOf(JavaCore.VERSION_13) != -1) {
return JavaCore.VERSION_13;
} else if (desc.indexOf(JavaCore.VERSION_12) != -1) {
return JavaCore.VERSION_12;
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
index e3c9daf..52582c6 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java
@@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
+ * 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.
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -41,6 +45,7 @@
// XXX: Note that this string is not yet standardized by OSGi, see http://wiki.osgi.org/wiki/Execution_Environment
+ private static final String JavaSE_14 = "JavaSE-14"; //$NON-NLS-1$
private static final String JavaSE_13 = "JavaSE-13"; //$NON-NLS-1$
private static final String JavaSE_12 = "JavaSE-12"; //$NON-NLS-1$
private static final String JavaSE_11 = "JavaSE-11"; //$NON-NLS-1$
@@ -87,10 +92,11 @@
mappings.put(JavaSE_1_8, new String[] { JavaSE_1_7 });
mappings.put(JavaSE_9, new String[] { JavaSE_1_8 });
mappings.put(JavaSE_10, new String[] { JavaSE_9 });
- mappings.put(JavaSE_10_Plus, new String[] { JavaSE_13 });
+ mappings.put(JavaSE_10_Plus, new String[] { JavaSE_14 });
mappings.put(JavaSE_11, new String[] { JavaSE_10 });
mappings.put(JavaSE_12, new String[] { JavaSE_11 });
mappings.put(JavaSE_13, new String[] { JavaSE_12 });
+ mappings.put(JavaSE_14, new String[] { JavaSE_13 });
}
@Override
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
@@ -116,7 +122,9 @@
types = getTypes(CDC_FOUNDATION_1_1);
}
} else {
- if (javaVersion.startsWith("13")) { //$NON-NLS-1$
+ if (javaVersion.startsWith("14")) { //$NON-NLS-1$
+ types = getTypes(JavaSE_14);
+ } else if (javaVersion.startsWith("13")) { //$NON-NLS-1$
types = getTypes(JavaSE_13);
} else if (javaVersion.startsWith("12")) { //$NON-NLS-1$
types = getTypes(JavaSE_12);
diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
index 6bc948a..756812e 100644
--- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
+++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java
@@ -6,6 +6,10 @@
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
+ * 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.
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -3333,8 +3337,11 @@
} else if (javaVersion.startsWith(JavaCore.VERSION_13)
&& (javaVersion.length() == JavaCore.VERSION_13.length() || javaVersion.charAt(JavaCore.VERSION_13.length()) == '.')) {
compliance = JavaCore.VERSION_13;
+ } else if (javaVersion.startsWith(JavaCore.VERSION_14)
+ && (javaVersion.length() == JavaCore.VERSION_14.length() || javaVersion.charAt(JavaCore.VERSION_14.length()) == '.')) {
+ compliance = JavaCore.VERSION_14;
} else {
- compliance = JavaCore.VERSION_13; // use latest by default
+ compliance = JavaCore.VERSION_14; // use latest by default
}
Hashtable<String, String> options= JavaCore.getOptions();
diff --git a/org.eclipse.jdt.launching/plugin.properties b/org.eclipse.jdt.launching/plugin.properties
index 2d8fe04..83284ca 100644
--- a/org.eclipse.jdt.launching/plugin.properties
+++ b/org.eclipse.jdt.launching/plugin.properties
@@ -75,6 +75,7 @@
environment.description.15 = Java Platform, Standard Edition 11
environment.description.16 = Java Platform, Standard Edition 12
environment.description.17 = Java Platform, Standard Edition 13
+environment.description.18 = Java Platform, Standard Edition 14
classpathVariableInitializer.deprecated = Use the JRE System Library instead
diff --git a/org.eclipse.jdt.launching/plugin.xml b/org.eclipse.jdt.launching/plugin.xml
index 6feab1e..311969d 100644
--- a/org.eclipse.jdt.launching/plugin.xml
+++ b/org.eclipse.jdt.launching/plugin.xml
@@ -342,7 +342,12 @@
description="%environment.description.17"
id="JavaSE-13"
compliance="13">
- </environment>
+ </environment>
+ <environment
+ description="%environment.description.18"
+ id="JavaSE-14"
+ compliance="14">
+ </environment>
<analyzer
class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"
id="org.eclipse.jdt.launching.eeAnalyzer"/>
diff --git a/pom.xml b/pom.xml
index 91097a6..cd4b907 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2016 Eclipse Foundation and others.
+ Copyright (c) 2012, 2019 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -36,6 +36,10 @@
<profiles>
<profile>
<id>build-individual-bundles</id>
+ <properties>
+ <eclipse-p2-repo.url>http://download.eclipse.org/eclipse/updates/Y-builds</eclipse-p2-repo.url>
+ <skipAPIAnalysis>true</skipAPIAnalysis>
+ </properties>
<repositories>
<repository>
<releases>