-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable 'Move...' in Refactor menu #979
Conversation
Why do we need a specific command? It should be available as a refactoring code action |
In case of multimodule projects, does it support moving to a different project? |
file explorer menu is one of ui entries, it supports selecting multiple java files and then moving to other package. yes, we need expose it in refactoring code action, too. when the cursor in different place, the move operation provide different meaning. for example:
yes. actually you can move it to any project in the same workspace. but quick pick widget will put the packages of the belonged project in the top. |
Something's not right. I seem to have lost other code actions in the process. Stay tuned for more info. |
So no source actions are available anymore, that's a significant regression. I don't even see the Move... action in the Refactoring menu, only when clicking on the light bulb. |
It works for me. You should eclipse-jdtls/eclipse.jdt.ls#1105 and #979 |
I still have no source actions even after going back to master, then checking out older commits. |
I have tested in the following way:
I have tested JDK 8, 11 and 12. |
@snjeza please nuke your node_modules/ folder, then |
update to latest insider, it's reproduced. |
While promising, I think this feature is not yet mature enough to be released, see eclipse-jdtls/eclipse.jdt.ls#1105 (review) |
In the latest update,
|
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
0090b96
to
88aafeb
Compare
Here's the error:
Full log
|
Signed-off-by: Jinbo Wang <[email protected]>
@fbricon thanks, i reproduced the issue. In multi-module case, the target folder may be contained by multiple project, so need use the nearest project to the resolve the associated package. The fix is updated. |
Also find a corner case bug in the upstream, the move file operation will remove the import for the inner class mistakenly. Current workaround is to manually invoke "organize import" to correct import list. See the original jdt bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=549674 If the bug is fixed in the upstream, I prefer to use a new PR to track the effort in jdt.ls side. |
The upstream jdt bug is fixed. And already synced back to eclipse.jdt.ls. |
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Thanks @testforstephen! |
Signed-off-by: Jinbo Wang [email protected]