Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Error Parser Issues..

> 
> Hi Alain,
> 
> I like the new functionality, but I don't want to give up what (I
> thought was) the old functionality.  That is, error parsers are called
> in a particular order, and when an error parser handles an error, the
> remaining error parsers are not called with that line.  There are 2
> reasons why I want to keep this functionality:
> 
> 1. I don't want more than 1 error parser handling a particular error.
> It seems to me that could confuse the user.
> 
> 2. Performance will be better if additional error parsers are not called
> unnecessarily.
> 
> My suggestion for implementing this is a minor modification to your
> proposal.  The "outputparser" element would describe "output parsers"
> which are always called per line (as per your proposal).  An additional
> new element with a new name (for example, "errormessageparser") would
> describe "error message parsers" which are invoked in a specified order
> and indicate whether or not they handled the error message.  Both
> parsers could implement IOutputParser if we add a Boolean return value
> to the new processLine method.  The return value would be used by error
> message parsers and ignored by output parsers.
> 

Allright, we can do this.
Unfortunately we can not get rid of the old interface for 2.1, meaning
the attribute "<errorparser>..</errorparser>" and the interface name IErrorParser
will still be around to support old projects.

But following your idea, we could add this:

public interface IErrorOutputParser {
   void startup(IOuputParserManager mgr);
   boolean processLine(IOutputParserStream block);
   void shutdown();
} 

<extension
  id="MYErrorParser"
  name="%MYErrorParser.name"
  point="org.eclipse.cdt.core.ErrorParser">
  <erroroutputparser
    class="org.eclipse.cdt.internal.errorparsers.MYErrorParser">
  </erroroutputparser>
</extension>

And it will behave as you describe above in  note (1) and (2)

OK ? if yes I'll update the docs later.




Back to the top