[Lazarus] copy declaration, with implementation [Re: Tweaking 'code completion' for event handlers]

Mattias Gaertner nc-gaertnma at netcologne.de
Fri May 13 14:31:04 CEST 2011


 
 

 Michael Van Canneyt <michael at freepascal.org> hat am 13. Mai 2011 um 12:55
geschrieben:

 >
 >
 > On Fri, 13 May 2011, Martin wrote:
 >
 > > On 13/05/2011 10:03, Mattias Gaertner wrote:
 > >       Graeme Geldenhuys <graemeg.lists at gmail.com> hat am 13. Mai 2011 um
 > >09:48 geschrieben:
 > >
 > >       >    http://bugs.freepascal.org/view.php?id=13994
 > >       >
 > >       > No solution has been implemented in Lazarus yet. As a work-around,
 > >is
 > >       > there any way to tell Code Completion (Ctrl+Shift+C) for event
 > >handlers,
 > >       > to only generate the code in the interface of the unit, and not the
 > >       > implementation section?
 > >
 > >  
 > >
 > > Not yet.
 > >
 > > I will add the checkbox for the implementation to my todo list.
 > >
 > >
 > > That reminds me of an idea, a feature I would like. And that would solve
 > > this too.
 > >
 > > It would be cool if one could with a single copy (or cut; as in copy/paste)
 > > copy a method (or procedure/function) declaration, including the
 > > implementation.
 > > Or even several methods, if one selects several lines in the interface.
 > >
 > > This would/should allow to:
 > > - copy/cut paste a method from one place in a class to another place in the
 > > same class (adjusting order of implementation too)
 > > - copy/cut paste a method from one class to any other class (adjusting the
 > > classname in the "procedure FOOCLASS.metho" line)
 > >   This one would hugely add to the ability of refactoring, moving things
 > > up/down in the class hierachy, or even to rlated classes
 > > - copy/cut paste a plain procedure into a class, making it a method
 > > - copy/cut paste a method to become a plain procedure. So this one still
 > > requires some clean up, for any reference to self
 >
 > I'm all for this one. A 'Remove method/procedure' and 'Insert
 > method/procedure'. 
Good idea.
 


 > As long as it doesn't interfere with regular copy&paste.
 I agree, it should not use the Cut/Copy shortcuts.
 But I see no problem with Paste. Do you see one?


 Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110513/9a01420d/attachment-0003.html>


More information about the Lazarus mailing list