开发者

In Eclipse, can I remove the red error markers?

开发者 https://www.devze.com 2023-03-25 20:07 出处:网络
I need to view source files from a project (C++) that I do not intend开发者_如何学运维 to run. Loaded in Eclipse, it has many errors due to missing libraries. Is there a way to tell Eclipse to ignore

I need to view source files from a project (C++) that I do not intend开发者_如何学运维 to run. Loaded in Eclipse, it has many errors due to missing libraries. Is there a way to tell Eclipse to ignore (or at least not underline in red) those compile errors?

I want to use eclipse to view the code for the syntax highlighting, parentheses matching, etc.


It's possible to tell Eclipse not to underline the text / show it in the vertical or overview ruler by unchecking all checkboxes in Window -> Preferences -> General -> Editors -> Text Editors -> Annotations -> Errors

As you only want to view the code, I'd recommend another editor like Notepad++, Sublime Text or (my personal favourite) vim/gvim. Eclipse is a little bit too 'heavy' for just viewing code.


If you are using the CDT plugin, which you probably are as you're using Eclipse for a C/C++ project:

  • Window -> Preferences -> C/C++ -> Code Analysis.
  • Disable Potential Programming Problems and Syntax and Semantic Errors.


You can also just remove the C++ files from the source folders included in the build path.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号