Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] How to disable parse of the internal JSDT AST?

Hi max,

many thanks for your answer.

1) double parsing problem (one parse on JSDT client side and a second parse
on tern server/tsserver). I would like to avoid the parse on JSDT client

why not work on reusing the AST already available on client side and pass it to server side ?

To do that we need a common _javascript_ Engine. For ternjs, node.js -> J2V8 -> Nashorn for performance.
So we could use J2V8, but it will require that we must implement some node.js module like "fs" which are consumed in some tern plugins for some features (like completion for required module)

For TypeScript, in my case I use tsserver which is linked to node.js. I could implement my own Language Service Host (as TypEcs, and Eclipse TypeScript have done), but I think it's a bad idea:

 * VSCode works with tsserver and tsserver manage a lot of logic like the use of tsconfig.json
 * tsserver is available when you install TypeScript, so with, it's very easy to change version of TypeScript (with TypEcs, and Eclipse TypeScript, you need to recompile the plugins, and you are not sure that it works) .

Thought that was one of the advantages we could do know by using esprima to parse client side.

2) peformance problem with big file which can take 30 secs (see

That one does look nasty.

Yes I know -(

3) disable validation of the WTP Validator because Esprima throw errors
with TypeScript syntax (ex: var s: string) and tsserver is able to validate
js, ts files.t).

If this internal AST cannot be disable (with an extension point?), I tell
me if I must implement my own editor (I would like to avoid doing that).

Since you are doing TypeScript I think you'll need to anyway as long as Eclipse
don't have a generic editor fwk to extend. But Gorkem and guys knows better what
is feasible.

You mean that I should implement my own TextEditor? 

Regard's Angelo

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

Back to the top