List<DomElementProblemDescriptor> (GenericDomValue element, final DomElementAnnotationHolder holder) { if (StringUtil.isEmpty(element.getStringValue())) { final Required required = element.getAnnotation(Required.class); if (required != null && !required.nonEmpty()) return Collections.emptyList(); } final XmlElement valueElement = DomUtil.getValueElement(element); if (valueElement != null && !isSoftReference(element)) { final SmartList<DomElementProblemDescriptor> list = new SmartList<>(); final PsiReference[] psiReferences = myProvider.getReferencesByElement(valueElement, new ProcessingContext()); GenericDomValueReference domReference = ContainerUtil.findInstance(psiReferences, GenericDomValueReference.class); final Converter converter = WrappingConverter.getDeepestConverter(element.getConverter(), element); boolean hasBadResolve = false; if (domReference == null || !isDomResolveOK(element, domReference, converter)) { for (final PsiReference reference : psiReferences) { if (reference != domReference && hasBadResolve(reference)) { hasBadResolve = true; list.add(holder.createResolveProblem(element, reference)); } } final boolean isResolvingConverter = converter instanceof ResolvingConverter; //noinspection unchecked if (!hasBadResolve && (domReference != null || isResolvingConverter && hasBadResolve(domReference = new GenericDomValueReference(element)))) { hasBadResolve = true; final String errorMessage = converter .getErrorMessage(element.getStringValue(), ConvertContextFactory.createConvertContext( DomManagerImpl.getDomInvocationHandler(element))); if (errorMessage != null) { list.add(holder.createResolveProblem(element, domReference)); } } } if (!hasBadResolve && psiReferences.length == 0 && element.getValue() == null && !PsiTreeUtil.hasErrorElements(valueElement)) { final String errorMessage = converter .getErrorMessage(element.getStringValue(), ConvertContextFactory.createConvertContext(DomManagerImpl.getDomInvocationHandler(element))); if (errorMessage != null) { list.add(holder.createProblem(element, errorMessage)); } } return list; } return Collections.emptyList(); }