Lines 131-144
Link Here
|
131 |
<answer id="arch-usecases"> |
131 |
<answer id="arch-usecases"> |
132 |
<usecase id="searchHistory" name="Search History"> |
132 |
<usecase id="searchHistory" name="Search History"> |
133 |
<p> |
133 |
<p> |
134 |
SearchHistory is synchronising history content through netbeans modules and it saves history to preferences. |
134 |
<code><a href="@TOP@/org/netbeans/api/search/SearchHistory.html">SearchHistory</a></code> |
|
|
135 |
is synchronising history content through netbeans modules and it saves history to preferences. |
135 |
</p> |
136 |
</p> |
136 |
<p> |
137 |
<p> |
137 |
There are two separate histories. One for search and another for replace. |
138 |
There are two separate histories. One for search and another for replace. |
138 |
When you add your propertyListener to SearchHistory - you can listen for changes in histories. |
139 |
When you add your propertyListener to |
|
|
140 |
<code><a href="@TOP@/org/netbeans/api/search/SearchHistory.html">SearchHistory</a></code> |
141 |
- you can listen for changes in histories. |
139 |
</p> |
142 |
</p> |
140 |
<p> |
143 |
<p> |
141 |
SearchHistory has methods for adding new entries and getting whole history list. |
144 |
<code><a href="@TOP@/org/netbeans/api/search/SearchHistory.html">SearchHistory</a></code> |
|
|
145 |
has methods for adding new entries and getting whole history list. |
142 |
</p> |
146 |
</p> |
143 |
|
147 |
|
144 |
</usecase> |
148 |
</usecase> |
Lines 153-184
Link Here
|
153 |
</p> |
157 |
</p> |
154 |
<p> |
158 |
<p> |
155 |
The definition is represented by objects extending class |
159 |
The definition is represented by objects extending class |
156 |
<code>SearchInfoDefinition</code>. To customize searching on |
160 |
<code> |
157 |
a custom node, a |
161 |
<a href="@TOP@/org/netbeans/spi/search/SearchInfoDefinition.html"> |
|
|
162 |
SearchInfoDefinition</a> |
163 |
</code>. To customize searching on a custom node, a |
158 |
<code>SearchInfoDefinition</code> object must be added to the node's lookup. |
164 |
<code>SearchInfoDefinition</code> object must be added to the node's lookup. |
159 |
In most cases, there is no need to define own class extending the |
165 |
In most cases, there is no need to define own class extending the |
160 |
class - one can use factory methods of class |
166 |
class - one can use factory methods of class |
161 |
<code>SearchInfoDefinitionFactory</code>. |
167 |
<code> |
|
|
168 |
<a href="@TOP@/org/netbeans/spi/search/SearchInfoDefinitionFactory.html"> |
169 |
SearchInfoDefinitionFactory</a> |
170 |
</code>. |
162 |
</p> |
171 |
</p> |
163 |
<p> |
172 |
<p> |
164 |
In some cases implementators may need to apply the same set |
173 |
In some cases implementators may need to apply the same set |
165 |
of SearchFilterDefinitions in the whole subtree of a node. |
174 |
of SearchFilterDefinitions in the whole subtree of a node. |
166 |
If so, it is not needed to put SearchInfoDefinition to all |
175 |
If so, it is not needed to put <code>SearchInfoDefinition</code> to all |
167 |
nodes' lookups, but only one instance of SubTreeSearchOptions |
176 |
nodes' lookups, but only one instance of <code> |
168 |
have to be put into the lookup of the root node. |
177 |
<a href="@TOP@/org/netbeans/spi/search/SubTreeSearchOptions.html"> |
|
|
178 |
SubTreeSearchOptions</a> |
179 |
</code> have to be put into the lookup of the root node. |
169 |
</p> |
180 |
</p> |
170 |
|
181 |
|
171 |
<api group="java" |
182 |
<api group="java" |
172 |
name="SearchInfoSPI" |
183 |
name="SearchInfoSPI" |
173 |
type="export" |
184 |
type="export" |
174 |
category="devel" |
185 |
category="stable" |
175 |
url="@TOP@org/netbeans/spi/search/package-summary.html"> |
186 |
url="@TOP@org/netbeans/spi/search/package-summary.html"> |
176 |
Defines abstract classes |
187 |
Defines abstract classes |
177 |
<code>SearchInfoDefinition</code>, |
188 |
<code><a href="@TOP@/org/netbeans/spi/search/SearchInfoDefinition.html">SearchInfoDefinition</a></code>, |
178 |
<code>SearchFilterDefinition</code>, |
189 |
<code><a href="@TOP@/org/netbeans/spi/search/SearchFilterDefinition.html">SearchFilterDefinition</a></code>, |
179 |
<code>SubTreeSearchOptions</code> |
190 |
<code><a href="@TOP@/org/netbeans/spi/search/SubTreeSearchOptions.html">SubTreeSearchOptions</a></code> |
180 |
and a factory class |
191 |
and a factory class |
181 |
<code>SearchInfoDefinitionFactory</code> |
192 |
<code><a href="@TOP@/org/netbeans/spi/search/SearchInfoDefinitionFactory.html">SearchInfoDefinitionFactory</a></code> |
182 |
</api> |
193 |
</api> |
183 |
</usecase> |
194 |
</usecase> |
184 |
<usecase id="SearchProvider" name="Enhance IDE searching features"> |
195 |
<usecase id="SearchProvider" name="Enhance IDE searching features"> |
Lines 192-241
Link Here
|
192 |
</p> |
203 |
</p> |
193 |
<ul> |
204 |
<ul> |
194 |
<li> |
205 |
<li> |
195 |
<code>SearchProvider</code> to register the new search feature to the IDE or platform application. |
206 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchProvider.html">SearchProvider</a></code> |
|
|
207 |
to register the new search feature to the IDE or platform application. |
196 |
</li> |
208 |
</li> |
197 |
<li> |
209 |
<li> |
198 |
<code>SearchProvider.Presenter</code> that creates visual component for adding to the search dialog and that can interact with dialog buttons. |
210 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchProvider.Presenter.html">SearchProvider.Presenter</a></code> |
|
|
211 |
that creates visual component for adding to the search dialog and that can interact with dialog buttons. |
199 |
</li> |
212 |
</li> |
200 |
<li> |
213 |
<li> |
201 |
<code>SearchResultsDisplayer</code> to show search results to the user. |
214 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchResultsDisplayer.html">SearchResultsDisplayer</a></code> |
|
|
215 |
to show search results to the user. |
202 |
</li> |
216 |
</li> |
203 |
<li> |
217 |
<li> |
204 |
<code>SearchComposition</code> that encapsulates setting and state of searches, provide access to result displayer, and is able to start and terminate the search. |
218 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchComposition.html">SearchComposition</a></code> |
|
|
219 |
that encapsulates setting and state of searches, provide access to result displayer, and is able to start |
220 |
and terminate the search. |
205 |
</li> |
221 |
</li> |
206 |
</ul> |
222 |
</ul> |
207 |
<api group="java" |
223 |
<api group="java" |
208 |
name="SearchProviderSPI" |
224 |
name="SearchProviderSPI" |
209 |
type="export" |
225 |
type="export" |
210 |
category="devel" |
226 |
category="stable" |
211 |
url="@TOP@org/netbeans/spi/search/provider/package-summary.html"> |
227 |
url="@TOP@org/netbeans/spi/search/provider/package-summary.html"> |
212 |
Defines abstract classes that need to be implemented when |
228 |
Defines abstract classes that need to be implemented when |
213 |
creating custom providers: |
229 |
creating custom providers: |
214 |
<code>SearchProvider</code>, |
230 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchProvider.html">SearchProvider</a></code>, |
215 |
<code>SearchProvider.Presenter</code>, |
231 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchProvider.Presenter.html">SearchProvider.Presenter</a></code>, |
216 |
<code>SearchResultsDisplayer</code>, |
232 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchResultsDisplayer.html">SearchResultsDisplayer</a></code>, |
217 |
<code>SearchComposition</code> |
233 |
<code><a href="@TOP@/org/netbeans/spi/search/provider/SearchComposition.html">SearchComposition</a></code> |
218 |
and relative classes. |
234 |
and relative classes. |
219 |
</api> |
235 |
</api> |
220 |
<api group="java" |
236 |
<api group="java" |
221 |
name="SearchProviderAPI" |
237 |
name="SearchProviderAPI" |
222 |
type="export" |
238 |
type="export" |
223 |
category="devel" |
239 |
category="stable" |
224 |
url="@TOP@org/netbeans/api/search/provider/package-summary.html"> |
240 |
url="@TOP@org/netbeans/api/search/provider/package-summary.html"> |
225 |
|
241 |
|
226 |
Classes usually used by search providers. |
242 |
Classes usually used by search providers. |
227 |
Contains class <code>SearchInfo</code>, that defines which files |
243 |
Contains class <code><a href="@TOP@/org/netbeans/api/search/provider/SearchInfo.html">SearchInfo</a></code>, |
228 |
should be searched (it can be retrieved from methods in |
244 |
that defines which files should be searched (it can be retrieved from methods in |
229 |
SearchInfoUtils, or UI component ScopeComboBox), <code> |
245 |
<code><a href="@TOP@/org/netbeans/api/search/provider/SearchInfoUtils.html">SearchInfoUtils</a></code>, |
230 |
SearchListener</code> that you should inform about events that |
246 |
or UI component controller <code><a href="@TOP@/org/netbeans/api/search/ui/ScopeController.html">ScopeController</a></code>), |
231 |
happen during searching, and helper classes <code>FileInfoUtils |
247 |
<code><a href="@TOP@/org/netbeans/api/search/provider/SearchListener.html">SearchListener</a></code> |
232 |
</code> (getting SearchInfo objects for nodes) and |
248 |
that you should inform about events that happen during searching, and helper classes |
233 |
<code>FileNameMatcher</code> (filtering files by file name). |
249 |
<code><a href="@TOP@/org/netbeans/api/search/provider/SearchInfoUtils.html">SearchInfoUtils</a></code> |
|
|
250 |
(getting SearchInfo objects for nodes) and |
251 |
<code><a href="@TOP@/org/netbeans/api/search/provider/FileNameMatcher.html">FileNameMatcher</a></code> |
252 |
(filtering files by file name). |
234 |
</api> |
253 |
</api> |
235 |
<api group="java" |
254 |
<api group="java" |
236 |
name="SearchProviderUIAPI" |
255 |
name="SearchProviderUIAPI" |
237 |
type="export" |
256 |
type="export" |
238 |
category="devel" |
257 |
category="stable" |
239 |
url="@TOP@org/netbeans/api/search/ui/package-summary.html"> |
258 |
url="@TOP@org/netbeans/api/search/ui/package-summary.html"> |
240 |
|
259 |
|
241 |
Several UI components that can be used in presenters of search |
260 |
Several UI components that can be used in presenters of search |
Lines 251-257
Link Here
|
251 |
<api group="java" |
270 |
<api group="java" |
252 |
name="SearchAPI" |
271 |
name="SearchAPI" |
253 |
type="export" |
272 |
type="export" |
254 |
category="devel" |
273 |
category="stable" |
255 |
url="@TOP@org/netbeans/api/search/package-summary.html"> |
274 |
url="@TOP@org/netbeans/api/search/package-summary.html"> |
256 |
|
275 |
|
257 |
Contains classes for controlling search, passing search |
276 |
Contains classes for controlling search, passing search |