简体   繁体   English

Eclipse Kepler在警告上显示错误标记

[英]Eclipse Kepler shows error marks on warnings

I've got a problem with Eclipse Kepler. 我遇到了Eclipse Kepler的问题。 In my Java project i've got some warnings and now they are shown as error marks (red crosses) in the project explorer. 在我的Java项目中,我收到了一些警告,现在它们在项目浏览器中显示为错误标记(红色十字)。

It looks like this picture http://i.stack.imgur.com/H8j7f.png 看起来像这张图片http://i.stack.imgur.com/H8j7f.png

So my question is: Is it possible to switch it back to the yellow cross for warnings and red cross for errors? 所以我的问题是:是否有可能将其切换回黄色十字架以发出警告,红十字会发生错误? I haven't found anything about it, so I hope you can help me. 我没有找到任何关于它的信息,所以我希望你能帮助我。

Edit: 编辑:

I've made a test project, and here is a screenshot: 我做了一个测试项目,这是一个截图: 在此输入图像描述

Thanks! 谢谢!

It might me because you set the compiler to mark as errors what used to be a warning. 这可能是因为您将编译器设置为标记为曾经是警告的错误。 You can set this in the Window->Preference menu. 您可以在Window-> Preference菜单中进行设置。 So open it and go into Java->Compiler->ErrorsWarnings and check if everything is like you want it to be. 所以打开它并进入Java-> Compiler-> ErrorsWarnings并检查是否一切都像你想要的那样。

You can also check into the compiler menu (Java->Compiler) if the java Compiler compliance level is set as you want it to be as @Chrylis suggested. 如果java编译器合规性级别设置为您想要的@Chrylis建议,您也可以检查编译器菜单(Java-> Compiler)。

Otherwise it might be because your program is unable to compile because of a dependency problem then you might want to check your build path or JRE in the Run configurations menu. 否则可能是因为您的程序由于依赖性问题而无法编译,那么您可能需要在“运行配置”菜单中检查构建路径或JRE。

Right click on your project -> Run as -> Run Configurations. 右键单击您的项目 - >运行方式 - >运行配置。

I solved it :) 我解决了:)

At the first start I took my old workspace as workspace. 在第一次启动时,我将旧工作区作为工作区。 Because of that there was an Error "Missing Action set" (I've found the "error log"-window :) ) and thats why the red crosses has been shown. 因为有一个错误“缺少行动设置”(我发现“错误日志” - 窗口:))这就是为什么红色十字架已经显示。

Now I have a new workspace and now everything is fine! 现在我有一个新的工作区,现在一切都很好!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM