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

18.2k views Asked by At

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

6

There are 6 answers

3
matt b On BEST ANSWER

Did you uncheck Build Automatically?

2
RTF On

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.

0
Tom Sanders On

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.

0
Daniel On

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!

1
J - L On

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.

0
Manix On

I had a missing project in the buiding dependencies config

removing it resolve the problem