eclipse / lsp4e

Language Server Protocol support in Eclipse IDE
Eclipse Public License 2.0
60 stars 53 forks source link

Use Rename and MoveRename ResourceChange classes if possible #954

Closed BoykoAlex closed 4 months ago

BoykoAlex commented 4 months ago

If the change is rename and then modify the content of a file. This translates into

  1. Delete the file
  2. Create the new named file
  3. Set its new content

This doesn't let to see the diffs in the refactor preview between the old file name file and the new name file side by side. If the Rename or MoveRename ResourceChange is used then refactor preview has more useful content.

This PR suggests to use Rename and MoveRename if this possible, i.e. both resources are in the workspace.

mickaelistria commented 4 months ago

Thank you!