Is there any way to sort the member variables of an enum alphabetically in IntelliJ? I've been trying a bunch of different settings in the arrangement section but didn't have success. Could anyone maybe help me?
IntelliJ sort enum members
Asked Answered
Type Alt+Enter on an enum constant and invoke the sort content
intention. This will sort the enum constants in alphabetical order. The intention will only appear if the constants are not alphabetically sorted.
Wasn't able to find the same action for AndroidStuido, instead, I used Menu -> Edit -> Sort Lines
Good thing is that it can be used for anything :)
© 2022 - 2024 — McMap. All rights reserved.