This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes How can i search a string in the source code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "How can i search a string in the source code?" Watch "How can i search a string in the source code?" New topic
Author

How can i search a string in the source code?

Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

I'm using Eclipse ide and working with struts 2.0 attached source code. I want to find all the instances of a particular class where it is instantiated in entire struts-core-2.2.3. How can i do that. Thanks


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Try this: select the class, right-click on it and choose Open Call Hierarchy.


JBoss In Action
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Thanks peter, But open in type hierarchy worked for me.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Open Type Hierarchy does not show the locations where the class is instantiated. Instead, it shows classes that extend the class. Or was your original question incorrect (you mentioned "instantiated")?
 
Consider Paul's rocket mass heater.
 
subject: How can i search a string in the source code?