public static Schema fromProjectFile(Project project, Path file) {
        Optional<PsiFile> psiFile = Files.open(file, project);
        if (psiFile.isEmpty())
            throw new IllegalArgumentException("Could not find file '" + file + "'");
        if ( ! (psiFile.get() instanceof SdFile))
            throw new IllegalArgumentException(file + " is not a schema file");
        return new Schema((SdFile)psiFile.get());
    }
Returns the profile of the given name from the given file.

@throws IllegalArgumentException if not found
integration/intellij/src/main/java/ai/vespa/intellij/schema/model/Schema.java