Weird code formatting?

Answered

Hi i have switched from Eclipse IDE to IntelliJ, and noticed that IntelliJ puts my Getters and Setters above the variable rather than below?

Im not sure if this is a coding standard thats been incorperated into the IDE, but i havent worked anywhere so far that requires my getters/setters to be at the very top of my classes, and i havent really been able to find a setting that allowes me to change this

Would anyone know what to do its slowing my work down because i got to manually drag my getters/setters to the bottom of the class?
Thanks

1 comment
Comment actions Permalink

How exactly do you create gettets/setters so that they appear at the top of the class?

Generate code creates them where you place the caret while pressing Alt+Insert (Generate).

Also, default Rearrange Code style (https://www.jetbrains.com/help/idea/2016.2/rearranging-code-using-arrangement-rules.html) places methods after fields in the class.

 

0

Please sign in to leave a comment.