Skip to main content

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

Hi James,

On Mon, Jul 21, 2008 at 9:10 AM, James Blackburn
<james.blackburn@xxxxxxxxxxxx> wrote:
> 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.
That was exactly what I needed. Thanks! The option is set through a
special editor for the configuration file, so I just had to add a
check when saving it to see if the project should be rebuilt or not
and then use the setRebuildState(true).

> 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
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx

Back to the top