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..

Cheers,
Patrick



>> 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
>on.unroll");
>> 
>ManagedBuildManager.setOption(conf, holder, unroll,f16.toolchain.compiler.gener
>al.opti_option.unroll.2");
>> }
>>      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 ?
>
>Patrick,
>
>This is a known issue, see:
>   https://bugs.eclipse.org/bugs/show_bug.cgi?id=161605
>
>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.
>
>Regards,
>  Wieant
>_______________________________________________
>cdt-dev mailing list
>cdt-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top