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:
- 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.
- I created a new file in my project with just one small function with two lines and the same thing happened again.
- 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).
- 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.
- 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.