Skip to content

Commit c785045

Browse files
datho7561iloveeclipse
authored andcommitted
Constants for Java 26
Signed-off-by: David Thompson <[email protected]>
1 parent dc11e61 commit c785045

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_26)) {
238+
return JavaCore.VERSION_26;
237239
} else if (matchesMajorVersion(version, JavaCore.VERSION_25)) {
238240
return JavaCore.VERSION_25;
239241
} else if (matchesMajorVersion(version, JavaCore.VERSION_24)) {

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_25)) {
811+
if (version.startsWith(JavaCore.VERSION_26)) {
812+
// Java 26 docs aren't published yet
813+
return new URI("https://docs.oracle.com/en/java/javase/25/docs/api/").toURL(); //$NON-NLS-1$
814+
} else if (version.startsWith(JavaCore.VERSION_25)) {
812815
return new URI("https://docs.oracle.com/en/java/javase/25/docs/api/").toURL(); //$NON-NLS-1$
813816
} else if (version.startsWith(JavaCore.VERSION_24)) {
814817
return new URI("https://docs.oracle.com/en/java/javase/24/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_26 = "JavaSE-26"; //$NON-NLS-1$
4445
private static final String JavaSE_25 = "JavaSE-25"; //$NON-NLS-1$
4546
private static final String JavaSE_24 = "JavaSE-24"; //$NON-NLS-1$
4647
private static final String JavaSE_23 = "JavaSE-23"; //$NON-NLS-1$
@@ -115,6 +116,7 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
115116
mappings.put(JavaSE_23, new String[] { JavaSE_22 });
116117
mappings.put(JavaSE_24, new String[] { JavaSE_23 });
117118
mappings.put(JavaSE_25, new String[] { JavaSE_24 });
119+
mappings.put(JavaSE_26, new String[] { JavaSE_25 });
118120
}
119121
@Override
120122
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
@@ -140,7 +142,9 @@ public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor)
140142
types = getTypes(CDC_FOUNDATION_1_1);
141143
}
142144
} else {
143-
if (javaVersion.startsWith("25")) { //$NON-NLS-1$
145+
if (javaVersion.startsWith("26")) { //$NON-NLS-1$
146+
types = getTypes(JavaSE_26);
147+
} else if (javaVersion.startsWith("25")) { //$NON-NLS-1$
144148
types = getTypes(JavaSE_25);
145149
} else if (javaVersion.startsWith("24")) { //$NON-NLS-1$
146150
types = getTypes(JavaSE_24);

org.eclipse.jdt.launching/plugin.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ environment.description.26 = Java Platform, Standard Edition 22
8787
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
90+
environment.description.30 = Java Platform, Standard Edition 26
9091

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

org.eclipse.jdt.launching/plugin.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,11 @@
399399
id="JavaSE-25"
400400
compliance="25">
401401
</environment>
402+
<environment
403+
description="%environment.description.30"
404+
id="JavaSE-26"
405+
compliance="26">
406+
</environment>
402407
<analyzer
403408
class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"
404409
id="org.eclipse.jdt.launching.eeAnalyzer"/>

0 commit comments

Comments
 (0)