如何获取 Visual Studio 的“创建方法存根”或“声明方法”在Delphi中重构?
当我在 Delphi XE 中编码并需要在另一个单元(例如在数据模块上)中使用新过程/函数时,我会错过 Visual Studio 功能,在该功能中我只需键入新方法名称并使用“创建方法存根”功能:
< img src="https://i.sstatic.net/9LmCV.jpg" alt="Visual Studio 中的示例">
或使用 CodeRush 的“声明方法”重构:
我更喜欢这种 TDD 风格的开发,因为它比首先切换到数据模块要快,例如,导航到界面部分并自己在那里创建过程/函数。
有谁知道我如何使用插件/加载项等在 Delphi XE 中实现这一目标?
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 first 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.?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Model Maker Code Explorer 就是您所需要的。我一直使用它 - 各种方式来触发它,但它将获取代码中的参数并计算出它们应该是什么,然后创建模板代码。您还可以额外定义各种类型,但 MMX 适合此类事情。
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 不是 Visual Studio。 AFAICT,RAD Studio没有这样的功能。唯一接近的是类完成,但是您必须首先在接口中声明该方法。对于变量来说有类似的东西,但对于方法则不然。
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.
也许你可以看看 castalia
May be you can take a look at castalia