JSClass and other Psi-likes.
Hi guys.
I'm writing a plugin for Robotlegs users allowing them to navigate to related RL classes.
Because this is actionscript code, the PsiFile for my Action is filled with elements like: JSClass, JSReferenceList, JSReferenceExpression etc.
With the openapi, i don't have access to these classes, but more suprising, JSClass instanceof PsiClass is false..
All the nice helper tools like psiClass.getInterfaces and the PsiTreeUtil seem to fail me at every turn.
Am I doing something fundamentally wrong, or is what I'm trying to do outside the scope of the devkit (because JS-ECMA support is a part of Ultimate?)
Any help would be appreciated.
请先登录再写评论。
Hello Rasheed,
The JavaScript PSI is indeed completely distinct from the Java PSI and does
not implement the same interfaces. You can add the JavaScript plugin to the
dependencies of your plugin and write code that works with the JavaScript
PSI, but at the moment we don't provide any OpenAPI interfaces or documentation
for the JavaScript PSI.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thankyou Dmitry..
For other N00bs like myself, you should note that plugins have their own ClassLoader. To advise the PluginClassLoader to load the classes you need, you may need the plugin.xml node <depends>.
Here's my plugin.xml
Has there been any thought given to exposing the Javascript API through OpenAPI?
For anyone passing through - for details on working with the JS psi tree see here:
http://devnet.jetbrains.com/message/5490721#5490721