Home » Language IDEs » C / C++ IDE (CDT) » Removing Build Options In CDT
Removing Build Options In CDT [message #198295] |
Thu, 26 July 2007 10:12  |
Eclipse User |
|
|
|
Originally posted by: marcusobrien.cyantechnology.com
Hi,
I have sucessfully added a toolchain, and some tools
(compiler/linker/assembler) to the CDT using the extension point
(org.eclipse.cdt.managedbuilder.core.buildDefinitions). They are based upon
the existing MinGW tools.
My compiler for example uses the superclass
cdt.managedbuild.tool.gnu.c.compiler.mingw.base. This ID in the
managedbuilder.gnu.ui plugin represents the MinGW C Compiler, this in turn
uses the superclass cdt.managedbuild.tool.gnu.c.compiler. The gnu C Compiler
has many build options, most of which I want to keep.
However I want to remove some options, so I can either...
1. Use the applicabilityCalculator option to implement the
IOptionApplicability, to make it not visible
2. Delete the option altogether from CDT (thus affecting all compilers)
3. Re-implement the entire toolchain (ie dont use
cdt.managedbuild.tool.gnu.c.compiler.mingw.base superclass)
Looking at options 1 and 2, I will have to make sure my customers always get
their CDT version from me (which will include my changes), option 3 I have
had very limited sucess. So my question is can I remove some options for my
tool, without affecting the underlying CDT by implementing an interface
somewhere that doesn't require a change to the CDT ?
Marcus.
|
|
|
Re: Removing Build Options In CDT [message #198326 is a reply to message #198295] |
Thu, 26 July 2007 10:25   |
Eclipse User |
|
|
|
Originally posted by: dmsubs.NOSPAM.consertum.com
Option #1 does what you want. You just supply it as an additional class with
your plugin. No changes to CDT required.
--
Derek
CDT wrote:
> Hi,
>
> I have sucessfully added a toolchain, and some tools
> (compiler/linker/assembler) to the CDT using the extension point
> (org.eclipse.cdt.managedbuilder.core.buildDefinitions). They are based upon
> the existing MinGW tools.
>
> My compiler for example uses the superclass
> cdt.managedbuild.tool.gnu.c.compiler.mingw.base. This ID in the
> managedbuilder.gnu.ui plugin represents the MinGW C Compiler, this in turn
> uses the superclass cdt.managedbuild.tool.gnu.c.compiler. The gnu C Compiler
> has many build options, most of which I want to keep.
>
> However I want to remove some options, so I can either...
>
> 1. Use the applicabilityCalculator option to implement the
> IOptionApplicability, to make it not visible
> 2. Delete the option altogether from CDT (thus affecting all compilers)
> 3. Re-implement the entire toolchain (ie dont use
> cdt.managedbuild.tool.gnu.c.compiler.mingw.base superclass)
>
> Looking at options 1 and 2, I will have to make sure my customers always get
> their CDT version from me (which will include my changes), option 3 I have
> had very limited sucess. So my question is can I remove some options for my
> tool, without affecting the underlying CDT by implementing an interface
> somewhere that doesn't require a change to the CDT ?
>
> Marcus.
>
>
|
|
|
Re: Removing Build Options In CDT [message #198439 is a reply to message #198326] |
Fri, 27 July 2007 06:35   |
Eclipse User |
|
|
|
Hello Derek,
Thanks for the response, hopefully you can help me out a bit, how will I
tell the option in the toolchain, the name of the applicabilityCalculator
class I add to my plugin without changing the CDT tool setting (and therefore
changing the cdt plugin.xml) ?
Is there a way of using an ID somehow ?
Marcus.
> Option #1 does what you want. You just supply it as an additional
> class with your plugin. No changes to CDT required.
>
> CDT wrote:
>
>> Hi,
>>
>> I have sucessfully added a toolchain, and some tools
>> (compiler/linker/assembler) to the CDT using the extension point
>> (org.eclipse.cdt.managedbuilder.core.buildDefinitions). They are
>> based upon the existing MinGW tools.
>>
>> My compiler for example uses the superclass
>> cdt.managedbuild.tool.gnu.c.compiler.mingw.base. This ID in the
>> managedbuilder.gnu.ui plugin represents the MinGW C Compiler, this in
>> turn uses the superclass cdt.managedbuild.tool.gnu.c.compiler. The
>> gnu C Compiler has many build options, most of which I want to keep.
>>
>> However I want to remove some options, so I can either...
>>
>> 1. Use the applicabilityCalculator option to implement the
>> IOptionApplicability, to make it not visible
>> 2. Delete the option altogether from CDT (thus affecting all
>> compilers)
>> 3. Re-implement the entire toolchain (ie dont use
>> cdt.managedbuild.tool.gnu.c.compiler.mingw.base superclass)
>> Looking at options 1 and 2, I will have to make sure my customers
>> always get their CDT version from me (which will include my changes),
>> option 3 I have had very limited sucess. So my question is can I
>> remove some options for my tool, without affecting the underlying CDT
>> by implementing an interface somewhere that doesn't require a change
>> to the CDT ?
>>
>> Marcus.
>>
|
|
| | | | |
Re: Removing Build Options In CDT [message #198609 is a reply to message #198482] |
Mon, 30 July 2007 06:12  |
Eclipse User |
|
|
|
Hello Chris,
Many thanks, this is exactly what I wanted.
Marcus
> marcus wrote:
>
>> Hello Derek,
>>
>> Thanks for the response, hopefully you can help me out a bit, how
>> will I tell the option in the toolchain, the name of the
>> applicabilityCalculator class I add to my plugin without changing the
>> CDT tool setting (and therefore changing the cdt plugin.xml) ?
>>
>> Is there a way of using an ID somehow ?
>>
>> Marcus.
>>
> What you do is in your toolchain, you redefine the option for that
> tool by making it inherit from the original option, i.e. you set the
> superClass in the definition for your new option to be the ID of the
> original option. Then in your new option you specify the
> applicabilityCalculator. The result is that the option is replaced by
> your new definition, whose applicabilityCalculator hides it.
>
> ===========================
>
> Chris Recoskie
> Team Lead, IBM CDT Team
> IBM Toronto
> http://www.eclipse.org/cdt
|
|
|
Goto Forum:
Current Time: Sun May 11 22:09:55 EDT 2025
Powered by FUDForum. Page generated in 0.04265 seconds
|