Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parsing of static imports in annotation params #2593

Merged
merged 2 commits into from Aug 3, 2022

Conversation

IgnatBeresnev
Copy link
Member

Fixes #2580

import com.intellij.lang.jvm.annotation.JvmAnnotationAttributeValue

/*
* For some reason `PsiAnnotationConstantValue` is package private,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use a public interface JvmAnnotationConstantValue instead of PsiAnnotationConstantValue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, yeah, totally.

I was looking for something like this, but when you open up PsiAnnotationConstantValue and go to declaration of JvmAnnotationConstantValue from the signature - it goes to the kotlin-compiler artifact, where the interface is empty, so I thought there was no other way 🤦

Importing it seems to be fine though

2022-08-03_15-04-12

@IgnatBeresnev IgnatBeresnev merged commit 256740a into master Aug 3, 2022
@IgnatBeresnev IgnatBeresnev deleted the java-constant-static-import branch August 3, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing annotation values for static imports
2 participants