Bug 5091 - Source attachment is broken for JRE_LIB
Summary: Source attachment is broken for JRE_LIB
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-19 05:01 EDT by Philipe Mulet CLA
Modified: 2001-10-19 09:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2001-10-19 05:01:40 EDT
Build 205

The variable used to attach source to the JRE library (JRE_SRC) is incorrectly
bound to the source root path.

This can be seen on the properties of a rt.jar package fragment root.

Offending code seems to be (see below >>>>>>):
-----------------------------
JavaRuntime
	private static LibraryLocation getAdjustedLocation(IVMInstall 
defaultVM)  {
		IPath libraryPath;
		IPath sourcePath;
		IPath sourceRootPath;
		LibraryLocation location= defaultVM.getLibraryLocation();
		if (location == null) {
			LibraryLocation dflt= defaultVM.getVMInstallType
().getDefaultLibraryLocation(defaultVM.getInstallLocation());
			
			libraryPath= dflt.getSystemLibraryPath();
			if (!libraryPath.toFile().isFile()) {
				libraryPath= Path.EMPTY;
			}
			
			sourcePath= dflt.getSystemLibrarySourcePath();
			if (sourcePath.toFile().isFile()) {
>>>>>>				sourcePath= dflt.getPackageRootPath();
				sourceRootPath= dflt.getPackageRootPath();
			} else {
				sourcePath= Path.EMPTY;
				sourceRootPath= Path.EMPTY;
			}
		} else {
			libraryPath= location.getSystemLibraryPath();
			sourcePath= location.getSystemLibrarySourcePath();
			sourceRootPath= location.getPackageRootPath();
		}
		return new LibraryLocation(libraryPath, sourcePath, 
sourceRootPath);
	}
Comment 1 Martin Aeschlimann CLA 2001-10-19 09:36:43 EDT
fixed > 205