mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
[external-system] cleanup: external system RC related warnings resolved
GitOrigin-RevId: f010167cd904930212c0d2bd83daf39445f0081a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d908b2747b
commit
fe72f134d8
@@ -81,8 +81,10 @@ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private RunContentDescriptor doGetRunContentDescriptor(@NotNull ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment environment) throws ExecutionException {
|
||||
private static RunContentDescriptor doGetRunContentDescriptor(
|
||||
@NotNull ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment environment
|
||||
) throws ExecutionException {
|
||||
RunContentDescriptor runContentDescriptor = createProcessToDebug(state, environment);
|
||||
if (runContentDescriptor == null) return null;
|
||||
|
||||
@@ -92,24 +94,30 @@ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner {
|
||||
if (executionConsole instanceof BuildView) {
|
||||
return runContentDescriptor;
|
||||
}
|
||||
RunContentDescriptor descriptor =
|
||||
new RunContentDescriptor(runContentDescriptor.getExecutionConsole(), runContentDescriptor.getProcessHandler(),
|
||||
runContentDescriptor.getComponent(), runContentDescriptor.getDisplayName(),
|
||||
runContentDescriptor.getIcon(), null,
|
||||
runContentDescriptor.getRestartActions()) {
|
||||
@Override
|
||||
public boolean isHiddenContent() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
RunContentDescriptor descriptor = new RunContentDescriptor(
|
||||
runContentDescriptor.getExecutionConsole(),
|
||||
runContentDescriptor.getProcessHandler(),
|
||||
runContentDescriptor.getComponent(),
|
||||
runContentDescriptor.getDisplayName(),
|
||||
runContentDescriptor.getIcon(),
|
||||
null,
|
||||
runContentDescriptor.getRestartActions()
|
||||
) {
|
||||
@Override
|
||||
public boolean isHiddenContent() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
descriptor.setRunnerLayoutUi(runContentDescriptor.getRunnerLayoutUi());
|
||||
return descriptor;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private XDebugProcess jvmProcessToDebug(@NotNull XDebugSession session,
|
||||
ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment env) throws ExecutionException {
|
||||
private static XDebugProcess jvmProcessToDebug(
|
||||
@NotNull XDebugSession session,
|
||||
ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment env
|
||||
) throws ExecutionException {
|
||||
String debugPort = String.valueOf(state.getDebugPort());
|
||||
RemoteConnection connection = state.isDebugServerProcess()
|
||||
? new RemoteConnection(true, "127.0.0.1", debugPort, true)
|
||||
@@ -135,8 +143,10 @@ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private RunContentDescriptor createProcessToDebug(ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment env) throws ExecutionException {
|
||||
private static RunContentDescriptor createProcessToDebug(
|
||||
ExternalSystemRunnableState state,
|
||||
@NotNull ExecutionEnvironment env
|
||||
) throws ExecutionException {
|
||||
|
||||
RunContentDescriptor result;
|
||||
|
||||
@@ -145,8 +155,7 @@ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner {
|
||||
@Override
|
||||
@NotNull
|
||||
public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
|
||||
XDebugProcess nonJvmDebugProcess = state.startDebugProcess(session, env);
|
||||
return nonJvmDebugProcess != null ? nonJvmDebugProcess : jvmProcessToDebug(session, state, env);
|
||||
return jvmProcessToDebug(session, state, env);
|
||||
}
|
||||
}).getRunContentDescriptor();
|
||||
}
|
||||
|
||||
@@ -44,10 +44,9 @@ import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.task.RunConfigurationTaskState;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.net.NetUtils;
|
||||
import com.intellij.util.text.DateFormatUtil;
|
||||
import com.intellij.xdebugger.XDebugProcess;
|
||||
import com.intellij.xdebugger.XDebugSession;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -117,8 +116,10 @@ public class ExternalSystemRunnableState extends UserDataHolderBase implements R
|
||||
public ServerSocket getForkSocket() {
|
||||
if (myForkSocket == null && !Boolean.getBoolean("external.system.disable.fork.debugger")) {
|
||||
try {
|
||||
boolean isRemoteRun = ExternalSystemExecutionAware.getExtensions(mySettings.getExternalSystemId()).stream()
|
||||
.anyMatch(aware -> aware.isRemoteRun(myConfiguration, myProject));
|
||||
boolean isRemoteRun = ContainerUtil.exists(
|
||||
ExternalSystemExecutionAware.getExtensions(mySettings.getExternalSystemId()),
|
||||
aware -> aware.isRemoteRun(myConfiguration, myProject)
|
||||
);
|
||||
myForkSocket = new ServerSocket(0, 0, findAddress(isRemoteRun));
|
||||
}
|
||||
catch (IOException e) {
|
||||
@@ -399,10 +400,4 @@ public class ExternalSystemRunnableState extends UserDataHolderBase implements R
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public XDebugProcess startDebugProcess(@NotNull XDebugSession session,
|
||||
@NotNull ExecutionEnvironment env) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user