This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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: 5852
    
    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: 5852
    
    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")?
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How can i search a string in the source code?
 
jQuery in Action, 3rd edition