Advertisement
Online Test Banks
Score higher
See Online Test Banks
eLearning
Learning anything is easy
Browse Online Courses
Mobile Apps
Learning on the go
Explore Mobile Apps
Dummies Store
Shop for books and more
Start Shopping

Searching for Text in Eclipse

Part of the Eclipse For Dummies Cheat Sheet

As your Eclipse project gets larger and more complex, being able to find specific snippets of Java code easily becomes important. Luckily, Eclipse offers you multiple ways to search for text in your Java code:

  • Locate text in one file: Select a file in an editor. Then, on the main menu, choose Edit→Find/Replace. The Find/Replace dialog appears. In the dialog’s Find field, type the text that you want to locate. If you intend to replace text, type the replacement text in the Replace With field. Then click Find, Replace/Find, Replace, or Replace All.

  • Locate text in a collection of files without regard to the meaning of the text in a Java program: Select the files that you want to search. (Select them in the Package Explorer or the Navigator view.) Then, on the main menu, choose Search→File. The Search dialog appears. (The Search dialog displays its File Search tab.) Type the text that you want to locate in the Containing Text field. Choose Selected Resources in the lower half of the File Search tab. Then click Search.

  • Locate text in a collection of files, taking into account the meaning of the text in a Java program: Select the files that you want to search in the Package Explorer or the Navigator view. Then, on the main menu, choose Search→Java. The Search dialog appears. (The Search dialog displays its Java Search tab.) Type the text that you want to locate in the Search String field. Narrow your search with the Search For and Limit To radio buttons. Choose Selected Resources in the lower half of the File Search tab. Then click Search.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement
Advertisement

Inside Dummies.com

Dummies.com Sweepstakes

Win an iPad Mini. Enter to win now!