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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.ui.search;
13 import org.eclipse.jdt.core.IJavaElement;
14 import org.eclipse.jdt.core.search.IJavaSearchScope;
18 * Describes a search query by giving the {@link IJavaElement} to search
22 * This class is not intended to be instantiated or subclassed by clients.
25 * @see org.eclipse.jdt.ui.search.QuerySpecification
29 * @noinstantiate This class is not intended to be instantiated by clients.
30 * @noextend This class is not intended to be subclassed by clients.
32 public class ElementQuerySpecification extends QuerySpecification {
33 private IJavaElement fElement;
37 * @param javaElement The java element the query should search for.
38 * @param limitTo The kind of occurrence the query should search for.
39 * @param scope The scope to search in.
40 * @param scopeDescription A human readable description of the search scope.
42 public ElementQuerySpecification(IJavaElement javaElement, int limitTo, IJavaSearchScope scope, String scopeDescription) {
43 super(limitTo, scope, scopeDescription);
44 fElement= javaElement;
48 * Returns the element to search for.
49 * @return The element to search for.
51 public IJavaElement getElement() {