[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Refreshing UI when using IManagedOptionValueHandler
|
Looks good, i will take a try.
Which class from cdt implements IOptionApplicability ?
>
>>>> 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.
>>>
>>> E.g. something like this?
>>>
>>> Optimization level (enumerated option)
>>> O0 (enumeratedOptionValue)
>>> O1 (enumeratedOptionValue)
>>> O2 (enumeratedOptionValue)
>>> O3 (enumeratedOptionValue)
>>>
>>> otherflag1 (boolean option) -> enable if O3
>>> otherflag2 (boolean option) -> enable if O3
>>>
>>> Other enumerated option
>>> flag1 (enable if O1)
>>> flag2 (enable if O1|O2|O3)
>>> flag3 (enable if O3)
>
>> But if i do this, the user has no chance to work manually with the options,
>> because all is based on enablements.
>
>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.
>
>
>_______________________________________________
>cdt-dev mailing list
>cdt-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/cdt-dev