Why do errors no longer appear in Eclipse's package explorer?

廉价感情. 提交于 2019-12-04 09:03:05

问题


My project used to be fine - errors showed up in the file margin, the editor breadcrumb, the problems view and in the package explorer tree as little red X marks.

Somewhat spontaneously though, it's stopped working properly.

If I introduce an error into my code, it shows up in the file margin, and nowhere else. It takes a 'project clean' to make the red X's show up elsewhere.

Then if I fix the problem, the error is cleared from the file margin but the red marks persist elsewhere until I do another clean.

Why is it no longer showing errors properly in an automatic way?

I'm using Eclipse 3.5


回答1:


Did you uncheck Build Automatically?




回答2:


I had a similar problem. I imported a project which also uses aspectj. compile errors were shown in the editors, but not in the package/navigator-explorers. And the project was marked as java-project, maven2 and aspectj.

Build path seemed ok.(jre was there, maven and aspectj.)

After long search i found that in the .project file the following entry was missing:

    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>

pasted that in and problem was solved!




回答3:


Try fixing your build path, Java compiler, JRE first. If still no luck, You may want to take a look at project Properties-->Builders. Make sure "Java Builder" is there.




回答4:


None of the answers so far applied to my situation, but they steered me towards this solution:

Project -> Properties -> Project Facets -> convert to faceted form...

and check the applicable Project Facets.




回答5:


Yet another reason for this type of problem: you might not be viewing your project with the correct perspective selected. I recently had this problem with 4 projects in my workspace, 3 of which were PyDev projects and the other was an Android project. In my case, only the Package Explorer was misbehaving, not showing up warnings or errors, but the Problems view and the files themselves were showing the errors and warnings.

It turned out that the PyDev perspective was active even while I had the Android project selected. To change perspective, go to Window -> Open Perspective --> [Perspective Name] or alternatively hit the Perspective shortcut button in the top-right corner of Eclipse.

This is relevant to Eclipse Indigo, I can't speak for other versions.




回答6:


I had a missing project in the buiding dependencies config

removing it resolve the problem



来源:https://stackoverflow.com/questions/1751495/why-do-errors-no-longer-appear-in-eclipses-package-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!