mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
PY-21177 ProcessStarter renamed to PythonProcessStarter
Following suggestion in the code review.
This commit is contained in:
+1
-1
@@ -96,7 +96,7 @@ public class PyCCCommandLineState extends PythonCommandLineState {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Executor executor, ProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
public ExecutionResult execute(Executor executor, PythonProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
CCUtils.updateResources(myRunConfiguration.getProject(), myTask, myTaskDir);
|
||||
ApplicationManager.getApplication().runWriteAction(() -> StudyCheckUtils.flushWindows(myTask, myTaskDir));
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
}
|
||||
|
||||
public ExecutionResult execute(Executor executor,
|
||||
ProcessStarter processStarter,
|
||||
PythonProcessStarter processStarter,
|
||||
CommandLinePatcher... patchers) throws ExecutionException {
|
||||
final ProcessHandler processHandler = startProcess(processStarter, patchers);
|
||||
final ConsoleView console = createAndAttachConsole(myConfig.getProject(), processHandler, executor);
|
||||
@@ -190,7 +190,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
* @param patchers any number of patchers; any patcher may be null, and the whole argument may be null.
|
||||
* @return handler of the started process
|
||||
* @throws ExecutionException
|
||||
* @deprecated use {@link #startProcess(ProcessStarter, CommandLinePatcher...)} instead
|
||||
* @deprecated use {@link #startProcess(PythonProcessStarter, CommandLinePatcher...)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@NotNull
|
||||
@@ -207,7 +207,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
* @throws ExecutionException
|
||||
*/
|
||||
@NotNull
|
||||
protected ProcessHandler startProcess(ProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
protected ProcessHandler startProcess(PythonProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
GeneralCommandLine commandLine = generateCommandLine(patchers);
|
||||
|
||||
// Extend command line
|
||||
@@ -223,7 +223,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected final ProcessStarter getDefaultPythonProcessStarter() {
|
||||
protected final PythonProcessStarter getDefaultPythonProcessStarter() {
|
||||
return (config, commandLine) -> {
|
||||
Sdk sdk = PythonSdkType.findSdkByPath(myConfig.getInterpreterPath());
|
||||
final ProcessHandler processHandler;
|
||||
@@ -600,7 +600,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
|
||||
return new UrlFilter();
|
||||
}
|
||||
|
||||
public interface ProcessStarter {
|
||||
public interface PythonProcessStarter {
|
||||
@NotNull
|
||||
ProcessHandler start(@NotNull AbstractPythonRunConfiguration config,
|
||||
@NotNull GeneralCommandLine commandLine) throws ExecutionException;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class PythonScriptCommandLineState extends PythonCommandLineState {
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Executor executor,
|
||||
ProcessStarter processStarter,
|
||||
PythonProcessStarter processStarter,
|
||||
final CommandLinePatcher... patchers) throws ExecutionException {
|
||||
if (myConfig.showCommandLineAfterwards() && !myConfig.emulateTerminal()) {
|
||||
if (executor.getId() == DefaultDebugExecutor.EXECUTOR_ID) {
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PyRerunFailedTestsAction extends AbstractRerunFailedTestsAction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Executor executor, ProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
public ExecutionResult execute(Executor executor, PythonProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
// Insane rerun tests with out of spec.
|
||||
if (getTestSpecs().isEmpty()) {
|
||||
throw new ExecutionException(PyBundle.message("runcfg.tests.cant_rerun"));
|
||||
|
||||
@@ -120,7 +120,7 @@ public abstract class PythonTestCommandLineStateBase<T extends AbstractPythonRun
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExecutionResult execute(Executor executor, ProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
public ExecutionResult execute(Executor executor, PythonProcessStarter processStarter, CommandLinePatcher... patchers) throws ExecutionException {
|
||||
final ProcessHandler processHandler = startProcess(processStarter, patchers);
|
||||
final ConsoleView console = createAndAttachConsole(myConfiguration.getProject(), processHandler, executor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user