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

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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

请先登录再写评论。