Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-08

new edit icon in gutter?

9 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I just upgraded to the latest revision in the repository and noticed something new. What does the new icon in the gutter mean of do? See attached image.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -------------- next part -------------- A non-text attachment was scrubbed... Name: editor.png Type: image/png Size: 4931 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090804/458ef848/attachment.png>

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Tue, 04 Aug 2009 16:24:58 +0200 See here http://wiki.lazarus.freepascal.org/New_IDE_fea…
Mattias Gaertner wrote

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.

Lazarus IDE is leading the way! :-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Martin
to Graeme Geldenhuys
Graeme Geldenhuys wrote 11 lines
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

Reply by email

Graeme Geldenhuys
to Martin
Martin wrote
Maybe you know, maybe not, anyway, just a tip.

Maybe not! :-) I must *really* take the time to learn to understand and write regex. Any tips on how I can learn regex? A good book or article on the internet? Is there a tool that one can use to test/debug a regex before running it for real? I work under Linux, but I guess a Windows tool will do as well - as long as it can run under WINE.

Reordering params, etc: I often use regular-expesion search. (needs a bit of experience)

Damn, why have I not mentioned my problem 2 days ago! ;-) You would have saved by hours of repetitive cut and paste sequences.

Show quoted text 5 lines
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.

I guess I answered by own question about testing a regex before I run it for real. Using the "confirm before replace" in Lazarus's "Search and Replace" dialog, it gives me a preview of what the replacement is going to look like. Nice.

Additionally you can use "alt-m" while being on a word, to keep this word highlighted, even if you move the cursor away.

Ummm... that is handy. Thanks!

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Hans-Peter Diettrich
to Graeme Geldenhuys
Show quoted text 7 lines
> Maybe you know, maybe not, anyway, just a tip. Maybe not! :-) I must *really* take the time to learn to understand and write regex. Any tips on how I can learn regex? A good book or article on the internet? Is there a tool that one can use to test/debug a regex before running it for real? I work under Linux, but I guess a Windows tool will do as well - as long as it can run under WINE.

You may have a look at TextTransformer
http://www.texttransformer.org

It comes with regular expressions and an integrated debugger, in a sophisticated IDE.

The latest project is a Delphi parser:
http://www.texttransformer.org/Delphi_en.html

DoDi

Reply by email

Michael Schneider
to Graeme Geldenhuys: Maybe not! :-) I must *really* take the time to learn to understand and write regex. Any…
Graeme Geldenhuys wrote
Any tips on how I can learn regex? A good book or article on the internet? Is there a tool that one can use to test/debug a regex before running it for real? I work under Linux, but I guess a Windows tool will do as well - as long as it can run under WINE.

this sites can help:
http://www.regular-expressions.info/

http://www.regextester.com/

http://www.fileformat.info/tool/regex.htm

Reply by email

Henry Vermaak
to Graeme Geldenhuys: Maybe not! :-) I must *really* take the time to learn to understand and write regex. Any…

2009/8/5 Graeme Geldenhuys :

Show quoted text 9 lines
Martin wrote: > > Maybe you know, maybe not, anyway, just a tip. Maybe not! :-) ?I must *really* take the time to learn to understand and write regex. Any tips on how I can learn regex? A good book or article on the internet? ?Is there a tool that one can use to test/debug a regex before running it for real? I work under Linux, but I guess a Windows tool will do as well - as long as it can run under WINE.

sed is good for messing around with, or if you know vi, you can use :s/regex/replacement/. Use "u" to undo, refine the regex, try again, etc. Then if you're sure it works, just go :%s/regex/replacement/g, which will do it for every line in the file.

Henry

Reply by email