Is there a template or something for generating a switch statement for Java enum in Eclipse?
So that when I got an enum and I want to have a switch with all the values, I didn’t have to write all it myself?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There certainly is, at least in 3.5.
Starting with something like this:
All you need to do is click on the switch keyword and hit CTRL+1. You should get a drop down which includes the option “Add missing case statements”