@Override
    public PsiElement getTarget(DataContext dataContext) {
        final Project project = CommonDataKeys.PROJECT.getData(dataContext);
        final Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
        if (project == null || editor == null) return null;

        final PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
        if (file == null) {
            return null;
        }
        final PsiElement element = file.findElementAt(editor.getCaretModel().getOffset());
        if (element == null) {
            return null;
        }

        if (element instanceof SdIdentifierVal || element.getParent() instanceof SdIdentifierVal) {
            PsiReference ref = element instanceof SdIdentifierVal ? element.getReference() : element.getParent().getReference();
            if (ref == null) {
                return null;
            }
            PsiElement resolvedRef = ref.resolve();
            if (resolvedRef instanceof SdFunctionDefinition) {
                return resolvedRef;
            }
        }
        return null;
    }
This class is used for the extension (in plugin.xml), to enable "Call Hierarchy" window using the plugin code.

@author Shahar Ariel
integration/intellij/src/main/java/ai/vespa/intellij/schema/hierarchy/SdCallHierarchyProvider.java