diff options
Diffstat (limited to 'java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java')
-rw-r--r-- | java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java b/java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java index daf2e3002dd2..34c3ff505af7 100644 --- a/java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java +++ b/java/java-impl/src/com/intellij/codeInsight/hint/api/impls/MethodParameterInfoHandler.java @@ -20,6 +20,7 @@ import com.intellij.codeInsight.CodeInsightBundle; import com.intellij.codeInsight.CodeInsightSettings; import com.intellij.codeInsight.completion.JavaCompletionUtil; import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; +import com.intellij.codeInsight.javadoc.JavaDocInfoGenerator; import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.lang.parameterInfo.*; import com.intellij.openapi.project.DumbAware; @@ -450,12 +451,12 @@ public class MethodParameterInfoHandler implements ParameterInfoHandlerWithTabAc final PsiJavaCodeReferenceElement element = annotation.getNameReferenceElement(); if (element != null) { final PsiElement resolved = element.resolve(); - if (resolved instanceof PsiClass && !AnnotationUtil.isAnnotated((PsiClass)resolved, "java.lang.annotation.Documented", false, true)) { + if (resolved instanceof PsiClass && !JavaDocInfoGenerator.isDocumentedAnnotationType(resolved)) { continue; } String referenceName = element.getReferenceName(); - if (shownAnnotations.add(referenceName) || isRepeatableAnnotation(resolved)) { + if (shownAnnotations.add(referenceName) || JavaDocInfoGenerator.isRepeatableAnnotationType(resolved)) { if (lastSize != buffer.length()) buffer.append(" "); buffer.append("@").append(referenceName); } @@ -464,10 +465,6 @@ public class MethodParameterInfoHandler implements ParameterInfoHandlerWithTabAc if (lastSize != buffer.length()) buffer.append(" "); } - private static boolean isRepeatableAnnotation(PsiElement resolved) { - return resolved instanceof PsiClass && !AnnotationUtil.isAnnotated((PsiModifierListOwner)resolved, CommonClassNames.JAVA_LANG_ANNOTATION_REPEATABLE, false, true); - } - @Override public void updateUI(final Object p, @NotNull final ParameterInfoUIContext context) { if (p instanceof CandidateInfo) { |