KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > ui > text > MatchFilter


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.text;
12
13 /**
14  * A match filter is used to evaluate the filter state of a match ({@link Match#isFiltered()}. Filters are
15  * managed by the ({@link AbstractTextSearchResult}.
16  *
17  * @since 3.3
18  */

19 public abstract class MatchFilter {
20     
21     /**
22      * Returns whether the given match is filtered by this filter.
23      *
24      * @param match the match to look at
25      * @return returns <code>true</code> if the given match should be filtered or <code>false</code> if not.
26      */

27     public abstract boolean filters(Match match);
28     
29     /**
30      * Returns the name of the filter as shown in the match filter selection dialog.
31      *
32      * @return the name of the filter as shown in the match filter selection dialog.
33      */

34     public abstract String JavaDoc getName();
35     
36     /**
37      * Returns the description of the filter as shown in the match filter selection dialog.
38      *
39      * @return the description of the filter as shown in the match filter selection dialog.
40      */

41     public abstract String JavaDoc getDescription();
42     
43     /**
44      * Returns the label of the filter as shown by the filter action.
45      *
46      * @return the label of the filter as shown by the filter action.
47      */

48     public abstract String JavaDoc getActionLabel();
49
50     /**
51      * Returns an ID of this filter.
52      *
53      * @return the id of the filter to be used when persisting this filter.
54      */

55     public abstract String JavaDoc getID();
56     
57 }
58
Popular Tags