Bug 89849 - [1.5][assist] Completion in switch proposes already written enum constants
Summary: [1.5][assist] Completion in switch proposes already written enum constants
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-31 11:56 EST by Frederic Fusier CLA
Modified: 2005-05-27 09:05 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.