"Show command line ..." breaks Coverage, Profiler and Concurrency Diagram (PY-27431)

It looks like this option is useless for these actions. It isn't available for Test run configurations - the most frequent use case for coverage. An output console isn't available for Concurrency Diagram, so users can't type any commands there. It doesn't work correctly with profiler's wrapping.
This commit is contained in:
Elizaveta Shashkova
2017-12-18 17:39:24 +03:00
parent f77e98980f
commit f61aff69fb
@@ -26,6 +26,7 @@ import com.intellij.execution.configurations.ParametersList;
import com.intellij.execution.configurations.ParamsGroup;
import com.intellij.execution.console.ConsoleExecuteAction;
import com.intellij.execution.executors.DefaultDebugExecutor;
import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.filters.UrlFilter;
import com.intellij.execution.process.OSProcessHandler;
import com.intellij.execution.process.ProcessHandler;
@@ -72,6 +73,11 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
Project project = myConfig.getProject();
if (myConfig.showCommandLineAfterwards() && !myConfig.emulateTerminal()) {
if (executor.getId() != DefaultDebugExecutor.EXECUTOR_ID && executor.getId() != DefaultRunExecutor.EXECUTOR_ID) {
// disable "Show command line" for all executors except of Run and Debug, because it's useless
return super.execute(executor, processStarter, patchers);
}
if (executor.getId() == DefaultDebugExecutor.EXECUTOR_ID) {
return super.execute(executor, processStarter, ArrayUtil.append(patchers, new CommandLinePatcher() {
@Override