Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Refreshing UI when using IManagedOptionValueHandler

The problem is that the compiler of my toolchain needs additional optimization flags when i change the optimization level:

When optimization level 0 is set, no other flags are needed, so they can be disabled.
When i change to optimization level 3 for example, two other flags have get enabled now and one enum flag has to get changed to an other value.

I didnt find a way to realize this with enablements, tell me when i am wrong..


>> i am just working on setting options dynamicly in my toolchain or
>> tools....  I implemented IManagedOptionValueHandler for one option
>> to set an other enum option
>> when the handlevalue method gets called:
>> public boolean handleValue(IBuildObject configuration,
>> IHoldsOptions holder, IOption option, String extraArgument,
>> int event)
>> {
>> if(configuration instanceof IConfiguration)
>> {
>> IConfiguration conf = (IConfiguration)configuration;
>> // change enum option
>IOption unroll = holder.getOptionById("f16.toolchain.compiler.general.opti_opti
>ManagedBuildManager.setOption(conf, holder, unroll,f16.toolchain.compiler.gener
>> }
>>      return true;
>> }
>> Problem is that the UI didnt get refreshed, i have to reopen the
>> build settings to see the changes.  Any idea how to solve this
>> problem ?
>This is a known issue, see:
>Perhaps you could explain why you want to programmatically change a
>specific option. A more common practice is to disable specific
>options or enumeration values based on the value of other options.
>E.g. you can have an enum with values unroll.1 and unroll.2 in which
>unroll.2 is only enabled (visible) if a specific checkbox is selected.
>  Wieant
>cdt-dev mailing list

Back to the top