Is there a way to search inside one particular source attachment in Eclipse?
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
- create a dummy project, e.g. "JDK6 (dummy)",
- deactivate the Java builder in its project properties so as to avoid an automatic build you do not want and which might fail due to missing dependencies anyway,
- unzip the source attachment (e.g. source.zip) into the dummy project's src folder,
- select the project or one of its packages in package explorer and
- search happily via Ctrl-H using text or Java search, maybe using the search option "Scope: Selected resources" (attention: initial indexing for big sources like JDK during the very first search action can take a while, the next time it will be much faster).
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.