[jbosstools-dev] Playing with Tern

Victor Rubezhny vrubezhny at exadel.com
Thu Mar 13 18:50:36 EDT 2014


On 03/14/2014 02:38 AM, Denis Golovin wrote:
> On 03/13/2014 07:45 AM, Victor Rubezhny wrote:
>> Angelo,
>>
>> Really appreciate your work and trying to always have projects 
>> up-to-date with your latest changes.
>>
>> We need to add some support cordovajs applications, and it looks like 
>> it's really effective and pretty easy to do with Tern.
>> But, obviously, I need some more time to get some suitable result 
>> here. The current one is a very first and simple code that doesn't 
>> cover all the requirements, so, it's too early to contribute 
>> something back to Tern.
>> Once we decide that we achieved some suitable result, I'll propose it 
>> to be contributed back to Tern.java.
>
> Victor, dot be shy :) This plugin is a good start. Could you at least 
> put it into your fork somewhere?
>
I thought you will peek it up into your fork first :)

The reasons:
1) To play with.
2) To give your opinion on what needs to be fixed and what to do next
3) Isn't your fork a candidate to be a source for JBT?

I'd like Denis and Gorkem to find a time to play with and tell their 
opinion on what needs to be improved.
There are many objects/variables/functions that weren't covered by this 
plugin yet. Adding a support for some of them requires to do a more 
sophisticated processing.
So, I'd like to know what has to be added in addition to what's already 
in. And probably some comments on accuracy (like correctness of types, 
arguments, return values and so on).

I need your opinion.

/Victor

> Thanks
> Denis
>
>
>>
>> Best Regards,
>> Victor
>>
>> On 03/13/2014 06:31 PM, Angelo zerr wrote:
>>> Hi Victor,
>>>
>>> Very cool! I'm very happy that you have tried to write your first 
>>> Tern plugin. I love Tern!
>>>
>>> For your information, I'm studying how to add custom Tern plugin + 
>>> Tern def in Tern IDE.
>>>
>>> I suggest you to synchronizeto my GitHub  because
>>>
>>> 1)  I have improved Tern console (now you have some colors)
>>> 2) completion popop  is improved (Parameters is well formatted in 
>>> the second popup).
>>> 3) if you have optional parameters like config: "fn(config: ?) -> 
>>> !custom:cordovaJSConfig", completion expand it by showing 2 
>>> compeltion items (with and without config parameter).
>>>
>>> IMHO think you should contribute to tern.js. If you want I can host 
>>> your tern plugin for the moment.
>>>
>>> Regards Angelo
>>>
>>>
>>> 2014-03-13 15:19 GMT+01:00 Victor Rubezhny <vrubezhny at exadel.com 
>>> <mailto:vrubezhny at exadel.com>>:
>>>
>>>     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
>>>
>>>
>>>     _______________________________________________
>>>     jbosstools-dev mailing list
>>>     jbosstools-dev at lists.jboss.org
>>>     <mailto:jbosstools-dev at lists.jboss.org>
>>>     https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>>>
>>>
>>
>

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


More information about the jbosstools-dev mailing list