I am working on a (Java) project in which I have many jars which have a source-jar file attached.
Is there any way to make the eclipse "File Search" search for Java files (and txt, xml etc. for that matter) containing some string literal inside these source jars, not just in the project folder?
Or is there any plugin by which this can be achieved?
If you want to search in files: Ctrl + H and then choose tab File Search . If you want to search for resources: Ctrl + Shift + R . If you want to search for Java types: Ctrl + Shift + T . If you want more shortcut keys: Ctrl + Shift + L .
Press Ctrl + H , should bring up the search that will include options to search via project, directory, etc. Ctrl + Alt + G can be used to find selected text across a workspace in eclipse.
Or, if this source jar file contains the sources of a classes jar file that is used as a library in your Eclipse project, just right-click on this jar file, select "Properties", then "Java Source Attachment", then "External File", and select the source jar file.
Recently discovered the following plugin has beta support for searching into linked source jars: https://github.com/ajermakovics/eclipse-instasearch
You have to enable searching source jars in the preferences as it is turned off by default. Depending on how much source you have, the indexing process is very slow, but then search is very fast.
I have an Eclipse workspace with the enterprise versions of Alfresco (Explore, Share and SOLR) and Alfresco Workdesk (Vanilla, Office and Mobile). Indexing took about 8 minutes on my Early 2011 MacBook Pro. Search is almost instantanious.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With