Live Template for Fluent-API Builder in IntelliJ

2019-08-26 07:58发布

问题:

If I wanted to generate a "fluent builder" in IntelliJ anyone know where to edit the live template that is used in the Replace Constructor with Builder feature?

The above mentioned feature will automatically build a Builder pattern object though with the common setAttribute naming convention instead of a more fluentlike naming pattern of .attribute or .withAttribute that I am looking for.

Ultimately I would like to just be able to change a setting / template that would be used in rendering the code similar as to how you can change the format of various other auto generated code within IntelliJ.

回答1:

install plugn in 'Generate Fluent interface'

http://plugins.jetbrains.com/plugin/6141?pr=idea