[jbosstools-dev] Playing with Tern

Victor Rubezhny vrubezhny at exadel.com
Thu Mar 13 10:19:29 EDT 2014


Hi, guys!

While playing with Tern I was able to make a very simple plugin that 
allows to show 'cordova' object and some of its members in Content Assist.



This is a very first and simple script that shows 'cordova' object and 
its members in content assistant without requiring to have any kind of 
cordova.js included to a project.
But it requires:
- to have Tern.java (updated with cordovajs.js plugin)
- to have Tern nature enabled on your project
- to have cordovajs plug-in enabled in project's Turn preferences.

You can look at the code changes in my branch on GitHub: 
https://github.com/vrubezhny/tern.java/tree/cordovajs (currently it's 
rebased over agelozerr's master)
There are no any special inference done due to get some objects/values 
from the modules that are loaded by require/define functionality.
This probably will require more sophisticated coding to be done.

/Victor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20140313/e3ed3b9e/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cordova-object-content-assist.png
Type: image/png
Size: 293180 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20140313/e3ed3b9e/attachment-0001.png 


More information about the jbosstools-dev mailing list