Tools: Registers - File, Line, Column
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Tools: Registers - File, Line, Column
Hi all,
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
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
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Thanks for your reply
But I've searched through the Textpad help with out finding anything that specifically explains what they (file, line, column) are for. I also looked in the sections you suggested
From texpad help:
I can make qualifyed guesses to what they mean but I would rather have it explained
Regards,
Delley 8) 8) 8)
But I've searched through the Textpad help with out finding anything that specifically explains what they (file, line, column) are for. I also looked in the sections you suggested
From texpad help:
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.
I can make qualifyed guesses to what they mean but I would rather have it explained
Regards,
Delley 8) 8) 8)
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
I must be missing something in your post
Again, from TP's help file: Hypertext links from file search and user tool
output to the relevant source line.
ie. when you are in a captured output window in TP, in many cases from a
compiler, double clicking on a error line in that output will take you to the file
and postion you on the line and column.
Again, from TP's help file: Hypertext links from file search and user tool
output to the relevant source line.
ie. when you are in a captured output window in TP, in many cases from a
compiler, double clicking on a error line in that output will take you to the file
and postion you on the line and column.
delley wrote:... But I've searched through the Textpad help with out finding anything that specifically explains what they (file, line, column) are for. ...
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
As I understand it (maybe someone would like to confirm this):
This is from TP's help file, from How to Use with Compilers.
used to group the items together to create an "or" statement for the regex,
the second contains the filename, ie. (.+\)
and finally the third contains the line number, ie. ([0-9]+\).
Column number is not used at all here, not a part of the C++ compiler output.
Edit: If you are not a "regex geek" you can post a sample output here and
tell us what lines you need to capture, plenty of us "geeks" here
This is from TP's help file, from How to Use with Compilers.
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
used to group the items together to create an "or" statement for the regex,
the second contains the filename, ie. (.+\)
and finally the third contains the line number, ie. ([0-9]+\).
Column number is not used at all here, not a part of the C++ compiler output.
Edit: If you are not a "regex geek" you can post a sample output here and
tell us what lines you need to capture, plenty of us "geeks" here
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
This still isn't clear to me either, I've got a similar problem going at http://textpad.com/forum/viewtopic.php?t=4968
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
so you set the line number pulldown to 3 in the tool setup dialog?
nowhere in the doc/help does it mention the relationship between the regexp that lays ( and ) into the match and the file/line/column settings
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
so you set the line number pulldown to 3 in the tool setup dialog?
nowhere in the doc/help does it mention the relationship between the regexp that lays ( and ) into the match and the file/line/column settings
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Yes. For clarity I used only the ().
help file, but in this case there seem's to be a "blank";)
confirms what we have been wondering about the registers.
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?
help file, but in this case there seem's to be a "blank";)
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
confirms what we have been wondering about the registers.
Regular expression for the free Pascal compiler:
Expression = \([^(]+\)(\([0-9]+\),\([0-9]+\)
File Register = 1
Line Register = 2
Column Register = 3
Last edited by s_reynisson on Thu Jan 22, 2004 4:37 pm, edited 1 time in total.
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
thanks for the prompt reply, could you take a second and look at my issue with textpad and tidy? its at http://textpad.com/forum/viewtopic.php?t=4968, any help appreciated
Mike
Mike
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
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.
From your post: "params: errors -quiet $File" but in the HOW-TO's
it reads "params: -errors -quiet $File". Can you double check it?
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.
Code: Select all
find ^line ([0-9]+) column ([0-9]+) - Warning: .*$
replace \1+\2
From your post: "params: errors -quiet $File" but in the HOW-TO's
it reads "params: -errors -quiet $File". Can you double check it?
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
In 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
The problem is placement of the cursor in the column when I click on the results. It seems to return in some random spot > col 1. I have column set up as 2 in the tool setup, with line in 1 and file blank.
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?
If you feel like giving it a shot, the tidy exe is a small (272k) single file available from http://htmltrim.sourceforge.net/tidy.html, I grabbed the first zip/exe on the page and d/l'd it (the January 10th 2003 tidy-exe.zip file). created a ./tidy subdir at the same level as system, samples, spelling - and mapped it out in tools.
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
Works for me using just the HOW-TO's post.
The only change I made was to strip the \'s since I'm using POSIX.
My settings are:
Command: C:\Program Files\TextPad 4\Tidy\tidy.exe
Parameters: -errors -quiet $File
Intial folder: $FileDir
Ticked: Capture output, Sound alert when completed.
Regex to match output: ^line ([0-9]+) column ([0-9]+)
(using POSIX)
Registers: File *Blank* Line 1 Column 2
The only change I made was to strip the \'s since I'm using POSIX.
My settings are:
Command: C:\Program Files\TextPad 4\Tidy\tidy.exe
Parameters: -errors -quiet $File
Intial folder: $FileDir
Ticked: Capture output, Sound alert when completed.
Regex to match output: ^line ([0-9]+) column ([0-9]+)
(using POSIX)
Registers: File *Blank* Line 1 Column 2
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be