Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to get <option/> value from my plugin Java code?(Want to get tool-chain <option/> from IManagedCommandLineGenerator.generateCommandLineInfo())
How to get <option/> value from my plugin Java code? [message #714907] Thu, 11 August 2011 18:11
Artyom  is currently offline Artyom
Messages: 2
Registered: August 2011
Junior Member
Hi!

I am trying to implement substitution of prefixes to MBS tools names in my plugin (like in Cross GCC plugin). I want to use different prefixes and different paths for build tools according to OS (where eclipse IDE is running). E.g.
"/opt/i686-gcc/bin/i686-nptl-linux-gnu-g++"
on Linux (native compiler) and
"C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin\i686-pc-linux-gnu-g++"
on Windows (cross compiler).

1. Tell me, am I right? I am implementing IManagedCommandLineGenerator (prefix for commandName) and IProjectEnvironmentVariableSupplier (additional directory for $PATH). I have next tool-chain options:
<toolChain ...>
    <optionCategory
            id="cdt.managedbuild.optionCategory.myplugin.settings.arm"
            name="ARM tool-chain settings">
    </optionCategory>
    <option browseType="directory"
            category="cdt.managedbuild.optionCategory.myplugin.settings.arm"
            id="cdt.managedbuild.option.myplugin.arm.path.windows"
            name="Windows tool-chain path"
            ...
            defaultValue="C:\\Program Files (x86)\\CodeSourcery\\Sourcery G++ Lite\\">
    </option>
    <option browseType="directory"
            category="cdt.managedbuild.optionCategory.myplugin.settings.arm"
            id="cdt.managedbuild.option.myplugin.arm.path.linux"
            name="Linux tool-chain path"
            ...
            defaultValue="/opt/PalmPDK/arm-gcc/">
    </option>
    <optionCategory
            id="cdt.managedbuild.optionCategory.myplugin.settings.ia32"
            name="IA32 tool-chain settings">
    </optionCategory>
    ...similar options for IA32 architecture
    
    ...tools declarations
</toolChain>

and 4 configurations: ARM Debug/Release, IA32 Debug/Release.
How can I get e.g. "cdt.managedbuild.option.myplugin.arm.path.linux" value from Java code ( from IManagedCommandLineGenerator.generateCommandLineInfo() ).

Is there a better method to implement my needs?

2. I could create 2 tool-chains (for ARM and for IA32) and not use prefixes substitution. But I don't understand: which tool-chain should user choose at New Project page. Can you explain please, what depends on that tool-chain (chosen by user at New Project page)?

3. Can you give sources or links to sources of org.eclipse.cdt.build.crossgcc, or org.eclipse.cdt.cross.arm.gnu, or any other project taht implements IManagedCommandLineGenerator and/or IProjectEnvironmentVariableSupplier?

Will be very appreciate!

[Updated on: Thu, 11 August 2011 18:54]

Report message to a moderator

Previous Topic:visitor class for collecting all class defs from AST
Next Topic:CDT Install Halted
Goto Forum:
  


Current Time: Sat Oct 25 19:17:06 GMT 2014

Powered by FUDForum. Page generated in 0.01552 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software