Skip to content

Commit 7281ab3

Browse files
More locations need to handle version "24" (eclipse-jdt#635)
Update: + StandardVMType + unify code from EECompilationParticipant and JavaRuntime Test currency vis-a-vis JavaCore.latestSupportedJavaVersion() Also update stale test still mentioning J2SE-1.4
1 parent 73d8cdf commit 7281ab3

File tree

8 files changed

+128
-111
lines changed

8 files changed

+128
-111
lines changed

org.eclipse.jdt.debug.tests/META-INF/MANIFEST.MF

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.jdt.debug.tests; singleton:=true
5-
Bundle-Version: 3.12.600.qualifier
5+
Bundle-Version: 3.12.650.qualifier
66
Bundle-ClassPath: javadebugtests.jar
77
Bundle-Activator: org.eclipse.jdt.debug.testplugin.JavaTestPlugin
88
Bundle-Vendor: %providerName

org.eclipse.jdt.debug.tests/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</parent>
1919
<groupId>org.eclipse.jdt</groupId>
2020
<artifactId>org.eclipse.jdt.debug.tests</artifactId>
21-
<version>3.12.600-SNAPSHOT</version>
21+
<version>3.12.650-SNAPSHOT</version>
2222
<packaging>eclipse-test-plugin</packaging>
2323
<properties>
2424
<testSuite>${project.artifactId}</testSuite>

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/AbstractDebugTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,9 @@ void assertBoundeEeProject() {
732732
JavaProjectHelper.addSourceContainer(jp, JavaProjectHelper.SRC_DIR, JavaProjectHelper.BIN_DIR);
733733

734734
// add VM specific JRE container
735-
IExecutionEnvironment j2se14 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(JavaProjectHelper.JAVA_SE_1_8_EE_NAME);
736-
assertNotNull("Missing J2SE-1.4 environment", j2se14);
737-
IPath path = JavaRuntime.newJREContainerPath(j2se14);
735+
IExecutionEnvironment javase1_8 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment(JavaProjectHelper.JAVA_SE_1_8_EE_NAME);
736+
assertNotNull("Missing JavaSE-1.8 environment", javase1_8);
737+
IPath path = JavaRuntime.newJREContainerPath(javase1_8);
738738
JavaProjectHelper.addContainerEntry(jp, path);
739739
loadedEE = true;
740740
waitForBuild();

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/ExecutionEnvironmentTests.java

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2019 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 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
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
*******************************************************************************/
@@ -23,8 +27,10 @@
2327
import org.eclipse.jdt.core.JavaCore;
2428
import org.eclipse.jdt.debug.testplugin.JavaProjectHelper;
2529
import org.eclipse.jdt.debug.tests.AbstractDebugTest;
30+
import org.eclipse.jdt.internal.launching.EECompilationParticipant;
2631
import org.eclipse.jdt.launching.AbstractVMInstall;
2732
import org.eclipse.jdt.launching.IVMInstall;
33+
import org.eclipse.jdt.launching.IVMInstall2;
2834
import org.eclipse.jdt.launching.JavaRuntime;
2935
import org.eclipse.jdt.launching.LibraryLocation;
3036
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
@@ -259,4 +265,27 @@ public void testEEHomeVariableInvalidArgument() throws Exception {
259265
}
260266
assertNotNull("Test should have thrown an exception", null);
261267
}
268+
269+
/**
270+
* Test decoding of the latest JVM version
271+
*/
272+
public void testVMVersionDecoding() {
273+
IVMInstall2 install = new IVMInstall2() {
274+
@Override
275+
public void setVMArgs(String vmArgs) {
276+
}
277+
278+
@Override
279+
public String getVMArgs() {
280+
return null;
281+
}
282+
283+
@Override
284+
public String getJavaVersion() {
285+
return JavaCore.latestSupportedJavaVersion() + ".xyz";
286+
}
287+
};
288+
String compliance = EECompilationParticipant.getCompilerCompliance(install);
289+
assertEquals(JavaCore.latestSupportedJavaVersion(), compliance);
290+
}
262291
}

org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/core/VMInstallTests.java

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2024 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 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
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
*******************************************************************************/
@@ -285,6 +289,17 @@ public void testJavaRuntimeQuerySystemPackages_nonModularJDK() throws Exception
285289
}
286290
}
287291

