Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.0.0alpha
-
Fix Version/s: None
-
Component/s: Editor
-
Labels:
-
Environment:Eclipse Ganymede 3.5SR1
Groovy eclipse plugin v2 Alpha
-
Number of attachments :
Description
I created the following groovy class in groovy editor.
public class MyGroovy { String str1 = null; String str2 = null; String str3 = null; }
Then I used the feature "Generate toString()" to create toString() code using the 3 fields. Code style is String concatenation and used default template.
The generated code is:
public String toString() { return "MyGroovy [str1=" + this.str1 + ", str2=" + this.str2 + ", str3=" + this.str3 + "]"; }
The problem is that this method returns only the first line of the String, truncating at the end of "this.str2"
This may be solved by moving the + at the beginning of the second line to the end of the first:
public String toString() { return "MyGroovy [str1=" + this.str1 + ", str2=" + this.str2 + ", str3=" + this.str3 + "]"; }
This code prints both lines
The issue should be moved to GRECLIPSE project, I guess.
Would it not be possible for groovy project to not have eclipse-plugin component anymore - now that GRECLIPSE has its own JIRA project?