mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more stub+ast diagnostics
This commit is contained in:
@@ -94,7 +94,10 @@ public class StubTreeLoaderImpl extends StubTreeLoader {
|
||||
return null;
|
||||
}
|
||||
|
||||
boolean wasIndexedAlready = FileBasedIndexImpl.isFileIndexed(vFile, StubUpdatingIndex.INDEX_ID);
|
||||
boolean wasIndexedAlready = ((FileBasedIndexImpl)FileBasedIndex.getInstance()).isFileUpToDate(vFile);
|
||||
|
||||
Document document = FileDocumentManager.getInstance().getCachedDocument(vFile);
|
||||
boolean saved = document == null || FileDocumentManager.getInstance().isDocumentUnsaved(document);
|
||||
|
||||
final List<SerializedStubTree> datas = FileBasedIndex.getInstance().getValues(StubUpdatingIndex.INDEX_ID, id, GlobalSearchScope
|
||||
.fileScope(project, vFile));
|
||||
@@ -111,6 +114,7 @@ public class StubTreeLoaderImpl extends StubTreeLoader {
|
||||
ObjectStubTree tree = stub instanceof PsiFileStub ? new StubTree((PsiFileStub)stub) : new ObjectStubTree((ObjectStubBase)stub, true);
|
||||
tree.setDebugInfo("created from index: " + StubUpdatingIndex.getIndexingStampInfo(vFile) +
|
||||
", wasIndexedAlready=" + wasIndexedAlready +
|
||||
", saved=" + saved +
|
||||
", queried at " + vFile.getTimeStamp());
|
||||
return tree;
|
||||
}
|
||||
|
||||
@@ -1718,9 +1718,13 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isFileUpToDate(VirtualFile file) {
|
||||
return !myChangedFilesCollector.myFilesToUpdate.contains(file);
|
||||
}
|
||||
|
||||
void processRefreshedFile(@NotNull Project project, @NotNull final com.intellij.ide.caches.FileContent fileContent) {
|
||||
myChangedFilesCollector.ensureAllInvalidateTasksCompleted();
|
||||
myChangedFilesCollector.processFileImpl(project, fileContent, false); // ProcessCanceledException will cause readding the file to processing list
|
||||
myChangedFilesCollector.processFileImpl(project, fileContent, false); // ProcessCanceledException will cause re-adding the file to processing list
|
||||
}
|
||||
|
||||
public void indexFileContent(@Nullable Project project, @NotNull com.intellij.ide.caches.FileContent content) {
|
||||
@@ -2347,7 +2351,7 @@ public class FileBasedIndexImpl extends FileBasedIndex {
|
||||
(isMock(file) || !isFileIndexed(file, indexId));
|
||||
}
|
||||
|
||||
public static boolean isFileIndexed(VirtualFile file, ID<?, ?> indexId) {
|
||||
private static boolean isFileIndexed(VirtualFile file, ID<?, ?> indexId) {
|
||||
ID id = IndexInfrastructure.getStubId(indexId, file.getFileType());
|
||||
return IndexingStamp.isFileIndexed(file, id, IndexInfrastructure.getIndexCreationStamp(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user