Bug 10634 - Problem with compiling some java classes; class not visible
Summary: Problem with compiling some java classes; class not visible
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-03 05:18 EST by Zoltan Luspai CLA
Modified: 2002-03-04 09:21 EST (History)
0 users

See Also:


Attachments
Project contains the source files does not compile (44.37 KB, application/octet-stream)
2002-03-03 05:19 EST, Zoltan Luspai CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Luspai CLA 2002-03-03 05:18:07 EST
I've a long java source file which contains many classes, and when I try to 
compile it some are reported invisible, so the compile fails. The same compiles 
fine with jdk. It is fixed when the full package name added before the class 
name, for example: x = new DateRenderer () does not compile while x=new 
com.proxima.centauri.gui.DateRenderer() compiles. 

I'll attach a zip file contains the project demonstrate the problem.

Problems from task list:
Report for 22 markers:
Marker 1:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 532
  Message: The type DateRenderer is not visible for the field 
PropertyTable.dateRenderer
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 2:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 535
  Message: The type DoubleRenderer is not visible for the field 
PropertyTable.doubleRenderer
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 3:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 700
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 4:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 702
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 5:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 702
  Message: The type DateRenderer is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 6:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 705
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 7:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 733
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 8:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 735
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 9:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 735
  Message: The type DoubleRenderer is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 10:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 738
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 11:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 763
  Message: The type NumberEditor is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 12:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 869
  Message: The type NumberEditor is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 13:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 923
  Message: The type NumberEditor is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 14:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 972
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 15:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 974
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 16:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 974
  Message: The type DateRenderer is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 17:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 977
  Message: dateRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 18:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 1,008
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 19:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 1,010
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 20:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 1,010
  Message: The type DoubleRenderer is not visible
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 21:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 1,013
  Message: doubleRenderer cannot be resolved
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal

Marker 22:
  Resource: /test/com/proxima/centauri/gui/PropertiesTable.java, Line: 1,562
  Message: fc.ACCEPT_OPTION cannot be resolved or is not a field
  Marker type: org.eclipse.jdt.core.problem
  Priority: Normal
Comment 1 Zoltan Luspai CLA 2002-03-03 05:19:58 EST
Created attachment 418 [details]
Project contains the source files does not compile
Comment 2 Zoltan Luspai CLA 2002-03-03 05:21:11 EST
Eclipse Build version: 20020214
Comment 3 Philipe Mulet CLA 2002-03-04 07:21:05 EST
Reproduced. Investigating.
Comment 4 Philipe Mulet CLA 2002-03-04 08:27:52 EST
Simpler test case:

p1/X.java
[package p1;
import p2.Top;
class Member {
	void bar(){}
}
class X extends Top {
	Member field;
}
]

p2/Top.java
[package p2;
public class Top {
	class Member {
		void foo(){}
	}
}
]
Comment 5 Philipe Mulet CLA 2002-03-04 09:21:14 EST
Changed implementation to consider unit content when inherited match isn't 
visible.

Fixed.