简体   繁体   中英

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?

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:

  1. Install "Eclipse web developer tools 3.20" from Eclipse marketplace
  2. Restart
  3. Open a JS file. Right-click on line number > Switch to theme > Eclipse light.

Done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM