Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311829 - Problem with concenating file-field in "Test Plugin RegexErrorParser"
Summary: Problem with concenating file-field in "Test Plugin RegexErrorParser"
Status: RESOLVED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 03:52 EDT by Andreas Tadic CLA
Modified: 2010-05-10 05:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Tadic CLA 2010-05-06 03:52:46 EDT
Using the newly added "Test Plugin RegexErrorParser", I've added my own regexfilter to match the compiler error and warning output.

Given the following compiler warning outout with regex filter, it works fine:

Regex: 
Severity: Warning
Pattern: (.*)\((\d+)\): warning: (.*)
File: $1
Line: $2
Description: $3

Compiler warning output:
C:/MyFolder/Subfolder/Animation.inl(27): warning: empty body in an else-statement

-- However, if I want to "remap" the filepath, say from /Subfolder+, the File field won't translate this to what c:/Otherfolder/$1 should result in.

Regex: 
Severity: Warning
Pattern: (.*)/Myfolder/(.*)\((\d+)\): warning: (.*)
File: C:/OtherFolder/$2
Line: $3
Description: $4

The file should result in:
C:/OtherFolder/Subfolder/Animation.inl but this don't seem to work.
Needless to say, this is an brute example. I whish to replace the mapping with a variable, say PWD or alike in the end..

Thanks,
Andreas
Comment 1 Andrew Gvozdev CLA 2010-05-06 09:59:50 EDT
> Compiler warning output:
> C:/MyFolder/Subfolder/Animation.inl(27): warning: empty body in an else-statement
You got "MyFolder" in your output

> Pattern: (.*)/Myfolder/(.*)\((\d+)\): warning: (.*)
but you placed "Myfolder" in the pattern. It won't match because of lowercase "f".
Comment 2 Elena Laskavaia CLA 2010-05-06 10:44:35 EDT
And should not source lookup mapping be used for that instead?
Comment 3 Andrew Gvozdev CLA 2010-05-06 11:10:07 EDT
What source lookup mapping?
Comment 4 Andreas Tadic CLA 2010-05-08 13:40:28 EDT
(In reply to comment #1)
> > Compiler warning output:
> > C:/MyFolder/Subfolder/Animation.inl(27): warning: empty body in an else-statement
> You got "MyFolder" in your output
> > Pattern: (.*)/Myfolder/(.*)\((\d+)\): warning: (.*)
> but you placed "Myfolder" in the pattern. It won't match because of lowercase
> "f".

Sorry for the typo, but it is in fact just a typo. In the real case, the casing is correct.

PS: I'm also interested in what Alena means with source-mapping..
Comment 5 Andrew Gvozdev CLA 2010-05-08 13:50:57 EDT
(In reply to comment #4)
> (In reply to comment #1)
> Sorry for the typo, but it is in fact just a typo. In the real case, the casing
> is correct.
I tested your patterns and it works fine for me. Note that your file has to be in a eclipse workspace in open project for this to work. Do you get any problem marker at all? If so, what you get in Resource, Path, and Location columns?

> PS: I'm also interested in what Alena means with source-mapping..
She meant "Common Source Lookup Path" in Debug in preferences but it is not available for error parsers. There is also bug 295627.
Comment 6 Andreas Tadic CLA 2010-05-10 05:45:43 EDT
Andrew,

I didn't realize the source have to be in a eclipse workspace in open project for this to work. That fixed it, sorry for the invoncenience and thank you for your response :)

/Andreas