Still have a problem with auto imports
Hi again.
If I type this:
class Bla {
throw new Exce
}
with the cursor at the end, Exception (java.lang) comes up in the popup. If I accept the suggestion (by hitting enter or tab), the import for it (import java.lang.Exception) gets entered at the top of the class.
Obviously, this is imported by default so doesn't need to be imported explicitly.
Thanks, Nick.
Please sign in to leave a comment.
What version of IntelliJ do you have? I have 10.5 and it doesn't do this for me. I do have the "Optimize Imports on the fly" option selected though. Maybe that is the difference?
I have the latest EAP ... so IU-107.148 with the latest released scala plugin (0.4.1084).
I tried turning on "Optimize Imports on the fly" as a test but it didn't make a difference. I still see that import ... imported.
Thanks, Nick.
Didn't realize this was referring to Scala rather than Java. I don't use the Scala plugin so my last response is probably worthless. Sorry!
Ha - no problems.
Thanks, Nick.
Happens to me too, except it seems to only apply to cases where there is a type of the same name in java.lang.
eg, for me it happened with Boolean (it imported java.lang.Boolean), but it won't happen with Some.
I think Nick had the same issue with Exception.
Yep, this is what I'm seeing.
Thanks, Nick.