Bug 3243

Summary: SourceAttachment - automatic computation of the package root does not work (1GCMTLP)
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: martinae
Version: 2.0   
Target Milestone: 2.1 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to compute the root path automatically none

Description Philipe Mulet CLA 2001-10-10 22:51:53 EDT
When attaching source to the default rt.jar, the package root is not automatically populated where it should (looking for corresponding entries 
from the binary jar).

NOTES:
EG (4/29/2001 4:28:38 PM)
	at this point the UI doesn't have special knowledge that the JAR is the rt.jar. The property page shows for any JAR.
	Given the browse button it isn't critical to hard code this know how.

EG (5/31/2001 12:55:27 PM)
	the CORE should do this all behind the scenes and not expose the source path to the clients.
	Something for after June.

PM (6/19/2001 12:51:03 PM)
	Should investigate a fix. This would however mean an API change (no more source root path).
Comment 1 Philipe Mulet CLA 2001-10-12 07:32:24 EDT
Not critical
Comment 2 DJ Houghton CLA 2001-10-23 23:52:39 EDT
PRODUCT VERSION:
SDK 46

Comment 3 Philipe Mulet CLA 2002-07-25 06:59:46 EDT
Reopening
Comment 4 Philipe Mulet CLA 2002-07-25 07:01:03 EDT
Clearing resolution
Comment 5 Philipe Mulet CLA 2002-07-25 07:17:53 EDT
*** Bug 3359 has been marked as a duplicate of this bug. ***
Comment 6 Olivier Thomann CLA 2002-09-20 16:53:49 EDT
Created attachment 2032 [details]
Patch to compute the root path automatically
Comment 7 Olivier Thomann CLA 2002-09-20 16:54:44 EDT
I don't want to lose this code. So I put it here for now.
Comment 8 Olivier Thomann CLA 2002-10-29 14:00:49 EST
We need a way to distinguish between no source root and an empty source root.
The code to infer the source root is ready, but cannot be fully tested without
resetting manually the source root to null when it is already set.
Comment 9 Jerome Lanneluc CLA 2002-11-20 11:53:39 EST
The source root is no longer persisted if set to null.
Also changed the algorithm to compute the root from the first .java file's 
package declaration.
Comment 10 David Audel CLA 2002-12-17 09:45:12 EST
Verified.