[debugger] IDEA-393273 Rework compiler invocations for breakpoint instrumentation to prevent long read actions

This is a combined commit of 2, squashed together

(cherry picked from commit a69aa2166b93267fcd84012a77b1e79a426ba5f0)

(cherry picked from commit 2c7c8313707fc49228a61e1433fbe7703400a89c)

IJ-CR-221035

GitOrigin-RevId: 6c75f6c316c850757f0250c2450054f35e584763
This commit is contained in:
Alexey.Merkulov
2026-09-08 12:32:55 +00:00
committed by intellij-monorepo-bot
parent 1e50389f67
commit eeea728a28
@@ -71,23 +71,25 @@ public class CompilingEvaluatorImpl extends CompilingEvaluator {
options.add("UTF-8");
List<File> platformClasspath = new ArrayList<>();
List<File> classpath = new ArrayList<>();
AnnotationProcessingConfiguration profile = null;
if (myModule != null) {
assert myProject.equals(myModule.getProject()) : myModule + " is from another project";
profile = CompilerConfiguration.getInstance(myProject).getAnnotationProcessingConfiguration(myModule);
ModuleRootManager rootManager = ModuleRootManager.getInstance(myModule);
for (String s : rootManager.orderEntries().compileOnly().recursively().exportedOnly().withoutSdk().getPathsList().getPathList()) {
classpath.add(new File(s));
}
for (String s : rootManager.orderEntries().compileOnly().sdkOnly().getPathsList().getPathList()) {
platformClasspath.add(new File(s));
}
ReadAction.runBlocking(() -> {
AnnotationProcessingConfiguration profile = null;
if (myModule != null) {
assert myProject.equals(myModule.getProject()) : myModule + " is from another project";
profile = CompilerConfiguration.getInstance(myProject).getAnnotationProcessingConfiguration(myModule);
ModuleRootManager rootManager = ModuleRootManager.getInstance(myModule);
for (String s : rootManager.orderEntries().compileOnly().recursively().exportedOnly().withoutSdk().getPathsList().getPathList()) {
classpath.add(new File(s));
}
for (String s : rootManager.orderEntries().compileOnly().sdkOnly().getPathsList().getPathList()) {
platformClasspath.add(new File(s));
}
if (myLanguageLevel != null && myLanguageLevel.isPreview()) {
options.add(JavaParameters.JAVA_ENABLE_PREVIEW_PROPERTY);
if (myLanguageLevel != null && myLanguageLevel.isPreview()) {
options.add(JavaParameters.JAVA_ENABLE_PREVIEW_PROPERTY);
}
}
}
JavaBuilder.addAnnotationProcessingOptions(options, profile);
JavaBuilder.addAnnotationProcessingOptions(options, profile);
});
Pair<Sdk, JavaSdkVersion> runtime = BuildManager.getJavacRuntimeSdk(myProject);
JavaSdkVersion buildRuntimeVersion = runtime.getSecond();