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
Implement "Add unambiguous imports on the fly" option #8266
Conversation
3a39a78
to
23c656f
Compare
Pretty cool! I suppose that this supersedes #7597? class RsReferenceImporter : ReferenceImporter 👀 I see that I could have saved quite a few lines in my implementation :D |
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.
Looks good in general but comments
src/main/kotlin/org/rust/ide/inspections/import/AutoImportFix.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/rust/ide/inspections/import/AutoImportFix.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/org/rust/ide/annotator/AnnotationTestFixtureBase.kt
Outdated
Show resolved
Hide resolved
23c656f
to
93613d9
Compare
93613d9
to
1770346
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.
bors r+
Build succeeded: |
changelog: Implement "Add unambiguous imports on the fly" option. You can turn it on in
Settings | Editor | General | Auto Import
. It can be useful e.g. when copying some code from a web site.Example:
Option in settings:
I united
AutoImportFix
andAutoImportHintFix
in order to get simpler code, and also in other languages there is no such division. Also nowcandidates
are stored inAutoImportFix