Bug 16162 - No source for classes without debug information [general issue]
Summary: No source for classes without debug information [general issue]
Status: RESOLVED DUPLICATE of bug 21475
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-16 11:25 EDT by Jed Anderson CLA
Modified: 2002-09-19 07:39 EDT (History)
0 users

See Also:


Attachments
abc.jar (537 bytes, application/octet-stream)
2002-05-16 11:45 EDT, Jed Anderson CLA
no flags Details
abcsrc.zip (700 bytes, application/octet-stream)
2002-05-16 11:45 EDT, Jed Anderson CLA
no flags Details

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