Can Eclipse convert if-else to switch for enums

前端 未结 2 1759
说谎
说谎 2021-01-14 05:32

ReShaper can automatically recognize if states on enums and offer to convert them to switch statements (or back). (Of course, this can only happen

2条回答
  •  野的像风
    2021-01-14 06:25

    For sake of completeness, the option Convert 'if-else' to 'switch' is shown by having the cursor e.g. on the if and then pressing the quick-assist command (Ctrl + 1).

提交回复
热议问题