[Lazarus] new edit icon in gutter?
Martin
lazarus at mfriebe.de
Tue Aug 4 22:04:28 CEST 2009
Graeme Geldenhuys wrote:
> Mattias Gaertner wrote:
>>
>> See here
>> http://wiki.lazarus.freepascal.org/New_IDE_features_since#Syncron-Edit
>
> By the way, that feature could not have come at a better time!! I'm
> busy porting our company test suite from FPCUnit to DUnit2 - a very
> tedious job. I have to change thousands of AssertEquals(..) to
> CheckEquals(..) and then reorder the parameters. Search and Replace
> could work, but this is so much better because I can clearly see which
> methods I need to reorder the parameters for on a screen by screen basis.
Maybe you know, maybe not, anyway, just a tip.
Reordering params, etc: I often use regular-expesion search. (needs a
bit of experience)
AssetEquals('some text', foo <> b, bar);
now assuming there are no comma in the boolean expression (a in [1,2]),
and no escaped quotes( '' ) in the text:
( including various " *" to skip spaces)
match: AssertEquals\( *('.*?'), *(.*?), *(.*?)\);
replace: CheckEquals($2, $3, $1);
I use No-Confirmation, replace single instance => and use F3, so I see
each replacement as it was done.
Additionally you can use "alt-m" while being on a word, to keep this
word highlighted, even if you move the cursor away.
Best Regards
Martin
More information about the Lazarus
mailing list