-
Notifications
You must be signed in to change notification settings - Fork 2.3k
copy javadoc for Activity @Extra and @FragmentArg to thier Builder #1526
copy javadoc for Activity @Extra and @FragmentArg to thier Builder #1526
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i assume you ask for the .replaceAll("\r", ""). I removed the \n because it breaks the output.
e.g.
/**
* Hello
World
*
*/
instead of
/**
* Hello
* World
*
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean you removed the \r, right? But why is this needed? CodeModel assumes only \n line ending and breaks with \r\n?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i mean that i removed the \r, sorry.
the .getDocComment(element) call returns comment with \r\n but when i apped that to the javadoc i get the line-break without an * in the line (like the first snippet). removing the \r resulted in having a correctly formatted javadoc output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Can you move this duplicated code then to APTCodeModelHelper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would extract this whole block into one method:
if (docComment != null) {
method.javadoc().append(docComment.replaceAll("\r", "").trim());
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
Thanks! Seems to be okay. After the plugin system is merged, i will have to ask you to rebase this unfortunately. |
|
I'm just waiting for the moment i can rebase ;-) |
|
Please rebase this onto |
|
rebased |
|
It seems you have compilation errors.
|
|
yeah... currently fighting with my eclipse to get AA working. |
|
Sorry... We changed to IntelliJ. I did not update the instructions, yet. |
|
the androidannotations-test project is missing project.properties :/ |
|
should be fixed |
|
TODO: copy ServiceAction javadoc |
|
@dodgex will you add |
|
yeah. it is planned. but i had no time yet. maybe this evening. |
|
OK, i will wait with merging, then. Thanks. |
|
PR updated with javadoc for |
|
Thanks for handling /**
* this is a javadoc comment
*
* @param param This is something
*/
@ServiceAction
void action(int param) {
}/**
* this is a javadoc comment
*
* @param param This is something
*
*/
public ServiceWithServiceAction_.IntentBuilder_ action(int param) {
action(ACTION);
super.extra(PARAM_EXTRA, param);
return this;
}Can i ask you to add the param to the test? Also please add a Thanks for your work! |
|
Well, the only little problem with |
|
no idea where the space comes from. but i'm pretty sure that JavaDoc parsers do not care for spaces at all (if not in a |
|
PR updated |
|
I know where it comes from. The javadoc which is added here, is interpreted as the main JavaDoc. When codemodel renders it, it adds a space after the starts. But the |
Copy JavaDoc for @extra, @FragmentArg and @ServiceAction to the generated builder method
|
After the final review of this PR, i realized there is another last annotations, which can use JavaDoc copy: |
|
Follow up issue for shared prefs: #1551. |
see #1525