mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable process preloading in debug mode
This commit is contained in:
@@ -104,7 +104,8 @@ import org.jetbrains.jps.cmdline.ClasspathBootstrap;
|
||||
import org.jetbrains.jps.incremental.Utils;
|
||||
import org.jetbrains.jps.model.serialization.JpsGlobalLoader;
|
||||
|
||||
import javax.tools.*;
|
||||
import javax.tools.JavaCompiler;
|
||||
import javax.tools.ToolProvider;
|
||||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -734,7 +735,7 @@ public class BuildManager implements ApplicationComponent{
|
||||
myBuildsInProgress.remove(projectPath);
|
||||
notifySessionTerminationIfNeeded(sessionId, execFailure);
|
||||
|
||||
if (Registry.is("compiler.process.preload") && !project.isDisposed()) {
|
||||
if (isProcessPreloadingEnabled() && !project.isDisposed()) {
|
||||
runCommand(new Runnable() {
|
||||
public void run() {
|
||||
if (!myPreloadedBuilds.containsKey(projectPath)) {
|
||||
@@ -763,6 +764,11 @@ public class BuildManager implements ApplicationComponent{
|
||||
return _future;
|
||||
}
|
||||
|
||||
private static boolean isProcessPreloadingEnabled() {
|
||||
// automatically disable process preloading when debugging
|
||||
return Registry.is("compiler.process.preload") && Registry.intValue("compiler.process.debug.port") <= 0 ;
|
||||
}
|
||||
|
||||
private void notifySessionTerminationIfNeeded(UUID sessionId, @Nullable Throwable execFailure) {
|
||||
if (myMessageDispatcher.getAssociatedChannel(sessionId) == null) {
|
||||
// either the connection has never been established (process not started or execution failed), or no messages were sent from the launched process.
|
||||
|
||||
Reference in New Issue
Block a user