如何在创建新文件时更改Eclipse CDT中的默认C ++文件扩展名? [英] How to change the default C++ file extension in Eclipse CDT when creating a new file?

查看:137
本文介绍了如何在创建新文件时更改Eclipse CDT中的默认C ++文件扩展名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队被强制使用特定的编码标准,该标准的一部分是使用.cc作为C类实现文件的后缀(为了参数,它可能是.cxx,.c ++或我们正在使用Eclipse CDT(C / C ++开发工具包)进行开发,但是在新的C ++开发工具包中,类对话框,当您键入类名作为Classname时,例如,它将自动将您的源文件命名为Classname.cpp。



当然,我可以取消选中使用默认复选框并修复后缀,但这是一些额外的步骤,并且要求每个工程师在大型ish项目上记住每次创建一个新的C ++类时都要做的很多。



但是,我试图找到允许在Eclipse CDT中为C ++文件指定默认后缀的选项。任何Eclipse大师都知道这一个吗?

解决方案

请参阅窗口>首选项> C / C ++>代码样式>名称样式>文件> C ++源文件>后缀


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?

解决方案

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

这篇关于如何在创建新文件时更改Eclipse CDT中的默认C ++文件扩展名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