Community
Participate
Working Groups
Build Identifier: 20100218-1602 Two ways of generating getters and setters generate them in different order, and cannot configure them to produce it in the same order. Reproducible: Always Steps to Reproduce: 1. Create a protected field 2. Ctrl+1 on the field 3. Create getter and setter RESULT: set... and get... methods in that order 1. Create a protected field 2. Right click - Source - Generate getters and setters RESULT: get... and set... methods in that order (and cannot modify the order)
Move to JDT/UI
The quick fix is the same as Refactor > Encapsulate Field. I agree that this should create the getter first. Raksha, could you please have a look? Remember to adjust the tests as well.
(In reply to comment #2) > The quick fix is the same as Refactor > Encapsulate Field. I agree that this > should create the getter first. > > Raksha, could you please have a look? Remember to adjust the tests as well. Fixed in HEAD.
(In reply to comment #3) > Fixed in HEAD. Fixed in these files : org.eclipse.jdt.internal.corext.refactoring.sef.SelfEncapsulateFieldRefactoring org.eclipse.jdt.ui.tests.quickfix.GetterSetterQuickFixTest
Created attachment 172213 [details] Test fixes More tests fixed and released to HEAD.
Verified with I20100802-1800 on Ubuntu.