Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Shortcut um Interfaces zu implementieren? (https://www.delphipraxis.net/149969-shortcut-um-interfaces-zu-implementieren.html)

Namenloser 3. Apr 2010 19:38


Shortcut um Interfaces zu implementieren?
 
Hallo,

ich hab mal eine kurze Frage. Ich wurste gerade mit Interfaces herum und finde es etwas mühselig jede Methodendeklaration einzeln anzulegen.

Gibt es eine Möglichkeit, in einer Klasse, die ein bestimmtes Interface implementieren soll, automatisch alle benötigten Methoden für dieses Interface anzulegen? Wenn man z.B. in der Klassendeklaration Ctrl+Space drückt, wird ja in der Codevervollständigung eine Liste mit allen Methoden des Interfaces in Rot angezeigt. Allerdings kann man immer nur eine Methode auf einmal einfügen.

Ich will aber nicht für jeden einzelnen Eintrag diesen Schritt wiederholen - kann man auch irgendwie alle Deklarationen auf einen Rutsch einfügen?

Beispiel:
Delphi-Quellcode:
type
  IMyInterface = interface
    function GetAValue: integer;
    procedure SayHello;
  end;
Delphi-Quellcode:
  TMyObject = class (TInterfacedObject, IMyInterface)
    *shortcut*
  end;
=>
Delphi-Quellcode:
  TMyObject = class (TInterfacedObject, IMyInterface)
  public
    function GetAValue: integer;
    procedure SayHello;
  end;
Vielen Dank

s.h.a.r.k 3. Apr 2010 19:40

Re: Shortcut um Interfaces zu implementieren?
 
Shift+Strg+C wird nicht funktionieren, oder?

Namenloser 3. Apr 2010 19:42

Re: Shortcut um Interfaces zu implementieren?
 
Zitat:

Zitat von s.h.a.r.k
Shift+Strg+C wird nicht funktionieren, oder?

Leider nicht, nein. Hab ich schon probiert.

himitsu 28. Apr 2010 15:46

Re: Shortcut um Interfaces zu implementieren?
 
Strg+Shift+G
Ach nee, hier war ja was anderes gemeint.

Sowas hatte ich auch noch nicht entdeckt ... aber wäre schon cool sowas.

Aber notfalls könnte man sich bestimmt was über die OpenToolsAPI basteln. :gruebel:


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:22 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz