Bug 351856 - [templates][1.7] Improve 'switch' template
Summary: [templates][1.7] Improve 'switch' template
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: fix candidate
Keywords:
Depends on: 95787
Blocks:
  Show dependency tree
 
Reported: 2011-07-12 10:56 EDT by Dani Megert CLA
Modified: 2012-03-22 09:30 EDT (History)
2 users (show)

See Also:


Attachments

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