|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 
|  | <html> | 
|  | <head> | 
|  | <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > | 
|  | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | 
|  | <meta http-equiv="Content-Style-Type" content="text/css"> | 
|  | <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> | 
|  | <title> Searching the workbench </title> | 
|  | <link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css"> | 
|  | </head> | 
|  | <body> | 
|  | <h1> Searching the workbench </h1> | 
|  | <p> In this section, you will search the workbench for Tcl elements. </p> | 
|  | <p> In the Search dialog, you can perform file, text or Tcl searches. Tcl searches | 
|  | operate on the structure of the code. File searches operate on the files | 
|  | by name and/or text content. Tcl searches are faster, since there is an | 
|  | underlying indexing structure for the code structure.  Text searches allow | 
|  | you to find matches inside comments and strings. | 
|  | </p> | 
|  | <h2> Performing a Tcl search from the workbench </h2> | 
|  | <ol> | 
|  | <li>Copy the contents of the http.tcl file (from http1.0 standard package) and paste it to a new Tcl file in an exemplary project.</li> | 
|  | <li> In the Tcl perspective, click the <strong>Search</strong> | 
|  | (<img src="images/search.png" alt="Search">) button | 
|  | in the workbench toolbar or use <strong>Search > Tcl</strong> from | 
|  | the menu bar. </li> | 
|  | <li> If it is not already selected, select the <strong>Tcl Search</strong> | 
|  | tab. </li> | 
|  | <li> In the <strong>Search string</strong> field, type <em>http_config</em>. | 
|  | In the <em>Search For</em> area, select <strong>Method</strong>, and in the <em>Limit | 
|  | To</em> area, select <strong>Declaration</strong>.<br> | 
|  | Verify that the Scope is set to <strong>Workspace</strong>. | 
|  | <p> <img src="images/tcl-search-1.png"  alt="Tcl Search dialog"> | 
|  | </p> | 
|  | Then click <strong>Search</strong>. While searching you may click <strong>Cancel</strong> | 
|  | at any time to stop the search. Partial results will be shown. </li> | 
|  | <li> In the Tcl perspective, the Search view shows the search results and the first match is | 
|  | highlighted in the editor. | 
|  | <p> <img src="images/tcl-search-results.png"  alt="Search results view"> | 
|  | </p> | 
|  | You may the <strong>Show Next Match</strong> | 
|  | (<img src="images/search_next.png" alt="Show Next Match">) and <strong>Show Previous | 
|  | Match</strong> (<img src="images/search_prev.png" alt="Show Previous Match">) buttons to navigate to each match | 
|  | (in this example there is a single match).<br> | 
|  | Note that if the file in which a match was found is not currently open, it is opened in an editor | 
|  | when you select the match in the Search view. | 
|  | </li> | 
|  | <li> When you navigate to a search match using the Search view buttons, | 
|  | the file opens in the editor at the position of the match. Search matches | 
|  | are tagged with a search marker in the vertical ruler as on the screenshot above. | 
|  | </li> | 
|  | </ol> | 
|  | <h2> Performing a file search </h2> | 
|  | <ol> | 
|  | <li> In the Tcl perspective, click the <strong>Search</strong> button | 
|  | in the workbench toolbar or select <strong>Search > File</strong> from the menu bar. </li> | 
|  | <li> If it is not already selected, select the <strong>File Search</strong> | 
|  | tab.</li> | 
|  | <li> In the <strong>Containing text</strong> field, type <em>http_config</em>. | 
|  | Make sure that the <strong>File name patterns</strong>  field is set | 
|  | to <em>*</em>. The Scope should be set to <em>Workspace</em>. | 
|  | Then click <strong>Search</strong>. | 
|  | <p> <img src="images/tcl-file-search.png"  alt="File search tab"> | 
|  | </p> | 
|  | </li> | 
|  | <li> To find all files of a given file name pattern, leave the Containing | 
|  | Text field empty. </li> | 
|  | </ol> | 
|  | <h2> Viewing previous search results </h2> | 
|  | <p> In the Search Results view, click the arrow next to the<strong> Previous | 
|  | Search Results</strong> toolbar button to see a menu containing the list of the most | 
|  | recent searches. You can choose items from this menu to view previous | 
|  | searches.  The list can be cleared by choosing <strong>Clear History</strong>. | 
|  | </p> | 
|  | <img src="images/tcl-search-hist.png"  alt="Previous search results menu"> | 
|  | <p> | 
|  | The <strong>Previous Search Results</strong> button will display a dialog | 
|  | with the list of all previous searches from the current session. | 
|  | </p> | 
|  | <img src="images/tcl-search-hist-dialog.png"  alt="Previous search results dialog"> | 
|  | <p> | 
|  | Selecting a previous search from this dialog will let you view that search. | 
|  | </p> | 
|  | <img src="../images/ngrelc.png"  alt="Related concepts" border="0"> | 
|  | <p> | 
|  |  | 
|  | <a href="../concepts/concepts-8.htm">Tcl search</a> </p> | 
|  |  | 
|  | </body> | 
|  | </html> | 
|  |  |