summaryrefslogtreecommitdiff
path: root/java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt')
-rw-r--r--java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt b/java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt
index 380d027086bd..d96351180133 100644
--- a/java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt
+++ b/java/java-impl/src/com/intellij/codeInsight/hints/AnnotationInlayProvider.kt
@@ -180,11 +180,9 @@ class AnnotationInlayProvider : InlayHintsProvider<AnnotationInlayProvider.Setti
val psiMethod = (file as PsiJavaFile).classes[0].methods[0]
val factory = PsiElementFactory.getInstance(file.project)
if (psiMethod.parameterList.isEmpty) {
- if (settings.showExternal) {
- PREVIEW_ANNOTATION_KEY.set(psiMethod, factory.createAnnotationFromText("@Deprecated", psiMethod))
- }
+ PREVIEW_ANNOTATION_KEY.set(psiMethod, factory.createAnnotationFromText("@Deprecated", psiMethod))
}
- else if (settings.showInferred)
+ else
PREVIEW_ANNOTATION_KEY.set(psiMethod.parameterList.getParameter(0), factory.createAnnotationFromText("@NotNull", psiMethod))
}