Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 85405

Summary: [quick assist] Name convert 'switch' into if-else-if wrong sometimes
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: Martin Aeschlimann <martinae>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: Konstantin.Scheglov
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dani Megert CLA 2005-02-16 08:54:15 EST
I20050215-2300

Look at the following test case:

switch (a) {
	case 1 :
		System.out.println("1");
}

It does not convert it into an if-else-if but only into an if.
Comment 1 Martin Aeschlimann CLA 2005-02-16 09:28:41 EST
so you think the label should only be 'convert to if'?
Comment 2 Dani Megert CLA 2005-02-16 09:40:54 EST
Yep. I was confused when I read it and thought "what will be in the else"
Comment 3 Martin Aeschlimann CLA 2005-02-16 09:44:37 EST
It's not really the most common case. I don't think it is that irritating.
Comment 4 Martin Aeschlimann CLA 2005-02-27 21:43:02 EST
won't fix. I think with the single one label 'convert to if-else' it is clear to
the user what happens here. Just complicates our code and maintnance.