图钉图标装饰在 Eclipse CDT 中意味着什么?
每当我从构建中排除 .h 文件并稍后重新包含它时,项目资源管理器中的 .h 文件的图标将具有图钉装饰。我查看了 CDT 用户指南,但它不在他们的 图标列表。图钉是什么意思?
Whenever I exclude a .h file from the build and then re-include it later, the icon for the .h file in the Project Explorer will have a push-pin adornment. I looked on the CDT User Guide but it's not on their list of icons. What does the push pin mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能发现了 CDT 中的一个小错误!
您在原始问题中没有包含图像,因此我建议您看到的图标叠加层不是图钉,而是一个指示符,表明该元素(包含文件)的属性已被修改(它看起来像一个小扳手)。当您排除该元素时,它会显示一个指示排除的覆盖层,当您重新包含该元素时,您会看到扳手覆盖层。这是错误,因为您已将元素返回到其未修改的状态。在这种情况下不应显示扳手覆盖层。
如果您尝试排除 C 源文件,您将看到排除覆盖,当您重新包含 C 源文件时,排除覆盖将被删除,仅显示原始图标(无覆盖)。
(我使用 CDT 7.0.0 尝试过)
You may have uncovered a small bug in CDT!
You did not include an image in your original question so I'm going to propose that the icon overlay you are seeing is not a push-pin, but an indicator that the properties for this element (the include file) have been modified (it looks like a little wrench). When you exclude the element it gets an overlay indicating exclusion, when you re-include the element you see the wrench overlay. This is the bug since you have returned the element to its unmodified state. The wrench overlay should not be displayed in this case.
If you try excluding C source file you'll see the exclusion overlay, and when you re-include the C source file the exclusion overlay is removed and only the original icon (with no overlay) is displayed.
(I tried this using CDT 7.0.0)
我想尝试不同版本的 cpp 文件。通过互换它们,新包含的文件的图标中有一个小扳手。这似乎是一个小错误。
解决方案:
创建新文件,复制内容,删除旧文件,将新文件重命名为旧文件的名称,完成。
I had different versions of a cpp file that I wanted to try. By interchanging them, the newly included file had such a small wrench in the icon. It appears to be a small bug.
Solution:
create new file, copy contents, delete old file, rename new file to the name of the old file, done.
扳手图标 ⟹ 自定义设置
此图标很久以前在 2009 年引入 - 查看 Bug #298540
只要某些资源的本地设置覆盖继承的全局或项目默认值,它就会显示。不幸的是,这并没有揭示真正的原因,因为树中的任何对象都可以有很多设置 - 属性对话框(右键单击>“属性”)很复杂并且有多个选项卡。
#define
符号“C++ 常规 > 路径和符号”如果单击该资源“属性”对话框的所有相关选项卡上的“恢复默认值”按钮,扳手图标就会消失。
Wrench Icon ⟹ custom settings
This icon was introduced a long time ago in 2009 — see Bug #298540
It shows up whenever the local settings for some resource override the inherited global or project defaults. Unfortunately, this does not reveal the actual reason, as any object in the tree can have a lot of settings — the Properties dialog (right click > "Properties") is complex and has several tabs.
#define
symbol "C++ General > Paths and Symbols"If you click the "Restore Defaults" button on all relevant tabs of the Properties dialog of that resource, the wrench icon disappears.