changing naming for "replace constructor with builder"
I love the "replace constructor with builder" functionality, but unfortunately the code it generates doesn't follow my company's naming convention for builders.
The builder it generates looks like:
public class ThingBuilder {
private String name;
public ThingBuilder setName(String name) {
this.name = name;
return this;
}
public Thing createThing() {
return new Thing(name);
}
}
My company's builders all use naming conventions look this:
public class ThingBuilder {
private String name;
public ThingBuilder name(String name) {
this.name = name;
return this;
}
public Thing build() {
return new Thing(name);
}
}
Is there any way to configure intellij to generate builders with this slightly different naming convention?
Thanks,
Brendan
请先登录再写评论。
Hello Brendan,
We have simular request in YouTrack: http://youtrack.jetbrains.com/issue/IDEA-102132.
Feel free to vote and leave comments.
Please start following it to receive automatic notifications from YouTrack when the issue is updated.
See http://intellij-support.jetbrains.com/entries/23368682 if you are not familiar with YouTrack.
Is this refactoring part of the open source project? I wonder if I could just submit a patch...
You could download sources here: http://www.jetbrains.org/.