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

6 comments
Comment actions Permalink

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...

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

>
>


0
Comment actions Permalink

Jean-François Daune wrote:

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).


If you just add the same doc to every getter and setter, why add it at all?

Bas

0
Comment actions Permalink

Company policy is the usual answer. I've worked at places like that.

--Dave Griffith

0
Comment actions Permalink


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

0
Comment actions Permalink

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.

Jean-François Daune wrote:

>> 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).
>>

If you just add the same doc to every getter and setter, why add it at
all?

Bas




0
Comment actions Permalink

/**
Returns firstName.
@return the firstName
*/
public String getFirstName() { return firstName; }


Yes, I really was missing such <censored/> JavaDoc, which I was
accustomed to from the Netbeanz project ;)

Tom

0

Please sign in to leave a comment.