upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / internal / ui / search / actions / FindDeclarationsAction.java
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
7  *
8  * Contributors:
9  *     IBM Corp. - Rational Software - initial implementation
10  *******************************************************************************/
11
12 package org.eclipse.cdt.internal.ui.search.actions;
13
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;
19
20
21 public class FindDeclarationsAction extends FindAction {
22         
23         public FindDeclarationsAction(CEditor editor, String label, String tooltip){
24                 super(editor);
25                 setText(label); 
26                 setToolTipText(tooltip); 
27         }
28         
29         public FindDeclarationsAction(CEditor editor){
30                 this(editor,
31                         CSearchMessages.CSearch_FindDeclarationAction_label, 
32                         CSearchMessages.CSearch_FindDeclarationAction_tooltip); 
33         }
34         
35         public FindDeclarationsAction(IWorkbenchSite site){
36                 this(site,
37                         CSearchMessages.CSearch_FindDeclarationAction_label, 
38                         CSearchMessages.CSearch_FindDeclarationAction_tooltip); 
39         }
40
41         public FindDeclarationsAction(IWorkbenchSite site, String label, String tooltip) {
42                 super(site);
43                 setText(label);
44                 setToolTipText(tooltip);
45         }
46
47         @Override
48         protected ICElement[] getScope() {
49                 return null;
50         }
51         
52         @Override
53         protected String getScopeDescription() {
54                 return CSearchMessages.WorkspaceScope; 
55         }
56         
57         @Override
58         protected int getLimitTo() {
59                 return PDOMSearchQuery.FIND_DECLARATIONS_DEFINITIONS;
60         }
61 }