Automatically adjust imports and package declarations when moving a class in the file explorer. (As implemented in eclipse/eclipse.jdt.ls#683 ?)
Windows 101.8.0_1441.27.20.30.0The original change was made for Eclipse Che. @yaohaizh can we also enable this feature at vscode side?
That's literally the one thing that's stopping this (amazing) tool to become the # 1 choice for Java development. I am the only developer in a project of near 100 Java developers who is using VSCode for Java. People are very impressed when I show my Java code in VSCode and also skeptical. So they ask "can it do this?" or "I bet if you try this it won't let you...". And refactoring is a key point. I confess I've been relying on Eclipse to do more complex code refactoring... It'd be great to have this fetaure incorporated in the tool.
Automatically fixing imports across the project and package declarations would be a killer feature for Java in vscode.
See https://github.com/microsoft/vscode/issues/43768, vscode will fire an FileWillRenameEvent when the user is renaming or moving (drag and drop) files in file explorer. By listening at this event, the language server is able to update package declaration and references.
Currently the change is proposed at vscode insider. When it's officially ready, it will unblock us on the refactoring features such as move/rename file/rename package name.
What is the current status on this? There's some work merged here https://github.com/microsoft/vscode/pull/85830
but I see an open ticket for a language server protocol extension https://github.com/microsoft/language-server-protocol/issues/873
I also like this feature
Is there a way I can get notification for when this fix is released?
@noel-yap You can subscribe to this issue and choose to only get notified once it closes.
Hi any update on this?
Most helpful comment
That's literally the one thing that's stopping this (amazing) tool to become the # 1 choice for Java development. I am the only developer in a project of near 100 Java developers who is using VSCode for Java. People are very impressed when I show my Java code in VSCode and also skeptical. So they ask "can it do this?" or "I bet if you try this it won't let you...". And refactoring is a key point. I confess I've been relying on Eclipse to do more complex code refactoring... It'd be great to have this fetaure incorporated in the tool.