Way to have IDEA import all classes after pasting in code from another file?

I'm sure IDEA can do this, but I can't find it in the docs or forums. Sometimes I'll copy code from another file and paste it into a different file. What I can't figure out is how I can get IDEA to import all the necessary classes. I seem to have to do alt-enter on every one it goes through. In Eclipse I was able to get prompted to the effect of "Do you want to import the following classes." If it can't just automatically import them (prompting when there are choices) is there a way I can get at least only one prompt like in Eclipse? Thanks.

1 comment
Comment actions Permalink

Settings/IDE Settings/Editor/Paste/Insert Imports. Select "All", and you'll never be asked again.

0

Please sign in to leave a comment.