Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1b4726ee66fe2e8b98b90871a022f967fe03d540 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v0.5 
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *     IBM Corp. - Rational Software - initial implementation
 ******************************************************************************/
/*
 * Created on Jun 11, 2003
 */
package org.eclipse.cdt.core.search;

import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;

/**
 * @author aniefer
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public interface ICSearchResultCollector {
	/**
	 * The search result corresponds exactly to the search pattern.
	 */
	int EXACT_MATCH = 0;

	/**
	 * The search result is potentially a match for the search pattern,
	 * but a problem prevented the search engine from being more accurate
	 * (typically because of the classpath was not correctly set).
	 */
	 int POTENTIAL_MATCH = 1;

	/**
	 * Called before the actual search starts.
	 */
	public void aboutToStart();
	
	/**
	 * Called when the search has ended.
	 */
	public void done();

	public IMatch createMatch( Object fileResource, int start, int end, 
						ISourceElementCallbackDelegate node, IPath referringElement) throws CoreException;
	
	//return whether or not the match was accepted
	public boolean acceptMatch( IMatch match ) throws CoreException;
	
	/**
	 * Returns the progress monitor used to report progress.
	 *
	 * @return a progress monitor or null if no progress monitor is provided
	 */
	public IProgressMonitor getProgressMonitor();
}

Back to the top