Skip to content

Commit

Permalink
Remove use of OPTION_JdtDebugCompileMode with
Browse files Browse the repository at this point in the history
OPTION_IgnoreUnnamedModuleForSplitPackage

This change replaces use of OPTION_JdtDebugCompileMode with
OPTION_IgnoreUnnamedModuleForSplitPackage, since the latter does what we
need better and doesn't cause the side effects that the first option
causes. Goal is to later on remove OPTION_JdtDebugCompileMode in JDT
core.

Fixes: #260
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
  • Loading branch information
trancexpress committed Jun 12, 2023
1 parent 4613cf2 commit e104e8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion org.eclipse.jdt.debug/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.debug; singleton:=true
Bundle-Version: 3.21.0.qualifier
Bundle-Version: 3.21.100.qualifier
Bundle-ClassPath: jdimodel.jar
Bundle-Activator: org.eclipse.jdt.internal.debug.core.JDIDebugPlugin
Bundle-Vendor: %providerName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ public ICompiledExpression getCompiledExpression(String snippet,
Map<String, String> extraOptions = Collections.emptyMap();
// if target runtime is above java 1.8 then switch the compiler to debug mode to ignore java 9 module system
if (JavaCore.compareJavaVersions(((IJavaDebugTarget) frame.getDebugTarget()).getVersion(), JavaCore.VERSION_1_8) > 0) {
extraOptions = Collections.singletonMap(CompilerOptions.OPTION_JdtDebugCompileMode, JavaCore.ENABLED);
extraOptions = Collections.singletonMap(CompilerOptions.OPTION_IgnoreUnnamedModuleForSplitPackage, JavaCore.ENABLED);
}

unit = parseCompilationUnit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void evaluationComplete(IEvaluationResult result) {
*/
public IJavaValue evaluate(String snippet) throws DebugException {
Map<String, String> compileOptions =
Collections.singletonMap(CompilerOptions.OPTION_JdtDebugCompileMode, JavaCore.ENABLED);
Collections.singletonMap(CompilerOptions.OPTION_IgnoreUnnamedModuleForSplitPackage, JavaCore.ENABLED);
ICompiledExpression compiledExpression = fEvaluationEngine
.getCompiledExpression(snippet, fEvaluationType, compileOptions);
if (compiledExpression.hasErrors()) {
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.jdt.debug/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
Contributors:
Igor Fedorenko - initial implementation
-->
Expand All @@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.debug</artifactId>
<version>3.21.0-SNAPSHOT</version>
<version>3.21.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>

0 comments on commit e104e8a

Please sign in to comment.