public abstract class SearchInfo
extends java.lang.Object
| Constructor | Description |
|---|---|
SearchInfo() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract boolean |
canSearch() |
Checks that searching is possible.
|
protected abstract java.util.Iterator<org.openide.filesystems.FileObject> |
createFilesToSearchIterator(SearchScopeOptions options,
SearchListener listener,
java.util.concurrent.atomic.AtomicBoolean terminated) |
Create
Iterator that iterates over all files in the search scope
that comply with search options and search filters. |
protected abstract java.util.Iterator<java.net.URI> |
createUrisToSearchIterator(SearchScopeOptions options,
SearchListener listener,
java.util.concurrent.atomic.AtomicBoolean terminated) |
Create
Iterator that iterates over all URIs in the search scope
that comply with search options and search filters. |
java.lang.Iterable<org.openide.filesystems.FileObject> |
getFilesToSearch(SearchScopeOptions options,
SearchListener listener,
java.util.concurrent.atomic.AtomicBoolean terminated) |
Get
Iterable that iterates over all files in the search scope
that comply with search options and search filters. |
abstract java.util.List<SearchRoot> |
getSearchRoots() |
Get search roots.
|
java.lang.Iterable<java.net.URI> |
getUrisToSearch(SearchScopeOptions options,
SearchListener listener,
java.util.concurrent.atomic.AtomicBoolean terminated) |
Get
Iterable that iterates over all URIs in the search scope
that comply with search options and search filters. |
public abstract boolean canSearch()
@NonNull public abstract java.util.List<SearchRoot> getSearchRoots()
@NonNull
protected abstract java.util.Iterator<org.openide.filesystems.FileObject> createFilesToSearchIterator(@NonNull
SearchScopeOptions options,
@NonNull
SearchListener listener,
@NonNull
java.util.concurrent.atomic.AtomicBoolean terminated)
Iterator that iterates over all files in the search scope
that comply with search options and search filters.options - Custom options. This object encapsulates custom search
filters, file name pattern and general search settings.listener - Listener that is notified when some important event
occurs during searching. Listener passed to SearchComposition
should be used here.terminated - Object that can be asked by the iterator whether
the search has been terminated.@NonNull
protected abstract java.util.Iterator<java.net.URI> createUrisToSearchIterator(@NonNull
SearchScopeOptions options,
@NonNull
SearchListener listener,
@NonNull
java.util.concurrent.atomic.AtomicBoolean terminated)
Iterator that iterates over all URIs in the search scope
that comply with search options and search filters.options - Custom options. This object encapsulates custom search
filters, file name pattern and general search settings.listener - Listener that is notified when some important event
occurs during searching. Listener passed to SearchComposition
should be used here.terminated - Object that can be asked by the iterator whether the
search has been terminated.@NonNull
public final java.lang.Iterable<org.openide.filesystems.FileObject> getFilesToSearch(@NonNull
SearchScopeOptions options,
@NonNull
SearchListener listener,
@NonNull
java.util.concurrent.atomic.AtomicBoolean terminated)
Iterable that iterates over all files in the search scope
that comply with search options and search filters.options - Custom options. This object encapsulates custom search
filters, file name pattern and general search settings.listener - Listener that is notified when some important event
occurs during searching. Listener passed to SearchComposition
should be used here.terminated - Object that can be asked by the iterator whether
the search has been terminated.
This method can be used in for-each loops:
for (FileObject fo: searchInfo.getFilesToSearch(opts,listnr,term) {
ResultType result = somehowCheckFileContentMatches(fo);
if (result != null) {
searchResultsDisplayer.addMatchingObject(result);
}
}
@NonNull
public final java.lang.Iterable<java.net.URI> getUrisToSearch(@NonNull
SearchScopeOptions options,
@NonNull
SearchListener listener,
@NonNull
java.util.concurrent.atomic.AtomicBoolean terminated)
Iterable that iterates over all URIs in the search scope
that comply with search options and search filters.options - Custom options. This object encapsulates custom search
filters, file name pattern and general search settings.listener - Listener that is notified when some important event
occurs during searching. Listener passed to SearchComposition
should be used here.terminated - Object that can be asked by the iterator whether
the search has been terminated.
This method can be used in for-each loops:
for (URI uri: searchInfo.getUrisToSearch(opts,listnr,term) {
ResultType result = somehowCheckFileContentMatches(fo);
if (result != null) {
searchResultsDisplayer.addMatchingObject(result);
}
}
Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.