String (PsiDocTagValue value) { boolean hasReference = (value != null && value.getFirstChild() != null); if (hasReference) { if (!PsiUtil.isLanguageLevel5OrHigher(value)) { return JavaPsiBundle.message("javadoc.value.tag.jdk15.required"); } } if (value != null) { PsiReference reference = value.getReference(); if (reference != null) { PsiElement target = reference.resolve(); if (target != null) { if (!(target instanceof PsiField)) { return JavaPsiBundle.message("javadoc.value.field.required"); } PsiField field = (PsiField) target; if (!field.hasModifierProperty(PsiModifier.STATIC)) { return JavaPsiBundle.message("javadoc.value.static.field.required"); } if (field.getInitializer() == null || JavaConstantExpressionEvaluator.computeConstantExpression(field.getInitializer(), false) == null) { return JavaPsiBundle.message("javadoc.value.field.with.initializer.required"); } } } } return null; }