mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-197127 Restart tests opens a new tab instead of reusing current tab
After-review refactoring
This commit is contained in:
@@ -84,12 +84,12 @@ public abstract class ExecutionManagerImpl extends ExecutionManager implements D
|
||||
return processHandler != null && !processHandler.isProcessTerminated();
|
||||
}
|
||||
|
||||
private static void start(@NotNull ExecutionEnvironment environment) {
|
||||
private static void restart(@NotNull ExecutionEnvironment environment) {
|
||||
//start() can be called during restartRunProfile() after pretty long 'awaitTermination()' so we have to check if the project is still here
|
||||
if (environment.getProject().isDisposed()) return;
|
||||
|
||||
RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings();
|
||||
ProgramRunnerUtil.executeConfiguration(environment, settings != null && settings.isEditBeforeRun(), environment.getExecutionId() == 0);
|
||||
ProgramRunnerUtil.executeConfiguration(environment, settings != null && settings.isEditBeforeRun(), true);
|
||||
}
|
||||
|
||||
private static boolean userApprovesStopForSameTypeConfigurations(Project project, String configName, int instancesCount) {
|
||||
@@ -418,8 +418,7 @@ public abstract class ExecutionManagerImpl extends ExecutionManager implements D
|
||||
}
|
||||
}
|
||||
myAwaitingRunProfiles.remove(environment.getRunProfile());
|
||||
environment.setExecutionId(0);// At restart we have to assign new execution ID and therefore reuse 'just stopped' contents if any
|
||||
start(environment);
|
||||
restart(environment);
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user