Skip to content

Commit 0be69cf

Browse files
jarthanaSougandhS
authored andcommitted
Add Java 27 Constants
1 parent ab4aa4d commit 0be69cf

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/EECompilationParticipant.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ public static String getCompilerCompliance(IVMInstall2 vMInstall) {
234234
String version = vMInstall.getJavaVersion();
235235
if (version == null) {
236236
return null;
237+
} else if (matchesMajorVersion(version, JavaCore.VERSION_27)) {
238+
return JavaCore.VERSION_27;
237239
} else if (matchesMajorVersion(version, JavaCore.VERSION_26)) {
238240
return JavaCore.VERSION_26;
239241
} else if (matchesMajorVersion(version, JavaCore.VERSION_25)) {

org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/StandardVMType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,10 @@ public URL getDefaultJavadocLocation(File installLocation) {
808808
*/
809809
public static URL getDefaultJavadocLocation(String version) {
810810
try {
811-
if (version.startsWith(JavaCore.VERSION_26)) {
811+
if (version.startsWith(JavaCore.VERSION_27)) {
812+
// Java 27 docs aren't published yet
813+
return new URI("https://docs.oracle.com/en/java/javase/26/docs/api/").toURL(); //$NON-NLS-1$
814+
} else if (version.startsWith(JavaCore.VERSION_26)) {
812815
return new URI("https://docs.oracle.com/en/java/javase/26/docs/api/").toURL(); //$NON-NLS-1$
813816
} else if (version.startsWith(JavaCore.VERSION_25)) {
814817
return new URI("https://docs.oracle.com/en/java/javase/25/docs/api/").toURL(); //$NON-NLS-1$

org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/environments/ExecutionEnvironmentAnalyzer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
4141

4242
// XXX: Note that this string is not yet standardized by OSGi, see http://wiki.osgi.org/wiki/Execution_Environment
4343

44+
private static final String JavaSE_27 = "JavaSE-27"; //$NON-NLS-1$
4445
private static final String JavaSE_26 = "JavaSE-26"; //$NON-NLS-1$
4546
private static final String JavaSE_25 = "JavaSE-25"; //$NON-NLS-1$
4647
private static final String JavaSE_24 = "JavaSE-24"; //$NON-NLS-1$
@@ -117,6 +118,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
117118
mappings.put(JavaSE_24, new String[] { JavaSE_23 });
118119
mappings.put(JavaSE_25, new String[] { JavaSE_24 });
119120
mappings.put(JavaSE_26, new String[] { JavaSE_25 });
121+
mappings.put(JavaSE_27, new String[] { JavaSE_26 });
120122
}
121123
@Override
122124
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
@@ -142,7 +144,9 @@ public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor)
142144
types = getTypes(CDC_FOUNDATION_1_1);
143145
}
144146
} else {
145-
if (javaVersion.startsWith("26")) { //$NON-NLS-1$
147+
if (javaVersion.startsWith("27")) { //$NON-NLS-1$
148+
types = getTypes(JavaSE_27);
149+
} else if (javaVersion.startsWith("26")) { //$NON-NLS-1$
146150
types = getTypes(JavaSE_26);
147151
} else if (javaVersion.startsWith("25")) { //$NON-NLS-1$
148152
types = getTypes(JavaSE_25);

org.eclipse.jdt.launching/plugin.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ environment.description.27 = Java Platform, Standard Edition 23
8888
environment.description.28 = Java Platform, Standard Edition 24
8989
environment.description.29 = Java Platform, Standard Edition 25
9090
environment.description.30 = Java Platform, Standard Edition 26
91+
environment.description.31 = Java Platform, Standard Edition 27
9192

9293
classpathVariableInitializer.deprecated = Use the JRE System Library instead
9394

org.eclipse.jdt.launching/plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,11 @@
403403
description="%environment.description.30"
404404
id="JavaSE-26"
405405
compliance="26">
406+
</environment>
407+
<environment
408+
description="%environment.description.31"
409+
id="JavaSE-27"
410+
compliance="27">
406411
</environment>
407412
<analyzer
408413
class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"

0 commit comments

Comments
 (0)