Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Type analisys for JSDT


> has which integrates on IDE
features level such as providing code completion implementations that directly query tern and bypass

Indeed, I tell me if it could be possible to disable the parse of JS by JSDT? If we wish to share the same AST between JSDT and tern.js, we need to execute ternjs with a _javascript_ engine different from node.js (J2V8 which has  better performance than Nashorn for executing ternjs). The only problem is that some tern plugins are linked to node.js (fs module generally) for some features like completion for required modules. But I think we could emulate fs inside J2V8.

Another alternate is typescript language tools but technically it is similar to tern.js with limitations.

Which limitations? IMHO I think TypeScript is very very interesting and not only for TypeScript, but for _javascript_ engine and JSX. Visual Studio uses now TypeScript Service Language API to provide support for _javascript_ (called Salsa).
TypeScript supports too JSX syntax. VSCode integrates TypeScript, _javascript_ and JSX with tsserver which looks like tern server.

The only problem is that TypeScript with tsserver is not extensible (you cannot support custom behaviour of _javascript_ like angular injection like it is done with tern angular1 plugin). But TypeScript guys are working on this issue. See you will see an awesome demo with Angular2. Once this plugin will be available, will benefit it. It's a good sample that community is very important.

Tern.js has a big community, but TypeScript has a bigger community than Tern.js. I'm not sure that developping your own inference engine is a good idea.VJET had done that, it worked very good, but community was just limitated for Eclipse.

Regard's Angelo

2016-03-31 18:45 GMT+02:00 Eugene Melekhov <emvv@xxxxxxx>:

> I hear good things about the new indexer [1] but it needs to be tried
> out in JS context.
Slides look promising, I think it's worth trying to experiment with it.

> Personally, I think what TAJS can do is really powerful and unique. I
> think we can write a converter that can convert JSDT’s DOM AST to
> one that TAJS can consume for a quick solution.
I'm going to look at the possibility to use JSDT’s DOM AST as input to TAJS, I don't have enough details at the moment
to be sure, but I hope it's possible. If it fails I'll write a converter.

> I think it does make
> sense to collaborate and see if we can come up with a solution
> that scales and provides an integrated experience.
Just a reminder. I believe JSDT’s DOM AST still requires some rethinking/refactoring for getting rid of some unused
Java's legacy etc in order to be more convenient for use outside of JSDT core itself.

Eugene Melekhov

wtp-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top