Comments, plain text code completion Follow
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
Please sign in to leave a comment.
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.
Could you please be more specific. How to use CompletionData, how can I add my items in it? Thanks.
http://www.google.com/codesearch?q=intellij+ompletionData&hl=zh-CN&btnG=%E6%90%9C%E7%B4%A2%E4%BB%A3%E7%A0%81
These are some demos, and you can take a look and try.