[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Question about external checkers (codan)
|
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
Andrew
Greetings,
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