The new code must use the "final" keyword, where possible.
Question: is it possible to automatically generate variables with this keyword? For example - I select a piece of code:
"bla"+"bla"+"bla"
and press ctrl + alt + v - the IDE generates such a variable:
String blaString = "bla"+"bla"+"bla";
but I need it to be
final String blaString = "bla"+"bla"+"bla";
PS I know about inspections and the possibility of "fixing them all", but it cannot be used everywhere, since there are a lot of old code that cannot be reorganized for no reason.
java standards intellij-idea
StKiller Mar 06 '12 at 7:11 2012-03-06 07:11
source share