Community
Participate
Working Groups
See bug 265744 We should add a quick fix to add the missing default for IProblem.MissingEnumDefaultCase.
Also see bug 372818 comment 2.
- Updated the preference label - Quick fix works for the new problem - Quick fix/assist always adds a default statement if it is missing. http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=f3fc6fb7bb9a825e5a97a39f3440add027e8bb48
Please combine these two LocalCorrectionsSubProcessor methods into one: evaluateMissingDefaultCase(List<Statement>) evaluateMissingEnumConstantCases(ITypeBinding, List<Statement>) They are always used together, so callers can be simplified and we avoid looping twice. Furthermore, the quick fix for "The switch on the enum type Thread.State should have a default case" is not what I'd expect: It's OK to have the "Add missing case statements" fix there as well iff there are really uncovered enum constants, but the first proposal should be "Add default case", which doesn't add any case statements for missing constants.
http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=41c40432e64ef7afc70561cbecaf5e8c31b923d0