Bug 96400 - Java Editor reports problem that is actually no compile error
Summary: Java Editor reports problem that is actually no compile error
Status: RESOLVED DUPLICATE of bug 36032
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-24 03:49 EDT by Christian Wimmer CLA
Modified: 2005-05-24 04:37 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***