Smart completion for interface implementation should respect parameter naming convention
When IntelliJ smart completion implements an inteface with a single method (Java 7), it uses the generic derived parameter name from the interface signature. I expect it to suggest a parameter name based on the generic type already available, formatted according to my specified code style for parameters, and have it editable in place.
Example:
public interface Func1<T, R> extends Function {
R call(T t);
}
When I type to begin implementing it for type signature Func1<ValueHolder, Boolean>
_o.filter(new
It completets to:
_o.filter(new Func1<ValueHolder, Boolean>() {
@Override
public Boolean call(ValueHolder t) {
return null;
}
})
Instead of "t", I expect it to be "inValueHolder", infered from the generic type, and formatted accoriding to my rule for parameter names (prefix with "in").
I find the current behavior disruptive, exactly when I expect to use smart completion to move fast with verbose code, because I have to stop, navigate and rename the parameter before proceeding, to comply with Checkstyle rules.
---
Original message URL: https://devnet.jetbrains.com/message/5557769#5557769
Please sign in to leave a comment.