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

Bug 351856

Summary: [templates][1.7] Improve 'switch' template
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: deepakazad, markus.kell.r
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: fix candidate
Bug Depends on: 95787    
Bug Blocks:    

Description Dani Megert CLA 2011-07-12 10:56:48 EDT
We should add a 'switch on string' template.
Comment 1 Markus Keller CLA 2011-07-12 11:04:50 EDT
Really? Didn't you mean try-with-resources?

Switch on string looks exactly the same as the existing switch template.
Comment 2 Dani Megert CLA 2011-07-12 11:26:02 EDT
I agree: a separate 'switch on string' template doesn't make too much sense but we should:

1. Improve the current 'switch' template to propose variables that have the 
   correct primitive types.
2. Once bug 95787 is fixed we set the existing template to work on 1.6 or lower
   and add a second template for 1.7 and higher that also offers variables of 
   type 'String'.