Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-core-dev] CDT Error parser


Thanks for your reply,

I have a quick question about creating ErrorParserManager. In
org.eclipse.cdt.make.core.MakeBuilder: thats how you create an ErrorParserManager
ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectory, this,

                                               info.getErrorParsers());


Here info is
IMakeBuilderInfo and it is created at line 65 of ErrorParserManager
       
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(args, MakeBuilder.BUILDER_ID);

My problem is that I cant
call MakeCorePlugin.createBuildInfo(args, MakeBuilder.BUILDER_ID)
since MakeBuilder is not active in our BuildCode. Is there any other way I can get ErrorParsers which are added by extending ErrorParser extention point in CDT? Instead of calling
info.getErrorParsers() ?


Thanks

Ali




achapiro <achapiro@xxxxxxx>
Sent by: cdt-core-dev-bounces@xxxxxxxxxxx

05/10/2007 03:59 PM

Please respond to
"CDT Core developers list." <cdt-core-dev@xxxxxxxxxxx>

To
"CDT Core developers list." <cdt-core-dev@xxxxxxxxxxx>
cc
Subject
Re: [cdt-core-dev] CDT Error parser





See org.eclipse.cdt.make.core.MakeBuilder:

               ErrorParserManager epm = new
ErrorParserManager(getProject(), workingDirectory, this,
info.getErrorParsers());
               epm.setOutputStream(streamMon);
               OutputStream stdout = epm.getOutputStream();
               OutputStream stderr = epm.getOutputStream();
               // Sniff console output for scanner info
               ConsoleOutputSniffer sniffer =
ScannerInfoConsoleParserFactory.getMakeBuilderOutputSniffer(
                       stdout, stderr, getProject(), workingDirectory,
null, this, null);
               OutputStream consoleOut = (sniffer == null ? stdout :
sniffer.getOutputStream());
               OutputStream consoleErr = (sniffer == null ? stderr :
sniffer.getErrorStream());
               Process p = launcher.execute(buildCommand,
buildArguments, env, workingDirectory);
               if (p != null) {
                   try {
                       // Close the input of the Process explicitly.
                       // We will never write to it.
                       p.getOutputStream().close();
                   } catch (IOException e) {
                   }
                   // Before launching give visual cues via the monitor
                   
monitor.subTask(MakeMessages.getString("MakeBuilder.Invoking_Command") +
launcher.getCommandLine()); //$NON-NLS-1$
                   if (launcher.waitAndRead(consoleOut, consoleErr, new
SubProgressMonitor(monitor, 0))
                       != CommandLauncher.OK)
                       errMsg = launcher.getErrorMessage();



Ali Sheraz wrote:
>
> Hi Guys,
>
> I am a co-op student working for J9 team in Ottawa under Gabriel
> Castro. My current task involves using CDT error parser to read the
> results of make (which we use to build J9 vm) and then parse it using
> the CDT error  parser. I am trying to find piece of code which passes
> the results of standard make to CDT error parser.
>
> Any help is much appreciated.
> Thanks
>
> Ali
> ------------------------------------------------------------------------
>
> _______________________________________________
> cdt-core-dev mailing list
> cdt-core-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-core-dev
>  

_______________________________________________
cdt-core-dev mailing list
cdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-core-dev


Back to the top