Introduce.Constructor is a tool that allows easy generation of constructors those are intended to initialize selected class' fields. It can be invoked using Alt+Shift+C (CUA) shortcut. The Introduce.Constructor popup will be shown with the list of fields matching a word at the cursor position. The list may be empty if there are no matching fields though. To find matches, type a word in the Fields edit box and Introduce.Constructor will dynamically rearrange the list of fields to show the matching ones. The Fields edit box can be blank that allows viewing all fields.
|Introduce.Constructor Insight Window|
One or more fields can be selected using the fields' list. NOTE: The order of fields' selection exactly defines the definition order of constructor parameters and, in turn, the order of fields' initialization. As soon as fields to initialize are selected pressing the Enter key closes Introduce.Constructor popup and introduces constructor that initializes all selected fields.
|Code generated by Introduce.Constructor|
Please note that if constructor with the same signature is already exists, Introduce.Constructor popup will not be closed and appropriate error message will be displayed in the Status Bar.
See also: Productivity! Tools , Customizing Productivity!