omer727
omer727

Reputation: 7737

Javascript Intellisense in IDE

How does Intellisense work in IDEs for JavaScript such as Webstorm or Eclipse?

Where do the suggestions come from?

Can we write the code to make the suggestions more accurate?

Sample image

Upvotes: 0

Views: 315

Answers (3)

Angelo
Angelo

Reputation: 2125

Disclaimer, I'm the author of tern.java

I suggest you that you try tern.java by starting to read Getting Started

Upvotes: 0

lena
lena

Reputation: 93908

Please see http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/ for some hints on improving JavaScript code completion in WebStorm. In general: suggestions are taken from index that is built for all .js and d.ts files available in the project/set up as libraries. To make the completion better, you can try using JSDoc annotations/typescript definition stubs

Upvotes: 2

greg-449
greg-449

Reputation: 111227

In Eclipse you can write plug-ins which use the org.eclipse.wst.jsdt.ui.javaCompletionProposalComputer extension point to contribute additional Content Assist proposals.

Eclipse gives you access to an Abstract Syntax Tree of the code to help with analyzing the source.

Upvotes: 0

Related Questions