如何在Delphi XE中自动实现继承的抽象方法 [英] How to automatically implement inherited abstract methods in Delphi XE

查看:266
本文介绍了如何在Delphi XE中自动实现继承的抽象方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以让IDE在Delphi XE中自动实现继承的抽象方法?在Java和C#IDE中,它是一个常见的功能,如在Visual Studio中按ALT + SHIFT + F10或IntelliJ IDEA中的ALT + RETURN。

Is it possible to let the IDE automatically implement inherited abstract methods in Delphi XE? In Java and C# IDEs it's a common functionality like pressing ALT+SHIFT+F10 in Visual Studio or ALT+RETURN in IntelliJ IDEA.

没有这个我总是要手动查找哪些方法必须实现,并复制他们的声明,这真的是我现在不应该做的事情! p>

Without this I always have to look up manually which methods have to be implemented and copy their declarations, which really is something I shouldn't have to do nowadays!

推荐答案

您可以在类声明中使用ctrl + space来获取您可能想要覆盖的所有方法的列表(或从一个接口)。然而,它不告诉你哪个是抽象的,但是一旦你想到你将通过从列表中选择方法来获得免费的声明。
然后你可以使用类完成ctrl + shift + c在实现部分生成代码。

You can use ctrl+space in the class declaration to get a list of all the methods you might want to override (or implement from an interface). It does however not tell you which is abstract but once you figured that out you will get the declaration for free by selecting the method(s) from the list. And after that you can of course use class completion ctrl+shift+c to generate the code in implementation section.

这篇关于如何在Delphi XE中自动实现继承的抽象方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