1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.search.ui; 12 13 14 /** 15 * <p>A listener for changes to the set of search queries. Queries are added by running 16 * them via {@link org.eclipse.search.ui.NewSearchUI#runQueryInBackground(ISearchQuery) NewSearchUI#runQueryInBackground(ISearchQuery)} or 17 * {@link org.eclipse.search.ui.NewSearchUI#runQueryInForeground(org.eclipse.jface.operation.IRunnableContext,ISearchQuery) NewSearchUI#runQueryInForeground(IRunnableContext,ISearchQuery)}</p> 18 * <p>The search UI determines when queries are rerun, stopped or deleted (and will notify 19 * interested parties via this interface). Listeners can be added and removed in the {@link org.eclipse.search.ui.NewSearchUI NewSearchUI} class. 20 * </p> 21 * <p>Clients may implement this interface.</p> 22 * 23 * @since 3.0 24 */ 25 public interface IQueryListener { 26 /** 27 * Called when an query has been added to the system. 28 * 29 * @param query the query that has been added 30 */ 31 32 void queryAdded(ISearchQuery query); 33 /** 34 * Called when a query has been removed. 35 * 36 * @param query the query that has been removed 37 */ 38 void queryRemoved(ISearchQuery query); 39 40 /** 41 * Called before an <code>ISearchQuery</code> is starting. 42 * @param query the query about to start 43 */ 44 void queryStarting(ISearchQuery query); 45 46 /** 47 * Called after an <code>ISearchQuery</code> has finished. 48 * @param query the query that has finished 49 */ 50 void queryFinished(ISearchQuery query); 51 } 52