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:

enter image description here

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

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -