Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java compiled error - file icon not marked for error
Java compiled error - file icon not marked for error [message #656172] Thu, 24 February 2011 12:54 Go to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Hi!

I have a compiler error in one java file, but the error is not marked:
- on the icon of that file in the Project Explorer view
- in the Markers or Problems view under Java Problems / Errors

If I open the file in editor, it has the error underlined, there are red markings in that column right of the vertical scroll bar,
there is a red square at the top right corner. But no error mark in the icon in tha tab title.

Also in the Project Explorer the project icon has an error mark and the "Java resources" has an error mark in its icon.

What I have are several related projects checked out from SVN (using subclipse). Today I checked out some more.
They depend on some of the precious ones. The described error is in one of the newly checked out projects.

Is this a sync issue?
The maven console also reports the error.


Versions:

Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 1
Build id: 20100917-0705

Subclipse (Required) 1.6.17 org.tigris.subversion.subclipse.feature.group
Maven Integration for Eclipse (Required) 0.12.1.20110112-1712 org.maven.ide.eclipse.feature.feature.group

Sun Java 1.6.0_24
Windows XP Pro SP3

Regards,
David Balažic
Re: Java compiled error - file icon not marked for error [message #656186 is a reply to message #656172] Thu, 24 February 2011 13:36 Go to previous messageGo to next message
Vinicius Isola is currently offline Vinicius IsolaFriend
Messages: 40
Registered: March 2010
Location: Brazil
Member
Did you try to run a full clean?
Project > Clean...
Select all projects and then click ok?

Normally, synchronization problems are solved with that.

You can also try to right-click on the project and then Refresh and Validate so that all validators and files are in sync with Eclipse view.

I had that kind of problem before and solved with these procedures.
Re: Java compiled error - file icon not marked for error [message #656188 is a reply to message #656186] Thu, 24 February 2011 13:40 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
I tried Clean, Refresh, Validate, neither helps.
Re: Java compiled error - file icon not marked for error [message #656200 is a reply to message #656188] Thu, 24 February 2011 14:40 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
Your problem comes from the reconciler. Are you using mixed 1.4/1.5 projects ?

I would open a bug report against JDT/Core with steps to reproduce. We need to be able to reproduce the problem in order to fix it.

You can also try a I-build from 3.7 stream to see if this is fixed in HEAD.
--
Olivier
Re: Java compiled error - file icon not marked for error [message #656206 is a reply to message #656200] Thu, 24 February 2011 14:55 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Olivier Thomann wrote on Thu, 24 February 2011 15:40
Your problem comes from the reconciler. Are you using mixed 1.4/1.5 projects ?


Every project in workspace has the Java Compiler / JDK Compliance set to "Use complience from execution environment 'JavaSE-1.6' on the Java Build Path" *

Or did you mean something else?
They are maven managed projects, using the m2eclispe plugin v0.12.1.

There are also a few non-java projects.

Regards,
David

* - funny, if I right click this text, the option get enabled/disable. All other can be switched only with left click.
Re: Java compiled error - file icon not marked for error [message #656209 is a reply to message #656206] Thu, 24 February 2011 15:02 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
When you hover on it, what kind of error is shown ?
The best I can recommend is that you open a bug report with steps to reproduce.
Without further details, it is difficult to give you hints to solve this issue.
--
Olivier
Re: Java compiled error - file icon not marked for error [message #656210 is a reply to message #656209] Thu, 24 February 2011 15:06 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Hover over what?

Over the error in editor?

I fixed the original error, but I created a nrew one, simply by adding a space into a method call: x.fooBar(..) -> x.foo Bar(...)
Hovering over the broken method name gives: foo cannot be resolved or is not a field


This seems to happen just in one project, the others seem to be fine.


PS: I really don't know what steps reproduce this, so I wont open a bug (yet).

[Updated on: Thu, 24 February 2011 15:07]

Report message to a moderator

Re: Java compiled error - file icon not marked for error [message #656250 is a reply to message #656210] Thu, 24 February 2011 17:10 Go to previous messageGo to next message
Olivier Thomann is currently offline Olivier ThomannFriend
Messages: 518
Registered: July 2009
Senior Member
David Balažic wrote on Thu, 24 February 2011 10:06

I fixed the original error, but I created a nrew one, simply by adding a space into a method call: x.fooBar(..) -> x.foo Bar(...)
Hovering over the broken method name gives: foo cannot be resolved or is not a field

This is expected. When you add a space, foo cannot be resolved. This is because the reconciler tries to "resolve" the current unit.

You can disable this inside the java editor preferences.
--
Olivier
Re: Java compiled error - file icon not marked for error [message #657301 is a reply to message #656186] Wed, 02 March 2011 11:17 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
I think I found a hint.
The problematic project has no javabuilder declared in its .project file.
The other, "good" projects have this:

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

So what is the next step?

Add this into the .project file directly (in some editor) ?
Or is there a GUI for it?

[Updated on: Wed, 02 March 2011 11:17]

Report message to a moderator

Re: Java compiled error - file icon not marked for error [message #657337 is a reply to message #657301] Wed, 02 March 2011 13:49 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 3/2/2011 4:47 PM, David Balažic wrote:
> I think I found a hint.
> The problematic project has no javabuilder declared in its .project file.
> The other, "goog" projects have this:
>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
>
> So what is the next step?
>
> Add this into the .project file directly (in some editor) ?
> Or is there a GUI for it?
Right click the project in Package Explorer and select properties from
the context menu. Go to 'Builders' page in the properties dialog and
check the 'Java Builder'.
Re: Java compiled error - file icon not marked for error [message #657342 is a reply to message #657337] Wed, 02 March 2011 14:01 Go to previous messageGo to next message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
Deepak Azad wrote on Wed, 02 March 2011 14:49

> Add this into the .project file directly (in some editor) ?
> Or is there a GUI for it?
Right click the project in Package Explorer and select properties from
the context menu. Go to 'Builders' page in the properties dialog and
check the 'Java Builder'.

There is no 'Java Builder' on that page.
Re: Java compiled error - file icon not marked for error [message #657345 is a reply to message #657301] Wed, 02 March 2011 14:08 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 02.03.2011 12:17, David Balažic wrote:
> I think I found a hint.
> The problematic project has no javabuilder declared in its .project file.
> The other, "goog" projects have this:
>
> <buildCommand>
> <name>org.eclipse.jdt.core.javabuilder</name>
> <arguments>
> </arguments>
> </buildCommand>
>
> So what is the next step?
>
> Add this into the .project file directly (in some editor) ?
Yes, add the following using the default Text Editor:

<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

Dani
> Or is there a GUI for it?
Re: Java compiled error - file icon not marked for error [message #657346 is a reply to message #657345] Wed, 02 March 2011 14:13 Go to previous message
David  Balažic is currently offline David BalažicFriend
Messages: 130
Registered: July 2009
Senior Member
<nature>org.eclipse.jdt.core.javanature</nature>

This is already there, only the builder was missing.
Previous Topic:Java and enums
Next Topic:Make Eclipse not to follow symbolic links
Goto Forum:
  


Current Time: Sat Apr 27 00:47:39 GMT 2024

Powered by FUDForum. Page generated in 0.03593 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top