mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
moved REMOTE_SESSION_KEY init into base attachVirtualMachine
This commit is contained in:
@@ -21,6 +21,7 @@ import com.intellij.debugger.engine.*;
|
||||
import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.debugger.ui.GetJPDADialog;
|
||||
import com.intellij.debugger.ui.breakpoints.BreakpointManager;
|
||||
import com.intellij.debugger.ui.tree.render.BatchEvaluator;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.ExecutionResult;
|
||||
import com.intellij.execution.configurations.JavaParameters;
|
||||
@@ -295,6 +296,17 @@ public class DebuggerManagerImpl extends DebuggerManagerEx implements Persistent
|
||||
});
|
||||
}
|
||||
myDispatcher.getMulticaster().sessionCreated(session);
|
||||
|
||||
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
|
||||
session.dispose();
|
||||
return null;
|
||||
}
|
||||
if (environment.isRemote()) {
|
||||
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
|
||||
// which is an expensive operation when executed first time
|
||||
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
|
||||
}
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,6 @@ import com.intellij.debugger.engine.DebugProcessImpl;
|
||||
import com.intellij.debugger.engine.DebuggerUtils;
|
||||
import com.intellij.debugger.engine.JavaDebugProcess;
|
||||
import com.intellij.debugger.settings.DebuggerSettings;
|
||||
import com.intellij.debugger.ui.tree.render.BatchEvaluator;
|
||||
import com.intellij.execution.DefaultExecutionResult;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.ExecutionResult;
|
||||
@@ -94,15 +93,6 @@ public class GenericDebuggerRunner extends JavaPatchableProgramRunner<GenericDeb
|
||||
}
|
||||
|
||||
final DebugProcessImpl debugProcess = debuggerSession.getProcess();
|
||||
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
|
||||
debuggerSession.dispose();
|
||||
return null;
|
||||
}
|
||||
if (environment.isRemote()) {
|
||||
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
|
||||
// which is an expensive operation when executed first time
|
||||
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
|
||||
}
|
||||
|
||||
return XDebuggerManager.getInstance(env.getProject()).startSession(env, new XDebugProcessStarter() {
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,12 +19,10 @@ import com.intellij.debugger.DebugEnvironment;
|
||||
import com.intellij.debugger.DebugUIEnvironment;
|
||||
import com.intellij.debugger.DebuggerManagerEx;
|
||||
import com.intellij.debugger.DefaultDebugUIEnvironment;
|
||||
import com.intellij.debugger.engine.DebugProcessImpl;
|
||||
import com.intellij.debugger.engine.JavaDebugProcess;
|
||||
import com.intellij.debugger.impl.DebuggerContextImpl;
|
||||
import com.intellij.debugger.impl.DebuggerSession;
|
||||
import com.intellij.debugger.impl.DebuggerStateManager;
|
||||
import com.intellij.debugger.ui.tree.render.BatchEvaluator;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.Executor;
|
||||
import com.intellij.execution.configurations.RemoteConnection;
|
||||
@@ -71,17 +69,6 @@ public class DebuggerPanelsManager implements ProjectComponent {
|
||||
return null;
|
||||
}
|
||||
|
||||
final DebugProcessImpl debugProcess = debuggerSession.getProcess();
|
||||
if (debugProcess.isDetached() || debugProcess.isDetaching()) {
|
||||
debuggerSession.dispose();
|
||||
return null;
|
||||
}
|
||||
if (modelEnvironment.isRemote()) {
|
||||
// optimization: that way BatchEvaluator will not try to lookup the class file in remote VM
|
||||
// which is an expensive operation when executed first time
|
||||
debugProcess.putUserData(BatchEvaluator.REMOTE_SESSION_KEY, Boolean.TRUE);
|
||||
}
|
||||
|
||||
XDebugSession debugSession =
|
||||
XDebuggerManager.getInstance(myProject).startSessionAndShowTab(modelEnvironment.getSessionName(), environment.getReuseContent(), new XDebugProcessStarter() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user