[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] how to get the project currently being built?
|
Andrew,
thanks for your reply! Yes, what you describe certainly works, but now I'm trying to take it to the next level (have several different marker types with different icons according to the output of the external tool; being able to get the same behavior
in many CDT installations without having to reconfigure the error parser, etc...). This is why I've been working on my own plug-in...
and I still don't know how to get the current project being built programatically... :(
any ideas?
Sam.
From: FLORES SANDOVAL Samuel
Sent: Friday, January 14, 2011 12:39 PM
To: cdt-dev@xxxxxxxxxxx
Subject: how to get the project currently being built?
Hello everyone,
thanks to all of you for the amazing work you do with the CDT. I'm having some trouble on something that might be easy and although I've browsed the archives and googled the problem I can't figure out a solution. Hope you guys can
help me.
I'm trying to create a plug-in that will integrate an external tool that performs static analysis on C code. As a first step I'm trying to generate several different markers from the output of the external tool (which I call from
the c project's makefile).
My problem is that the external tool is executed by Make on the project's directory and thus the output is relative to that directory, for example:
>> file1.c:11:[value] assigning non deterministic value for the first time
from this line I can figure that a marker should be generated on file1.c.
Because my typical workspace could contain several files named file1.c on different projects,
I first have to find a way to know on which project file1.c is being built (To which project does the target I clicked on belong?)
How can I know from my code what's the project I'm currently building?
I've tried things like:
MakeCorePlugin.getDefault().getTargetManager().getTargetBuilderProjects()
but this returns all the open c projects, not just the one currently being built.
I'm sure someone has faced a similar need in the past...
thank you very much for any pointers that you can give me!
cheers!
Sam
Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par
erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts
soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet,
the Atos Origin group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted.