static @Nullable DomFileElementImpl<?> createFileElement(XmlFile xmlFile) {
    VirtualFile file = xmlFile.getVirtualFile();
    if (!(xmlFile.getFileType() instanceof DomSupportEnabled) || file != null && ProjectCoreUtil.isProjectOrWorkspaceFile(file)) {
      IdempotenceChecker.logTrace("DOM unsupported");
      return null;
    }

    DomFileDescription<?> description = findFileDescription(xmlFile);
    if (IdempotenceChecker.isLoggingEnabled()) {
      IdempotenceChecker.logTrace("DOM file description: " + description);
    }
    if (description == null) {
      return null;
    }

    XmlName xmlName = DomImplUtil.createXmlName(description.getRootTagName(), description.getRootElementClass(), null);
    assert xmlName != null;
    EvaluatedXmlNameImpl rootTagName1 = EvaluatedXmlNameImpl.createEvaluatedXmlName(xmlName, xmlName.getNamespaceKey(), false);

    FileStub stub = null;
    DomFileMetaData meta = DomApplicationComponent.getInstance().findMeta(description);
    if (meta != null && meta.hasStubs() && file instanceof VirtualFileWithId && !isFileParsed(xmlFile)) {
      if (FileBasedIndex.getInstance().getFileBeingCurrentlyIndexed() == null && !XmlUtil.isStubBuilding()) {
        ObjectStubTree<?> stubTree = StubTreeLoader.getInstance().readFromVFile(xmlFile.getProject(), file);
        if (stubTree != null) {
          stub = (FileStub)stubTree.getRoot();
        }
      }
    }

    @SuppressWarnings({"unchecked", "rawtypes"})
    DomFileElementImpl<?> element = new DomFileElementImpl(xmlFile, rootTagName1, description, stub);
    xmlFile.putUserData(DomManagerImpl.CACHED_FILE_ELEMENT, new WeakReference<>(element));
    return element;
  }
static @Nullable DomFileElementImpl<?> createFileElement(XmlFile xmlFile)