Builder Generator

Compatible with  IntelliJ IDEA
18.04.2016
49 042
Adds ability to generate builder for a class and switch between them. Switching between builder and source class is similar to 'Go To Test' action. Generated builder class does not use reflection, only setter methods or constructor. Usage:
  • ALT+SHIFT+B inside a class.

Download plugin

Version

Update date

Recent change notes

version 1.1.1
  • 'but' method is now optional and disabled by default (issue #23)
  • Generated builder class is final (issue #24)
  • Added possibility to find inner builder
version 1.1.0
  • Added possibility to generate builder as inner class (issue #13)
version 1.0.11
  • Added 'but' method generation (issue #10)
  • Fix for deadlock on startup (issue #12)
  • Fix for method name generation (issue #14)
version 1.0.10
  • Support for Code Style field and parameter prefixes (issue #9)
version 1.0.9
  • Added customizable prefix for builder method (contribution by Bjorn Monnens)
version 1.0.8
  • Comments are no longer copied when creating builder(issue #5)
  • Compiled for Java 6 (issue #6)
version 1.0.7
  • Attempt to fix a bug that caused deadlock during IDEA startup (issue #4)
version 1.0.6
  • Fixed bug that prevented generating builder in multimodule project
version 1.0.5
  • Added action to 'Navigate' menu (can be easier found in 'Find Action' box)
version 1.0.4
  • Fixed bug that prevented generating builder for class that was added as a project dependency
version 1.0.3
  • Added ability to create builder for class with fields initialized in constructor
version 1.0.2
  • Updated for IDEA 11.0
version 1.0.1
  • Annotations of fields are now ignored when creating a builder
  • Source class in builder is no longer a field, but a local variable in build() method

General usage instructions

ALT+SHIFT+B inside a class
11.07.2016
The description reads as "Generated builder class does not use reflection, only 'setter methods' or constructor." I have a class with no constructor but setter methods only. I get an empty list in "Select Fields to Be Available in Builder" popup. Am I missing something? Or having a constructor is mandatory for it to work?
12.04.2016
This is really good. Have you thought of adding Objects.requireNonNull as a way to enforce non null fields and checks on the Build()? if you need some, would love to help. Cheers, gmelo.org
18.02.2015
Fields are all generated on the same line. Generated constructor passes arguments in the order that fields are declared, rather than the order that the constructor takes the arguments.
Anonymous
09.10.2014
Can't figure out how to use this in an OS X installation of Idea
Anonymous
10.03.2014
Perfect!! Thanks
08.01.2014
Very nice and simple plugin, works as expected. Thanks!
Please  sign in  to leave a comment.