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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

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




Eclipse JDT
Release 3.5
Interface IQueryParticipant

public interface IQueryParticipant

This is the interface expected of extensions to the extension point org.eclipse.jdt.ui.queryParticipants.

A IQueryParticipant is called during the execution of a Java search query. It can report matches via an ISearchRequestor and may contribute a IMatchPresentation to help render the elements it contributes.

Clients may implement this interface.


Method Summary
 int estimateTicks ( QuerySpecification specification)
          Returns the number of units of work estimated.
  IMatchPresentation getUIParticipant ()
          Gets the UI participant responsible for handling the display of elements not known to the Java search UI.
 void search ( ISearchRequestor requestor, QuerySpecification querySpecification, IProgressMonitor monitor)
          Executes the search described by the given querySpecification.

Method Detail


void search(
ISearchRequestor requestor,
QuerySpecification querySpecification,
IProgressMonitor monitor)
Executes the search described by the given querySpecification. Matches are reported to the given requester. The interpretation of what a given Java search (e.g. "References to class Foo") means is up to the participant.

requestor - The requester to report matches to.
querySpecification - The specification of the query to run.
monitor - A monitor to report progress on.
CoreException - Thrown when the search can not be executed


int estimateTicks(
QuerySpecification specification)
Returns the number of units of work estimated. The returned number should be normalized such that the number of ticks for the original Java search job is 1000. For example if the participant uses the same amount of time as the Java search, it should return 1000, if it uses half the time, it should return 500, etc. This method is supposed to give a quick estimate of the work to be done and is assumed to be much faster than the actual query.

specification - the specification to estimate.
The number of ticks estimated.


IMatchPresentation getUIParticipant()
Gets the UI participant responsible for handling the display of elements not known to the Java search UI. The Java search UI knows elements are of type IJavaElement and IResource. A participant may return null if matches are only reported against elements of type IResource and IJavaElement.

The UI participant for this query participant or null.

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

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