1 /*******************************************************************************
2 * Copyright (c) 2004, 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 Corp. - Rational Software - initial implementation
10 *******************************************************************************/
12 package org.eclipse.cdt.internal.ui.search.actions;
14 import org.eclipse.cdt.core.model.ICElement;
15 import org.eclipse.cdt.internal.ui.editor.CEditor;
16 import org.eclipse.cdt.internal.ui.search.CSearchMessages;
17 import org.eclipse.cdt.internal.ui.search.PDOMSearchQuery;
18 import org.eclipse.ui.IWorkbenchSite;
21 public class FindDeclarationsAction extends FindAction {
23 public FindDeclarationsAction(CEditor editor, String label, String tooltip){
26 setToolTipText(tooltip);
29 public FindDeclarationsAction(CEditor editor){
31 CSearchMessages.CSearch_FindDeclarationAction_label,
32 CSearchMessages.CSearch_FindDeclarationAction_tooltip);
35 public FindDeclarationsAction(IWorkbenchSite site){
37 CSearchMessages.CSearch_FindDeclarationAction_label,
38 CSearchMessages.CSearch_FindDeclarationAction_tooltip);
41 public FindDeclarationsAction(IWorkbenchSite site, String label, String tooltip) {
44 setToolTipText(tooltip);
48 protected ICElement[] getScope() {
53 protected String getScopeDescription() {
54 return CSearchMessages.WorkspaceScope;
58 protected int getLimitTo() {
59 return PDOMSearchQuery.FIND_DECLARATIONS_DEFINITIONS;