custom CompletionContributor not working in JAVA language method string parameter

Answered

Hello, in my plugin development, I try to do a simple example, but it's not working, nothing happened.

I following the question to put breakpoints but it wasn't trigger.

Q: My completion is not working! How do I debug it? 

here is my code, help me please, thanks.

contributor

<extensions defaultExtensionNs="com.intellij">
<completion.contributor language="JAVA" order="first"
implementationClass="com.github.chengyuxing.plugin.rabbit.sql.file.XqlNameCompletionContributor"/>
</extensions>

here, when I typing 'hell', nothing happened.

0
2 comments

another way implement ReferenceContributor,

public class XqlNameReference extends PsiReferenceBase<PsiElement> implements PsiPolyVariantReference {
...
@Override
    public Object @NotNull [] getVariants() {
        System.out.println(1);
        var properties = Stream.of("&my.other", "&my.users", "my.me")
//                .map(s -> LookupElementBuilder.create(s).withIcon(XqlIcons.FILE))
                ;
        return properties.toArray();
    }
}

method getVariants() never called, why?

didn't get any suggestions.

0

I found I already implemented, the reason is macOS Ctrl+Space conflict with idea, and CompletionConfidence help me resolved.

done!

0

Please sign in to leave a comment.