Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c379a37f95009106261fe8c9d82e71fe2c6effb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html lang="en">

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Searching for C/C++ elements</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>

<body>

<h1>Searching for C/C++ elements</h1>

<p>It is recommended that you perform searches on successfully compiled 
programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax 
to use to complete an effective search. It is also important to ensure that 
include paths and symbols are correctly defined. For more information, see
<a href="cdt_t_proj_paths.htm">Including paths and symbols</a>.</p>

<p>See <a href="../concepts/cdt_c_search.htm">C/C++ search</a>, for more information on:</p>

<ul>
  <li>What you can search for</li>
  <li>How to limit your search</li>
  <li>How to use wildcard characters in your search</li>
  <li>Syntax examples</li>
</ul>



<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> 

The info required to do a search is:

<table border="1"  cellpadding="4" cellspacing="0" valign="top" bordercolor="#DDDDDD" width="700px" >
   <tr>
     <th width="25%" scope="col">Option</th>
     <th width="75%" scope="col">Explanation</th>
   </tr>
	<tr>
		<td valign="top"><strong>Search string</strong></td>
		<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>
	</tr>
	<tr>
		<td valign="top"><strong>Search For </strong></td>
		<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>
	</tr>
	<tr>
		<td valign="top"><strong>Limit To</strong></td>
		<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>
	</tr>
	<tr>
		<td valign="top"><strong>Scope</strong></td>
		<td valign="top">this allows the user to limit the scope of the search. The three available scopes are:
		<table border="0" cellpadding="2">
			<tr>
				<td valign="top"><strong>Workspace</strong></td>
				<td valign="top">this searches all of the open projects in the workspace</td>
			</tr>
			<tr>
				<td valign="top"><strong>Selected Resources</strong></td>
				<td valign="top">this option becomes enabled whenever something is selected in one of the following views in the C/C++ perspective:
				<ul>
					<li>C/C++ Projects</li>
					<li>Project Explorer</li>
					<li>Search</li>
					<li>Outline</li>
				</ul>
				<p>The scope will be limited to whatever element is selected in the view.</p>
				</td>
			</tr>
			<tr>
				<td valign="top"><strong>Working Set</strong></td>
				<td valign="top">working sets can be selected and created </td>
				</tr>		
			</table>
		</td>
	</tr>
</table>

<p>There are 3 main ways for initiating a C/C++ search:
<ul>
	<li>Using the <strong>C/C++ Search</strong> dialog</li>
	<li>Selecting an element in the <strong>Editor</strong> view</li>
	<li>Selecting an element in the <strong>C/C++ Projects</strong> view or Selecting an element from the <strong>Outline</strong> view</li>
</ul>
</p>


<h3>Using the C/C++ Search dialog</h3>
<p> <img src="../images/search.png"  alt="Search dialog box"></p>

<ol>
	<li>Enter the search string in the <strong>Search String</strong> field (optional mark it case sensitive). <br>
	<strong>Note: </strong>that previous search queries (from the same work session) are remembered and can be accessed via the drop down list.</li>
	<li>Select the <strong>Search For</strong> element.</li>
	<li>Select the <strong>Limit To</strong>.</li>
	<li>Select the <strong>Scope</strong>.</li>
	<li>Press <strong>Search</strong>.</li>
</ol>
<p>Results are displayed in the <a href="../reference/cdt_u_search_view.htm">Search</a> view.</p>


<h3>Selecting an element in the Editor view</h3>
<ol>
	<li>Select the desired element in the editor.</li>
	<li>Right click and select <strong>All Declarations</strong> or <strong>All References</strong> and the scope you wish to search.</li>
</ol>
<p>Results are displayed in the <strong>Search</strong> view.</p>

<h3>Selecting an element in C/C++ Projects or Outline View</h3>

<ol>
	<li>Select the desired element in the tree.</li>
	<li>Right click and select <strong>All Declarations</strong> or <strong>All References</strong> and the scope you wish to search.</li>
</ol>
<p>Results are displayed in the <strong>Search</strong> view.</p>


<p>For more information, see:
<li><strong>Workbench User Guide &gt; Concepts &gt; Views &gt; Search view</strong></li>
<li><strong>Workbench User Guide &gt; Concepts &gt; Workbench &gt; Working Set</strong></li>
<li><strong>Workbench User Guide &gt; Tasks &gt; Navigating and finding resources</strong></li>

</ul>

<p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_search.htm">C/C++ search</a><br>
<a href="../concepts/cdt_c_indexer.htm">C/C++ Indexer</a><br>
<a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
<a href="../concepts/cdt_c_open_declarations.htm">Open Declaration</a><br>
</p>

<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21"><br>
<a href="cdt_t_sel_search.htm">Selection Searching for C/C++ elements</a><br>
<a href="cdt_t_open_declarations.htm">Navigate to C/C++ declarations</a><br>
</p>

<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_u_search.htm">C/C++ search page, Search dialog box</a></p>
<hr >
<img src="../images/ng00_07.gif" ALT="IBM Copyright Statement" >
</body>

</html>

Back to the top