Skip to content

[Eclipse] js syntax highlight disabled by STS4 #702

Closed

Description

@tree1891

STS 4.12.1
eclipse-jee 2021-09

Activity

  1. cypher256 commented on Nov 12, 2021

    @cypher256

    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.

  2. nexodex-dev commented on Nov 26, 2021

    @nexodex-dev
  3. martinlippert commented on Nov 26, 2021

    @martinlippert
    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.

  4. added this to the 4.13.0.RELEASE milestone on Nov 29, 2021
  5. martinlippert commented on Nov 29, 2021

    @martinlippert
    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.

  6. martinlippert commented on Nov 29, 2021

    @martinlippert
    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.

  7. bettasplenden commented on Mar 3, 2023

    @bettasplenden

    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.

  8. martinlippert commented on Mar 6, 2023

    @martinlippert
    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?

  9. bettasplenden commented on Mar 6, 2023

    @bettasplenden

    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

  10. martinlippert commented on Mar 8, 2023

    @martinlippert
    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.

  11. martinlippert commented on Mar 8, 2023

    @martinlippert
    Member

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

  12. martinlippert commented on Mar 8, 2023

    @martinlippert
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: eclipsestatus: needs-investigationtype: bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions