diff options
Diffstat (limited to 'platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution')
2 files changed, 5 insertions, 16 deletions
diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskDebugRunner.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskDebugRunner.java index 71b74f6e2272..86d1b6138f0d 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskDebugRunner.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskDebugRunner.java @@ -17,7 +17,6 @@ package com.intellij.openapi.externalSystem.service.execution; import com.intellij.debugger.impl.GenericDebuggerRunner; import com.intellij.execution.ExecutionException; -import com.intellij.execution.Executor; import com.intellij.execution.configurations.RemoteConnection; import com.intellij.execution.configurations.RunProfile; import com.intellij.execution.configurations.RunProfileState; @@ -26,7 +25,6 @@ import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.execution.ui.RunContentDescriptor; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.externalSystem.util.ExternalSystemConstants; -import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -35,8 +33,7 @@ import org.jetbrains.annotations.Nullable; * @since 6/7/13 11:18 AM */ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner { - - private static final Logger LOG = Logger.getInstance("#" + ExternalSystemTaskDebugRunner.class.getName()); + private static final Logger LOG = Logger.getInstance(ExternalSystemTaskDebugRunner.class); @NotNull @Override @@ -51,16 +48,12 @@ public class ExternalSystemTaskDebugRunner extends GenericDebuggerRunner { @Nullable @Override - protected RunContentDescriptor createContentDescriptor(Project project, - RunProfileState state, - RunContentDescriptor contentToReuse, - ExecutionEnvironment env) throws ExecutionException - { + protected RunContentDescriptor createContentDescriptor(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException { if (state instanceof ExternalSystemRunConfiguration.MyRunnableState) { int port = ((ExternalSystemRunConfiguration.MyRunnableState)state).getDebugPort(); if (port > 0) { RemoteConnection connection = new RemoteConnection(true, "127.0.0.1", String.valueOf(port), true); - return attachVirtualMachine(project, state, contentToReuse, env, connection, true); + return attachVirtualMachine(state, environment, connection, true); } else { LOG.warn("Can't attach debugger to external system task execution. Reason: target debug port is unknown"); diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskRunner.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskRunner.java index 90ca62f1bd54..d45be42bbbd9 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskRunner.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemTaskRunner.java @@ -51,12 +51,8 @@ public class ExternalSystemTaskRunner extends GenericProgramRunner { protected RunContentDescriptor doExecute(@NotNull Project project, @NotNull RunProfileState state, RunContentDescriptor contentToReuse, - @NotNull ExecutionEnvironment env) throws ExecutionException - { + @NotNull ExecutionEnvironment env) throws ExecutionException { ExecutionResult executionResult = state.execute(env.getExecutor(), this); - if (executionResult == null) return null; - - final RunContentBuilder contentBuilder = new RunContentBuilder(this, executionResult, env); - return contentBuilder.showRunContent(contentToReuse); + return executionResult == null ? null : new RunContentBuilder(executionResult, env).showRunContent(contentToReuse); } } |