option to reformat the grey stuff away/upgrade code to JDK7

Hello all,

I upgraded my little project to JDK7 but would prefer to have IntelliJ automatically reformat the codebase to use the diamonds notation overall. Now IntelliJ identifies the stuff inside the diamonds as unnecessary with grey highlight, but I can't figure out how to get it to remove the grey parts using reformat project or anything else. Is this possible in any way?


1 comment
Comment actions Permalink

OK, so the answer is to run the inspections manually from the menu. From the top-level results menu then choose the relevant inspection result(s) and right-click. Choose "apply fix", "convert xyz to..." or whatever is the syntax for the inspection. The JDK7 stuff is under "Java language level migration aids". Did the string switches, multi-catches, and everything while was at it..

You're welcome.
Gee, thanks.


Please sign in to leave a comment.