Skip to content

Commit

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

This reverts commit f52ee57 as it
caused regression.

See #260

See also eclipse-jdt/eclipse.jdt.core#2340

Fixes #309
  • Loading branch information
iloveeclipse committed Apr 14, 2024
1 parent 60da9ec commit 61a610f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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_IgnoreUnnamedModuleForSplitPackage, JavaCore.ENABLED);
extraOptions = Collections.singletonMap(CompilerOptions.OPTION_JdtDebugCompileMode, JavaCore.ENABLED);
}

unit = parseCompilationUnit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void evaluationComplete(IEvaluationResult result) {
*/
public IJavaValue evaluate(String snippet) throws DebugException {
Map<String, String> compileOptions =
Collections.singletonMap(CompilerOptions.OPTION_IgnoreUnnamedModuleForSplitPackage, JavaCore.ENABLED);
Collections.singletonMap(CompilerOptions.OPTION_JdtDebugCompileMode, JavaCore.ENABLED);
ICompiledExpression compiledExpression = fEvaluationEngine
.getCompiledExpression(snippet, fEvaluationType, compileOptions);
if (compiledExpression.hasErrors()) {
Expand Down

0 comments on commit 61a610f

Please sign in to comment.