Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse 2020-06 Javascript - Syntax Hightlighting not working

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?

like image 975
omanthey Avatar asked Jun 22 '20 08:06

omanthey


People also ask

What happened to eclipse JS editor?

In the Eclipse IDE 2020-06 release the JavaScript support for.js file is no longer provided by the JavaScript editor from JSDT, but by Eclipse Wild Web Developer.

Is eclipse JSDT no longer supported?

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.

Why can't I open a JavaScript source in Eclipse?

Instead you can open a javascript source in the Eclipse general text editor which naturally lacks all the relevant features - syntax highlighting, outline, syntax validation, source formatting. This is in contradiction with the PDT documentation that says that a javascript editor is included in the package.

Does the Eclipse installer 2021โ€‘12 R include JRE?

The Eclipse Installer 2021โ€‘12 R now includes a JRE for macOS, Windows and Linux. Get Eclipse IDE 2021โ€‘12 Install your favorite desktop IDE packages. Download x86_64


2 Answers

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".

like image 195
Paul DeWolf Avatar answered Sep 28 '22 10:09

Paul DeWolf


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 ๐Ÿ˜ž

like image 23
skia.heliou Avatar answered Sep 28 '22 11:09

skia.heliou