mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/docker/remote-run'
Conflicts: platform/util/resources/misc/registry.properties
This commit is contained in:
@@ -39,6 +39,7 @@ import javax.swing.JList
|
||||
|
||||
abstract class RemoteVmConnection : VmConnection<Vm>() {
|
||||
var port = -1
|
||||
var isLocalAddress = true
|
||||
|
||||
private val connectCancelHandler = AtomicReference<() -> Unit>()
|
||||
|
||||
@@ -47,6 +48,7 @@ abstract class RemoteVmConnection : VmConnection<Vm>() {
|
||||
@JvmOverloads
|
||||
fun open(address: InetSocketAddress, stopCondition: Condition<Void>? = null): Promise<Vm> {
|
||||
port = address.port
|
||||
isLocalAddress = address.getAddress().isAnyLocalAddress() || address.getAddress().isLoopbackAddress()
|
||||
setState(ConnectionStatus.WAITING_FOR_CONNECTION, "Connecting to ${address.hostName}:${port}")
|
||||
val result = AsyncPromise<Vm>()
|
||||
val future = ApplicationManager.getApplication().executeOnPooledThread {
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@ import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.ExecutionResult;
|
||||
import com.intellij.execution.configurations.RunConfiguration;
|
||||
import com.intellij.execution.configurations.RunProfile;
|
||||
import com.intellij.execution.configurations.RunProfileState;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.util.net.NetUtils;
|
||||
import com.intellij.xdebugger.XDebugProcess;
|
||||
@@ -32,7 +33,7 @@ import java.net.InetSocketAddress;
|
||||
|
||||
public interface DebuggableRunConfiguration extends RunConfiguration {
|
||||
@NotNull
|
||||
default InetSocketAddress computeDebugAddress() throws ExecutionException {
|
||||
default InetSocketAddress computeDebugAddress(RunProfileState state) throws ExecutionException {
|
||||
try {
|
||||
return new InetSocketAddress(InetAddress.getLoopbackAddress(), NetUtils.findAvailableSocketPort());
|
||||
}
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ public abstract class RemoteDebugConfiguration extends LocatableConfigurationBas
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public InetSocketAddress computeDebugAddress() {
|
||||
public InetSocketAddress computeDebugAddress(RunProfileState state) {
|
||||
if (host == null) {
|
||||
return new InetSocketAddress(InetAddress.getLoopbackAddress(), port);
|
||||
}
|
||||
|
||||
@@ -760,3 +760,6 @@ ide.intellij.laf.win10.ui.description=Enables Windows 10 look
|
||||
ide.http.server.response.actual.status=false
|
||||
ide.rest.api.requests.per.minute=30
|
||||
ide.built.in.web.server.activatable=false
|
||||
|
||||
NodeJS.Docker=false
|
||||
NodeJS.Docker.description=Enables Node.JS remote execution with Docker (if Docker and Node.JS plugins are installed)
|
||||
|
||||
@@ -114,7 +114,8 @@ public class SemVer implements Comparable<SemVer> {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static SemVer parseFromTextNonNullize(@NotNull final String text) {
|
||||
public static SemVer parseFromTextNonNullize(@Nullable final String text) {
|
||||
if (text == null) return UNKNOWN;
|
||||
final SemVer ver = parseFromText(text);
|
||||
return ver == null ? UNKNOWN : ver;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
myConfig = runConfiguration;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public ExecutionResult execute(Executor executor, final CommandLinePatcher... patchers) throws ExecutionException {
|
||||
if (myConfig.showCommandLineAfterwards()) {
|
||||
@@ -71,7 +70,10 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
PyConsoleOptions.getInstance(myConfig.getProject()).getPythonConsoleSettings());
|
||||
|
||||
runner.runSync();
|
||||
|
||||
// runner.getProcessHandler() would be null if execution error occurred
|
||||
if (runner.getProcessHandler() == null) {
|
||||
return null;
|
||||
}
|
||||
List<AnAction> actions = Lists.newArrayList(createActions(runner.getConsoleView(), runner.getProcessHandler()));
|
||||
|
||||
return new DefaultExecutionResult(runner.getConsoleView(), runner.getProcessHandler(), actions.toArray(new AnAction[actions.size()]));
|
||||
|
||||
Reference in New Issue
Block a user