Merge remote-tracking branch 'origin/R4_9_maintenance' into BETA_JAVA11


Change-Id: I08c37ae6dd2b2a88b62673874a5e1e708a86a310
diff --git a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
index 7b4676f..93f0a66 100644
--- a/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.debug.ui/META-INF/MANIFEST.MF
@@ -37,7 +37,7 @@
  org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.14.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.13.100,4.0.0)",
  org.eclipse.jdt.debug;bundle-version="[3.11.0,4.0.0)",
  org.eclipse.jdt.launching;bundle-version="[3.11.0,4.0.0)",
diff --git a/org.eclipse.jdt.launching/META-INF/MANIFEST.MF b/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
index 65dda94..7cb45ad 100644
--- a/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.launching/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
  org.eclipse.jdt.launching.sourcelookup.advanced,
  org.eclipse.jdt.launching.sourcelookup.containers
 Require-Bundle: org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.8.0,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.15.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.13.0,4.0.0)",
  org.eclipse.jdt.debug;bundle-version="[3.11.0,4.0.0)",
  org.eclipse.core.variables;bundle-version="[3.2.0,4.0.0)",
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 3396a2c..3db063f 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
@@ -10,6 +10,10 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *
+ * 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.
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching;
 
@@ -205,6 +209,8 @@
 		String version = vMInstall.getJavaVersion();
 		if (version == null) {
 			return null;
+		} else if (version.startsWith(JavaCore.VERSION_11)) {
+			return JavaCore.VERSION_11;
 		} else if (version.startsWith(JavaCore.VERSION_10)) {
 			return JavaCore.VERSION_10;
 		} else if (version.startsWith(JavaCore.VERSION_9)) {
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 b26fa7b..86e9926 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
@@ -10,6 +10,10 @@
  *
  *  Contributors:
  *     IBM Corporation - initial API and implementation
+ *
+ * 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.
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching.environments;
 
@@ -195,7 +199,9 @@
 
 	private String getExecutionEnvironmentCompliance(IExecutionEnvironment executionEnvironment) {
 		String desc = executionEnvironment.getId();
-		if (desc.indexOf(JavaCore.VERSION_10) != -1) {
+		if (desc.indexOf(JavaCore.VERSION_11) != -1) {
+			return JavaCore.VERSION_11;
+		} else if (desc.indexOf(JavaCore.VERSION_10) != -1) {
 			return JavaCore.VERSION_10;
 		} else if (desc.indexOf(JavaCore.VERSION_9) != -1) {
 			return JavaCore.VERSION_9;
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 f5e3c37..c07c510 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
@@ -10,6 +10,10 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *
+ * 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.
  *******************************************************************************/
 package org.eclipse.jdt.internal.launching.environments;
 
@@ -39,6 +43,8 @@
 public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyzerDelegate {
 
 	// XXX: Note that this string is not yet standardized by OSGi, see http://wiki.osgi.org/wiki/Execution_Environment
+
+	private static final String JavaSE_11 = "JavaSE-11"; //$NON-NLS-1$
 	private static final String JavaSE_10_Plus = "JavaSE-10+"; //$NON-NLS-1$
 	private static final String JavaSE_10 = "JavaSE-10"; //$NON-NLS-1$
 	static final String JavaSE_9 = "JavaSE-9"; //$NON-NLS-1$
@@ -82,7 +88,8 @@
 		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_10 });
+		mappings.put(JavaSE_10_Plus, new String[] { JavaSE_11 });
+		mappings.put(JavaSE_11, new String[] { JavaSE_10 });
 	}
 	@Override
 	public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
@@ -108,7 +115,9 @@
 					types = getTypes(CDC_FOUNDATION_1_1);
 				}
 			} else {
-				if (javaVersion.startsWith("10")) { //$NON-NLS-1$
+				if (javaVersion.startsWith("11")) { //$NON-NLS-1$
+					types = getTypes(JavaSE_11);
+				} else if (javaVersion.startsWith("10")) { //$NON-NLS-1$
 					types = getTypes(JavaSE_10);
 				} else if (javaVersion.startsWith("9")) { //$NON-NLS-1$
 					types = getTypes(JavaSE_9);
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 c4125fc..6aabdd5 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
@@ -12,6 +12,10 @@
  *     IBM Corporation - initial API and implementation
  *     Frits Jalvingh - Contribution for Bug 459831 - [launching] Support attaching
  *     	external annotations to a JRE container
+ *
+ * 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.
  *******************************************************************************/
 package org.eclipse.jdt.launching;
 
@@ -3290,8 +3294,11 @@
 				} else if (javaVersion.startsWith(JavaCore.VERSION_10)
 						&& (javaVersion.length() == JavaCore.VERSION_10.length() || javaVersion.charAt(JavaCore.VERSION_10.length()) == '.')) {
 					compliance = JavaCore.VERSION_10;
+				} else if (javaVersion.startsWith(JavaCore.VERSION_11)
+						&& (javaVersion.length() == JavaCore.VERSION_11.length() || javaVersion.charAt(JavaCore.VERSION_11.length()) == '.')) {
+					compliance = JavaCore.VERSION_11;
 				} else {
-					compliance = JavaCore.VERSION_10; // use latest by default
+					compliance = JavaCore.VERSION_11; // 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 c68280b..1908308 100644
--- a/org.eclipse.jdt.launching/plugin.properties
+++ b/org.eclipse.jdt.launching/plugin.properties
@@ -10,6 +10,10 @@
  
 # Contributors:
 #     IBM Corporation - initial API and implementation
+
+#     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.
 ###############################################################################
 
 localJavaApplication = Java Application
@@ -72,6 +76,7 @@
 environment.description.12 = Java Platform, Standard Edition 8.0
 environment.description.13 = Java Platform, Standard Edition 9
 environment.description.14 = Java Platform, Standard Edition 10
+environment.description.15 = Java Platform, Standard Edition 11
 
 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 d16bf2a..a30e8eb 100644
--- a/org.eclipse.jdt.launching/plugin.xml
+++ b/org.eclipse.jdt.launching/plugin.xml
@@ -12,6 +12,11 @@
  
      Contributors:
          IBM Corporation - initial API and implementation
+         
+         
+     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.
  -->
 
 <plugin>
@@ -326,6 +331,11 @@
             description="%environment.description.14"
             id="JavaSE-10"
             compliance="10">
+      </environment>
+      <environment
+            description="%environment.description.15"
+            id="JavaSE-11"
+            compliance="11">
       </environment>            
       <analyzer
             class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"