Skip to content
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

Support "Add all missing imports" #2753

Merged
merged 2 commits into from
Nov 4, 2022

Conversation

CsCherrYY
Copy link
Contributor

@CsCherrYY CsCherrYY commented Oct 24, 2022

Signed-off-by: Shi Chen chenshi@microsoft.com

requires: eclipse-jdtls/eclipse.jdt.ls#2292

@CsCherrYY

This comment was marked as outdated.

Signed-off-by: Shi Chen <chenshi@microsoft.com>
@CsCherrYY CsCherrYY marked this pull request as ready for review October 31, 2022 08:33
@rgrunber
Copy link
Member

rgrunber commented Nov 3, 2022

Overall the change looks good. We have JDT-LS (quick-fix) calling to the client with java.action.addAllMissingImports, which calls back to JDT-LS with java/addAllMissingImports, which may call back to the client with java.action.organizeImports.chooseImports before returning to the client with the chosen result.

Why can't we just return java.action.organizeImports.chooseImports as the command at https://github.com/eclipse/eclipse.jdt.ls/blob/5c326daac216bb73cc5f43fc9a068fa7e569a9dd/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/proposals/UnresolvedElementsSubProcessor.java#L726 ?

@CsCherrYY
Copy link
Contributor Author

You're right. It seems that we don't need these capability/request/response, and just return the code action/quick fix as proposal and lazy resolve them. I'll update this PR later.

Signed-off-by: Shi Chen <chenshi@microsoft.com>
@rgrunber rgrunber merged commit 2d99511 into redhat-developer:master Nov 4, 2022
@rgrunber rgrunber added this to the End November milestone Nov 4, 2022
@CsCherrYY CsCherrYY deleted the cs-add-missing-imports branch November 8, 2022 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants