When I make Dynamic Web Project in Eclipse it generates Javascript Resources meta-folder; before I tried to use it at first time I thought that it works just like Java Resources - if you add your source here IDE provides you with Intellisense, documentation and error checking.
But when I tried to add jquery.js there, I found nothing that I was expecting to see.
Yes, eclipse shows me that it's aware of jQuery object now but it knows nothing
about jQuery's methods (like jQuery.ajax(...)
) and it also doesn't recognize $
shortcut.
How can I make eclipse recognize methods of js libraries that I include?
The two things aren't related in the way you think. The JavaScript Resources node indicates all of the known globals and named "types", as well as their properties, organized according to the way you've set up the project's JavaScript Include Path. It represents everything that is known to the JavaScript (standalone and client-side) in your project--this is what Content Assist will be able to offer you, shown in what we hope is a nicely laid out and browseable structure.
What you've run into is that jQuery is more dynamic, and perhaps a little trickier syntactically, than JSDT understands. Googling for both jQuery and JSDT should help you find a plug-in that helps in that regard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With