Stop Idea adding 'final' to every local variable

How do I stop IDEA X adding the 'final' modifier to every local variable it inserts (under Mac OS X)?

3 comments
Comment actions Permalink

You mean when you use the inline refactoring "Introduce variable"?
Press shift-tab until you are on the "final" and select the empty text instead. IDEA will remember it for the next time.

0
Comment actions Permalink

Thanks, that at least opens up the configuration. However, IDEA doesnt seem to remember the selection.

When I hit Shift+Tab x2 the 'final' modifier is highlighted, and I have a drop down with two options - 'final' and a blank entry.
I select the blank entry, hit return a couple of times, and I'm left with what I want (no final keyword on local variables).

I now repeat the procedure, but the final modifier is back by default, so IDEA hasnt remembered what I wanted.


Im using IDEA 10.0.1 on Mac OS X 10.6.5

0
Comment actions Permalink

did you tried settings > code style > code generation: mark local variables final
setting?

cheers,
-m

0

Please sign in to leave a comment.