[ROO-3447] Comment structures added by a builder are not written in the ITD Created: 03/Sep/13  Updated: 17/Sep/15  Resolved: 25/Jul/15

Status: Resolved
Project: Spring Roo
Component/s: @ CORE
Affects Version/s: 1.2.4.RELEASE, 1.2.5.RELEASE
Fix Version/s: 2.0.0.M2

Type: Improvement Priority: Minor
Reporter: Mario Martínez Sánchez - gvNIX - DISID Assignee: Juan Carlos García del Canto
Resolution: Complete Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


Issue Links:
duplicates ROO-3160 entity fields and ITD's methods javadoc Closed
relates to ROO-3676 Error adding Javadoc to new method on... Open


Builders allow comment structures from Metadata, but not included in the AJ file when write to disk.

It is possible same problem affects comments into properties, classes, methods, ...


CommentStructure comments = new CommentStructure();
JavadocComment javadoc = new JavadocComment("My javadoc comment");
comments.addComment(javadoc, CommentStructure.CommentLocation.BEGINNING);
MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(...);
itdTypeDetails = builder.build();

Comment by Juan Carlos García del Canto [ 25/Jul/15 ]

Now it's possible to include comments on generated ITDs.

The problem was that MethodBuilder includes CommentStructure correctly, but no one includes it on ITDs source file.

This is the commit with the applied changes:


To include multi-line comment, you should use "\n" on your string comment:

CommentStructure comments = new CommentStructure();
JavadocComment javadoc = new JavadocComment("My javadoc comment is \n really long");
comments.addComment(javadoc, CommentLocation.BEGINNING);
Generated at Sun Sep 27 16:18:55 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.