Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How to dynamically add enumeratedOptionValue for my option in toolchain?

On Mon, 29 Sep 2008 15:53:28 +0400, Andrew Gvozdev <angvoz.dev@xxxxxxxxx> wrote:

Hi Andrey,There are some test cases
in org.eclipse.cdt.managedbuilder.core.tests like
tests/org.eclipse.cdt.managedbuilder.core.tests/OptionStringListValueTests.java.
Perhaps you can draw an idea from there.

Hmm... I'm novice at Eclipse... :\
I've imported plugin "org.eclipse.cdt.managedbuilder.core.tests" as "Projects with source folders", but I can't get its sources. Only
org.eclipse.cdt.managedbuilder.core.tests/org/eclipse/cdt/projectmodel/tests/OptionStringListValueTests.class
Please, talk me, where to find the sources. Or, please, attach OptionStringListValueTests.java :-)


Thanks,
Andrew

On Mon, Sep 29, 2008 at 4:55 AM, Andrey Tretyakov <andrromeda@xxxxxxxxx>wrote:

Hello!
I've defined my own toolchain, for example, I have:

     <tool
           id="test.toolchain.c.compiler"
           name="Test C Compiler"
           superClass="cdt.managedbuild.tool.gnu.c.compiler">
        <optionCategory
              id="test.toolchain.c.compiler.tetscategory"
              name="Test Settings"
              owner="test.toolchain.c.compiler">
        </optionCategory>
        <option
              category="test.toolchain.c.compiler.testcategory"
              id="test.toolchain.c.compiler.testversion"
              name="Test Version"
              valueType="enumerated">
           <enumeratedOptionValue
                 id="test.toolchain.c.compiler.testversion.default"
                 isDefault="true"
                 name="Default">
           </enumeratedOptionValue>
        </option>
     </tool>

and combo-box with only one item "Default" in project's settings. In
runtime I want to add more items in this combo-box.

How to dynamically add enumeratedOptionValue for my option in toolchain?
I've tried to use

IToolChain.getTool("test.toolchain.c.compiler").getOptionById("test.toolchain.c.compiler.testversion")...
, but unsuccessfully.

Is it possible? If yes, can you help me?
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev





Back to the top