292+
public void testLatestJavadocLocation() {
293+
String latest = JavaCore.latestSupportedJavaVersion();
294+
URL javadocLocation = StandardVMType.getDefaultJavadocLocation(latest);
295+
assertNotNull(javadocLocation);
296+
if (!javadocLocation.getPath().contains(latest)) {
297+
System.err.println("****************************WARNING!!**********************************");
298+
System.err.println("Update for Java " + latest + " needed in StandardVMType.getDefaultJavadocLocation()");
299+
System.err.println("***********************************************************************");
300+
}
301+
}
302+
288303
private void assertContainsAllCommonPackages(IVMInstall vm, Set<String> packages) {
289304
Set<String> missing = new LinkedHashSet<>(COMMON_JAVA_PACKAGES);
290305
missing.removeAll(packages);

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

+38-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2008, 2024 IBM Corporation and others.
2+
* Copyright (c) 2008, 2025 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
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
*******************************************************************************/
@@ -234,56 +238,66 @@ public static String getCompilerCompliance(IVMInstall2 vMInstall) {
234238
String version = vMInstall.getJavaVersion();
235239
if (version == null) {
236240
return null;
237-
} else if (version.startsWith(JavaCore.VERSION_23)) {
241+
} else if (matchesMajorVersion(version, JavaCore.VERSION_24)) {
242+
return JavaCore.VERSION_24;
243+
} else if (matchesMajorVersion(version, JavaCore.VERSION_23)) {
238244
return JavaCore.VERSION_23;
239-
} else if (version.startsWith(JavaCore.VERSION_22)) {
245+
} else if (matchesMajorVersion(version, JavaCore.VERSION_22)) {
240246
return JavaCore.VERSION_22;
241-
} else if (version.startsWith(JavaCore.VERSION_21)) {
247+
} else if (matchesMajorVersion(version, JavaCore.VERSION_21)) {
242248
return JavaCore.VERSION_21;
243-
} else if (version.startsWith(JavaCore.VERSION_20)) {
249+
} else if (matchesMajorVersion(version, JavaCore.VERSION_20)) {
244250
return JavaCore.VERSION_20;
245-
} else if (version.startsWith(JavaCore.VERSION_19)) {
251+
} else if (matchesMajorVersion(version, JavaCore.VERSION_19)) {
246252
return JavaCore.VERSION_19;
247-
} else if (version.startsWith(JavaCore.VERSION_18)) {
253+
} else if (matchesMajorVersion(version, JavaCore.VERSION_18)) {
248254
return JavaCore.VERSION_18;
249-
} else if (version.startsWith(JavaCore.VERSION_17)) {
255+
} else if (matchesMajorVersion(version, JavaCore.VERSION_17)) {
250256
return JavaCore.VERSION_17;
251-
} else if (version.startsWith(JavaCore.VERSION_16)) {
257+
} else if (matchesMajorVersion(version, JavaCore.VERSION_16)) {
252258
return JavaCore.VERSION_16;
253-
} else if (version.startsWith(JavaCore.VERSION_15)) {
259+
} else if (matchesMajorVersion(version, JavaCore.VERSION_15)) {
254260
return JavaCore.VERSION_15;
255-
} else if (version.startsWith(JavaCore.VERSION_14)) {
261+
} else if (matchesMajorVersion(version, JavaCore.VERSION_14)) {
256262
return JavaCore.VERSION_14;
257-
} else if (version.startsWith(JavaCore.VERSION_13)) {
263+
} else if (matchesMajorVersion(version, JavaCore.VERSION_13)) {
258264
return JavaCore.VERSION_13;
259-
} else if (version.startsWith(JavaCore.VERSION_12)) {
265+
} else if (matchesMajorVersion(version, JavaCore.VERSION_12)) {
260266
return JavaCore.VERSION_12;
261-
} else if (version.startsWith(JavaCore.VERSION_11)) {
267+
} else if (matchesMajorVersion(version, JavaCore.VERSION_11)) {
262268
return JavaCore.VERSION_11;
263-
} else if (version.startsWith(JavaCore.VERSION_10)) {
269+
} else if (matchesMajorVersion(version, JavaCore.VERSION_10)) {
264270
return JavaCore.VERSION_10;
265-
} else if (version.startsWith(JavaCore.VERSION_9)) {
271+
} else if (matchesMajorVersion(version, JavaCore.VERSION_9)) {
266272
return JavaCore.VERSION_9;
267-
} else if (version.startsWith(JavaCore.VERSION_1_8)) {
273+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_8)) {
268274
return JavaCore.VERSION_1_8;
269-
} else if (version.startsWith(JavaCore.VERSION_1_7)) {
275+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_7)) {
270276
return JavaCore.VERSION_1_7;
271-
} else if (version.startsWith(JavaCore.VERSION_1_6)) {
277+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_6)) {
272278
return JavaCore.VERSION_1_6;
273-
} else if (version.startsWith(JavaCore.VERSION_1_5)) {
279+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_5)) {
274280
return JavaCore.VERSION_1_5;
275-
} else if (version.startsWith(JavaCore.VERSION_1_4)) {
281+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_4)) {
276282
return JavaCore.VERSION_1_4;
277-
} else if (version.startsWith(JavaCore.VERSION_1_3)) {
283+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_3)) {
278284
return JavaCore.VERSION_1_3;
279-
} else if (version.startsWith(JavaCore.VERSION_1_2)) {
285+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_2)) {
280286
return JavaCore.VERSION_1_3;
281-
} else if (version.startsWith(JavaCore.VERSION_1_1)) {
287+
} else if (matchesMajorVersion(version, JavaCore.VERSION_1_1)) {
282288
return JavaCore.VERSION_1_3;
283289
}
284290
return null;
285291
}
286292

