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

> 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_option.unroll");
> ManagedBuildManager.setOption(conf, holder, unroll,f16.toolchain.compiler.general.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


Back to the top