Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.search.ui
Interface ISearchQuery


public interface ISearchQuery

Represents a particular search query (in a Java example, a query might be "find all occurrences of 'foo' in workspace"). When it's run method is called, the query places any results it finds in the ISearchResult that can be accessed via getSearchResult(). Note that getSearchResult may be called at any time, even before the run() method has been called. An empty search result should be returned in that case.

Clients may implement this interface.

Since:
3.0

Method Summary
 boolean canRerun ()
          Returns whether the query can be run more than once.
 boolean canRunInBackground ()
          Returns whether this query can be run in the background.
  String getLabel ()
          Returns a user readable label for this query.
  ISearchResult getSearchResult ()
          Returns the search result associated with this query.
  IStatus run ( IProgressMonitor monitor)
          This is the method that actually does the work, i.e. finds the results of the search query.
 

Method Detail

run

IStatus run(
IProgressMonitor monitor)
            throws 
OperationCanceledException
This is the method that actually does the work, i.e. finds the results of the search query.

Parameters:
monitor - the progress monitor to be used
Returns:
the status after completion of the search job.
Throws:
OperationCanceledException - Thrown when the search query has been canceled.

getLabel

String getLabel()
Returns a user readable label for this query. This will be used, for example to set the Job name if this query is executed in the background. Note that progress notification (for example, the number of matches found) should be done via the progress monitor passed into the run(IProgressMonitor) method

Returns:
the user readable label of this query

canRerun

boolean canRerun()
Returns whether the query can be run more than once. Some queries may depend on transient information and return false.

Returns:
whether this query can be run more than once

canRunInBackground

boolean canRunInBackground()
Returns whether this query can be run in the background. Note that queries must do proper locking when they are run in the background (e.g. get the appropriate workspace locks).

Returns:
whether this query can be run in the background

getSearchResult

ISearchResult getSearchResult()
Returns the search result associated with this query. This method can be called before run is called.

Returns:
this query's search result

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire