Auto complete for plugin

hi everybody
i am working on a plugin for some xml based config file and wanna enable auto complete so i begin searching and realised that i must override the PsiElement.getVariants and provide some variation in PsiReference to those elements BUT i have some questions
1- if i subclassed the XmlTag and XmlAttribute and provide them with my custom PsiReference, HOW TO REGISTER THESE CLASSES TO MAKE IDEA USE THEM NOT THE ORIGINAL IMPLEMENTATION

2- while browsing this forum i notice that u r using some classes which i cannot find in the whole classpath of the plugin project such as
CompletionData,CompletionUtil,ReferenceProvidersRegistry
so where r these classes and where to find anyting about them

by joseph

1 comment

1. did you overriden the getReference method ?


hi everybody
i am working on a plugin for some xml based config file and wanna enable auto complete so i begin searching and realised that i must override the PsiElement.getVariants and provide some variation in PsiReference to those elements BUT i have some questions
1- if i subclassed the XmlTag and XmlAttribute and provide them with my custom PsiReference, HOW TO REGISTER THESE CLASSES TO MAKE IDEA USE THEM NOT THE ORIGINAL IMPLEMENTATION

2- while browsing this forum i notice that u r using some classes which i cannot find in the whole classpath of the plugin project such as
CompletionData,CompletionUtil,ReferenceProvidersRegistry
so where r these classes and where to find anyting about them

by joseph

0

Please sign in to leave a comment.