oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.29k stars 739 forks source link

fix annotation regression #4516

Closed vladak closed 5 months ago

vladak commented 6 months ago

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.