Skip to content

Commit

Permalink
Use AnnotationUtil.findAnnotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Sep 25, 2023
1 parent 2e509b4 commit c54eb20
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.demonwav.mcdev.util.constantStringValue
import com.demonwav.mcdev.util.constantValue
import com.demonwav.mcdev.util.extractVarArgs
import com.demonwav.mcdev.util.referencedMethod
import com.intellij.codeInsight.AnnotationUtil
import com.intellij.codeInspection.dataFlow.CommonDataflow
import com.intellij.openapi.project.Project
import com.intellij.psi.CommonClassNames
Expand Down Expand Up @@ -68,7 +69,7 @@ abstract class TranslationIdentifier<T : PsiElement> {

val method = call.referencedMethod ?: return null
val parameter = method.parameterList.getParameter(index) ?: return null
val translatableAnnotation = parameter.getAnnotation(TranslationConstants.TRANSLATABLE_ANNOTATION)
val translatableAnnotation = AnnotationUtil.findAnnotation(parameter, TranslationConstants.TRANSLATABLE_ANNOTATION)
?: return null

val prefix =
Expand Down

0 comments on commit c54eb20

Please sign in to comment.