Bug 89849

Summary: [1.5][assist] Completion in switch proposes already written enum constants
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2005-03-31 11:56:25 EST
Using 3.1 M6 candidate: I20050330-0500.

Have following code:
public class E {
	static final String BLANK = "    ";
	void foo(Colors color) {
		switch (color) {
			case BLUE:
			case RED:
				break;
			case <complete here>
		}
	}
}
enum Colors { BLACK, BLUE, WHITE, RED }

When I complete where indicated, I got all Colors constants although I would
expect only WHITE and BLACK to proposed.
Comment 1 David Audel CLA 2005-05-18 13:00:23 EDT
Fixed and test added
  CompletionTests_1_5#test0208()
Comment 2 Maxime Daniel CLA 2005-05-27 02:47:56 EDT
Verified upon I20050526-2000-win32.