How to Customize Automatically Generated Methods in the DVT Eclipse IDE

Description

DVT has many features that automate code entry: various Quick Fix and refactoring operations, override virtual methods, Generate Getters and Setters to name just a few. This video explains how to align the methods generated by DVT with your own coding guidelines.

Explore the design and verification tools: https://www.dvteclipse.com
Or request a license: https://www.dvteclipse.com/request-license

Transcript

DVT has many code generation features — for example, overriding virtual methods, extracting selected code to a new method or task, or declaring the missing implementation stub for an external method, and several others. But what if your coding guidelines mandate a different structure for methods?

Customizing the Method Implementation Template

In the Code Templates view, look for Method Implementation and update the template to match your methodology. For example, let's customize the method's block comment and place the list of arguments on a new line.

Customizing the Method Override Body

Similarly, for the method override body, let's include a more specific to-do in the comments section.

Note how the customization takes effect.