Bug 16162

Summary: No source for classes without debug information [general issue]
Product: [Eclipse Project] JDT Reporter: Jed Anderson <jed.anderson>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
abc.jar
none
abcsrc.zip none

Description Jed Anderson CLA 2002-05-16 11:25:35 EDT
Build: 20020508

If you have a jar that contains class files that are compiled with no debug
information, you cannot get attached source to display.

I will attach abc.jar, which contains one class I have made, x.Foo.  It has been
compiled with no debug information.  I will also attach a abcsrc.zip that
contains the source, x/Foo.java.  Follow these steps to see the bug:

1. Import the archives into a project.
2. Add abc.jar them to your build path.
3. Attach abcsrc.zip as source for abc.jar.
4. Set the root in the abcsrc.zip to be ABC/
5. Navigate in the packages view to Foo.class and double click it.

No source will appear.

It looks like we are checking the debug information in the class to get the
filename of the source file to open, but when that fails, we should try to help
the user a little bit by hacking the name to find the source name (i.e. changing
x.Foo.class to x/Foo.java).  99% of the time this will be the correct answer.
Comment 1 Jed Anderson CLA 2002-05-16 11:45:36 EDT
Created attachment 847 [details]
abc.jar
Comment 2 Jed Anderson CLA 2002-05-16 11:45:54 EDT
Created attachment 848 [details]
abcsrc.zip
Comment 3 Erich Gamma CLA 2002-05-16 14:51:39 EDT
we currently depend on the source file information in the class file. 

It is not critical and we haven't ran into issues because of this yet. 

Should be considered after 2.0
Comment 4 Philipe Mulet CLA 2002-09-19 07:39:06 EDT
Duplicate of bug 21475, was resolved for 2.1M1.

*** This bug has been marked as a duplicate of 21475 ***