Project: JDT
Bug 85239 Extract Constant should be disabled on switch-case constant
Reported: 2005-02-15 06:51:23 | Status: resolved fixed

I20050209-0800 enum Color { RED, BLUE(), YELLOW() {}; public static final Color fColor= RED; } class ColorUser { void use() { Color c= Color.fColor; switch (c) { case RED : //extract constant "RED" break; default : break; } } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/ExtractConstant/canExtract/A_test23_in.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractConstant/canExtract/A_test23_out.java org.eclipse.jdt.ui.tests.refactoring/resources/ExtractConstant/cannotExtract/A_testFail17.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/ExtractConstantTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractConstantRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/ExtractTempRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceParameterRefactoring.java