@Override
    public String getNodeText(PsiElement element, boolean useFullName) {
        if (element instanceof SdIdentifierVal || element instanceof SdIdentifierWithDashVal) {
            String name = ((PsiNamedElement) element).getName();
            return name != null ? name : "";
        } else if (element instanceof SdDeclaration) {
            String fullText = element.getNode().getText();
            return fullText.substring(0, fullText.indexOf('{'));
        } else {
            return "";
        }
    }
This class is used for the extension (in plugin.xml), to enable "find Usages" window using the plugin code.

@author Shahar Ariel
integration/intellij/src/main/java/ai/vespa/intellij/schema/findUsages/SdFindUsagesProvider.java