Can I Modify The Template IntelliJ Uses To Generate Getters/Setters?

IntelliJ does a brilliant job of automagically generating getters/setters for class members.  The ones I get back do not include javadocs.

Is there a way for me to modify the template IntelliJ uses to generate getters and setters to create boilerplate javadocs comments for me as well?  Something like this:

public class X
{
    private Foo foo;

    /**
     * Read access to foo
     * @return foo value
     */
    public Foo getFoo() { return this.foo; }

    /**  
     * Write access to foo
     * @param foo new value
     */
    public void setFoo(Foo newFoo) { this.foo = newFoo; }
}

Did I miss it?  Or is it impossible?

0
7 comments

Yikes - it's been six years, and no action yet.  It doesn't sound like it's high on the priority list.  Thank you for pointing it out.

0

what do you need useless javadoc for?

0

To get an architecture group that insists on them off my back.

0

my job sounds better and better

0
Avatar
Permanently deleted user

There's a couple of old plug-ins, like IDEA Doc (http://plugins.intellij.net/plugin/?idea&id=952) that auto generate javadocs for getters/setters and constructors. It looks like IDEA Doc has been abandoned and is throwing exceptions due to the the plug-in API rework a couple of years ago. But the source code is available. It might be a quick fix for you to get it working.
Just throwing it out there as an option for you. Good Luck.

0

Thank you Mark; it's thoughtful of you to point it out.  Too bad I'll be too embarrassed to pursue it.  Perhaps it'd be better to push back on the automated code review tool than to go down this road.

0

Please sign in to leave a comment.