private static @Nullable XmlFile findSchemaFile(VirtualFile resourceFile, PsiFile baseFile) {
    PsiFile psiFile = baseFile.getManager().findFile(resourceFile);
    return psiFile instanceof XmlFile ? (XmlFile)psiFile : null;
  }
private static @Nullable XmlFile findSchemaFile(VirtualFile resourceFile, PsiFile baseFile)