Bug 86613

Summary: Java Editor cannot resolve Classes named different than the filename
Product: [Eclipse Project] JDT Reporter: Jan Schnabel <jschnab>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jan Schnabel CLA 2005-02-25 07:09:55 EST
If a Java file contains classes beside the class that is named like the file 
name and these classes are not subclasses of this "main" class and the java file 
has not been opened in the editor the editor cannot resolve these classes. 
although the project compiles successfully.

Example:

a file Test.java contains two classes:
class Test {}
class Test2 {}

Another file Main.java in the same package contains following:
public class Main {
	Test2 test2 = new Test2();
}

The editor marks a reference to Test2 from Main as error with the error message 
"Test2 cannot be resolved to a type" if and only if the file Test.java is not 
opened. Nevertheless the project compiles successfully.
Comment 1 Dirk Baeumer CLA 2005-02-25 11:14:09 EST
The error annotation are coming form JDT/Core.
Comment 2 Olivier Thomann CLA 2005-02-25 13:47:37 EST
This is an issue with secondary types.
Comment 3 Kent Johnson CLA 2005-02-25 14:14:11 EST

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