]> git.uio.no Git - ifi-stolz-refaktor.git/blame - case-study/jdt-before/ui/org/eclipse/jdt/ui/search/QuerySpecification.java
Case Study: adding data and statistics
[ifi-stolz-refaktor.git] / case-study / jdt-before / ui / org / eclipse / jdt / ui / search / QuerySpecification.java
CommitLineData
1b2798f6
EK
1/*******************************************************************************
2 * Copyright (c) 2000, 2008 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 *******************************************************************************/
11package org.eclipse.jdt.ui.search;
12
13import org.eclipse.jdt.core.search.IJavaSearchScope;
14
15/**
16 * <p>
17 * Describes a Java search query. A query is described by giving a scope, a
18 * scope description, what kind of match to search for (reference, declarations,
19 * etc) and either a Java element or a string and what kind of element to search
20 * for (type, field, etc). What exactly it means to, for example, to search for
21 * "references to type foo" is up to query participants. For example, a
22 * participant might consider the "class" attribute of an extension in a
23 * plugin.xml file to be a reference to the class mentioned in the attribute.
24 * </p>
25 *
26 * <p>
27 * This class is not intended to be instantiated or subclassed by clients.
28 * </p>
29 *
30 * @since 3.0
31 *
32 * @noextend This class is not intended to be subclassed by clients.
33 */
34public abstract class QuerySpecification {
35 private IJavaSearchScope fScope;
36 private int fLimitTo;
37 private String fScopeDescription;
38
39 QuerySpecification(int limitTo, IJavaSearchScope scope, String scopeDescription) {
40 fScope= scope;
41 fLimitTo= limitTo;
42 fScopeDescription= scopeDescription;
43 }
44
45 /**
46 * Returns the search scope to be used in the query.
47 * @return The search scope.
48 */
49 public IJavaSearchScope getScope() {
50 return fScope;
51 }
52
53 /**
54 * Returns a human readable description of the search scope.
55 * @return A description of the search scope.
56 * @see QuerySpecification#getScope()
57 */
58 public String getScopeDescription() {
59 return fScopeDescription;
60 }
61
62 /**
63 * Returns what kind of occurrences the query should look for.
64 * @return Whether to search for reference, declaration, etc.
65 * @see org.eclipse.jdt.core.search.IJavaSearchConstants
66 */
67 public int getLimitTo() {
68 return fLimitTo;
69 }
70
71}