KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > internal > core > text > ITextSearchResultCollector


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 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.internal.core.text;
12
13 import org.eclipse.core.resources.IResourceProxy;
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.core.runtime.IProgressMonitor;
16
17 public interface ITextSearchResultCollector {
18
19     /**
20      * Returns the progress monitor used to setup and report progress.
21      * @return The progress monitor
22      */

23     public IProgressMonitor getProgressMonitor();
24     
25     /**
26      * Called before the actual search starts.
27      * @throws CoreException Throws when starting failed.
28      */

29     public void aboutToStart() throws CoreException;
30      
31     /**
32      * Accepts the given search result.
33      * @param proxy proxy the resource proxy in which the match has been found.
34      * @param start position from the beginning of the file. Start position
35      * is zero based.
36      * @param length the length of the match.
37      * @throws CoreException Processing failed
38      */

39     public void accept(IResourceProxy proxy, int start, int length) throws CoreException;
40     
41     /**
42      * Called when the search has ended.
43      * @throws CoreException Throws when finish failed.
44      */

45     public void done() throws CoreException;
46 }
47
Popular Tags