Refactoring to enums
已回答
For the code like this
public static final String ADD = "Add";
public static final String MOVE = "Move";
public static final String REMOVE = "Remove";
Can be automatically converted to JDK enums and vise versa.. if we were to convert enum code to lower JDK.
Intellij should consider to introduce this refactoring approach.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
- Java Product Code Audit Experts
请先登录再写评论。
Hello Denis,
Seems you could select those strings and run "Refactor | Extract | Delegate" (don't forget to check "Extract as enum")
+1 (8 years later)
Not bad. Thanks Yaroslav!