Project: JDT
Bug 385389 [quick assist] 'Invert equals' not available for enum comparisons.
Reported: 2012-07-18 06:13:51 | Status: resolved fixed

class A{ void foo(Enum e) { if (e.equals(Enum.e1)) { } else if (e.equals(Enum.e2)) { } else if (e.equals(Enum.e3)) { } } } enum Enum { e1, e2, e3; } org.eclipse.jdt.internal.ui.text.correction.QuickAssistProcessor.getInvertEqualsProposal(IInvocationContext, ASTNode, Collection<ICommandAccess>) Line 2094 should be if (binding != null && !(binding.isClass() || binding.isInterface() || binding.isEnum())) { //overloaded equals w/ non-class/interface argument or null .. or something better. (Need to check if something else is also missing)

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/AssistQuickFixTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/QuickAssistProcessor.java