Change eclipse template for setter so that actual parameter be named 'value'?

226 Views Asked by At

I want setters coded like this:

private String name;

public void setName(String value) {
    this.name = value;
}

but if I program eclipse template like this

${field} = value;

I get the following wrong code:

private String name;

public void setName(String name) {
    this.name = value;
}

How to accomplish?

2

There are 2 best solutions below

2
On

My configuration as below:

${field} = ${param};
0
On

It is not possible to accomplish this as you can only influence the body of the setter, not the signature.