Skip to content

Missing annotation values for static imports #2580

@juliamcclellan

Description

@juliamcclellan

Some annotation values which are statically imported constants are not showing up in docs. For example, this function has the annotation @RequiresPermission(ACCESS_FINE_LOCATION) where the constant comes from import static android.Manifest.permission.ACCESS_FINE_LOCATION;, but the annotation value shows up as the empty string in the docs. Some annotations in the same file use a set of constant values, which are not showing up at all.

It seems this was addressed in #1845 with the JvmAnnotationAttribute.toValue function in DefaultPsiToDocumentableTranslator, but in this case the attributeValue of the JvmAnnotationAttribute is not a JvmAnnotationEnumFieldValue (it is a PsiAnnotationConstantValue), so that solution doesn't work here:

Screen Shot 2022-07-21 at 11 11 59 AM

Installation
Operating system: macOS
Build tool: Gradle v7.3
Dokka version: 1.6.20-dev-154

Metadata

Metadata

Assignees

Labels

bugfeedback: GoogleAn issue/PR submitted by colleagues at Google, most likely related to the Android API reference docs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions