Bug 353562 - Build path: Source attachment lost on workspace change when source directory uses a variable pointing to a symlinked directory
Summary: Build path: Source attachment lost on workspace change when source directory ...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.8 M2   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 07:30 EDT by Daniel Hiller CLA
Modified: 2011-09-13 07:08 EDT (History)
2 users (show)

See Also:


Attachments
Test project (2.88 KB, application/octet-stream)
2011-08-02 07:32 EDT, Daniel Hiller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hiller CLA 2011-08-02 07:30:02 EDT
Build Identifier: 20110218-0911

Recently I switched to a ssd for operating system and applications. I have a directory containing all my libraries, the library directory. The library directory is symlinked from within my user directory to have it reside on another partition. For the library directory a classpath variable is configured in eclipse settings containing the original path (not the path to the partition, but via the user directory).

I set the source attachment for a library residing in the library directory, and it finds all sources.

Now when I leave the source file open, then change the workspace and re-change to the first workspace, it claims "Source not found" - "The source attachment does not contain the source for the file xyz" within the source window where it previously could find the attachment.

Note: I'm running OS X Lion, but on Snow Leopard the problem was the same.

I've included an example project using joda time 2.0 that will demonstrate the problem.

Reproducible: Always

Steps to Reproduce:
1. Create a directory "libraries" on a separate partition
2. Download joda-time, extract to directory "libraries"
3. Create a symbolic link from your user directory to the directory "libraries"
4. Create a new workspace
5. Configure a class path variable "DEV_LIB_HOME" that points to the "libraries" directory using the symbolic link (i.e. if the path to the directory "library" is /Volumes/hd2/library and the symlink to "libraries" is in /Users/username/Documents/libraries pointing to /Volumes/hd2/libraries, use "/Users/username/Documents/libraries" as classpath variable value)
6. extract the test project
7. re-configure the build path if necessary
8. open the one class and open the class DateTime via "Open declaration" (it should show the source code then)
9. Switch to another workspace (do not close the source file!)
10. Switch to the first workspace
11. You should see "Source not found" - "The source attachment does not contain the source for the file xyz"
Comment 1 Daniel Hiller CLA 2011-08-02 07:32:03 EDT
Created attachment 200703 [details]
Test project
Comment 2 Ayushman Jain CLA 2011-08-02 10:16:53 EDT
Jay, please follow up. Thanks!
On Windows, I guess you can use this to create symlinks (or junctions) - http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx
Comment 3 Daniel Hiller CLA 2011-09-05 02:42:59 EDT
Just wanted to let you know that I upgraded my Eclipse installation to Indigo recently. Build ID is 20110615-0604. For this build the problem does not exist any more.
Comment 4 Jay Arthanareeswaran CLA 2011-09-05 03:00:09 EDT
Thanks for the update, Daniel.
Comment 5 Satyam Kandula CLA 2011-09-13 07:08:39 EDT
Verified for 3.8M2 as per user comments.