assert that index queries are to be performed in a read action

This commit is contained in:
peter
2015-05-21 08:08:09 +02:00
parent e149b3dc6b
commit d31fb8b83f
@@ -804,7 +804,8 @@ public class FileBasedIndexImpl extends FileBasedIndex {
@Nullable GlobalSearchScope filter,
@Nullable VirtualFile restrictedFile) {
ProgressManager.checkCanceled();
myContentlessIndicesUpdateQueue.ensureUpToDate(); // some content full indices depends on contentless ones
myContentlessIndicesUpdateQueue.ensureUpToDate(); // some contentful indices depends on contentless ones
ApplicationManager.getApplication().assertReadAccessAllowed();
if (!needsFileContentLoading(indexId)) {
return; //indexed eagerly in foreground while building unindexed file list
}