carbidecpp22devenv/configuration/org.eclipse.osgi/bundles/309/1/.cp/tasks/cdt_t_search.htm
changeset 5 684bf18fdedf
equal deleted inserted replaced
4:4764c8c88759 5:684bf18fdedf
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
       
     2 <html lang="en">
       
     3 
       
     4 <head>
       
     5 <meta http-equiv="Content-Language" content="en-us">
       
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       
     7 <title>Searching for C/C++ elements</title>
       
     8 <link rel="stylesheet" type="text/css" href="../help.css">
       
     9 </head>
       
    10 
       
    11 <body>
       
    12 
       
    13 <h1>Searching for C/C++ elements</h1>
       
    14 
       
    15 <p>It is recommended that you perform searches on successfully compiled 
       
    16 programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax 
       
    17 to use to complete an effective search. It is also important to ensure that 
       
    18 include paths and symbols are correctly defined. For more information, see
       
    19 <a href="cdt_t_proj_paths.htm">Including paths and symbols</a>.</p>
       
    20 
       
    21 <p>See <a href="../concepts/cdt_c_search.htm">C/C++ search</a>, for more information on:</p>
       
    22 
       
    23 <ul>
       
    24   <li>What you can search for</li>
       
    25   <li>How to limit your search</li>
       
    26   <li>How to use wildcard characters in your search</li>
       
    27   <li>Syntax examples</li>
       
    28 </ul>
       
    29 
       
    30 
       
    31 
       
    32 <p>Performing a C/C++ Search can be done in a number of different ways but regardless of the manner chosen the same information must be provided to C/C++ Search.</p> 
       
    33 
       
    34 The info required to do a search is:
       
    35 
       
    36 <table border="1"  cellpadding="2" valign="top">
       
    37 	<tr>
       
    38 		<td valign="top"><b>Search string</b></td>
       
    39 		<td valign="top">this is the name of the element you are looking for. See <a href="../concepts/cdt_c_search.htm">C/C++ search</a> for more information on how to specify wildcard searches and how to further refine your searches by using fully qualified names</td>
       
    40 	</tr>
       
    41 	<tr>
       
    42 		<td valign="top"><b>Search For </b></td>
       
    43 		<td valign="top">this is the element type that you wish to search for. You can also select to search on ‘Any Element’ which will perform the search on a combination of all elements</td>
       
    44 	</tr>
       
    45 	<tr>
       
    46 		<td valign="top"><b>Limit To</b></td>
       
    47 		<td valign="top">this allows you to limit your search to declarations, definitions or references. You can also select ‘All Occurrences’ which will search for declarations, definitions and references that match the element</td>
       
    48 	</tr>
       
    49 	<tr>
       
    50 		<td valign="top"><b>Scope</b></td>
       
    51 		<td valign="top">this allows the user to limit the scope of the search. The three available scopes are:
       
    52 		<table border="0" cellpadding="2">
       
    53 			<tr>
       
    54 				<td valign="top"><b>Workspace</b></td>
       
    55 				<td valign="top">this searches all of the open projects in the workspace</td>
       
    56 			</tr>
       
    57 			<tr>
       
    58 				<td valign="top"><b>Selected Resources</b></td>
       
    59 				<td valign="top">this option becomes enabled whenever something is selected in one of the following views in the C/C++ perspective:
       
    60 				<ul>
       
    61 					<li>C/C++ Projects</li>
       
    62 					<li>Project Explorer</li>
       
    63 					<li>Search</li>
       
    64 					<li>Outline</li>
       
    65 				</ul>
       
    66 				<p>The scope will be limited to whatever element is selected in the view.</p>
       
    67 				</td>
       
    68 			</tr>
       
    69 			<tr>
       
    70 				<td valign="top"><b>Working Set</b></td>
       
    71 				<td valign="top">working sets can be selected and created </td>
       
    72 				</tr>		
       
    73 			</table>
       
    74 		</td>
       
    75 	</tr>
       
    76 </table>
       
    77 
       
    78 <p>There are 3 main ways for initiating a C/C++ search:
       
    79 <ul>
       
    80 	<li>Using the <b>C/C++ Search</b> dialog</li>
       
    81 	<li>Selecting an element in the <b>Editor</b> view</li>
       
    82 	<li>Selecting an element in the <b>C/C++ Projects</b> view or Selecting an element from the <b>Outline</b> view</li>
       
    83 </ul>
       
    84 </p>
       
    85 
       
    86 
       
    87 
       
    88 <h3>Using the C/C++ Search dialog</h3>
       
    89 <p> <img src="../images/search.png"  alt="Search dialog box"></p>
       
    90 
       
    91 <ol>
       
    92 	<li>Enter the search string in the <b>Search String</b> field (optional mark it case sensitive). <br>
       
    93 	<b>Note: </b>that previous search queries (from the same work session) are remembered and can be accessed via the drop down list.</li>
       
    94 	<li>Select the <b>Search For</b> element.</li>
       
    95 	<li>Select the <b>Limit To</b>.</li>
       
    96 	<li>Select the <b>Scope</b>.</li>
       
    97 	<li>Press <b>Search</b>.</li>
       
    98 </ol>
       
    99 <p>Results are displayed in the <b>Search</b> view.</p>
       
   100 
       
   101 
       
   102 <h3>Selecting an element in the Editor view</h3>
       
   103 <ol>
       
   104 	<li>Select the desired element in the editor.</li>
       
   105 	<li>Right click and select <b>All Declarations</b> or <b>All References</b> and the scope you wish to search.</li>
       
   106 </ol>
       
   107 <p>Results are displayed in the <b>Search</b> view.</p>
       
   108 
       
   109 
       
   110 
       
   111 <h3>Selecting an element in C/C++ Projects or Outline View</h3>
       
   112 
       
   113 <ol>
       
   114 	<li>Select the desired element in the tree.</li>
       
   115 	<li>Right click and select <b>All Declarations</b> or <b>All References</b> and the scope you wish to search.</li>
       
   116 </ol>
       
   117 <p>Results are displayed in the <b>Search</b> view.</p>
       
   118 
       
   119 
       
   120 <p>For more information, see:
       
   121 <li><b>Workbench User Guide &gt; Concepts &gt; Views &gt; Search view</b></li>
       
   122 <li><b>Workbench User Guide &gt; Concepts &gt; Workbench &gt; Working Set</b></li>
       
   123 <li><b>Workbench User Guide &gt; Tasks &gt; Navigating and finding resources</b></li>
       
   124 
       
   125 </ul>
       
   126 
       
   127 <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
       
   128 <br>
       
   129 <a href="../concepts/cdt_c_search.htm">C/C++ search</a><br>
       
   130 <a href="../concepts/cdt_c_indexer.htm">C/C++ Indexer</a><br>
       
   131 <a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
       
   132 <a href="../concepts/cdt_c_open_declarations.htm">Open Declaration</a><br>
       
   133 </p>
       
   134 
       
   135 <p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21"><br>
       
   136 <a href="cdt_t_sel_search.htm">Selection Searching for C/C++ elements</a><br>
       
   137 <a href="cdt_t_open_declarations.htm">Navigate to C/C++ declarations</a><br>
       
   138 </p>
       
   139 
       
   140 <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
       
   141 <br>
       
   142 <a href="../reference/cdt_u_search.htm">C/C++ search page, Search dialog box</a></p>
       
   143 <p>&nbsp;</p>
       
   144 <img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
       
   145 
       
   146 </body>
       
   147 
       
   148 </html>