Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.1.0Release
-
Fix Version/s: 2.1.1Release
-
Component/s: Editor
-
Labels:None
-
Environment:STS 2.5.1
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
The format source action on groovy classes (e.g. Grails controllers) breaks some gstrings, when lists appear as method parameters.
For example, the following:
-------------------
class FormatTest {
def test () {
def message = "$
"
}
}
-------------------
...gets turned into:
------------------
class FormatTest
{
def test ()
{ def message = "$" }}
------------------
...which does not compile.
This is a cut-down example that shows the problem.
Similar code appears in all Grails-generated controllers when creating messages, e.g.:
flash.message = "$
{message(code: 'default.created.message', args: [message(code: 'nodemasterMachineReservation.label', default: 'NodemasterMachineReservation'), nodemasterMachineReservationInstance.id])}"
(which is code entirely generated by Grails 1.3.4).
This particular example gets 'formatted' to:
flash.message = "$
"
I'm pretty sure this did not use to happen on STS 2.3.3, so it's probably a new issue.
That is a serious problem. Looking into it.