Skip to content

Renaming a variable leads to entire contents of the file editor being replaced with one word- Error #1974

@iamnotserious

Description

@iamnotserious

I tried setting up an new project in my workspace and tried editing a JS file by refactoring (renaming) a variable which led to the entire contents of the file being replaced with just one word 'Error'. I would have to close the file and open it again to see its modified contents, which are correct.

What I've observed:

  1. I've observed that this only happens in a nested Gradle project which contains both Java and JavaScript files. I tried the same in a different project (not a Gradle project with sub-projects) and it worked without any issues.
  2. I created a new file in my project with just one small function with two lines and the same thing happened again.
  3. There are no unique errors reported in the 'Error Log' or 'Problems' view when comparing the two projects (one where the issue occurs and the other where it doesn't).
  4. I enabled printing language server logs to the 'Console' view and observed that there was no mention of words 'error' or 'parse' in the Console.
  5. I predicted it would be an issue with JSDT, so I downloaded Spring Tools Eclipse IDE which doesn't contain JSDT and I still get the same issue.

Any help would be appreciated.
Thank you for developing this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions