[Lazarus] Feature Request: Override/Implement methods

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Feature Request: Override/Implement methods

Free Pascal - Lazarus mailing list
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

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

Screenshot from 2020-10-08 00-01-00.png (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Feature Request: Override/Implement methods

Free Pascal - Lazarus mailing list
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)
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Feature Request: Override/Implement methods

Free Pascal - Lazarus mailing list
On Thu, 8 Oct 2020 01:36:23 +0200
Martin Frb via lazarus <[hidden email]> 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.

Mattias

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Feature Request: Override/Implement methods

Free Pascal - Lazarus mailing list


On 8-10-2020 02:02, Mattias Gaertner via lazarus wrote:

> On Thu, 8 Oct 2020 01:36:23 +0200
> Martin Frb via lazarus <[hidden email]> 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
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Feature Request: Override/Implement methods

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On 08.10.2020 02:02, Mattias Gaertner via lazarus wrote:
> As for overrides:
> Insert a new line in the class declaration, Ctrl+Space, select the
> parent method. This will create an override.

And the same goes for interfaces. Ctrl+Space offers methods from
interfaces as well.

Ondrej

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus