mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Run console progresses from EDT.
This commit is contained in:
@@ -157,16 +157,21 @@ public class PydevConsoleRunner extends AbstractConsoleRunnerWithHistory<PythonC
|
||||
|
||||
myCommandLineArgumentsProvider = createCommandLineArgumentsProvider(mySdk, myEnvironmentVariables, myPorts);
|
||||
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(getProject(), "Connecting to console", false) {
|
||||
public void run(@NotNull final ProgressIndicator indicator) {
|
||||
indicator.setText("Connecting to console...");
|
||||
try {
|
||||
initAndRun(myStatementsToExecute);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
LOG.warn("Error running console", e);
|
||||
ExecutionHelper.showErrors(myProject, Arrays.<Exception>asList(e), getTitle(), null);
|
||||
}
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ProgressManager.getInstance().run(new Task.Backgroundable(getProject(), "Connecting to console", false) {
|
||||
public void run(@NotNull final ProgressIndicator indicator) {
|
||||
indicator.setText("Connecting to console...");
|
||||
try {
|
||||
initAndRun(myStatementsToExecute);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
LOG.warn("Error running console", e);
|
||||
ExecutionHelper.showErrors(myProject, Arrays.<Exception>asList(e), getTitle(), null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user