5
votes

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.

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!

2
I notice that you have not yet voted here at Stack Overflow. You now have enough reputation to vote. Congratulations!David Heffernan

2 Answers

10
votes

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.

2
votes

No, the Delphi IDE doesn't have an automatic shortcut for this. But, you can use the compiler to make it easier on you.

Define your new class. Then put a line somewhere in your code that says TMyNewClass.Create(whatever). When the compiler parses this, if there are any unimplemented abstract methods on TMyNewClass, it will tell you about them in the compiler warnings.