-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathref-dialog-java-search.htm
More file actions
217 lines (175 loc) · 7.39 KB
/
ref-dialog-java-search.htm
File metadata and controls
217 lines (175 loc) · 7.39 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2014. 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">
<title>Java Search Tab</title>
<link rel="stylesheet" href="../book.css" charset="ISO-8859-1" type="text/css">
</head>
<body>
<h1>Java Search Tab</h1>
<p>This tab in the Search dialog allows you to search for Java elements. To show the tab invoke <b>Search > Java</b>.</p>
<h2>Search String</h2>
<p>In this field, type the expression for which you wish to search, using the wildcard characters mentioned in the dialog as needed. This field is initialized based on the
current selection.</p>
<!-- Description copied from Javadoc of org.eclipse.jdt.core.search.SearchPattern.createPattern(String, int, int, int): -->
<ul>
<li>Type patterns have the following syntax:
<p><b><code>[qualification '.']typeName ['<' typeArguments '>']</code></b></p>
<p>Examples:</p>
<ul>
<li><code>java.lang.Object</code></li>
<li><code>Runnable</code></li>
<li><code>List<String></code></li>
</ul>
<p>
Type arguments can be specified to search for references to parameterized types
using following syntax:</p><p>
<b><code>'<' { [ '?' {'extends'|'super'} ] type ( ',' [ '?' {'extends'|'super'} ] type )* | '?' } '>'</code></b>
</p><div style="font-style:italic;">
Note that:
<ul>
<li>'*' is not valid inside type arguments definition <></li>
<li>'?' is treated as a wildcard when it is inside <> (i.e. it must be put on first position of the type argument)</li>
</ul>
</div>
<br>
</li>
<li>Method patterns have the following syntax:
<p><b><code>[declaringType '.'] ['<' typeArguments '>'] methodName ['(' parameterTypes ')'] [returnType]</code></b></p>
<p>Type arguments have the same syntax as explained in the type patterns section.</p>
<p>Examples:</p>
<ul>
<li><code>java.lang.Runnable.run() void</code></li>
<li><code>main(*)</code></li>
<li><code><String>toArray(String[])</code></li>
</ul>
<br>
</li>
<li>Constructor patterns have the following syntax:
<p><b><code>['<' typeArguments '>'] [declaringQualification '.'] typeName ['(' parameterTypes ')']</code></b></p>
<p>Type arguments have the same syntax as explained in the type patterns section.</p>
<p><i>Note that the constructor name should not be entered as it is always the same as the type name.</i></p>
<p>Examples:</p>
<ul>
<li><code>java.lang.Object()</code></li>
<li><code>Test(*)</code></li>
<li><code><Exception>Sample(Exception)</code></li>
</ul>
<br>
</li>
<li>Field patterns have the following syntax:
<p><b><code>[declaringType '.'] fieldName [fieldType]</code></b></p>
<p>Examples:</p>
<ul>
<li><code>java.lang.String.serialVersionUID long</code></li>
<li><code>field*</code></li>
</ul>
<br>
</li>
<li>Package patterns have the following syntax:
<p><b><code>packageNameSegment {'.' packageNameSegment}</code></b></p>
<p>Examples:</p>
<ul>
<li><code>java.lang</code></li>
<li><code>org.e*.jdt.c*e</code></li>
</ul>
</li>
</ul>
<!-- End of copy -->
<h2 class="Head">Search For</h2>
<p>Select to search for one of the following kinds of elements:</p>
<ul>
<li>Type</li>
<li>Method</li>
<li>Package</li>
<li>Constructor</li>
<li>Module</li>
<li>Field</li>
</ul>
<h2 class="Head">Limit To</h2>
<p>Select to limit your search results to one of the following kinds of matches:</p>
<ul>
<li>Declarations</li>
<li>Implementers (available only when searching for types)</li>
<li>References</li>
<li>All occurrences</li>
<li>Read access (available only when searching for fields)</li>
<li>Write access (available only when searching for fields)</li>
<li>Match locations (available only when searching for types or methods references).
<p>Match locations allow to further narrow the location of matches.</p>
<p>Select the location where to search for:</p>
<ul>
<li>type reference:
<ul>
<li>Super class declarations</li>
<li>Annotations</li>
<li>Field types</li>
<li>Local variable types</li>
<li>Method return types</li>
<li>Method parameter types</li>
<li>Thrown exception types</li>
<li>Type parameter bounds</li>
<li>Wildcard bounds</li>
<li>Type argument</li>
<li>Cast expressions</li>
<li>Catch clauses</li>
<li>Class instance creations</li>
<li>'instanceof' checks</li>
</ul>
</li>
<li>method reference:
<ul>
<li>'this.' references</li>
<li>Implicit 'this.' references</li>
<li>'super.' references</li>
<li>Qualified references</li>
<li>'::' method references</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 class="Item">Search In</h2>
<p>Select where in the scope to search for results</p>
<ul>
<li>Sources: Search in all source files in the scope</li>
<li>Required projects: Search in all required projects</li>
<li>JRE libraries: Search in JRE libraries on the build path</li>
<li>Application libraries: Search in libraries on the build path</li>
</ul>
<h2 class="Item">Scope</h2>
<p>Select to limit your search results to one of the following scope</p>
<ul>
<li>Workspace</li>
<li>Selected resources</li>
<li>Enclosing Projects</li>
<li>Working Set</li>
</ul>
<p>Press <span class="control">Choose</span> to select or create a working set.</p>
<h2 class="Item">Search Result View, Filters</h2>
<p>The search results are presented in the <b>Search</b> view.</p>
<p>The <b>View Menu</b> contains these options:</p>
<ul>
<li><b>Show As List</b><br>
Presents results in a flat list. In this mode, the context menu contains a <b>Sort By</b> menu with options
<b>Name</b>, <b>Path</b>, <b>Parent Name</b>.</li>
<li><b>Show as Tree</b><br>
Presents results in a hierarchy. In this mode, 4 buttons appear in the view tool bar,
where you can <b>Group by Project</b>, <b>Package</b>, <b>File</b>, or <b>Type</b>.
</li>
<li><b>Filters</b><br>
Various filters allow to exclude certain search results,
for example potential matches, matches in imports, Javadocs, deprecated, non-public, static or non-static elements.<br>
For types, there are filters for inexact or non-matching type arguments.<br>
For methods, there's a filter for references to overriding methods.<br>
For fields, there are filters for read or write accesses.<br>
</li>
</ul>
<h3 class="related">Related Concepts</h3>
<a href="../concepts/concept-java-search.htm">Java search</a>
<h3 class="related">Related References</h3>
<a href="../reference/ref-menu-search.htm">Search</a>
</body>
</html>