Eclipse CDT:禁用红色下划线

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6423184/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:28:41  来源:igfitidea点击:

Eclipse CDT: Disable red underlining

eclipsesyntax-errorsyntax-highlightingeclipse-cdt

提问by toom

I use eclipse cdt and I included some files. Unfortunalty I cannot add the include path to my eclipse project since then eclipse will always crash when it starts indexing the newly added includes. Therefore I would like to turn off the feature that highlights errors.

我使用 eclipse cdt 并包含了一些文件。不幸的是,我无法将包含路径添加到我的 eclipse 项目中,因为当 eclipse 开始索引新添加的包含时,它总是会崩溃。因此,我想关闭突出显示错误的功能。

Where can I do this?

我在哪里可以这样做?

回答by ChristophK

This is probably not the answer to your problem, but it's actually the answer to your question (which I was looking for and now found out myself): How to disable the red underlining, which can be pretty annoying because it hides underscore characters.

这可能不是您问题的答案,但它实际上是您问题的答案(我一直在寻找,现在我自己找到了):如何禁用红色下划线,这可能非常烦人,因为它隐藏了下划线字符。

Go to Preferences -> General -> Editors -> Text Editors -> Annotations

转到首选项 -> 常规 -> 编辑器 -> 文本编辑器 -> 注释

(Alternative: Type "annotations" in the filter / search box).

(替代方法:在过滤器/搜索框中键入“注释”)。

In the "Annotation types" list, select "Errors". Disable the "Text as" setting(to the right).

在“注释类型”列表中,选择“错误”。禁用“文本为”设置(右侧)。

The same can be done for yellow underlining of warnings (further down in the list).

对警告的黄色下划线也可以这样做(在列表的更下方)。

回答by PeterSom

You might try to disable the indexer, if that is really the problem. If you are using indigo release (or one of its milestones or release candidates), try to disable Codan's checkers. Workspace-or-project properties/preferences C++ Code Analysis. This should get rid of the underlining. Codan is relatively new, and at least pre-release had some issues with some of the code checkers.

您可能会尝试禁用索引器,如果这确实是问题所在。如果您正在使用 indigo 版本(或其里程碑或候选版本之一),请尝试禁用 Codan 的检查器。工作区或项目属性/首选项 C++ 代码分析。这应该去掉下划线。Codan 相对较新,至少在预发布之前,某些代码检查器存在一些问题。