Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Problems with Tool Option enablement

Hi All,

I'm having some problems automatically setting the value of a tool's
option based on that of a toolchain option value.  I'm attempting to do
this by subclassing the toolchain option in each of the tools that need
it, and by using the enablement element to update 'value'. 

Unfortunately it seems to work intermittently.  I've attempted to trace
through the code and seen that control flow reaches
ManagedBuildManager.setOption(...) with my updated enum values, for the
given subclassed tool.  However this often doesn't translate to a change
in the compiler command.

Attached is what I'm doing in the plugin.xml.

In the toolchain, I've got this:

      <toolChain id="toolchain"
          ...
         <optionCategory
               icon="icons/broadcom.gif"
               id="toolchain.processor"
               name="Our Processor">
         </optionCategory>
         <option
               category="toolchain.processor"
               id="toolchain.processor.id"
               name="Machine"
               valueType="enumerated">
            <enumeratedOptionValue
                  command="-m1"
                  id="toolchain.processor.id.1"
                  name="Machine 1">
            </enumeratedOptionValue>
            <enumeratedOptionValue
                  command="-m2"
                  id="toolchain.processor.id.2"
                  name="Machine 2">
            </enumeratedOptionValue>
         </option>
         ...

And in the compiler / linker tool I have this :

         <option
               id="compiler.machine"
               superClass="toolchain.processor.id">
            <enablement
                  type="UI_VISIBILITY">
               <false>
                  false body text
               </false>
            </enablement>
            <enablement
                  attribute="value"
                  type="CONTAINER_ATTRIBUTE"
                  value="toolchain.processor.id.1">
               <checkOption
                     holderId="toolchain"
                     optionId="toolchain.processor.id"
                     value="toolchain.processor.id.1">
               </checkOption>
            </enablement>
            <enablement
                  attribute="value"
                  type="CONTAINER_ATTRIBUTE"
                  value="toolchain.processor.id.2">
               <checkOption
                     holderId="toolchain"
                     optionId="toolchain.processor.id"
                     value="toolchain.processor.id.2">
               </checkOption>
            </enablement>
         </option>

If anyone has any experience doing this, am I doing something obviously
wrong?

Many thanks in advance,

James



Back to the top