mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
contentsChanged event for file outside indexablesets doesn't add the file for filesToBeIndexed
This commit is contained in:
@@ -1791,8 +1791,8 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
||||
|
||||
clearUpToDateStateForPsiIndicesOfUnsavedDocuments(file);
|
||||
|
||||
// the file is for sure not a dir and it was previously indexed by at least one index AND it belongs to some update set
|
||||
if (!isTooLarge(file) && getIndexableSetForFile(file) != null) myChangedFilesCollector.scheduleForUpdate(file);
|
||||
// the file is for sure not a dir and it was previously indexed by at least one index
|
||||
if (!isTooLarge(file)) myChangedFilesCollector.scheduleForUpdate(file);
|
||||
}
|
||||
}
|
||||
else if (!fileIndexedStatesToUpdate.isEmpty()) { // file was removed, its data should be (lazily) wiped for every index
|
||||
@@ -1854,10 +1854,10 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
||||
}
|
||||
}
|
||||
|
||||
if (scheduleForUpdate) {
|
||||
if (resetStamp) IndexingStamp.flushCache(fileId);
|
||||
myChangedFilesCollector.scheduleForUpdate(file);
|
||||
}
|
||||
if (scheduleForUpdate) {
|
||||
if (resetStamp) IndexingStamp.flushCache(fileId);
|
||||
myChangedFilesCollector.scheduleForUpdate(file);
|
||||
}
|
||||
|
||||
if (!myUpToDateIndicesForUnsavedOrTransactedDocuments.isEmpty()) {
|
||||
clearUpToDateStateForPsiIndicesOfUnsavedDocuments(file);
|
||||
@@ -1922,6 +1922,12 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
||||
}
|
||||
|
||||
void scheduleForUpdate(VirtualFile file) {
|
||||
if (!(file instanceof DeletedVirtualFileStub)) {
|
||||
IndexableFileSet setForFile = getIndexableSetForFile(file);
|
||||
if (setForFile == null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final int fileId = Math.abs(getIdMaskingNonIdBasedFile(file));
|
||||
final VirtualFile previousVirtualFile = myFilesToUpdate.put(fileId, file);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user