293+
private static boolean matchesMajorVersion(String currentVersion, String knownVersion) {
294+
if (currentVersion.startsWith(knownVersion)) {
295+
int knownLength = knownVersion.length();
296+
return currentVersion.length() == knownLength || currentVersion.charAt(knownLength) == '.';
297+
}
298+
return false;
299+
}
300+
287301
/**
288302
* Returns the severity for the specific key from the given {@link IProject},
289303
* or -1 if the problem should be ignored.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2024 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 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
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
* Michael Allman - Bug 211648, Bug 156343 - Standard VM not supported on MacOS
@@ -809,8 +813,10 @@ public URL getDefaultJavadocLocation(File installLocation) {
809813
*/
810814
public static URL getDefaultJavadocLocation(String version) {
811815
try {
812-
if (version.startsWith(JavaCore.VERSION_23)) {
813-
// To modify to version 23 after the release
816+
if (version.startsWith(JavaCore.VERSION_24)) {
817+
// To modify to version 24 after the release
818+
return new URI("https://docs.oracle.com/en/java/javase/23/docs/api/").toURL(); //$NON-NLS-1$
819+
} else if (version.startsWith(JavaCore.VERSION_23)) {
814820
return new URI("https://docs.oracle.com/en/java/javase/23/docs/api/").toURL(); //$NON-NLS-1$
815821
} else if (version.startsWith(JavaCore.VERSION_22)) {
816822
return new URI("https://docs.oracle.com/en/java/javase/22/docs/api/").toURL(); //$NON-NLS-1$

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

+30-77
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
*
99
* SPDX-License-Identifier: EPL-2.0
1010
*
11+
* This is an implementation of an early-draft specification developed under the Java
12+
* Community Process (JCP) and is made available for testing and evaluation purposes
13+
* only. The code is not compatible with any specification of the JCP.
14+
*
1115
* Contributors:
1216
* IBM Corporation - initial API and implementation
1317
* Frits Jalvingh - Contribution for Bug 459831 - [launching] Support attaching
@@ -88,6 +92,7 @@
8892
import org.eclipse.jdt.internal.launching.DefaultEntryResolver;
8993
import org.eclipse.jdt.internal.launching.DefaultProjectClasspathEntry;
9094
import org.eclipse.jdt.internal.launching.DetectVMInstallationsJob;
95+
import org.eclipse.jdt.internal.launching.EECompilationParticipant;
9196
import org.eclipse.jdt.internal.launching.EEVMInstall;
9297
import org.eclipse.jdt.internal.launching.EEVMType;
9398
import org.eclipse.jdt.internal.launching.JREContainerInitializer;
@@ -3338,88 +3343,36 @@ private static void updateCompliance(IVMInstall vm) {
33383343
LaunchingPlugin.log("Compliance needs an update."); //$NON-NLS-1$
33393344
}
33403345
if (vm instanceof IVMInstall2) {
3341-
String javaVersion = ((IVMInstall2)vm).getJavaVersion();
3342-
if (javaVersion != null) {
3343-
String compliance = null;
3344-
if (javaVersion.startsWith(JavaCore.VERSION_1_8)) {
3345-
compliance = JavaCore.VERSION_1_8;
3346-
} else if (javaVersion.startsWith(JavaCore.VERSION_9)
3347-
&& (javaVersion.length() == JavaCore.VERSION_9.length() || javaVersion.charAt(JavaCore.VERSION_9.length()) == '.')) {
3348-
compliance = JavaCore.VERSION_9;
3349-
} else if (javaVersion.startsWith(JavaCore.VERSION_10)
3350-
&& (javaVersion.length() == JavaCore.VERSION_10.length() || javaVersion.charAt(JavaCore.VERSION_10.length()) == '.')) {
3351-
compliance = JavaCore.VERSION_10;
3352-
} else if (javaVersion.startsWith(JavaCore.VERSION_11)
3353-
&& (javaVersion.length() == JavaCore.VERSION_11.length() || javaVersion.charAt(JavaCore.VERSION_11.length()) == '.')) {
3354-
compliance = JavaCore.VERSION_11;
3355-
} else if (javaVersion.startsWith(JavaCore.VERSION_12)
3356-
&& (javaVersion.length() == JavaCore.VERSION_12.length() || javaVersion.charAt(JavaCore.VERSION_12.length()) == '.')) {
3357-
compliance = JavaCore.VERSION_12;
3358-
} else if (javaVersion.startsWith(JavaCore.VERSION_13)
3359-
&& (javaVersion.length() == JavaCore.VERSION_13.length() || javaVersion.charAt(JavaCore.VERSION_13.length()) == '.')) {
3360-
compliance = JavaCore.VERSION_13;
3361-
} else if (javaVersion.startsWith(JavaCore.VERSION_14)
3362-
&& (javaVersion.length() == JavaCore.VERSION_14.length() || javaVersion.charAt(JavaCore.VERSION_14.length()) == '.')) {
3363-
compliance = JavaCore.VERSION_14;
3364-
} else if (javaVersion.startsWith(JavaCore.VERSION_15)
3365-
&& (javaVersion.length() == JavaCore.VERSION_15.length() || javaVersion.charAt(JavaCore.VERSION_15.length()) == '.')) {
3366-
compliance = JavaCore.VERSION_15;
3367-
} else if (javaVersion.startsWith(JavaCore.VERSION_16)
3368-
&& (javaVersion.length() == JavaCore.VERSION_16.length() || javaVersion.charAt(JavaCore.VERSION_16.length()) == '.')) {
3369-
compliance = JavaCore.VERSION_16;
3370-
} else if (javaVersion.startsWith(JavaCore.VERSION_17)
3371-
&& (javaVersion.length() == JavaCore.VERSION_17.length() || javaVersion.charAt(JavaCore.VERSION_17.length()) == '.')) {
3372-
compliance = JavaCore.VERSION_17;
3373-
} else if (javaVersion.startsWith(JavaCore.VERSION_18)
3374-
&& (javaVersion.length() == JavaCore.VERSION_18.length() || javaVersion.charAt(JavaCore.VERSION_18.length()) == '.')) {
3375-
compliance = JavaCore.VERSION_18;
3376-
} else if (javaVersion.startsWith(JavaCore.VERSION_19)
3377-
&& (javaVersion.length() == JavaCore.VERSION_19.length() || javaVersion.charAt(JavaCore.VERSION_19.length()) == '.')) {
3378-
compliance = JavaCore.VERSION_19;
3379-
} else if (javaVersion.startsWith(JavaCore.VERSION_20)
3380-
&& (javaVersion.length() == JavaCore.VERSION_20.length() || javaVersion.charAt(JavaCore.VERSION_20.length()) == '.')) {
3381-
compliance = JavaCore.VERSION_20;
3382-
} else if (javaVersion.startsWith(JavaCore.VERSION_21)
3383-
&& (javaVersion.length() == JavaCore.VERSION_21.length() || javaVersion.charAt(JavaCore.VERSION_21.length()) == '.')) {
3384-
compliance = JavaCore.VERSION_21;
3385-
} else if (javaVersion.startsWith(JavaCore.VERSION_22)
3386-
&& (javaVersion.length() == JavaCore.VERSION_22.length() || javaVersion.charAt(JavaCore.VERSION_22.length()) == '.')) {
3387-
compliance = JavaCore.VERSION_22;
3388-
} else if (javaVersion.startsWith(JavaCore.VERSION_23)
3389-
&& (javaVersion.length() == JavaCore.VERSION_23.length() || javaVersion.charAt(JavaCore.VERSION_23.length()) == '.')) {
3390-
compliance = JavaCore.VERSION_23;
3391-
} else {
3392-
compliance = JavaCore.VERSION_23; // use latest by default
3393-
}
3346+
String compliance = EECompilationParticipant.getCompilerCompliance((IVMInstall2) vm);
3347+
if (compliance == null) {
3348+
compliance = JavaCore.latestSupportedJavaVersion();
3349+
}
33943350

3395-
Hashtable<String, String> options= JavaCore.getOptions();
3351+
Hashtable<String, String> options = JavaCore.getOptions();
33963352

3397-
org.osgi.service.prefs.Preferences bundleDefaults = BundleDefaultsScope.INSTANCE.getNode(JavaCore.PLUGIN_ID);
3353+
org.osgi.service.prefs.Preferences bundleDefaults = BundleDefaultsScope.INSTANCE.getNode(JavaCore.PLUGIN_ID);
33983354

3399-
boolean isDefault =
3400-
equals(JavaCore.COMPILER_COMPLIANCE, options, bundleDefaults) &&
3401-
equals(JavaCore.COMPILER_SOURCE, options, bundleDefaults) &&
3402-
equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, options, bundleDefaults) &&
3403-
equals(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, options, bundleDefaults) &&
3404-
equals(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, options, bundleDefaults);
3405-
if (JavaCore.compareJavaVersions(compliance, JavaCore.VERSION_10) > 0) {
3406-
isDefault = isDefault && equals(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, options, bundleDefaults)
3407-
&& equals(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, options, bundleDefaults);
3408-
}
3409-
// only update the compliance settings if they are default settings, otherwise the
3410-
// settings have already been modified by a tool or user
3355+
boolean isDefault = equals(JavaCore.COMPILER_COMPLIANCE, options, bundleDefaults)
3356+
&& equals(JavaCore.COMPILER_SOURCE, options, bundleDefaults)
3357+
&& equals(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, options, bundleDefaults)
3358+
&& equals(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, options, bundleDefaults)
3359+
&& equals(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, options, bundleDefaults);
3360+
if (JavaCore.compareJavaVersions(compliance, JavaCore.VERSION_10) > 0) {
3361+
isDefault = isDefault && equals(JavaCore.COMPILER_PB_ENABLE_PREVIEW_FEATURES, options, bundleDefaults)
3362+
&& equals(JavaCore.COMPILER_PB_REPORT_PREVIEW_FEATURES, options, bundleDefaults);
3363+
}
3364+
// only update the compliance settings if they are default settings, otherwise the
3365+
// settings have already been modified by a tool or user
3366+
if (LaunchingPlugin.isVMLogging()) {
3367+
LaunchingPlugin.log("Compliance to be updated is: " + compliance); //$NON-NLS-1$
3368+
}
3369+
if (isDefault) {
3370+
JavaCore.setComplianceOptions(compliance, options);
3371+
JavaCore.setOptions(options);
34113372
if (LaunchingPlugin.isVMLogging()) {
3412-
LaunchingPlugin.log("Compliance to be updated is: " + compliance); //$NON-NLS-1$
3373+
LaunchingPlugin.log("Compliance Options are updated."); //$NON-NLS-1$
34133374
}
3414-
if (isDefault) {
3415-
JavaCore.setComplianceOptions(compliance, options);
3416-
JavaCore.setOptions(options);
3417-
if (LaunchingPlugin.isVMLogging()) {
3418-
LaunchingPlugin.log("Compliance Options are updated."); //$NON-NLS-1$
3419-
}
3420-
}
3421-
3422-
}
3375+
}
34233376
}
34243377
}
34253378

0 commit comments

Comments
 (0)