How to modify the code generated by 'generate...' menu ?
Hi,
I would like to modify the code generated when using 'generate...'/'getter and setter' menu in order to automatically add the Javadoc (I am fed up manually writing this Javadoc).
Is this possible, and how ?
J-F
Please sign in to leave a comment.
No,
it's not possible now.
"Jean-François Daune" <no_mail@jetbrains.com> wrote in message
news:32752095.1110371815262.JavaMail.itn@is.intellij.net...
>
and setter' menu in order to automatically add the Javadoc (I am fed up
manually writing this Javadoc).
>
>
>
>
Jean-François Daune wrote:
If you just add the same doc to every getter and setter, why add it at all?
Bas
Company policy is the usual answer. I've worked at places like that.
--Dave Griffith
1) Company policy, indeed;
2) Because I feel uncomfortable not commenting public methods, even though their usage is straightforward. The risk is that some developers could use use the 'straightforward' excuse to avoid writing comments;
3) Because it is done in JDK, and I strive to use it as reference point.
J-F
He might also be used to Eclipse, which generates something like this awful
Javadoc:
/**
Returns firstName.
@return the firstName
*/
public String getFirstName() { return firstName; }
I think it's one of Eclipse's worse problems.
>> I would like to modify the code generated when using
>> 'generate...'/'getter and setter' menu in order to automatically add
>> the Javadoc (I am fed up manually writing this Javadoc).
>>
Yes, I really was missing such <censored/> JavaDoc, which I was
accustomed to from the Netbeanz project ;)
Tom