How to configure Eclipse so it adds private fields at the bottom of a Java class?
By default when I select 'create a field..' the field gets added at the top of the class. Can I configure Eclipse so the fields are added at the bottom instead?
Window
> Preferences
On the left choose: Java
> Appearance
> Members Sort Order
On the right select Fields
and check Sort members in same category by visibility
.
After that right-click your project and choose Source
> Sort members...
to modify the source code. You can configure Eclipse to execute this action automatically on save: go once again to the preferences Window
> Preferences
and then Java
> Editor
> Save actions
, and click on Configure
for additional actions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With