Bug 130309 - Eclipse JDK: Project loses track of classes in a package and claims "class xxx cannot be resolved to a type" making refactoring impossible
Summary: Eclipse JDK: Project loses track of classes in a package and claims "class xx...
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2006-03-03 08:38 EST by Manne Laukkanen CLA
Modified: 2009-08-30 02:08 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 Manne Laukkanen CLA 2006-03-03 08:38:54 EST
Use of references in code to some, *but not all*, Java-classes in same package is suddenly impossible, seemingly by itself.

Overview Description:
References to *some* public classes in code (or instances of them) within the same package are suddenly impossible ("ClassSomeClass cannot be resolved to a type" and of course this leads to "instanceOfClassSomeClass cannot be resolved"). 

The classes are in GUI, do compile without errors, can be opened with Eclipse editors, whole project can be built succesfully with Ant tasks - everything. Even the handy functionality of writing a class instance +dot (instanceOfSomeClass.promptlyOfferedFunctionOfThatClassByEclipse() ) -functionality works, pointing to the possibility that the references to these classes existing are at least somewhere within Eclipse's data structures. Deploying and building succeeds, so this is not lethal, but it causes problems:

Eclipse marks every reference to a "lost" class or its instance as "error in a compilation unit, fix errors first" and refuses to allow refactoring for example, making developing tedious. Referencing a class as "country.company.project.more.more.more.Class" does not help: Eclipse notices that the class is in the same package, replaces the reference with only "Class" AND THEN reports an error..[sic]

What is even more weird that only 3 classes of 17 vanished in this way from Eclipses internal reference data structure. Rest of the classes referencing these classes are of course affected by this, but some classes are unaffected by either. ???why.

This problem has been duplicated by several work colleagues of mine and seems to appear on a not very regular basis, but still annoyingly often, once/twice a month.

Repository used is CVS, JDK used is Sun's 1.4.2, .classpath file is ok, no one has touched it in months, refreshed the project, closed and started Eclipse...to no avail.

Steps to Reproduce:
Hard, as seems to appear by itself at unknown intervals. After refactoring class names? Perhaps?

Build Date & Platform:
Build id: M20050929-0840

Tried to find a previous bug report about the case but did not succeed, sorry if I duplicate.

Yours sincerely, 
Manne Laukkanen
Helsinki
Finland
Comment 1 Martin Aeschlimann CLA 2006-03-12 17:32:02 EST
Moving to jdt.core as it's the compiler who issues these errors.

I haven't seen something like that, and it seems we won't be able to do much without reproducible steps.
Comment 2 Philipe Mulet CLA 2006-04-10 11:06:53 EDT
pls reopen once steps are available
Comment 3 Denis Roy CLA 2009-08-30 02:08:26 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.