Bug 36510

Summary: Automatically attach source for source files located in a class folder
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.1   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Patch the HEAD contents with this patch file. none

Description Olivier Thomann CLA 2003-04-15 11:08:34 EDT
Using 2.1, the source of a .class file could be automatically attached when the 
source of a .class file located in a class folder is in the same folder.
See bug 36337 for a description of the problem.
When bug 36499 will be fixed, no source will be returned for a .class file 
located in a class folder even if the corresponding source file is also located 
in the same class folder.
In the openBuffer(...) method of the ClassFile class, we could detect such a 
case and automatically attach the proper source to the package fragment root 
that corresponds to the class folder.
The actual behavior is incomplete. Due to a bug (see bug 36499), we return a 
source for a .class file located in a class folder, but the editor opened on 
that source doesn't synchronize with the outliner (bug 36337).
Comment 1 Olivier Thomann CLA 2003-04-16 14:26:07 EDT
Created attachment 4618 [details]
Patch the HEAD contents with this patch file.
Comment 2 Olivier Thomann CLA 2003-04-21 11:02:53 EDT
Fixed and released in HEAD.
Regression tests added.
Comment 3 David Audel CLA 2003-06-06 09:39:09 EDT
Verified.