Code completion package names in custom language plugin


Is ist possible to get code completion for package names in a custom language plugin?


Thanks for your help


Comment actions Permalink
Official comment

Of course. CompletionContributor javadoc describes how to add completion, and JavaPsiFacade#findPackage and PsiPackage#getChildren can help you generate the variants.

Comment actions Permalink

Thank you very much Peter.


I already have a completion contributor implemented in my plugin and added some keywords, which popup.

Do you have an example for me how to get the package names of a project and how I add these to my completion contributor?


Please sign in to leave a comment.