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

Implement "Add unambiguous imports on the fly" option #8266

Merged
merged 2 commits into from Jan 28, 2022

Conversation

dima74
Copy link
Member

@dima74 dima74 commented Dec 13, 2021

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 and AutoImportHintFix in order to get simpler code, and also in other languages there is no such division. Also now candidates are stored in AutoImportFix

@dima74 dima74 added the feature label Dec 13, 2021
@dima74 dima74 added this to In Progress in To test via automation Dec 13, 2021
@dima74 dima74 force-pushed the diralik/unambiguous-imports-on-the-fly branch from 3a39a78 to 23c656f Compare December 13, 2021 11:21
@Kobzol
Copy link
Member

Kobzol commented Dec 13, 2021

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

@dima74
Copy link
Member Author

dima74 commented Dec 13, 2021

@Kobzol I think #7597 is needed too, because "unambiguous imports on the fly" option will be disabled by default (as in Java/Kotlin). Also even if user enable "unambiguous ..." option, #7597 will be useful when copying code with ambiguous name

Copy link
Member

@Undin Undin left a 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

@dima74 dima74 force-pushed the diralik/unambiguous-imports-on-the-fly branch from 23c656f to 93613d9 Compare January 24, 2022 15:49
@dima74 dima74 force-pushed the diralik/unambiguous-imports-on-the-fly branch from 93613d9 to 1770346 Compare January 28, 2022 09:59
@dima74 dima74 requested a review from Undin January 28, 2022 10:00
Copy link
Member

@Undin Undin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 28, 2022

Build succeeded:

@bors bors bot merged commit 8fac03c into master Jan 28, 2022
To test automation moved this from In Progress to Test Jan 28, 2022
@bors bors bot deleted the diralik/unambiguous-imports-on-the-fly branch January 28, 2022 12:13
@github-actions github-actions bot added this to the v165 milestone Jan 28, 2022
@neonaot neonaot self-assigned this Jan 31, 2022
@neonaot neonaot moved this from Test to Done in To test Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
To test
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants