Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2Release
-
Fix Version/s: 2.1.0Release
-
Component/s: Content Assist, Inferencing Engine
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
From https://issuetracker.springsource.com/browse/STS-1107
Imagine I have this method in a Groovy class:
void echo(msg) {
println "Echoing: ${m"
}
I have started a Groovy expression in the print statement and now I want to autocomplete msg. But STS won't autocomplete the variable unless I put the closing brace in first.
I guess the most appropriate fix is to automatically add the closing brace when the user types '${' inside a double-quote string.
I've marked as major because I think it impacts usability significantly.
This comes about because the groovy parser does not recognize a snippet as a GString unless both braces exist. It looks like the parser does not break in this situation, but merely assumes that the contents inside the "" is merely a string.