commenting blocks of code removes import statements

I never noticed before but apparently when I use Code/Comment with Line Comment to comment a block of code the IDE removes unnecessary import statements. When I uncomment the block of code I'm forced to add all the import statements again. Is there a way to disable the removal of import statements when commenting blocks of code.

Grant

2 comments

IDE Settings->Editor->Optimize imports on the fly

0

Also the "Add unambiguous imports on the fly" option will hide most addition of import statements (unless there is more than one possibility for an import then it will still ask you)

0

Please sign in to leave a comment.