Eclipse 2020-06 Javascript - Syntax Hightlighting not working - javascript

after updating my Eclipse IDE to the actual 2020-06 version the syntax highlighting for JavaScript does not work any more.
Is this a known/common problem and how can I fix this?

After spending most of a day futzing with it, including installing a new instance of Eclipse PDT, I found that I could fix it simply by adding *.js to the File Associations preference page and setting its default to "Generic Text Editor".

Per the Eclipse Bugzilla Report:
Standalone JS Editor is not provided anymore.
To work with JavaScript/TypeScript projects users may install JS [1] or JEE [2] EPP packages, WildWebDeveloper [3] or other products.
[1] https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-web-and-javascript-developers
[2] https://www.eclipse.org/downloads/packages/release/2020-06/r/eclipse-ide-enterprise-java-developers
[3] https://marketplace.eclipse.org/content/eclipse-wild-web-developer-html-css-javascript-typescript-nodejs-angular-json-yaml
Basically this means that the Eclipse JavaScript Development Tools (JSDT) is no longer supported.
It could just be me, but [1] seems to be a pretty stripped-down version of Eclipse. It doesn't even include Package Explorer, which baffles me. [2] is a bit better in my opinion, at least having Package Explorer. (I do love Package Explorer ๐Ÿ˜œ) However, I'm not really interested in installing a new version of Eclipse when the way [1] and [2] implement JavaScript support is through [3] Wild Web Developer ("WWD") anyway. (You don't have to follow that link for [3]; you can find it in the Eclipse Marketplace just fine. Also, you'll have to reopen any JavaScript files you have open for the update to work.)
I added WWD through the Eclipse Marketplace on my Windows x64 version of Eclipse IDE for Java Developers, 2020-06. I guess it works, but it sure doesn't integrate like JSDT did.
I'm not thrilled with WWD since the first thing I tried to do is comment a line in JavaScript using Ctrl+/ and it summons a dropdown of keyword and available function choices. Ctrl+. does the same thing, and feels more appropriate, so what's the deal? ๐Ÿคจ Want to change the keyboard shortcuts? Too bad. There's nothing under the Keys preference that has anything to do with TextMate/WWD actions.
Want to change the syntax coloring? Better love what you're given. There is no Syntax Coloring section or anything like it. There's a TextMate set of preferences, but it seems like anything regarding Theme doesn't actually work. Is it because I use DevStyle and the Darkest Dark theme? Who knows.
There's only one WWD preference (XML), which does nothing but tell you "See 'XML Catalogs' for XML catalogs preferences". Thanks? It's also version 0.10.0.etc, which feels like we're being forced to test it. Overall I'm pretty disappointed, especially since Eclipse just automatically upgraded itself from 2020-03 to 2020-06 and now I'm stuck with this. Boo to you on this move, Eclipse ๐Ÿ˜ž

This is how I fixed it:
Install "Eclipse web developer tools 3.20" from Eclipse marketplace
Restart
Open a JS file. Right-click on line number > Switch to theme > Eclipse light.
Done.

Related

Turning off Eclipse 2020-06 Javascript Validation Notes

Using Eclipse's 2020-06 built in JavaScript editor, I need to disable the JavaScript informational notes on syntax and warnings as displayed with an (i) icon to the left of the line number and with markers to the right of the scroll bar. See links to the two images showing what these look like.
An example of the informational icon
An example of the markers
There are two warnings repeating numerous times:
'aVariableName' is declared but its value is never read.
This constructor function may be converted to a class declaration.
I would rather turn off these two individual messages since they do not apply to the project, but such control does not appear to exist, but they are overly spamming the editor and are interfering with other notifications and informational notes. FYI: I'm needing to follow specific coding conventions for the project and therefore the warnings don't even apply to the project and are just spam.
So I'll just settle for shutting off javascript validation, but the validation will not turn off.
I've tried to disable the project level settings for the javascript validation through the menu option Window, Preferences, Web, HTML Files, Client-side Javascript, Validator, Errors/Warnings: and unchecked both options of Strict Validation of Javascript keywords usage, and Enable JavaScript semantic validation. But making those changes accomplishes nothing since the warnings are still there even after running validation on the project, cleaning the project, and even restarting eclipse.
The specific version of Eclipse is:
Eclipse IDE for Enterprise Java Developers Version 2020-06 (4.16.0)
To try to better explain the need to install Node.js, this is the dialog requested Node.js be installed. The text of the dialog reads: "Missing node.js" "Could not find node.js. This will result in editors missing key features. Please make sure node.js is installed and that your PATH environment variable contains the location to the 'node' executable."
Eclipse's Missing Node.js dialog
Are there any other ways to shut off individual warnings/messages, or the javascript validations? Any help, or constructive suggestions would be very much appreciated. Thanks!
Sorry, the stackoverflow editor won't allow in-lining simple images.
Update: So I have not been able to figure out how to disable the informational notices that are showing up in the JavaScript editor along both the left and right margins. I would still love to find out how to do that. I'm wondering if the issues I'm seeing may have been resolved in the current release of Eclipse? I cannot put my development environments at risk if downgrading is not possible. But some hopeful and important details that I have learned is that the latest release of Eclipse "can" support java 1.8 although it says the minimal version supported is Java 11. And also the latest release is better integrated with Node.js so an external install is no longer required. At this time I cannot risk testing the latest Eclipse release due to possible lockout of the workspaces if eclipse cannot be downgraded. I will make plans to rebuild some of the workspaces on another workstation so it will not impact vital projects if something should go wrong.
I was able to disable these javascript validation notes by changing the following setting.
Eclipse -> Window -> Preferences -> General -> Editors ->Text Editors -> Annotations
find "Infos" in the "Annotation types" and click it
uncheck both the "Vertical Ruler" and "Overview Ruler"
optional - uncheck "Text as "Squiggly Line"
Click Apply and Close
Voila enjoy the less cluttered javascript files

