@Dependent(value={org.eclipse.search.internal.ui.text.FileSearchQuery.class,org.eclipse.search.internal.ui.text.FileSearchResult.class}) public final class IdeFindListener extends IdeListener implements SearchQueryListener
IdeFindEventRequest
and passes them to the
IdeUacaProxy
to be transferred into the User Activity Central
Application for further processing.
Find operations are logged when a file search is performed.
Data available in an IdeFindEventRequest
:
derivedResources
- set to true
if search should
consider derived resources, false
otherwise.
fileTypes
- file name patterns separated by ", "
.
Set to "*"
by default, other examples produce strings such as
"Map*.*, String*.class"
.
queryText
- the search query string.
lookinTypeUri
- search scopes separated by ", "
.
In case of enclosed projects or selected resources the string
consists of a list of resource (project) paths relative to workspace
root (but starting with "/"
), and separated by ", "
.
In case of working sets the string starts with "working sets "
concatenated to a list of working set names separated by ", "
.
Set to "workspace"
by default, other examples produce strings
such as "/com.gratex.perconik.activity"
, "com.gratex.perconik.activity/src/com/gratex/perconik/activity/ide/listeners/IdeCommitListener.java"
,
(for enclosed projects or selected resources) or "working sets PerConIK Core, PerConIK Gratex, PerConIK Site"
(for working sets).
matchCase
- set to true
if search is case sensitive,
false
otherwise.
matchWholeWord
- always null
, can not be determined.
patternSyntaxTypeUri
- set to "Regular expressions"
when
enabled or "Wildcards"
by default.
resultsPerFiles
- a list of matched files,
see IdeFindFileResultDto
below.
searchSubfolders
- always null
, in fact it is always
true
(whole directory tree is always searched) but null
indicates that it is not a search option nor accessible via search API.
totalFilesSearched
- always null
, not accessible
via search API.
IdeListener
for documentation of inherited data.
Data available in an IdeFindFileResultDto
:
file
- matched file, see documentation of
IdeDocumentDto
in IdeDocumentListener
for more details.
rows
- a list of file matches,
see IdeFindResultRowDto
below.
Data available in an IdeFindResultRowDto
:
column
- zero based match position on line,
or null
if can not be determined.
row
- zero based match line number.
text
- matched text.
Note that row and column offsets in documents start from zero instead of one.
Warning: this listener depends on some Eclipse search API internals, therefore correct functionality in next versions of Eclipse IDE is not guaranteed.
Constructor and Description |
---|
IdeFindListener() |
Modifier and Type | Method and Description |
---|---|
void |
queryAdded(org.eclipse.search.ui.ISearchQuery query) |
void |
queryFinished(org.eclipse.search.ui.ISearchQuery query) |
void |
queryRemoved(org.eclipse.search.ui.ISearchQuery query) |
void |
queryStarting(org.eclipse.search.ui.ISearchQuery query) |
postUnregister, preRegister
postRegister, preUnregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postRegister, postUnregister, preRegister, preUnregister
public void queryAdded(org.eclipse.search.ui.ISearchQuery query)
queryAdded
in interface org.eclipse.search.ui.IQueryListener
public void queryRemoved(org.eclipse.search.ui.ISearchQuery query)
queryRemoved
in interface org.eclipse.search.ui.IQueryListener
public void queryStarting(org.eclipse.search.ui.ISearchQuery query)
queryStarting
in interface org.eclipse.search.ui.IQueryListener
public void queryFinished(org.eclipse.search.ui.ISearchQuery query)
queryFinished
in interface org.eclipse.search.ui.IQueryListener