Community
Participate
Working Groups
Build Identifier: 20110916-0149 I use a toolchain that requires the c/h files be named with extensions .ck and .hk. I was wondering if there is a way that CDT indexer can treat those files during indexing operation Reproducible: Couldn't Reproduce
It is possible to make LanguageManager.getLanguageForFile() retrieve language from MBS toolchain InputType and we can use this bug to consider that. But perhaps in your case you should define a new content type in plugin.xml <extension point="org.eclipse.core.contenttype.contentTypes"> <file-association content-type="org.eclipse.cdt.core.cHeader" file-extensions="hk"> </file-association> <file-association content-type="org.eclipse.cdt.core.cSource" file-extensions="ck"> </file-association> <!-- or <file-association content-type="org.eclipse.cdt.core.cxxSource" file-extensions="ck"> </file-association> --> </extension>
If you add those extensions to the proper C/C++ content types, I would think this would just work.
(In reply to comment #2) > If you add those extensions to the proper C/C++ content types, I would think > this would just work. Thank you for your replies. Tried following 'how to' from http://wiki.eclipse.org/CDT/User/FAQ How can I add another extension to CDT so that files other than c/cpp/cc/h files are recognized as source files? My compiler needs the file extension to be "xyz", and when I open xyz files there is no syntax highlighting. >>> Seems to do the trick for me, but I noticed the tooltip does not work, I need to provide further info probably in new feature req Regarding suggestion 1, it seems like I may have to rebuild the CDT from source unless there is a way to to change the plugin.xml in the default disto
Bugzilla is not really a proper place to ask questions, please use cdt-dev development list from https://dev.eclipse.org/mailman/listinfo if you are plugin developer, or if you are not a developer ask at user forums http://www.eclipse.org/forums/ (select CDT). But answering your question, you need to add that to the plugin which defines the toolchain which uses .ck and .hk. As a user (if you are not developing plugin) you can associate file extensions with the content types in Preferences->General->Content Types.
I think the question has been answered.