Is there a way to search inside one particular source attachment in Eclipse?
Currently what I am doing is:
- In Eclipse, right-clicking on the binary jar that I’m interested in the source code of, in Package Explorer, and choosing Properties
- Copying and pasting the source attachment filename from the dialog box
- Making a new directory
- Unzipping the sources jar to that directory
- Searching that directory in Emacs (yes, Emacs – this means I don’t have to add it as a new project in Eclipse)
There must be an easier way!
The answer to your question is: no, not directly. See Eclipse bugs #199994 and #23341.
I hope the bounty is meant to be for the correct answer, even though it might not be the answer you had hoped for.
A workaround you can always use if at least you want to avoid using two tools (Eclipse vs. Emacs) is to
I just tested this, and it works nicely. 🙂
Optionally you may even select the dummy project’s src folder as the source location for your library. This could speed up things like “Open declaration” via F3 in comparison with unzipping a source JAR/ZIP.