-
Notifications
You must be signed in to change notification settings - Fork 408
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" #2292
Support "Add all missing imports" #2292
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
f349c0e
to
da7d096
Compare
Signed-off-by: Shi Chen <[email protected]>
92a8d2a
to
5c326da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks good. Just some small things to address/clarify.
...lipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/correction/AbstractQuickFixTest.java
Outdated
Show resolved
Hide resolved
....jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/text/correction/SourceAssistProcessor.java
Outdated
Show resolved
Hide resolved
...c/org/eclipse/jdt/ls/core/internal/corrections/proposals/UnresolvedElementsSubProcessor.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Shi Chen <[email protected]>
Signed-off-by: Shi Chen <[email protected]>
Looks like the failures are likely due to something that the change is regressing (relating to statics?). Once it's fixed I think this is definitely good to merge. |
the root cause is that we always return proposal (formerly code action for some cases), which will be resolved directly if a client doesn't support resolving the code action. The related logic has an extra static part here. Let me fix it. |
Signed-off-by: Shi Chen <[email protected]>
test this please |
re-test this please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change looks good to me.
Signed-off-by: Shi Chen [email protected]
The quickfix will be available when there is an unresolved type, and the source action will be available if the current file has unresolved type errors, the actions will only add missing imports and do not affect current import order.
addallmissingimports.mp4
see redhat-developer/vscode-java#2748
related to: redhat-developer/vscode-java#2753