Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] Patches to error parsing classes

> 
> Folks,
> 
>  I got into a situation where I wanted to use the ErrorParserManager
> class from org.eclipse.cdt.internal.errorparsers to parse error output
> from a preprocessor run.

If you are in the vicinity, the errorparsing class, GCCErrorParser etc ..
try to be smart but still ...  If you have ideas, my office is open 8-).


>  Unfortunately, at that point, I was nowhere near an ACBuilder-derived
> class to feed to the ErrorParserManager.  Taking a look at the code for
> the class, it appears that it uses ACBuilder for two things - to call
> getProject() and addMarker().
> 

The abstraction is a good idea.

>  The attached patches do the following:
> 
> - IMarkerGenerator.patch
>  Adds an interface with one member, addMarker(), to the package
>  org.eclipse.cdt.core.

Applied.

> 
> - ACBuilder.patch
>  Adds "implements IMarkerGenerator" to the ACBuilder declaration.
> 

Applied.

> - CBuilder.patch
>  Moves the creation of the ErrorParserManager from the CBuilder
>  constructor and into the invokeMake() function so it picks up
>  the proper context (current project).
> 

Applied.

> - ErrorParserManager.patch
>  Changes the ErrorParserManager class to use an instance of IProject
>  and IMarkerGenerator instead of an ACBuilder.  Retains the constructor
>  that takes an ACBuilder reference, but simply forwards the call on
>  to the (IProject, IMarkerGenerator) constructor.

Applied.

>  I would appreciate if the maintainer of this code could review my
> changes incorporate them into the project's repository.

Done, thanks.



Back to the top