Generating Getters & Setters Question

Hello -

Using Idea 14.1.4 and Ctrl-Return (on a MAC) invokes generating Getters & Setters.  I have already made changes so the variable name in the setter adds the word "Value" as a suffix.

For example:

private Integer itemCount;

public Integer getItemCount() {
    return itemCount;
}

public void setItemCount( Integer itemCountValue ) {
    itemCount = itemCountValue;
}

So my question:  Is there a way to configure IntelliJ so the variable name in the Setter is just "value"?  For example:

public void setItemCount( Integer value ) {
    itemCount = value;
}


Thanks!

1 comment
Comment actions Permalink

One can use Velocity templates to customize getters and setters: https://youtrack.jetbrains.com/issue/IDEA-28206#comment=27-1005751 .

Unfortunately, it's not documented yet: https://youtrack.jetbrains.com/issue/IDEA-137477 .

0

Please sign in to leave a comment.