protected Schema resolveSchema(PsiElement element) {
        PsiFile file = element.getContainingFile();
        if (file.getVirtualFile().getPath().endsWith(".profile")) {
            Path schemaFile = Path.fromString(file.getVirtualFile().getParent().getPath() + ".sd");
            return ReadAction.compute(() -> Schema.fromProjectFile(element.getProject(), schemaFile));
        }
        else { // schema
            return ReadAction.compute(() -> Schema.fromProjectFile(element.getProject(), Path.fromString(file.getVirtualFile().getPath())));
        }
    }
Returns the schema logically containing this element.
integration/intellij/src/main/java/ai/vespa/intellij/schema/findUsages/UsageFinder.java