do not allow to run Task from non-EDT thread in tests

this commit reverts e5b44d6d5a
This commit is contained in:
Aleksey Pivovarov
2016-05-24 17:47:40 +03:00
committed by Aleksey Pivovarov
parent 7d258bc82a
commit 3fcf6ff7eb
@@ -301,12 +301,8 @@ public class CoreProgressManager extends ProgressManager implements Disposable {
@Override
public void run(@NotNull final Task task) {
if (task.isHeadless()) {
if (ApplicationManager.getApplication().isDispatchThread()) {
runProcessWithProgressSynchronously(task, null);
}
else {
new TaskRunnable(task, new EmptyProgressIndicator()).run();
}
ApplicationManager.getApplication().assertIsDispatchThread();
runProcessWithProgressSynchronously(task, null);
}
else if (task.isModal()) {
runProcessWithProgressSynchronously(task.asModal(), null);