How to implement custom code completion in javascript?

The following is the code with prototypejs used:
$(link).addClassName("category_selected");
I wonder how to implement code completion for CSS selector in my plugin. Should I use registry.registerReferenceProvider?

0
3 comments

Sorry, i don't get the question. What is your plugin? What do you want to complete? In which context?

0

Hi Jay, I want to make a plugin to extend JavaScript plugin add some special features for javascript frameworks, such as Prototype, ExtJS. I want to add code completion for config parameter, css selector name, id code completion in different frameworks.

0
Avatar
Permanently deleted user

No, there is already a reference in string literal that should be
extended to include css or id reference. You can look in JavaScript
plugin sources and even send patches for desired functionality :)

linux_china wrote:

The following is the code with prototypejs used:
$(link).addClassName("category_selected");
I wonder how to implement code completion for CSS selector in my plugin. Should I use registry.registerReferenceProvider?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.