From 60da9ec17dfc8a9498eada5c2b3424bbc095b6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Sat, 13 Apr 2024 00:38:11 +0300 Subject: [PATCH] Add JavaSE-23 EE to launching (#426) As jdt.core still doesn't have the Java 23 support JavaSE-23 doesn't appear in the various places with EE lists but allows Java 23 JVM to be seen as super set of Java 22. Work for https://github.com/eclipse-pde/eclipse.pde/issues/1225 --- .../environments/ExecutionEnvironmentAnalyzer.java | 6 +++++- org.eclipse.jdt.launching/plugin.properties | 1 + org.eclipse.jdt.launching/plugin.xml | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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 17921e190e..96a4a7ad95 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 @@ -41,6 +41,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz // XXX: Note that this string is not yet standardized by OSGi, see http://wiki.osgi.org/wiki/Execution_Environment + private static final String JavaSE_23 = "JavaSE-23"; //$NON-NLS-1$ private static final String JavaSE_22 = "JavaSE-22"; //$NON-NLS-1$ private static final String JavaSE_21 = "JavaSE-21"; //$NON-NLS-1$ private static final String JavaSE_20 = "JavaSE-20"; //$NON-NLS-1$ @@ -108,6 +109,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz mappings.put(JavaSE_20, new String[] { JavaSE_19 }); mappings.put(JavaSE_21, new String[] { JavaSE_20 }); mappings.put(JavaSE_22, new String[] { JavaSE_21 }); + mappings.put(JavaSE_23, new String[] { JavaSE_22 }); } @Override public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException { @@ -133,7 +135,9 @@ public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) types = getTypes(CDC_FOUNDATION_1_1); } } else { - if (javaVersion.startsWith("22")) { //$NON-NLS-1$ + if (javaVersion.startsWith("23")) { //$NON-NLS-1$ + types = getTypes(JavaSE_23); + } else if (javaVersion.startsWith("22")) { //$NON-NLS-1$ types = getTypes(JavaSE_22); } else if (javaVersion.startsWith("21")) { //$NON-NLS-1$ types = getTypes(JavaSE_21); diff --git a/org.eclipse.jdt.launching/plugin.properties b/org.eclipse.jdt.launching/plugin.properties index 0b994220b1..4c70a941d4 100644 --- a/org.eclipse.jdt.launching/plugin.properties +++ b/org.eclipse.jdt.launching/plugin.properties @@ -83,6 +83,7 @@ environment.description.23 = Java Platform, Standard Edition 19 environment.description.24 = Java Platform, Standard Edition 20 environment.description.25 = Java Platform, Standard Edition 21 environment.description.26 = Java Platform, Standard Edition 22 +environment.description.27 = Java Platform, Standard Edition 23 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 8b1b5f8ebc..d4448206ea 100644 --- a/org.eclipse.jdt.launching/plugin.xml +++ b/org.eclipse.jdt.launching/plugin.xml @@ -384,6 +384,11 @@ id="JavaSE-22" compliance="22"> + +