How to identify the code of the ES6 specification in <script></script> for reference

Hello,

I'm writing a plug-in for a special language. This language consists of a single file (including HTML, CSS, JS, like vue.js). When I use the ES6 standard export module:

How can I get the firstFun as reference at the cursor? 

 

I have a successful sample, but it is through modual.exports={},

I can get a JSObjectLiteralExpression object through the following code, and the JSObjectLiteralExpression can help me find firstFun through other function.

 

but when I do this, I can only get XmlText in the first case when run the first getChildren(),not  JSEmbeddedContent(in the second case) . The JSEmbeddedContent can help me get the JSObjectLiteralExpression finally,but the XmlText can't.

 

Any help? thanks,

ML

0
1 comment

Vue plugin uses a combination of com.intellij.lang.javascript.completion.JSSmartCompletionContributor and com.intellij.lang.javascript.JavaScriptSpecificHandlersFactory to provide completion and navigation for such cases. In general, it boils down to finding a module and producing lookup elements for completion and resolve results for navigation via specific properties (method property children in your case)

 

1

Please sign in to leave a comment.