|Selection of Language Extension [message #644847]
||Tue, 14 December 2010 08:21
Registered: November 2010
I am trying to improve the SDCC (Small Devices C Compiler) integration with Eclipse CDT. In particular I am trying to add some additional keywords. I have written a class which extends GCCLanguage. I have also written a class that implements ICLanguageKeywords and a class that extends GNUScannerExtensionConfiguration. I have also added an extension point to org.eclipse.cdt.core.language
name="SDCC Language Extension"
By selecting "Properties" from the Project menu and selecting my language from "C/C++ General / Language Mapping" I am now able to use my additional keywords with keyword highlighting and no syntax warnings.
My question is how do I automatically map my language to ".c" and ".h" files for project developed using my tool chain. I have tried adding an extension to org.eclipse.core.contenttype.contentTypes with no success.
I have tried creating to new file extensions "cap" and "hap" just as a test.
<!-- declares a content type for C source files -->
<content-type id="cSDCCSource" name="SDCCSourceName"
<!-- declares a content type for C header files -->
<content-type id="cSDCCHeader" name="SDCCHeaderName"
and I added
<contentType id="mypluglin.cSDCCSource "/>
<contentType id="mypluglin.cSDCCHeader "/>
to the org.eclipse.cdt.core.language above but this didn't seem to work.
I have tried looking thorough other postings on here and I am sure others have succeed in doing similar language extension, but I just can't figure this bit out.
All help welcome.
Powered by FUDForum
. Page generated in 0.01670 seconds