[Lazarus] copy declaration, with implementation [Re: Tweaking 'code completion' for event handlers]
Martin
lazarus at mfriebe.de
Fri May 13 15:36:10 CEST 2011
On 13/05/2011 14:27, Mattias Gaertner wrote:
>
>
> Martin <lazarus at mfriebe.de> hat am 13. Mai 2011 um 14:44 geschrieben:
>
>> [...]
>> IMHO it should copy (or cut) to clipboard => but as indicated via
>> different shortcut/command.
>
> Yes. Remove method/procedure. Or maybe better two functions: Copy- and
> Cut method/procedure.
>
>>
>> It does therefore need a different clipboard format (a mixed one
>> plain text / codetool-format). The plain text would allow to paste
>> into other apps
>> (SynEdit does the same for copy with fold info / or copy column-mode
>> selection)
>>
>> If required, synEdit could get a callbackon paste => so codetool can
>> check for the special format, and intercept it.
>> At some future point, I can provide insight, how this could even
>> include foldstate info.
>>
> Yes, a special format would be useful.
>
Maybe even synedit could be told to create this format => it has already
some nice code to create clipboard stuff.
Or it can be extended in SynSourceEditor
> The format must contain
>
> - the source of the headers, because they might contain comments and
> ifdefs
>
> - the implementations
>
> - the source position. This is needed to resolve the identifiers,
> which could be used in a later extension to automatically extend the
> uses section of the target unit.
>
>
Actually, there should be (at least) 2 paste methods. (But for starters
one would do)
1) Paste, without any question.
Necessary/Optional actions such as units-dependencies, or replacing
identifiers, can be globally configured
IMHO kept to a minimum by default (insert units into uses, but do not
update identifiers
2) Paste via feedback dialog (like "extract procedure " already has.
Could offer a growing amount of options. Such as an identifier, to use
as prefix for calls to the originating-class. Or creation of missing
fields....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110513/9fd48374/attachment-0003.html>
More information about the Lazarus
mailing list