Bug 227813

Summary: root detection in in external linked source folders
Product: [Eclipse Project] JDT Reporter: Darin Wright <darin.eclipse>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: philippe_mulet
Version: 3.4   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 109137    
Attachments:
Description Flags
patch
none
Proposed fix and regression test none

Description Darin Wright CLA 2008-04-18 14:04:09 EDT
Auto-detection of roots in external source folders seems to have a bug.

This is being used in support of bug 109137.

When attaching source to external class file folders, we are pointing to corresponding root project folders in an "external" workspace. This results in JDT core using a linked folder to attach source. However, when building a root path the root is computed relative to the root of the project  by removing segments. This code does not take into account the fact that linked folders are not complete prefixes of the workspace....
Comment 1 Darin Wright CLA 2008-04-18 14:05:06 EDT
Created attachment 96631 [details]
patch

This is my workaround to the problem... but there may be a more robust solution.
Comment 2 Jerome Lanneluc CLA 2008-04-21 04:51:15 EDT
Created attachment 96801 [details]
Proposed fix and regression test

Thanks for investigating a fix. The new proposed fix avoids to hard-code the name of the hidden project.
Comment 3 Jerome Lanneluc CLA 2008-04-21 04:56:55 EDT
Fix and test released for 3.4M7
Comment 4 Maxime Daniel CLA 2008-04-29 07:27:57 EDT
Verified for 3.4 M7 using build I20080427-2000.