Hi,
Is there a function in the IDE to delete the implementation of a method when the Interface signature is removed? Almost like class completion, but in reverse?

Mailing lists / lazarus / 2009-10
11 messages · 5 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
Is there a function in the IDE to delete the implementation of a method when the Interface signature is removed? Almost like class completion, but in reverse?
Is there a function in the IDE to delete the implementation of a method when the Interface signature is removed? Almost like class completion, but in reverse?
A very dangerous feature. When the tool cannot match properly declaration and implementation header/signature, much code can be destroyed.
I'd agree with a refactoring feature, to delete both interface and implementation of a selected method. That feature could safely do nothing in case of a mismatch.
DoDi
Simply removing a method with empty implementation if the header is in the published section would also be nice. A misclick in the OI causes an empty method to be generated. Deleting these automatically on compilation/save would be a nice thing. (as Delphi does, incidentally)
Michael.
A very dangerous feature. When the tool cannot match properly declaration and…
2009/10/9 Hans-Peter Diettrich :
A very dangerous feature. When the tool cannot match properly declaration and implementation header/signature, much code can be destroyed.
Nothing your source code management system cannot retrieve. Or a simple Ctrl+Z key sequence undo the delete.
Simply removing a method with empty implementation if the header is in the published…
2009/10/9 Michael Van Canneyt :
Somehow I thought that was already added....?
2009/10/9 Graeme Geldenhuys :
Yes, you can do this via right click -> refactoring -> show empty methods. Would be nice to have this happen automatically, though.
Henry
Options->Editor->Automatic features->Auto remove empty methods
2009/10/9 Alexander Klenin :
Options->Editor->Automatic features->Auto remove empty methods
Excellent, thanks for the tip.
Henry
Options->Editor->Automatic features->Auto remove empty methods Alexander S. Klenin
2009/10/9 Alexander Klenin :
Options->Editor->Automatic features->Auto remove empty methods
:-) I love it when that happens.
[...I knew I saw it somewhere in the IDE...]
Options->Editor->Automatic features->Auto remove empty methods Alexander S. Klenin
Duh !
I should open this dialog from time to time to see if something new appeared :)
Thanks for the tip...
Michael.
2009/10/9 Michael Van Canneyt :
Options -> Windows -> Show New Features -> Once every 7 days.
;-)