Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 90501

Summary: Eclipse loses type information for java code located under linked resource folders
Product: [Eclipse Project] JDT Reporter: alexander korobov <akorobov>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Open Type dialog screenshot none

Description alexander korobov CLA 2005-04-06 13:53:06 EDT
My project's source code and libraries are located on linux build machine 
exported to windows devbox[2000 sp4] via samba. Project has several folders 
that are linked to remote samba folders containing code. 
For some reason Eclipse [3.1M6] looses type information for all code located 
under these folders, but it still keeps type information for classes located in 
zip/jar archives that are also located under lonked folders.
This problem is not reproducible right after creating/importing project but 
rather develops after some time(happened for 3 projects within 1 day).

This problem does not happen when code is located on local disk and addressed 
without using linked folders. I have yet to test whether this problem appears 
in project that uses folders linked to directories on local disk.

Is there any way to debug/trace the way code [re]indexing works?


Thanks a lot.
Comment 1 Frederic Fusier CLA 2005-06-08 11:34:38 EDT
To debug indexing create/modify .options file in eclipse starting directory by
adding/modifying following lines:
# Turn on debug tracing for org.eclipse.jdt.core plugin
org.eclipse.jdt.core/debug=true

# Reports background indexer activity: indexing, saving index file, index queries
org.eclipse.jdt.core/debug/indexmanager=true

If you're able to reproduce this problem with latest build (at least RC1),
please attach trace you'll get with these options and reopen this bug asap, thx
Comment 2 alexander korobov CLA 2005-06-11 13:17:43 EDT
This problem occured again in 3.1RC1. Here're the conditions:
1. workspace contains 2 projects that refer to 2 copies of the same code, 
meaning almost all class names in both projects are the same(let's say project 
A and project B have the same class SnmpCommunityHook.java)
2. In 'Open Type' i can see two choices of SnmpCommunityHook.java for project A 
and project B.
3. devbox(windows2k) crashed while eclipse was doing refreshing/reindexing or 
one of the projects(project A)
4. once eclipse was restarted it did refresh/reindex again. At this moment it 
does not show in 'Open Type' SnmpCommunityHook.java for project A  but still 
shows SnmpCommunityHook.java that is in project B.
[It's not only one class Foo.java but rather a set of 'affected' classes]

5. SnmpCommunityHook.java actually exists, and can be seen and opened in/via 
Navigator/PackageExplorer.

Refreshing  the whole project does not fix the project, it looks like eclipse 
refresh/indexing does not see such classes in project A. The only thing that 
actually helps is to remove project A and import it again.
 
I attached a screenshot of 'Open Type' dialog.
Comment 3 alexander korobov CLA 2005-06-11 13:18:57 EDT
Created attachment 22862 [details]
Open Type dialog screenshot
Comment 4 Jerome Lanneluc CLA 2006-03-31 06:16:44 EST
Unfortunately, I was never able to reproduce this problem
Please reopen if you have steps to reproduce it.