Is anyone know how to set up a live template in intellij for doing specialized setters - i\'m using v5, but I accept with pleasure knowledge for a more recent release) -
Something like this
private $TYPE$ $NAME$;
public $THIS$ set$BNAME$($TYPE$ $NAME$) {
this.$NAME$ = $NAME$;
return this;
}
where
Type = complete()
NAME = suggestVariableName()
BNAME = capitalize(NAME)
THIS = className()
The only Problem ist that className will not work in nested classes as it will return "Outer$Inner" but it should work good enough.