Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Can't add boolean option to my project type

It looks like there are problems with inheriting option categories.  You should enter a new bugzilla.  For a work-around, I think that you could redefine all of the tool’s categories in your tool, and then add all options to your tool with only the required attributes, superClass set to the original option definition, and category set to your categories.

 

Regards,

Leo

 


From: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] On Behalf Of Ploett Norbert
Sent: Tuesday, February 22, 2005 7:27 AM
To: cdt-dev@xxxxxxxxxxx
Subject: [cdt-dev] Can't add boolean option to my project type

 

Hi all,

 

I am trying to define my own cross development project type for cdt, and I need to specify some additional compiler options. Although I try to follow the Managed Build System Extensibility Document I run into a number of problems:

 

Here is a snippet from my plugin.xml:

=============================

     <tool superClass="cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug" id="de.siemens.rmos.crossdevel.rmosemu.debug.tools.compiler" command="/usr/local/bin/i586-rmos-elf-gcc" sources="c,C,cc,CC" outputs="o" headerExtensions="h,H" name="GCC C Compiler" outputFlag="-o" natureFilter="both">
      <option
            defaultValue="true"
            isAbstract="false"
            valueType="boolean"
            category=""
            name="No COMMON entries"
            id="de.siemens.rmos.crossdevel.compiler.option.misc.nocommon"/>
     </tool>

==============================

 

Note that I try to assign the newly defined option to the gnu.c.compiler.category.other category. When I create a new project which uses this tool definition I get

 

Managed Build system manifest file error: Unable to resolve the category identifier gnu.c.compiler.category.other in the option de.siemens.rmos.crossdevel.compiler.option.misc.nocommon.

 

java.lang.NullPointerException
 at org.eclipse.cdt.managedbuilder.internal.core.Tool.getOptions(Tool.java:707)
 at org.eclipse.cdt.managedbuilder.internal.core.Tool.getOptions(Tool.java:692)
...

 

Why is this?

 

I tried different approaches:

1) I define a new category inside my compiler tool. The new project is created o.k. but when I go to project properties and the settings of the compiler I get to see _only_ my newly created category, all the other option categories (and options) that were inherited from cdt.managedbuild.tool.gnu.c.compiler.cygwin.exe.debug are gone! This happens regardless of whether I set the new category's owner to

 a) The tool instance itself (de.siemens.rmos.crossdevel.rmosemu.debug.tools.compiler)

 b) The category gnu.c.compiler.category.other inside the parent compiler tool where I want the option to become visible. In this case, again, I get the "unable to resolve" complaint.

 c) The parent compiler tool cdt.managedbuild.tool.gnu.c.compiler itself. Again, unable to resolve.

2) I try to inherit from an existing option by setting superclass e.g. to gnu.c.compiler.option.misc.verbose which helps in that I now have my new option visible. But now the original "verbose" option is gone.

 

Can anybody help me out?

 

Tnx a lot

 

 

Norbert Plött

 

 


Back to the top