Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Eclipse] js syntax highlight disabled by STS4 #702

Closed
tree1891 opened this issue Nov 9, 2021 · 11 comments
Closed

[Eclipse] js syntax highlight disabled by STS4 #702

tree1891 opened this issue Nov 9, 2021 · 11 comments
Labels
for: eclipse something that is specific for Eclipse status: needs-investigation type: bug

Comments

@tree1891
Copy link

tree1891 commented Nov 9, 2021

STS 4.12.1
eclipse-jee 2021-09

@cypher256
Copy link

STS 4.12.1 Plugin
eclipse-jee-2021-12-M2-win32-x86_64 (Wild Web Developer Generic Text Editor)

The above also causes problems.
It does not occur in STS 4.12.0 Plugin.

@nexodex-dev
Copy link

eclipse-wildwebdeveloper/wildwebdeveloper#750

@martinlippert martinlippert added for: eclipse something that is specific for Eclipse status: needs-investigation and removed status: waiting-for-triage labels Nov 26, 2021
@martinlippert
Copy link
Member

I can reproduce this issue, thanks for reporting this. I do not immediately see the reason why this breaks, so this needs some deeper investigation. My initial guess is that this is related to newer versions of the tm4e bundles being installed when the Spring Tools 4 get installed and maybe causing some incompatibility here, but this is just initial guesswork. I will continue the investigations here.

@martinlippert martinlippert added this to the 4.13.0.RELEASE milestone Nov 29, 2021
@martinlippert
Copy link
Member

This works out-of-the-box in the Spring Tools 4 for Eclipse distributions that you can download from https://spring.io/tools or even the latest nightly builds on Eclipse 2021-12 milestones from https://dist.springsource.com/snapshot/STS4/nightly-distributions.html, but I can reproduce this after installing the Spring Tools into an existing Eclipse JEE package.

Now need to find out why this breaks when the Spring Tools are installed as an extension to an existing Eclipse JEE package.

@martinlippert
Copy link
Member

The solution to this is to install the latest TM4E via:

  • open Install New Software dialog
  • add https://download.eclipse.org/tm4e/releases/latest/ to the Work With field
  • only select the TextMate Core feature from the TextMate category
  • install

This should bring back the syntax highlighting for JavaScript files.

This problem doesn't seem to occur in the latest Eclipse 2021-12 RC1 when installing the latest Spring Tools 4 extension from https://dist.springsource.com/snapshot/TOOLS/sts4/nightly/e4.22 - if you want to use the latest for the upcoming Eclipse 2021-12 release.

@cdiama
Copy link

cdiama commented Mar 3, 2023

Hello, the issue persists both in a fresh installation of Spring Tool Suite 4 (4.17.2.RELEASE) and as a plugin (4.17.2.202301311045) of latest Eclipse (2022-12). TextMate Core installation in Eclipse case did not help either.

@martinlippert
Copy link
Member

@cdiama Can you share a few more details here? I have a fresh STS 4.17.2.RELEASE running, created a JS file and it looks like I get syntax highlighting just fine. Do you open the JS files with the Generic Editor? And is there anything showing up in the Error Log view maybe?

@cdiama
Copy link

cdiama commented Mar 6, 2023

Hello Martin (@martinlippert),

Thanks for your prompt reply!

Let me share the steps I went through:

  1. As you I have a fresh latest STS as fetched from here.

  2. After starting it and without any single configuration I import a project using the very basic Import... -> General -> Projects From Folder or Archive. For the sake of the issue reproduction let's take this sample project.

  3. I double click the file /Chapter01/CompletedCode/src/scripts.js and it opens in the Generic Text Editor by default.

... then, an interesting sequence follows ...

  1. The file opens with its syntax highlighted as expected, while Outline view tries to "calculate the symbols..."
    InkedCapture

  2. After that, syntax highlighting is getting lost for functions, vars, properties and so on, and we are left with the reserved words properly shown only.
    Capture2

Exported Error Logs:
ErrorLog.log

@martinlippert
Copy link
Member

Thanks a lot @cdiama for the detailed description, this helps a lot to actually see the issue in action. That is great. I can reproduce this with the latest STS builds as well. I also tried the latest Eclipse WWD release, which does NOT have the issue. The latest Eclipse JEE 2023-03 milestone builds also do NOT show the issue, so it seems to be very specific for the STS builds.

Based on the error log, it might be related to the snapshot version of lsp4e that we use and ship (to include a number of important fixes), so let's see if we can get to the root cause of this.

@martinlippert
Copy link
Member

Let's track this in a separate issue: #993

@martinlippert
Copy link
Member

Thanks again @cdiama for the detailed report, this is now fixed in the latest lsp4e snapshot builds, will be included in the upcoming STS 4.18.0 release (scheduled for next week).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse status: needs-investigation type: bug
Projects
None yet
Development

No branches or pull requests

5 participants