The Delegate.Insight tool provides an easy way to generate methods those actual implementations are delegated to another object (delegate). To invoke Delegate.Insight please use Alt+Shift+M (CUA) shortcut.
After invocation, the Delegate.Insight popup is shown with the list of members (fields and methods) matching a word at the cursor position. The list may be empty if there are no matching or suitable members though. To find matches, type a word in the Choose Delegate edit box and Delegate.Insight will dynamically rearrange the list of members to show the matching ones. The Choose Delegate edit box can be blank that allows viewing of all members.
|Choosing a Delegate Using Delegate.Insight|
As soon as the user selects one member to become delegate (multiple selection is not supported by this tool) and press the Enter key, the Delegate.Insight popup shows the list of methods belonging to the delegate and suitable to be introduced in the target class.
|Choosing Methods to Implement Using Delegate.Insight|
To find matches please type a word in the Choose Methods edit box and Delegate.Insight will dynamically rearrange the list of methods to show the matching ones. The Choose Method edit box can be blank that allows viewing all methods.
|Code Generated by Delegate.Insight|
Delegate.Insight correctly recognizes delegate modifiers and generates static methods if required (preserving other modifiers as well). It utilizes all major delegate patterns and allows using the following entities as delegates:
The Project Properties | Productivity! | Code Style property page allows customizing code style and placement for the generated methods. Settings for Java Doc comments those can be optionally generated during methods' generation can be customized using the Project Properties | Productivity! | Java Doc property page.
See also: Productivity! Tools , Customizing Productivity!