This change restores the ability to get annotations for xref-able files in the UI. The way it works with this change is that if there is a document for given file, it is used for negative check, i.e. if there is no type in the document or the type is not xref-able, the file is considered not eligible for annotation. If no document can be found for the file, the repository will be checked. This way, with some refactoring, it should work for both the UI and the indexer (when annotation cache is created). Using the "xrefable" property as "annotatable" property (not considering the missing document caveat) is not entirely correct, however it is better to leave this for a subsequent PR; the focus of this PR should be the regression fix.
This change restores the ability to get annotations for xref-able files in the UI. The way it works with this change is that if there is a document for given file, it is used for negative check, i.e. if there is no type in the document or the type is not xref-able, the file is considered not eligible for annotation. If no document can be found for the file, the repository will be checked. This way, with some refactoring, it should work for both the UI and the indexer (when annotation cache is created). Using the "xrefable" property as "annotatable" property (not considering the missing document caveat) is not entirely correct, however it is better to leave this for a subsequent PR; the focus of this PR should be the regression fix.