Skip to content

Commit 23fede5

Browse files
committed
Bug 577682 - [18] Release Activities
Merge remote-tracking branch 'origin/BETA_JAVA18' Conflicts: org.eclipse.jdt.launching/META-INF/MANIFEST.MF org.eclipse.jdt.launching/pom.xml Change-Id: Ib156ab75c4ee01c90fa9a91d8e19a93390fb362e
2 parents a0332c9 + c379adb commit 23fede5

File tree

7 files changed

+32
-12
lines changed

7 files changed

+32
-12
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2008, 2021 IBM Corporation and others.
2+
* Copyright (c) 2008, 2022 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -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 (version.startsWith(JavaCore.VERSION_18)) {
238+
return JavaCore.VERSION_18;
237239
} else if (version.startsWith(JavaCore.VERSION_17)) {
238240
return JavaCore.VERSION_17;
239241
} else if (version.startsWith(JavaCore.VERSION_16)) {

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2021 IBM Corporation and others.
2+
* Copyright (c) 2000, 2022 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -846,7 +846,9 @@ public URL getDefaultJavadocLocation(File installLocation) {
846846
*/
847847
public static URL getDefaultJavadocLocation(String version) {
848848
try {
849-
if (version.startsWith(JavaCore.VERSION_17)) {
849+
if (version.startsWith(JavaCore.VERSION_18)) {
850+
return new URL("https://docs.oracle.com/en/java/javase/18/docs/api/"); //$NON-NLS-1$
851+
} else if (version.startsWith(JavaCore.VERSION_17)) {
850852
return new URL("https://docs.oracle.com/en/java/javase/17/docs/api/"); //$NON-NLS-1$
851853
} else if (version.startsWith(JavaCore.VERSION_16)) {
852854
return new URL("https://docs.oracle.com/en/java/javase/16/docs/api/"); //$NON-NLS-1$

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2005, 2021 IBM Corporation and others.
2+
* Copyright (c) 2005, 2022 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -196,7 +196,9 @@ public synchronized Analyzer[] getAnalyzers() {
196196

197197
private String getExecutionEnvironmentCompliance(IExecutionEnvironment executionEnvironment) {
198198
String desc = executionEnvironment.getId();
199-
if (desc.indexOf(JavaCore.VERSION_17) != -1) {
199+
if (desc.indexOf(JavaCore.VERSION_18) != -1) {
200+
return JavaCore.VERSION_18;
201+
} else if (desc.indexOf(JavaCore.VERSION_17) != -1) {
200202
return JavaCore.VERSION_17;
201203
} else if (desc.indexOf(JavaCore.VERSION_16) != -1) {
202204
return JavaCore.VERSION_16;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2006, 2021 IBM Corporation and others.
2+
* Copyright (c) 2006, 2022 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -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_18 = "JavaSE-18"; //$NON-NLS-1$
4445
private static final String JavaSE_17 = "JavaSE-17"; //$NON-NLS-1$
4546
private static final String JavaSE_16 = "JavaSE-16"; //$NON-NLS-1$
4647
private static final String JavaSE_15 = "JavaSE-15"; //$NON-NLS-1$
@@ -91,14 +92,15 @@ public class ExecutionEnvironmentAnalyzer implements IExecutionEnvironmentAnalyz
9192
mappings.put(JavaSE_1_8, new String[] { JavaSE_1_7 });
9293
mappings.put(JavaSE_9, new String[] { JavaSE_1_8 });
9394
mappings.put(JavaSE_10, new String[] { JavaSE_9 });
94-
mappings.put(JavaSE_10_Plus, new String[] { JavaSE_17 });
95+
mappings.put(JavaSE_10_Plus, new String[] { JavaSE_18 });
9596
mappings.put(JavaSE_11, new String[] { JavaSE_10 });
9697
mappings.put(JavaSE_12, new String[] { JavaSE_11 });
9798
mappings.put(JavaSE_13, new String[] { JavaSE_12 });
9899
mappings.put(JavaSE_14, new String[] { JavaSE_13 });
99100
mappings.put(JavaSE_15, new String[] { JavaSE_14 });
100101
mappings.put(JavaSE_16, new String[] { JavaSE_15 });
101102
mappings.put(JavaSE_17, new String[] { JavaSE_16 });
103+
mappings.put(JavaSE_18, new String[] { JavaSE_17 });
102104
}
103105
@Override
104106
public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor) throws CoreException {
@@ -124,7 +126,9 @@ public CompatibleEnvironment[] analyze(IVMInstall vm, IProgressMonitor monitor)
124126
types = getTypes(CDC_FOUNDATION_1_1);
125127
}
126128
} else {
127-
if (javaVersion.startsWith("17")) { //$NON-NLS-1$
129+
if (javaVersion.startsWith("18")) { //$NON-NLS-1$
130+
types = getTypes(JavaSE_18);
131+
} else if (javaVersion.startsWith("17")) { //$NON-NLS-1$
128132
types = getTypes(JavaSE_17);
129133
} else if (javaVersion.startsWith("16")) { //$NON-NLS-1$
130134
types = getTypes(JavaSE_16);

org.eclipse.jdt.launching/launching/org/eclipse/jdt/launching/JavaRuntime.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2021 IBM Corporation and others.
2+
* Copyright (c) 2000, 2022 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -3361,8 +3361,11 @@ private static void updateCompliance(IVMInstall vm) {
33613361
} else if (javaVersion.startsWith(JavaCore.VERSION_17)
33623362
&& (javaVersion.length() == JavaCore.VERSION_17.length() || javaVersion.charAt(JavaCore.VERSION_17.length()) == '.')) {
33633363
compliance = JavaCore.VERSION_17;
3364+
} else if (javaVersion.startsWith(JavaCore.VERSION_18)
3365+
&& (javaVersion.length() == JavaCore.VERSION_18.length() || javaVersion.charAt(JavaCore.VERSION_18.length()) == '.')) {
3366+
compliance = JavaCore.VERSION_18;
33643367
} else {
3365-
compliance = JavaCore.VERSION_17; // use latest by default
3368+
compliance = JavaCore.VERSION_18; // use latest by default
33663369
}
33673370

33683371
Hashtable<String, String> options= JavaCore.getOptions();

org.eclipse.jdt.launching/plugin.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
###############################################################################
2-
# Copyright (c) 2000, 2021 IBM Corporation and others.
2+
# Copyright (c) 2000, 2022 IBM Corporation and others.
33
#
44
# This program and the accompanying materials
55
# are made available under the terms of the Eclipse Public License 2.0
66
# which accompanies this distribution, and is available at
77
# https://www.eclipse.org/legal/epl-2.0/
88
#
99
# SPDX-License-Identifier: EPL-2.0
10+
#
1011
# Contributors:
1112
# IBM Corporation - initial API and implementation
1213
###############################################################################
@@ -78,6 +79,7 @@ environment.description.18 = Java Platform, Standard Edition 14
7879
environment.description.19 = Java Platform, Standard Edition 15
7980
environment.description.20 = Java Platform, Standard Edition 16
8081
environment.description.21 = Java Platform, Standard Edition 17
82+
environment.description.22 = Java Platform, Standard Edition 18
8183

8284
classpathVariableInitializer.deprecated = Use the JRE System Library instead
8385

org.eclipse.jdt.launching/plugin.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<?eclipse version="3.0"?>
33
<!--
4-
Copyright (c) 2005, 2021 IBM Corporation and others.
4+
Copyright (c) 2005, 2022 IBM Corporation and others.
55
66
This program and the accompanying materials
77
are made available under the terms of the Eclipse Public License 2.0
@@ -362,6 +362,11 @@
362362
description="%environment.description.21"
363363
id="JavaSE-17"
364364
compliance="17">
365+
</environment>
366+
<environment
367+
description="%environment.description.22"
368+
id="JavaSE-18"
369+
compliance="18">
365370
</environment>
366371
<analyzer
367372
class="org.eclipse.jdt.internal.launching.environments.ExecutionEnvironmentAnalyzer"

0 commit comments

Comments
 (0)