Eclipse: search for the text in Java class comments etc

Muhammad Imran Tariq picture Muhammad Imran Tariq · May 31, 2011 · Viewed 7k times · Source

I want to search for the text that is written in annotations and comments in my java classes. e.g

/** 
 * Object interface mapping for hibernate-handled table: mytable.
 * @author
 */

public interface myInterface{
}

I tried to search mytable in eclipse "java search" and "file search" but it not searching these texts and I can see these texts in annotaions etc.

I also use java search option match location and select all but it still did not search for mytable.

Please tell me how to do it in eclipse or RAD 8.0 (if possible).

After search how to replace that without opening each file?

Answer

Andreas Dolk picture Andreas Dolk · May 31, 2011

If you do file search on all *.java files in the current workspace/the project with keyword mytable, then this file (myInterface.java) should be in the search result. That's how it's supposed to work.