How can you get IntelliJ to generate getter/setters on one line like this:
public String getAbc() { return abc; }
Instead of
public String getAbc() {
return abc;
}
??
How can you get IntelliJ to generate getter/setters on one line like this:
public String getAbc() { return abc; }
Instead of
public String getAbc() {
return abc;
}
??
You didn't mention what version of IDEA you are using, so I assume the recent 8 or 9.
Check your Code Style settings, under "Alignment and Braces". You should find a "Simple methods in one line" option there.
There are no templates neither for getters nor for equals/hashcode. These are hardcoded in IDEA.
EDIT:
You can see that in this IntelliJ Wishlist
I don't know why you want to do this, presumably for saving visual space. If so, just use IntelliJ's feature to fold trivial getters/setters and forget about how lines does it take. Folding feature can be found in
Settings -> IDE Settings -> Editor -> Code Folding -> Show code folding outline -> Simple property accessors