KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > search > IOccurrencesFinder


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.jdt.internal.ui.search;
12
13 import java.util.Collection JavaDoc;
14 import java.util.List JavaDoc;
15
16 import org.eclipse.jface.text.IDocument;
17
18
19 import org.eclipse.jdt.core.IJavaElement;
20 import org.eclipse.jdt.core.dom.CompilationUnit;
21
22 public interface IOccurrencesFinder {
23     
24     public String JavaDoc initialize(CompilationUnit root, int offset, int length);
25     
26     public List JavaDoc perform();
27     
28     public String JavaDoc getJobLabel();
29
30     /**
31      * Returns the plural label for this finder with 3 placeholders:
32      * <ul>
33      * <li>{0} for the {@link #getElementName() element name}</li>
34      * <li>{1} for the number of results found</li>
35      * <li>{2} for the scope (name of the compilation unit)</li>
36      * </ul>
37      * @return the unformatted label
38      */

39     public String JavaDoc getUnformattedPluralLabel();
40     
41     /**
42      * Returns the singular label for this finder with 2 placeholders:
43      * <ul>
44      * <li>{0} for the {@link #getElementName() element name}</li>
45      * <li>{1} for the scope (name of the compilation unit)</li>
46      * </ul>
47      * @return the unformatted label
48      */

49     public String JavaDoc getUnformattedSingularLabel();
50     
51     /**
52      * Returns the name of the lement to look for or <code>null</code> if the finder hasn't
53      * been initialized yet.
54      * @return the name of the element
55      */

56     public String JavaDoc getElementName();
57     
58     public void collectOccurrenceMatches(IJavaElement element, IDocument document, Collection JavaDoc resultingMatches);
59 }
60
Popular Tags