图钉图标装饰在 Eclipse CDT 中意味着什么?

发布于 2024-10-20 18:57:19 字数 230 浏览 2 评论 0原文

每当我从构建中排除 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

吐个泡泡 2024-10-27 18:57:19

您可能发现了 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)

倥絔 2024-10-27 18:57:19

我想尝试不同版本的 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.

铜锣湾横着走 2024-10-27 18:57:19

扳手图标 ⟹ 自定义设置

此图标很久以前在 2009 年引入 - 查看 Bug #298540

只要某些资源的本地设置覆盖继承的全局或项目默认值,它就会显示。不幸的是,这并没有揭示真正的原因,因为树中的任何对象都可以有很多设置 - 属性对话框(右键单击>“属性”)很复杂并且有多个选项卡。

  • 您可能已添加本地 #define 符号“C++ 常规 > 路径和符号”
  • 如果您使用的是»非托管构建,您可能已添加特定的包含或包含目录
  • < /em> (即您正在调用外部 makefile),并且您正在使用“发现”,那么 CDB 构建输出解析器 可能会捕获该资源的编译器调用并推断出包含或超出一般默认值的其他设置。
  • 仅选择自定义编码或添加特定语言映射似乎不会导致显示

如果单击该资源“属性”对话框的所有相关选项卡上的“恢复默认值”按钮,扳手图标就会消失。

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.

  • you may have added a local #define symbol "C++ General > Paths and Symbols"
  • you may have added a specific include or include directory
  • if you're using a »non managed build« (i.e. you are calling an external makefile), and you're using "discovery", than it might happen that the CDB Build Output Parser captured a compiler invocation for that resource and inferred an include or other setting beyond the general defaults.
  • just selecting a custom encoding or adding a specific language mapping does not seem to cause that display

If you click the "Restore Defaults" button on all relevant tabs of the Properties dialog of that resource, the wrench icon disappears.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文