Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Question about external checkers (codan)

Thanks Alena. 

I've been reading CDT source and I haven't found an example similar to what you described. I'd truly appreciate if you could please point me to an example or just some area I can start looking at :)

Regards,
-Alex

On Wed, Feb 2, 2011 at 7:47 AM, Alena Laskavaia <elaskavaia.cdt@xxxxxxxxx> wrote:
You should not be launching command line tool from a checker. You
either integrate it to a makefile
and write a parser plugin (or use customized parser) or integrate it
as a toolchain piece or as a builder.
Running from a checker would be huge performance hit.

On Tue, Feb 1, 2011 at 6:34 PM, Alex Ruiz <alruiz@xxxxxxxxxx> wrote:
> Thanks Andrew for the tip! I'll have it handy when I start working on
> parsing the tool output.
> I've been looking around the CDT code and I found the class
> org.eclipse.cdt.utils.spawner.ProcessFactory seems to do what I'm looking
> for. It is being used by org.eclipse.cdt.dsf.gdb.service.GDBBackend to
> launch a GDB process.
> I'll try this one to see if it really does what I think it does. Please let
> me know if there's a better way to launch an external command-line tool from
> a codan checker :)
> Thanks,
> -Alex
>
> On Tue, Feb 1, 2011 at 2:30 PM, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:
>>
>> Did you consider using errorparsers? For that you don't even have to write
>> plugin although you could if you need to.
>> See http://wiki.eclipse.org/CDT/User/NewIn70#Build about Regular _expression_
>> Error Parser or if you want it in your
>> plugin http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_Error_Parser_.28or_The_project_seems_to_build_file.2C_but_doesn.27t_parse_my_error_output_what_can_I_do.3F.29
>> Thanks,
>> Andrew
>>
>> On Tue, Feb 1, 2011 at 5:18 PM, Alex Ruiz <alruiz@xxxxxxxxxx> wrote:
>>>
>>> Greetings,
>>> I'm new to CDT and Eclipse plug-in development in general. I've been
>>> reading through the mailing list trying to find information about writing
>>> codan external checkers (I started with this great
>>> presentation: http://wiki.eclipse.org/images/f/f9/CodanCDTSummit2010.pdf .)
>>> What I need to do is write a codan external checker that calls a
>>> command-line tool, then parse the output somehow and map it to actual
>>> warnings/errors in Eclipse. The part that I haven't found answers for is how
>>> to call the external command-line tool.
>>> In one of the messages, the ETF (PTP's External Tool Framework
>>> - http://wiki.eclipse.org/PTP/ETFw/PTP_External_Tools_Framework ) is
>>> mentioned. I looked into it and, IMHO, it seems great if I want to generate
>>> a UI where users can enter some parameters for the tool. In my case, I just
>>> want to call the tool, passing parameters (if any) myself, without showing
>>> any UI. For my use case, ETF seems an overkill.
>>> I also googled around and found this little gem: cppcheclipse
>>> ( http://code.google.com/a/eclipselabs.org/p/cppcheclipse/ .) It does
>>> something similar to what I want to do, but 1. It doesn't use codan and 2.
>>> it uses apache-commons-exec for launching the command-line tool (something
>>> that is a no-no for my project.)
>>> Any help on how I can launch a command-line tool, without any UI, as a
>>> external checker, will be greatly appreciated :)
>>> Many thanks in advance,
>>> -Alex
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>
>>
>>
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
>
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top