This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 201111242103 ] [ JDK VERSION : 1.7.1 ] In a Netbeans RCP module project I've opened (with ctrl-B) the source file for a java class in an external library; the editor opened the generated source file with a message "Showing generated source file. No source are attached to class' JAR file." I used the "Attach sources..." button but nothing changed. The projects are based on version 7.0 of the platform, and the wrapper modules are in a different module suite.
Need steps to reproduce from scratch.
Please which sourced you are attaching to binary. Can you share them?
I'm attaching slf4j-api-1.6.1-sources.jar to slf4j-api-1.6.1.jar, they can be downloaded from here http://www.slf4j.org/dist/ My slf4j module also wraps slf4j-jdk14-1.6.1.jar
Thanks!
I was thinking this was a duplicate of bug #202785 but (1) slf4j-1.6.1.zip!/slf4j-1.6.1/slf4j-api-1.6.1.jar has a SHA-1 of 37ec7b9f4640c525a3b00b6fcac9ccc99f361ed3 which does not match that of org.slf4j:slf4j-api:1.6.1:jar in Central (6f3b8a24bf970f17289b234284c94f43eb42f0e4), (2) the Central artifact does in fact have sources and Javadoc, (3) it would not even matter until bug #205649 was implemented, which it is not in 7.1. So this is probably something else. The S/J attacher feature probably needs to better log what is going on.
Also UI in the Options where the default SJA shows the bindings will be good.
Not sure if Options is the right place for it; more akin to stuff currently listed in the Tools menu. Perhaps a subdialog launched from a new button in the Library Manager dialog?
>new button in the Library Manager dialog Seems the best to me.
The problem was in JavadocAndSourceRootDetection which was not able to detect the root in jar (zip) folder. Fixed jet-main 0dcd0fb4152e For the customizer panel I've created a new enhancement # 213718
Good candidate for a unit test.
Right, I will add them.
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0dcd0fb4152e User: Tomas Zezula <tzezula@netbeans.org> Log: #205782:"Attach sources..." button not working
Unit test added: jet-main b03f590f5dd3
BTW TestFileUtils has easier ways of creating a ZIP file.
It does not work in RC1 (Build 201206272359 which is after 201206080001 where it was supposed to be integrated). I am using 64 bit Windows 7, jdk1.7.0_04. I have several wrapper projects, I cannot use this method to add sources to any of them (nothing happens, no error, no message). I think I should reopen the bug.
Works fine in NB 7.2rc2. If it does not work with wrapper projects probably caused by wrapper projects ownership. If possible attach a test project.