How can I get Visual Studio's "Create method stub" or "Declare method" refactoring in Delphi?
When I code in Delphi XE and need a new procedure/function in another unit (for example on a datamodule) then I miss the Visual Studio feature where I can just type the new method name and use the "Create method stub" feature:
or using CodeRush the "Declare method" refactoring:
I prefer this TDD style development as it is faster than fir开发者_运维百科st switching to the data module for example, navigating to the interface section and creating the procedure/function myself there.
Do anybody know how I can achieve that in Delphi XE using plugins/add-ins etc.?
Model Maker Code Explorer is what you need. I use this all the time - various ways to trigger it, but it will take the parameters that you have in your code and work out what they should be, then create the template code. You can also define all sorts extra, but MMX is the business for this sort of thing.
RAD Studio is not Visual Studio. AFAICT, RAD Studio does not have such a feature. The only thing that comes close is class completion, but then you'll have to declare the method in the interface first. There is something like it for variables, but not for methods.
May be you can take a look at castalia
精彩评论