Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: search for the text in Java class comments etc

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?

like image 696
Muhammad Imran Tariq Avatar asked Apr 11 '26 12:04

Muhammad Imran Tariq


2 Answers

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.

like image 59
Andreas Dolk Avatar answered Apr 13 '26 01:04

Andreas Dolk


it do,

eclipse searches that string under

Search->File search-> Comtaining text:mytable

file pattern *.java

it works for java file

like image 34
Nirmal- thInk beYond Avatar answered Apr 13 '26 01:04

Nirmal- thInk beYond



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!