2-pane IDE for JavaScript/CoffeeScript?

I am looking for a simple IDE that looks like the coffee2js website:
2-pane - CoffeeScript on left, JavaScript on right - live preview
Simple debugging feature - REPL, breakpoints, stepping
Visual Studio has plugin Web Essentials that allow transparent compilation of CoffeeScript, so you can open compiled JS and split window vertically etc
Sublime Text 2 has plugin for compiling CoffeeScript as well and also allow splitting screen on two windows.
I personally love all three ( including Webstorm wrick answered about ) and use them depending on the project ( .NET stack in VS2012, other stuff in ST2 and WS )
The good old vim has a plugin to enable live preview
https://github.com/kchmck/vim-coffee-script if you're looking for a lightweight solution.
:CoffeeCompile watch
Found one: Webstorm. Although its a more heavyweight ugly IDE than I would have imagined (looks like its a fork of IntelliJ)
For what it's worth, I've tried Komodo, Sublime, Aptana, and others. For front end, javascript-heavy web development, Webstorm is the best.
As you say, #wrick, it has a live coffeescript preview option.
It also (at least in the latest EAP) has SASS compilation and JSHint integration.

How do I properly run the VJET development tools for NodeJS on Eclipse?

The default javascript editor for Eclipse has very poor outlining and code completion. As a result of this, for any modern javascript application like ExtJS or NodeJS where you need to write a lot of object literal statements, Eclipse becomes pretty useless. And it is impossible to ask how to do this properly.
Now I found that Ebay Open Source seems to have tools that are specifically designed to replace this flaw in the standard editors, both for javascript in general as for NodeJS specifically.
Installing the normal NodeJS V8 debugger on a default WDT install of Eclipse is pretty straightforward, and apart from setting up some script mapping, it's easy to get to work.
But when I tried installing VJET, stuff just didn't work. No code assist at all, no debugging anymore, nothing. VJET mode was set as default for debugging and stuff, but when I couldn't get it to work, I couldn't find any option to switch back to normal Eclipse/JS Editor/V8 Debugger either. Even when I removed all VJET stuff, my Eclipse installation was bombed and a complete wipe of the workspace and home configuration + downloads finally fixed this.
So I was hoping that anyone could explain:
What are the exact steps to getting VJET to work for Node.JS development in Eclipse, and possibly how can one switch between 'VJET' mode and 'default' mode?

Eclipse PDT - Javascript Code Assist is not work?

I thought PDT would do code assisting on JS files. Was I wrong, or is there a bug or something I am missing?
Is the Javascript development tools installed? I'm not sure, whether its installed together with the PHP Development Tools.
Select Help/Install new software, then select the Helios update site (http://download.eclipse.org/releases/helios), then install the Javascript Development Tools from the Web, XML and Java EE category.
Update: See the answer at your other question.
Got here because I had the same problem, first install "Eclipse web developer tools => javascript development tools"
Then instead of creating a javascript project create a "static web project". Right click the project in project explorer choose configure (in the bottom) make sure you add javascript support (if it's not there than it's probably already supported).
Under your project in project explorer there should be an item called javascript resources right click that and choose properties. If the browser libraries or ecma3 libraries are not there you can add them.

Breakpoints in Ruby IDE?

I currently use TextMate for Ruby/Javascript/Actionscript development and it is amazing. But one thing I would really love to use are breakpoints so I could stop code execution and examine the state of the variables and walk through the code. Something like what Flex Builder does.
Does TextMate have this capability? Or what do you use to do breakpoints and that sort of thing with Ruby? How about for Javascript too?
Thanks!
Since TextMate is not an IDE but just a text editor (on steroids though!) I believe this is something totally not supported.
As for the javascript, this is something you can do with firebug (at least for firefox) and similar tools are included (or can be found) for IE, Chrome and Safari :)
There are 3 mostly-Java IDEs that run under Mac OS X yet do a good job of developing (and of course debugging) Ruby.
Eclipse, with the Aptana plugin;
IntelliJ IDEA (it knows lots of programming languages)
NetBeans (I think).
All three are free (even IntelliJ, they have an Open Source edition out now), so you can just download, play around with it, get accustomed and go to town.
Eclipse with the Dynamic Languages Toolkit supports Ruby debugging. I have used it in the past, and it supports Javascript as well.
TextMate is an editor and not a full-blown IDE, so it doesn't support debugging.
If you're looking for a Ruby IDE, I highly recommend RubyMine. It's got great support for debugging, running tests, easily navigating between files, and basic refactoring. Admittedly it's a lot more heavyweight, so I tend to use it for major work (or when getting up to speed on an existing code base), and still use TextMate for quick changes.
There are some open source solutions as well. In the past I've used NetBeans and RadRails, and particularly NetBeans has worked very well for me, too. Not as good as RubyMine, but well worth checking out if you're on a budget.
I should also point out that you can debug Ruby apps from the command line, using the ruby-debug gem. Basically, you place a debugger call into your code to set a breakpoint, and then run the app with rdebug instead of ruby. Check out this article for an overview.
arcadia is a ruby editor written in ruby with ruby debugging support. A little rough still, but at least you get the good feeling of running ruby :)
-r

Categories