I want to prefix the parameter name when implementing a method
Answered
TIn my company, there is a convention to attach "_" to the parameter name of the method of the implementation class.
In "Code Generation" under "Settings> Editor> Code Style> java", "_" is set in Parameter Prefix.
However, implementing interface methods does not take effect.
The interface is as follows.
void sample (String str, int val);
Executing "Code> Implement Methods ..." to implement this will result in the following.
@Override
public void sample (String str, int val) {
}
I would like to be as follows.
@Override
public void sample(String _str, int _val) {
}
It is troublesome to fix the parameter name all the time.
Can I solve this problem with settings?
My environment is as follows.
IntelliJ IDEA 2018.1.4 (Ultimate Edition)
Build # IU-181.5087.20, built on May 17, 2018
Windows 10 Pro.
Please sign in to leave a comment.
Hello,
We have related request on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-82120
Feel free to vote for it and leave suggestions in comments.
Thanks for the response.
I commented on the ticket.