I have seen some documentation such as this and some Stack Overflow questions like this which talk about templates, perhaps Velocity templates, used by IntelliJ when generating a toString
method in a Java class.
But no where can I find where this template lives, or how to access it from within IntelliJ.
➥ Exactly how does one find and edit the toString
generation templat e in IntelliJ 2018?
Go to Code -> Generate and select toString()
from the contextual menu:
Next, click the Settings
button in upper corner.
In the toString() Generation Settings
window that appears, select Templates
tab.
Add template:
Finally, add the Velocity code then click apply:
Tip: You can duplicate an existing template rather than create an empty one. Click the "double sheets of paper" icon next to the plus and minus icons.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.