Community
Participate
Working Groups
toString() generator adding the fields in alphabetical order. It would be better if it adds in the order whatever the order fields declared in the class.
Moving from APT to Text - this has nothing to do with APT.
We had a similar problem with 'Generate Constructor using Fields', see bug 215161. The essence of the fix there was that IType#getFields() is always in source order (that's also the case for IType#getChildren()). If the alphabetic order is still deemed worthwhile in the end, we could add a 'Sort' button on the right. Mateusz, are you interested?
Yep, I'm on it.
Created attachment 139037 [details] patch
Sweet, thanks! Released to HEAD with 2 changes: GenerateToStringAction#populateMembers(..): Made static, added Javadoc, made type of allMembers more specific. GenerateToStringContentProvider#sort(): Changed to use com.ibm.icu.text.Collator (Eclipse platform convention).