@Override
    public Object[] getVariants() {
        List<SdDeclaration> declarations = SdUtil.findDeclarations(myElement.getContainingFile());
        List<LookupElement> variants = new ArrayList<>();
        for (final SdDeclaration element : declarations) {
            if (element.getName() != null && element.getName().length() > 0) {
                variants.add(LookupElementBuilder
                                 .create(element).withIcon(SdIcons.FILE)
                                 .withTypeText(element.getContainingFile().getName())
                );
            }
        }
        return variants.toArray();
    }
A reference to a Psi Element.

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