This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread 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 Elasticsearch in Action this week in the Big Data 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: 5850
    
    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: 5850
    
    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")?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How can i search a string in the source code?