Bug 26830 - Allow external programs to create tasks and markers through regex matches on the output
Summary: Allow external programs to create tasks and markers through regex matches on ...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-20 21:22 EST by Ed Burnette CLA
Modified: 2004-08-20 14:32 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 Ed Burnette CLA 2002-11-20 21:22:39 EST
For example I have a non-standard build system and run builds (compiles, etc.) 
through the external tools interface. The build program generates error 
messages and I want to parse the error messages and generate tasks and markers 
for them just like with a normal make or java build. This would be easy if you 
could define some regular expressions in the external tool preferences to have 
eclipse go through the stdout/stderr produced by the tool, match the 
expressions, and generate tasks/markers as directed.

Here's one possible idea for how to implement this. For an error line that 
looks like this:

\\root\u\ebb\src\sqpolap.x(983): Error 15: invalid function call

You could specify a matching pattern like "^(.*)\(([0-9]*)\): 
((Error|Warning).*)" and define the filename substitution to be "\1", line 
number "\2", and message "\3".
Comment 1 Darin Wright CLA 2002-11-21 12:06:07 EST
This is a duplicate - but better describes the problem, so I will leave it as 
the master.
Comment 2 Darin Wright CLA 2002-12-05 10:11:33 EST
We do not have a regular expression facility. We may not be able to support 
such an extension.
Comment 3 Darin Wright CLA 2003-01-08 21:07:45 EST
This is going to be deferred for post 2.1 consideration. We do not have proper 
regular expression matching for 2.1. For a workaround, you can implement a 
console line listener.

@see extension point org.eclipse.debug.ui.consoleLineTrackers

There are several examples:
* JavaConsoleTracker
* JavacLineTracker
Comment 4 Darin Wright CLA 2004-07-29 16:01:07 EDT
Re-open for 3.1 consideration and generic console work.
Comment 5 Kevin Barnes CLA 2004-08-18 13:57:18 EDT
Regex pattern matching implemented in new IOConsole (see IPatternMatchListener, PatternMatchEvent). 
This functionality is not available in ProcessConsole yet. Filed separate bug #72167 to migrate that 
console to the new code.
Comment 6 Kevin Barnes CLA 2004-08-18 13:57:50 EDT
Darin, please verify
Comment 7 Darin Wright CLA 2004-08-20 13:50:35 EDT
The basic infrastructure is now present to perform regular expression matching 
in a console. What the listener does with the matches is up to the listener 
implementation (add markers, hyperlinks, etc). I'd rather leave the action up 
to a listener, rather than provide all sorts of built-in possibilties.

I'm also going to suggest that we add an extension point to register regular 
expressions for pattern match listeners, with delegates that are instantiated 
lazily when a match is found. I will add this request to the bug that is still 
open - bug 72167.

Verified (with Javadoc modifications).