private boolean domKnowsBetter(final CompletionParameters parameters, final CompletionResultSet result) {
    final XmlAttributeValue element = PsiTreeUtil.getParentOfType(parameters.getPosition(), XmlAttributeValue.class);
    if (element == null) {
      return false;
    }

    if (isSchemaEnumerated(element)) {
      return false;
    }
    final PsiElement parent = element.getParent();
    if (parent instanceof XmlAttribute) {
      XmlAttributeDescriptor descriptor = ((XmlAttribute)parent).getDescriptor();
      if (descriptor != null && descriptor.getDefaultValue() != null) {
        final PsiReference[] references = myProvider.getReferencesByElement(element, new ProcessingContext());
        if (references.length > 0) {
          return LegacyCompletionContributor.completeReference(parameters, result);
        }
      }
    }
    return false;
  }
private boolean domKnowsBetter(final CompletionParameters parameters, final CompletionResultSet result)