Bug 96400

Summary: Java Editor reports problem that is actually no compile error
Product: [Eclipse Project] JDT Reporter: Christian Wimmer <chw>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Christian Wimmer CLA 2005-05-24 03:49:36 EDT
The Java Editor reports a bug when typing a class (and even offers a quick 
fix) when there is actually no bug: A non-public class of one file is 
referenced by a class of another file in the same package.

The file is compiled correctly, so there is no error or warning reported in 
the problem view.

The preference option "Report problems as you type" must be enabled (this is 
the default value)

Steps to reproduce the bug:
1) create a java-file "First.java"
2) type the following class declaration:

   class DifferentName { }

3) close the editor for First.java
4) create a java-file "Second.java"
5) type the following class declaration:

   public class Second {
     DifferentName d;
   }

The editor reports the error "DifferentName cannot be resolved to a type". The 
problem view does not show the error, and a correct class-file is compiled.

The error message disappears when the file "First.java" is opened in the 
editor. It re-appears when "First.java" is closed and a change is made 
to "Second.java"

The problem occurs is all tested versions, including Eclipse 3.0
Comment 1 Philipe Mulet CLA 2005-05-24 04:37:13 EDT

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