Bug 115639 - Bogus "XXX cannot be resolved to a type" annotations in editor
Summary: Bogus "XXX cannot be resolved to a type" annotations in editor
Status: RESOLVED DUPLICATE of bug 36032
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 10:19 EST by Richard Dunlap CLA
Modified: 2005-11-09 11:56 EST (History)
0 users

See Also:


Attachments
Image of bogus error annotations (94.84 KB, image/png)
2005-11-09 10:29 EST, Richard Dunlap CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Dunlap CLA 2005-11-09 10:19:53 EST
A new editor problem has surfaced where the edit window is filled with bogus error annotations indicating 
that numerous types cannot be resolved.   The projects build and run just fine, the only problem seems to 
be with the editor (and it's very annoying).

If I open the Java file containing the "alleged" undefined type, the offending bogus error annotations 
spontaneously go away and when I close that same file, the error annotations come back.

There are no errors in the log file.  There are no compile errors, and there are no error indications on the 
file's icons.  I have been using this workspace for about two months and the problem just surfaced last 
night.  Nothing was changed in the project other than some Java source files were edited.
Comment 1 Richard Dunlap CLA 2005-11-09 10:29:25 EST
Created attachment 29600 [details]
Image of bogus error annotations

Here is a snapshot of a typical editor with false error indications, note the
lack of an error indication on the file tab at the top of the window.
Comment 2 Olivier Thomann CLA 2005-11-09 10:32:11 EST
Would it be possible to get a test case that would help us to reproduce this issue?
Comment 3 Richard Dunlap CLA 2005-11-09 10:48:49 EST
(In reply to comment #2)
> Would it be possible to get a test case that would help us to reproduce this issue?

Hmm...  Where to begin?  First, there's nothing special that I am doing.  I'm just opening a file in the 
editor.  It was working yesterday, nothing changed and the problem just surfaced last night.  I was 
forced to kill Eclipse because it froze up last night.  Perhaps something in the project was corrupted?

 I could give you a little background about the projects.  My workspace has multiple projects, two of 
these projects depend upon two other projects.  They also depend upon two Jar file libraries.  The 
projects contain multiple source directories which are links to directories outside of the workspace.

Are there any logs that I could look at (other than the main error log)? Or is there any metadata I can 
delete? etc?

Comment 4 Richard Dunlap CLA 2005-11-09 11:22:53 EST
Yes I DO have a test case!!  And a very simple one at that.

Create the following two files in the same Java package.

in Foo.java:
------START FILE--------
public class Foo {
}

class Bar {
}
-------END FILE---------
in FooBar.java:

------START FILE--------
public class FooBar extends Bar {
}
-------END FILE---------


That's it!

Now, it will all compile.  But if you open 'FooBar.java' while the file 'Foo.java' is NOT open, you will see 
the error annotation in question (cannot resolve type Bar).  However, if you open the file 'Foo.java', the 
problem goes away.
Comment 5 Frederic Fusier CLA 2005-11-09 11:56:18 EST

*** This bug has been marked as a duplicate of 36032 ***