I finally created a workaround around this frustrating issue. I'm not completely happy with the workaround, but it's better than nothing.
Basically, after you paste the source code and unambigous imports are fixed, just press F2
to highlight the next compiler error. If the current error is an import-missing error, press Alt+Enter
, then Enter
to select the Import
option, then pick the correct import. Then, press F2
again.