Is there anyone that can explain how the registers under tools configuration work ??? Please give examples
I'm trying to set-up "captured-output-doubleclick" function for ant.
In advance thanks,
delley
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
From regular expressions:A regular expression that matches the output must be typed in the Regular Expression box, and the file name, line and column registers set to the appropriate values. See Regular Expressions to Match Compilation Errors for more information.
I don't think that this covers the subject very much...In general, each line must include a file name, but there is one special case: if the output specifies only the corresponding line numbers (and optional column numbers), the file name is assumed to be that of the document that was active when the tool was started. For an example, see "Tidy HTML", below.
delley wrote:... But I've searched through the Textpad help with out finding anything that specifically explains what they (file, line, column) are for. ...
Here the first register is not used, ie. the (Error\|Warning\),Menu text: Compile C++
Command: C:\Borland\BCC55\Bin\bcc32.exe
Parameters: $File
Initial directory: $FileDir
Capture Output: [x]
Save files: [x]
Then set the regular expression as follows:
Expression: ^\(Error\|Warning\) [A-Z][0-9]+ \(.+\) \([0-9]+\):
File Register: 2
Line Register: 3
Yes.... so if "finally the third contains the line number, ie. ([0-9]+\). " shouldn't that be \([0-9]+\) with the leading backslash (not trying to be picky, just trying to be sure I understand correctly). This is considered the 3rd since:
\(Error\|Warning\) is the first
\(.+\) is considered the second
You may be right on this, I usually tend to have a very high opinion of TP'sso you set the line number pulldown to 3 in the tool setup dialog?
Found this at http://textpad.com/support/tips/index.html#Pascal , I think itnowhere in the doc/help does it mention the relationship between the regexp that lays ( and ) into the match and the file/line/column settings
Regular expression for the free Pascal compiler:
Expression = \([^(]+\)(\([0-9]+\),\([0-9]+\)
File Register = 1
Line Register = 2
Column Register = 3
Code: Select all
find ^line ([0-9]+) column ([0-9]+) - Warning: .*$
replace \1+\2In the find dialog, I was able to get it to match on only the column, only the line, and the entire line (depending on how much of the regexp I put into the find dialog). So I think I'm past the point of considering that I've done something dopey that is causing this not to work. (of course now by stating that publicly it will turn out to be something simple that I've overlooked...)s_reynisson wrote:I've been following that thread but since I do not have Tidy on my puter I can
only test the regex in my editor and using POSIX this works fine for me:
^line ([0-9]+) column ([0-9]+) - Warning: .*$
I double checked using Replace and I always got the correct line+column
from registers 1 and 2.This regexp is really the same as posted by Helios in the HOW-TO's.Code: Select all
find ^line ([0-9]+) column ([0-9]+) - Warning: .*$ replace \1+\2
good catch, i just didn't get the leading '-' when i cut and pasted, I just checked and its in there. <whew> woulda felt kinda stoopid if i missed that one...From your post: "params: errors -quiet $File" but in the HOW-TO's
it reads "params: -errors -quiet $File". Can you double check it?