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

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

> Looks good, i will take a try.
> Which class from cdt implements IOptionApplicability ?

You will have to write your own implementation with your specific
enablement handling, then specify that class in the
applicabilityCalculator attribute of every option that uses
that specific enablement.

You can also have a look at the 'enablement' extension element that can
be specified for an option, it may be sufficient in your case and
saves you the hassle of going through buildobjects, derived options

Back to the top