Project: JDT
Bug 162549 [surround with] Surround-with-if generates wrong code, brackets not matching
Reported: 2006-10-27 08:17:11 | Status: resolved fixed

Hi, Please refer to the attached screenshot, I have a code snippet with some lines commented off in the end, when performing Source / Surround With / if statement, I see a wrong output, the curly brakets even don't match, It seems the template has been molested by those ending commets which also contain curly brackets.

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/SurroundWithTemplateTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SurroundWith.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/contentassist/SurroundWithTemplateProposal.java