Bug 227813 - root detection in in external linked source folders
Summary: root detection in in external linked source folders
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 109137
  Show dependency tree
 
Reported: 2008-04-18 14:04 EDT by Darin Wright CLA
Modified: 2008-04-29 07:27 EDT (History)
1 user (show)

See Also:


Attachments
patch (1.62 KB, patch)
2008-04-18 14:05 EDT, Darin Wright CLA
no flags Details | Diff
Proposed fix and regression test (4.78 KB, patch)
2008-04-21 04:51 EDT, Jerome Lanneluc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.