Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse searching files in specific package

Tags:

search

eclipse

I am attempting to strip out my Log.i Log.d etc code in eclipse. I have used them liberally. I can find them by control+h and using the File Search tab. Once I can filter the results to a certain package I plan on doing a replace with a blank string.

I check the Regular Expression checkbox.
In the Containing text: field I use Log\..*;

This gets every single Log line of code in the workspace (At least I think workspace, because there is currently 1 project in the workspace)

How can I get this search to only search within a certain package (ie com.example.so.is.super.cool)

I assume this is in the File name patterns field and I have attempted:

.*super.*
*super*
super

Please let me know if there is a pattern I can enter in File name patterns that narrows the search down for me.

like image 687
Jesse Black Avatar asked Jan 06 '12 03:01

Jesse Black


1 Answers

Here's how:

  1. Select the package in Package Explorer
  2. On the Search > File Search panel: Specify regular expression, set Scope to "Selected resources"
  3. Press Search

enter image description here

like image 110
Sri Sankaran Avatar answered Oct 31 '22 07:10

Sri Sankaran