KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > ui > ISearchResultViewEntry


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 import org.eclipse.core.resources.IMarker;
14 import org.eclipse.core.resources.IResource;
15
16 /**
17  * Specifies a search result view entry.
18  * This entry provides information about the markers
19  * it groups by a client defined key. Each entry in the search
20  * result view corresponds to a different key.
21  * <p>
22  * The UI allows stepping through this entry's markers grouped by the key.
23  * </p>
24  * <p>
25  * This interface is not intended to be implemented by clients.
26  * </p>
27  * @deprecated Part of the old ('classic') search result view. Since 3.0 clients can create their own search result view pages (see {@link ISearchResultPage}), leaving it up to the search
28  * how to model search results. {@link org.eclipse.search.ui.text.AbstractTextSearchResult} and {@link org.eclipse.search.ui.text.Match} can be used to port old searches to the new API design.
29  */

30 public interface ISearchResultViewEntry {
31
32     /**
33      * Returns the key by which this entry's markers
34      * are logically grouped. A line in a text could be such a key.
35      * Clients supply this key as a parameter to <code>ISearchResultView.addMatch</code>.
36      *
37      * @return the common resource of this entry's markers
38      * @see ISearchResultView#addMatch
39      */

40     public Object JavaDoc getGroupByKey();
41
42     /**
43      * Returns the resource to which this entry's markers are attached.
44      * This is a convenience method for <code>getSelectedMarker().getResource()</code>.
45      *
46      * @return the common resource of this entry's markers
47      */

48     public IResource getResource();
49
50     /**
51      * Returns the number of markers grouped by this entry.
52      *
53      * @return the number of markers
54      */

55     public int getMatchCount();
56
57     /**
58      * Returns the selected marker of this entry, or the first one
59      * if no marker is selected.
60      * A search results view entry can group markers
61      * which the UI allows the user to step through them while
62      * this entry remains selected.
63      *
64      * @return the selected marker inside this entry, or
65      * <code>null</code> if the entry has no markers
66      */

67     public IMarker getSelectedMarker();
68 }
69
Popular Tags