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.
dummies
Source:http://www.dummies.com/how-to/content/searching-for-text-in-eclipse.html
No comments:
Post a Comment