0

just setup my new laptop with fresh Eclipse Oxygen (4.7.3a) and also STS. In both environments if I try to generate getters and setters (right click --> Source --> generate getters and setters) these are always displayed in alphabetical order not in the order of attributes in the code. Up to now I wasn' able to find any setting to change this again. Is this a new 'feature' ? Or was I just too blind to see where this can be switched off ? Thanks in advance !

Joern

Joern
  • 41
  • 1
  • 6
  • Using `Oxygen.3a Release (4.7.3a), Build id: 20180405-1200`. Just tried it, getters and setters are created in the same order my attributes are in. Have you changed any other settings maybe? – Ben Jun 21 '18 at 13:23
  • 1
    use lombok, keep your code clean https://projectlombok.org – Halayem Anis Jun 21 '18 at 13:31
  • Version: Oxygen.3 Release (4.7.3), property ordered, not alphabetical. Also the @HalayemAnis solution used to be always worth – Cristian Batista Jun 21 '18 at 13:35
  • hm, weird... I didn't change any settings at all up to now. Interesting enough that this is the same alphabetical order in a separate STS installation. Lombok is an option, however I'll still try to figure out, why this behaves different here. – Joern Jun 21 '18 at 16:52
  • When you say "displayed in alphabetical order", do you mean in the Outline, or the actual source is alphabetical? – nitind Jun 21 '18 at 17:22
  • that was in both - outline and source. The emphasis is on 'was' . For whatever reasons, it has gone on Eclipse and STS. I tried to update both, but no updates available / necessary. Some restarts later, I see alphabetical order only in outline, which is normal, if I remember correctly and order of attributes in source code. No clue what happened, however: solved. – Joern Jun 24 '18 at 05:51

0 Answers0