intellij idea - Rearranging fields and constants -
i have following lines of code @ top of class:
private static final int default_a = 0; private static final int default_b = 1; private int ma = default_a; private int mb = default_b;
when use 'rearrange code' action in intellij (or rather, android studio), thinks should stick these together, this:
private static final int default_a = 0; private int ma = default_a; private static final int default_b = 1; private int mb = default_b;
how can prevent happening when using action? these matching rules:
i guess way intellij 'understands' code in humanly readable manner.
i'll explain:
in code above declaring final variables defaulta , defaultb, , setting value ma , mb. intellij doing setting value of ma , mb after declaration, therefore refactoring code.
i not sure if there way change in intellij, way software developed handles declarations , setting of variables in grouped manner more developer friendly, (not make developer forget ma , mb.
hope helps :)
Comments
Post a Comment