Community
Participate
Working Groups
Build Identifier: I20100429-1549 When creating a custom value handler (IManagedOptionValueHandler) for a enumerated option, the value of the IHoldsOption holder is not correct for the IOption parameter that is passed to the isEnumValueAppropriate method. In the situation where this arises, the holder and option are created in a base tool that is inherited in the definition of another tool. The IHoldsOption object that is passed to the isEnumValueAppropriate method is that of the base class and not the inherited class the IOption object is from. This happens when the control for the option is created and the value of the options is initially updated. It does not happen when the value of the enumerated option is changed. Reproducible: Always Steps to Reproduce: 1. Create a base tool, in this case it is a compiler tool for a custom compiler 2. Create an enumerated option with enumerated values 3. Create a value handler class that implements IManagedOptionValueHandler 4. Assign the valueHandler attribute of the enumerated option the value of the custom class. 5. Create a new tool that inherits from the base class, i.e. the superClass attribute of the new class is the id of the base class. (In this situation, the new tool is in a separate plugin definition.) 6. Create a toolchain using the new tool. 7. set a breakpoint in the isEnumValueAppropriate method and debug the plugin to see that the base class tool is passed to the method instead of the new tool.
The build id for the CDT components is 201005031211.