14

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?

4
  • 1
    Equivalent report on Eclipse Bugzilla is here Commented Jun 22, 2020 at 10:11
  • 1
    I have the same problem after update. I ended up installing Wild Web Developer package, which provides its own JavaScript editor (although colors are different from standard Eclipse editors, maybe they can be configured, i didn't look too hard). Commented Jun 22, 2020 at 18:04
  • 2
    Actually I found how to change color scheme. It's in Preferences -> TextMate -> Grammar, then set theme for source.js to "Eclipse Light". Commented Jun 22, 2020 at 18:16
  • 2
    Actually you can just right-click the line numbers in the editor and will get a contextmenu containing "Switch to Theme" option :-) Commented Jun 23, 2020 at 5:33

3 Answers 3

30

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

Sign up to request clarification or add additional context in comments.

3 Comments

This association is expected to be defined out-of-the-box when WIld Web Developer is installed and shouldn't require user action. Please report to Wild Web Developer or PDT the steps to reproduce the issue.
Setting the default to "Generic Text Editor". That's the final solution. Thanks!
Though it works the editor is 10 times slower than the normal one.
10

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 😞

3 Comments

Their "solution" ugh. I had wtp or whatever its called installed (Jeezus, with the abbreviations...) but .js files didnot have much to offer with syntax highlighting, no code completion or anything. I HAVE node installed, and then I installed this Wild Web #&%¤#&. And now when I open a .js file I have no code completion AND no syntax highlighting at ALL o_O. So. their solution that you also mention here is totally worthless. I install Wild Web #&%&#=, it stops working, solution = install Wild Web #%&%&##. ugh.
Comment is Ctrl+Shift+C. Ctrl+/ is coming from another plugin... Ctrl+Space is the usual shortcut for content assist. You can still uninstall Wild Web Developer and install older versions of JSDT if you prefer, but don't be surprised with lack of support for new JS constructs and newer frameworks If you find bugs with WIld Web Developer, just report them on the GitHub repo.
I'm also curious about what would make one prefer the Package Explorer over the more generic and powerful Project Explorer.
5

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.