mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-101776 Gradle: Avoid ide hang on auto-import
Don't call invokeAndWait() from EDT
This commit is contained in:
@@ -581,7 +581,12 @@ public class GradleUtil {
|
||||
};
|
||||
|
||||
if (synchronous) {
|
||||
UIUtil.invokeAndWaitIfNeeded(wrappedTask);
|
||||
if (ApplicationManager.getApplication().isDispatchThread()) {
|
||||
wrappedTask.run();
|
||||
}
|
||||
else {
|
||||
UIUtil.invokeAndWaitIfNeeded(wrappedTask);
|
||||
}
|
||||
}
|
||||
else {
|
||||
UIUtil.invokeLaterIfNeeded(wrappedTask);
|
||||
|
||||
Reference in New Issue
Block a user