| Summary: | [code templates] Allow to mark exception variable 'final' when generating try/catch | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Rodney Beede <business2008+bugs.eclipse.org> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | ASSIGNED --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | business2008+bugs.eclipse.org, daniel_megert |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Build Identifier: 20100917-0705 When I do a Quick Fix on Java code and select Surround with try/catch it provides a default try catch block. I like to make the catch parts look like catch(final Exception excep) { I tried modifying the templates for try and catch in Windows, Preferences but that didn't affect the Quick Fix Surround with try/catch. I prefer the Quick Fix one because it fills in multiple exceptions and each type quickly over the user-defined template ones. A setting in Preferences where I can change the template used for Quick Fix Surround with try/catch would be great. Reproducible: Always Steps to Reproduce: 1. Write a line of Java that throws an exception (not RuntimeException) 2. Focus the cursor on the line 3. Bring up Quick Fix (ctrl+1 on Windows) 4. Select Surround with try/catch Notice that regardless of your template settings in preferences for try and catch that a built-in mode is used.