JavaScript / jQuery don't work in Eclipse - javascript

I don't want to provide a source code because the same code works perfectly on a different PC or on a different eclipse version. The project is a Java EE project with servlets and JSP-s, and I want to use some js functions in a JSP file. How can I set my eclipse to understand and execute jQuery and JavaScript functions? BTW I have installed JSDT jQuery on my eclipse but still doesn't work. Thank you.

Have you searched for a plug-in?
http://marketplace.eclipse.org/content/jsdt-jquery was the last I've seen. See if you can find the version of JQuery you're using on that site.

Disclaimer, I'm the author of tern.java
I suggest you that you install tern.java which extends JSDT Editor and provides a jQuery support
and too jQuery completion for CSS selectors

Related

Why is the JavaScript Viewer not showing in Eclipse Editor Selection?

I am currently trying to code on Eclipse using JavaScript, but I am having a lot of troubles when tying to add JavaScript to Eclipse. I followed the instructions on this website (JavaScript Editor Plugin for Eclipse), and everything was going well until step 9 of the first part. JavaScript Viewer is not one of the offered options in Editor Selection. I am very confused as to what to do. Any help would be appreciated!
Thank you in advance :)
Version: Eclipse Oxygen on MacOS. Oxygen.3a Release (4.7.3a)
You could give the latest Eclipse IDE for JavaScript and Web Developers bundle a try.
It provides:
The essential tools for any JavaScript developer, including JavaScript, HTML, CSS, XML languages support, Git client, and Mylyn.
With this recent (2018) version of Eclipse, you should get a working JS-enabled IDE pretty fast as this is pre-bundled for the use-cases you are looking for:
JavaScript Development Tools
Eclipse XML Editors and Tools
[..]
Hope it helps.
FYI -- I ran into this problem with the latest version of eclipse [2020-06(4.16.0)]. It turns out they removed the Javascript editor from the install. See ref here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564496

Eclipse plugin for javascript development in jsp?

I'm used to Intellij to develop javascript but today (or in a short while), I'll need to develop it in Eclipse. A quick google search gave me JSEclipse and JSEditor.
I'm writing JS in JSPs, not necessarily in .js files (even if I might, too).
Among important criterias :
ctrl + click navigation between function declaration/calls
variable hightlighting
Synthax correction
Usual stuff I find in java development and that would be useful in javascript.
Hope this question isn't to general/subjective.
So what should I use ?
Thanks in advance
Try using Aptana Studio plugin for Eclipse. It contains all you need to work with Web Technology.
[http://marketplace.eclipse.org/content/aptana-3#.U_2OuWOVLIU][1]
This will be helpfull. I got solution by this

Netbeans 7 - jquery code completion [duplicate]

I'm using NetBeans for PHP.
When I edit a .js file, it gives me javascript code completion.
How can I get it to also give me jQuery code completion?
First go to Tools -> Options -> Miscellaneous and click on the Javascript tab,
make sure the targeted browsers are configured properly, code completion changes by the minimal version of the targeted browsers to make sure that the functionality is supported.
You also need to add the jquery js file to your project so netbeans would be able to parse it and to properly add code completion.
These answers are misleading because jQuery no longer self-documents using "scriptdoc." Version 1.1.4 was the last to have this. Anything newer than that (>=1.2 ~mid-2007) is gutted.
amending that: VSdocs actually work:
http://code.jquery.com/jquery-1.4.1-vsdoc.js
or http://www.asp.net/ajaxlibrary/cdn.ashx for version after 1.4.1
i suspect using a non-minified version of jquery would help.
For Netbeans 6.7 / 6.8 / 6.9, just follow the guide here:
Using jQuery to Enhance the Appearance and Usability of a Web Page
There's a section about half way down called "NetBeans Code Completion and API Support".
Worked no problem for me.
Note: "Choose the uncompressed version, i.e., 'Development', before downloading the jQuery library. Using the uncompressed version will allow you to examine the JavaScript code in the editor, and aid in any debugging processes."
Tip: Tools / Options / Miscellaneous / JavaScript. In the "Targeted Browsers" section, ensure IE is "6 or later". Otherwise, you'll get "Not supported" errors in the code completion pop-up and a lot of the commands will be struck out.
I use netbians 7.x for development on drupal 6.x. Autocomplete works after adding non-minified version jquery-1.2.6.js file to the root folder of the project (so it will be with any version).
It is important to specify the version of the file name, without -1.2.6 will not work!
The basic rule is that your jQuery (or for that matter any js lib) should be found in the same project you need auto complete to work. So just place jquery-1.x.y.js somewhere in your project (that can be reached by NetBeans as it reaches your js file) and you should be good to go.
To test you can put the jQuery file in the same folder as your js file being edited.
Make sure your Internet connection is working, because NetBeans downloads documentation when is needed. I think that NetBeans downloads it from there, but this is only my assumption. This is parsing friendly XML document with whole and recent jQuery documentation.

How to write JavaScript in Eclipse

I am using eclipse for java coding. Can I use JavaScript in eclipse? If yes, How to use it? Please give ideas.
I use the excellent Aptana studio eclipse plugin.
If you want to edit Javascript within Eclipse, just install the WTP (Web Tools Project), there is one in there. Edit: You cannot execute Javascript from within Eclipse, but you can use, for example, Firefox with Venkman or Firebug to run the actual file in a browser.

Eclipse: which plugins for HTML & Javascript?

Which plugins do you use for editing (with syntax highlighting) HTML & Javascript in Eclipse 3.5?
Spket is a great plugin for JavaScript. For HTML, I normally just use the default XML/HTML editor that comes with Eclipse WTP which is good enough for my purposes. Depending on which Eclipse distro you downloaded, you may already have this
I've heard Aptana is great, but I have not used it personally.
Eclipse WTP

Categories