Suggestion: Add user-specified unambiguous imports on-the-fly


As the title says. I think it would be a nice in-between between no/all unambiguous imports on the fly. I don't want it to add all unambiguous imports, as it may add something I didn't intend (I might be missing a dependency, for example), and I want the IDE to remember me from where what I'm importing comes from.

However, I know "Optional" comes from core Java, for example. I don't care at all if it auto-imports it.

Someone could make a plugin for it, but it should be very easy to implement for Jetbrains devs anyway.

1 comment
Comment actions Permalink

Does it happen often that you use dependencies with conflicting class names and miss a certain dependency? Also, IDEA won't add an unwanted import in case of type mismatching.

How do you see the feature to work if you add a specific import, but you missed a dependency? Seems that IDEA will end up with a red import, which kinda undermines the idea of adding imports on the fly


Please sign in to leave a comment.