Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2020-10

Feature Request: Override/Implement methods

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I've pulled the latest Lazarus code and went through all the menu items I could find but could see what I was looking for. Does Lazarus have a feature eg: (Editor -> Source [popup menu] -> Override/Implement Methods) so the IDE could stub out say missing methods from a Interface I listed in the class definition, or allow to override methods from parent classes?

Attached is a screenshop of Eclipse (Java IDE) where it will generate stub code for a new "QuackBehaviour" interface I specified in the class I'm currently editing.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2020-10-08 00-01-00.png Type: image/png Size: 14481 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20201008/757cce96/attachment.png>

Reply by email

Martin Frb
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Hi, I've pulled the latest Lazarus code and went through all the menu items I could find but could see what I was looking for. Does Lazarus have a feature eg: (Editor -> Source [popup menu] -> Override/Implement Methods) so the IDE could stub out say missing methods from a Interface I listed in the class definition, or allow to override methods from parent classes?

AFAIK Closest we have is; Refactor > Abstract Methods.

Lists abstracts methods that are not overriden in this or parent class (i.e that would still be abstract in this class)

Reply by email

Mattias Gaertner
to Martin Frb
Show quoted text 14 lines
On 08/10/2020 01:16, Graeme Geldenhuys via lazarus wrote: > Hi, > > I've pulled the latest Lazarus code and went through all the menu > items I could find but could see what I was looking for. Does > Lazarus have a feature eg: (Editor -> Source [popup menu] -> > Override/Implement Methods) so the IDE could stub out say missing > methods from a Interface I listed in the class definition, or allow > to override methods from parent classes? AFAIK Closest we have is; Refactor > Abstract Methods. Lists abstracts methods that are not overriden in this or parent class (i.e that would still be abstract in this class)

As for overrides:
Insert a new line in the class declaration, Ctrl+Space, select the parent method. This will create an override.

Mattias

Reply by email

Marc Weustink
to Mattias Gaertner
Mattias Gaertner wrote 21 lines
On Thu, 8 Oct 2020 01:36:23 +0200 Martin Frb via lazarus wrote: > On 08/10/2020 01:16, Graeme Geldenhuys via lazarus wrote: >> Hi, >> >> I've pulled the latest Lazarus code and went through all the menu >> items I could find but could see what I was looking for. Does >> Lazarus have a feature eg: (Editor -> Source [popup menu] -> >> Override/Implement Methods) so the IDE could stub out say missing >> methods from a Interface I listed in the class definition, or allow >> to override methods from parent classes? > > AFAIK Closest we have is; Refactor > Abstract Methods. > > Lists abstracts methods that are not overriden in this or parent > class (i.e that would still be abstract in this class) As for overrides: Insert a new line in the class declaration, Ctrl+Space, select the parent method. This will create an override.

DUH... learning every day.

Marc

Reply by email