Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Running Clean

Hi Karol,

Essentially calling setRebuildState(true) on the IConfiguration will do
the trick.  The problem is you need to set that on the configuration
before the build is run.  I don't think there's an easy way to do this
using the IOptionApplicaibility interface (on the option itself) as
isOptionEnabled isn't called for the option in question, and
isOptionUsedInCommandLine(...) is called too late.

Other ways you could do this:
- If you implement your own ICPropertyTab, you could set the
setRebuildState if the IOption is selected when the apply event happens.
- You could put an option applicability handler on another option in the
same category (slightly horrible) and setRebuildState when the
isOptionEnabled(...) method is called.

Cheers,

James

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Karol Krizka
> Sent: 21 July 2008 16:52
> To: CDT General developers list.
> Subject: [cdt-dev] Running Clean
> 
> Hi,
> 
> I'm wondering if it's possible to require to run make clean before a
> managed C project is being build.
> 
> The reason I am asking this is because I wrote my own managed
> configuration, which has a certain option that if enabled requires an
> rebuild of the entire project. What I would like to do is to catch
> when the user enables it the next time the user tries to build the
> project it will first run clean and then build it.
> 
> If that is not possible, I'll just run the clean command when the user
> enables the option it runs clean automatically. But then, how do I run
> the clean command from the CDT SDK?
> -- 
> Cheers,
> Karol Krizka
> http://www.krizka.net
> http://www.thesphericalcow.com
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
> 



Back to the top