Bug 86613 - Java Editor cannot resolve Classes named different than the filename
Summary: Java Editor cannot resolve Classes named different than the filename
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: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-25 07:09 EST by Jan Schnabel CLA
Modified: 2005-02-25 14:14 EST (History)
0 users

See Also:


Attachments

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