Conversation
| * | ||
| * @return a description of the Mojo or the parameter. | ||
| */ | ||
| String content(); |
There was a problem hiding this comment.
With this named as value, could annotation be used as @Description("xxx yyy")?
There was a problem hiding this comment.
Yes, that was my first idea. But since it contains HTML, I thought it might be a good idea to not use "value". But then, what would value be if added later...
Can change that. Will also add tests.
| { | ||
| mojoAnnotationContent.setDescription( javaClass.getComment() ); | ||
| if ( StringUtils.isEmpty( mojoAnnotationContent.getDescription() ) ) | ||
| { | ||
| mojoAnnotationContent.setDescription( javaClass.getComment() ); | ||
| } | ||
|
|
||
| DocletTag since = findInClassHierarchy( javaClass, "since" ); | ||
| if ( since != null ) | ||
| if ( since != null && StringUtils.isEmpty( mojoAnnotationContent.getSince() ) ) | ||
| { | ||
| mojoAnnotationContent.setSince( since.getValue() ); | ||
| } | ||
|
|
||
| DocletTag deprecated = findInClassHierarchy( javaClass, "deprecated" ); | ||
| if ( deprecated != null ) | ||
| if ( deprecated != null && StringUtils.isEmpty( mojoAnnotationContent.getDeprecated() ) ) | ||
| { |
There was a problem hiding this comment.
New behaviour (compatible): Only set from javadoc annotation if not already set by Java annotation..
| DescriptionAnnotationContent descriptionAnnotationContent = new DescriptionAnnotationContent(); | ||
| final MojoAnnotationVisitor descriptionAnnotationVisitor = | ||
| annotationVisitorMap.get( Description.class.getName() ); | ||
| if ( descriptionAnnotationVisitor != null ) | ||
| { | ||
| populateAnnotationContent( descriptionAnnotationContent, descriptionAnnotationVisitor ); | ||
| } |
There was a problem hiding this comment.
@Description is optional and thus can be null.
|
Looks ok to me |
|
commits added as a review |
|
Should the new annotation contain a |
Sounds like a plan! |
|
Resolve #740 |
ITs missing, tests missing, draft.