NlsInfo (String qualifiedName, Supplier<? extends UExpression> capitalization) { if (qualifiedName == null) return NlsUnspecified.UNKNOWN; if (qualifiedName.equals(AnnotationUtil.NON_NLS) || qualifiedName.equals(AnnotationUtil.PROPERTY_KEY)) { return NonLocalized.INSTANCE; } if (qualifiedName.equals(NLS_SAFE) || qualifiedName.equals("org.intellij.lang.annotations.RegExp")) { return NlsSafe.INSTANCE; } if (qualifiedName.equals(AnnotationUtil.NLS)) { UExpression value = capitalization.get(); String name = null; if (value instanceof UReferenceExpression) { // Java plugin returns reference for enum constant in annotation value name = ((UReferenceExpression)value).getResolvedName(); } if (name != null) { if (Capitalization.Title.name().equals(name)) { return Localized.NLS_TITLE; } if (Capitalization.Sentence.name().equals(name)) { return Localized.NLS_SENTENCE; } } return Localized.NLS; } return NlsUnspecified.UNKNOWN; }