Comments, plain text code completion

Hi,

I would like to contribute few items to code completion in text files
and in comments (java, javascript and so on). I found nice demo by
Sascha http://intellij.net/forums/message.jspa?messageID=5047098#5047098
(btw, good candidate for FAQ I think)
it works ok on xml file.
I was thinking that if I change:
registry.registerReferenceProvider(XmlTag.class, new
PsiReferenceProvider());
to
registry.registerReferenceProvider(PsiPlainText.class, new
PsiReferenceProvider();
or to:
registry.registerReferenceProvider(PsiComment.class, new
PsiReferenceProvider();
it will work as good as it was working with xml. But I was wrong. This
PsiReferenceProvider never gets called.

Is it possible to add completion items to plain text and comments
completion?

Thanks a lot.

-s

3 comments

CompletionData may be another choice, now I use it to implement code completion in xml text. I think psiReference maybe the good solution, but I failed to implement code completion.

0

Could you please be more specific. How to use CompletionData, how can I add my items in it? Thanks.

0

Please sign in to leave a comment.