[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdt-dev] Refreshing UI when using IManagedOptionValueHandler
- From: Wieant Nielander <wieant@xxxxxxxxx>
- Date: Thu, 4 Sep 2008 10:03:02 +0200
- Delivered-to: email@example.com
- Organization: Altium, BV
- User-agent: Mutt/1.5.18 (2008-05-17)
>> Instead of using IOptionApplicability.isOptionUsedInCommandLine like
>> James suggested you can also use IOptionApplicability.isOptionEnabled.
>> That way, given the above example, you can have otherflag1 and
>> otherflag2 enabled only if O3 is selected, that means the user can
>> still check/uncheck them, but only if O3 is selected. Dito for the enum
>> flags, in case O3 is selected only flag2/flag3 are shown so the user
>> can still select both of them.
> I can dynamicly enable/disabled options now with implementing those
> functions, but the UI with the new values of an enum still didnt get
Just checked it, but it appears I was mistaken about using
'IOptionApplicability' to disable enum values. Besides using the
'applicabilityCalculator' attribute you will also have to specify the
'valueHandler' attribute for the given enumerated option. Here you
need to specify a class that implements 'IManagedOptionValueHandler'
containing a method 'isEnumValueAppropriate()'. Whenever an option
in the same property page is changed this method is called for each
enum value allowing you to disable it (that is, not to show up in the