[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] Problem adding new tool and file extension into MBS
|
Hi,
I'm having a problem while trying to add a new tool and file extension to
the MBS as part of a Managed Make C project.
The tool is called 'xlate' and it converts a .xc file to a .c source file
that can then be built with the standard C tools (compiler/linker). It is
similar in concept to yacc/bison.
The problem is that having created a project, if I try to create a source
file with a .xc extension, I get the error "File name is discouraged. File
extension does not correspond to known source file types.".
What have I missed in my plugin?
I am using Eclipse 3.1.1 and CDT 3.0.1. I am developing the plug-in with the
PDE. To create the integration, I have followed the Example Tool Integration
example in the Managed Build System Extensibility document provided with
3.0.1. I have then tried to modify it by adding a new tool called xlate and
it's associated inputType and outputType, which generates the following
plugin.xml:
<tool
command="xlate"
id="example.toolchain.xlate"
isAbstract="false"
name="Translator"
natureFilter="both" >
<inputType
dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.Defaul
tIndexerDependencyCalculator"
dependencyContentType="org.eclipse.cdt.core.cHeader"
id="example.toolchain.xlate.input"
name="Translator Input"
primaryInput="true"
sources="xc"/>
<outputType
id="example.toolchain.xlate.output"
name="TranslatorOutput"
outputContentType="org.eclipse.cdt.core.cSource"
outputs="c"
primaryOutput="true"/>
</tool>
I am then defining content-type, which generates the following in plugin.xml
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
file-extensions="xc"
id="xlateC"
name="xlateC"
priority="high"/>
</extension>
---
Derek