mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
This commit is contained in:
+13
-1
@@ -139,7 +139,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
|
||||
// avoid documents piling up during batch processing
|
||||
if (areTooManyDocumentsInTheQueue(myUnsavedDocuments)) {
|
||||
saveAllDocuments();
|
||||
saveAllDocumentsLater();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,6 +210,18 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
myTrailingSpacesStripper.dropAll();
|
||||
}
|
||||
|
||||
private void saveAllDocumentsLater() {
|
||||
// later because some document might have been blocked by PSI right now
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!ApplicationManager.getApplication().isDisposed()) {
|
||||
saveAllDocuments();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void saveAllDocuments() {
|
||||
ApplicationManager.getApplication().assertIsDispatchThread();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user