Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default C++ file extension in Eclipse CDT when creating a new file?

My team has been mandated to use a specific coding standard, and part of that standard is to use .cc as the suffix for C class implementation files (for sake of argument, it could have been .cxx, .c++, or any number of other suffixes which are not .cpp).

We're using the Eclipse CDT (C/C++ Development Toolkit) for development, however in the "New C++ Class" dialog, when you type in a class name as Classname, for example, it automatically names your Source file as Classname.cpp.

Sure, I could uncheck the "use default" checkbox and repair the suffix, but that's a few extra steps, and a lot to ask every Engineer on the large-ish project to remember to do each time they make a new C++ class.

I have been stumped, however, trying to find the option that allows one to specify the default suffix for C++ files in Eclipse CDT. Any Eclipse gurus know this one off hand?

like image 534
Ogre Psalm33 Avatar asked Jan 18 '11 20:01

Ogre Psalm33


1 Answers

See Window > Preferences > C/C++ > Code Style > Name Style > Files > C++ Source File > Suffix

like image 85
Sergey Prigogin Avatar answered Sep 19 '22 23:09

Sergey Prigogin