KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > callhierarchy > SearchScopeWorkspaceAction


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  * Jesper Kamstrup Linnet (eclipse@kamstrup-linnet.dk) - initial API and implementation
10  * (report 36180: Callers/Callees view)
11  * Michael Fraenkel (fraenkel@us.ibm.com) - patch
12  * (report 60714: Call Hierarchy: display search scope in view title)
13  *******************************************************************************/

14 package org.eclipse.jdt.internal.ui.callhierarchy;
15
16 import org.eclipse.ui.PlatformUI;
17
18 import org.eclipse.jdt.core.search.IJavaSearchScope;
19 import org.eclipse.jdt.core.search.SearchEngine;
20
21 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
22 import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
23
24
25 class SearchScopeWorkspaceAction extends SearchScopeAction {
26     public SearchScopeWorkspaceAction(SearchScopeActionGroup group) {
27         super(group, CallHierarchyMessages.SearchScopeActionGroup_workspace_text);
28         setToolTipText(CallHierarchyMessages.SearchScopeActionGroup_workspace_tooltip);
29         PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_SEARCH_SCOPE_ACTION);
30     }
31     
32     public IJavaSearchScope getSearchScope() {
33         return SearchEngine.createWorkspaceScope();
34     }
35     
36     /* (non-Javadoc)
37      * @see org.eclipse.jdt.internal.ui.callhierarchy.SearchScopeActionGroup.SearchScopeAction#getSearchScopeType()
38      */

39     public int getSearchScopeType() {
40         return SearchScopeActionGroup.SEARCH_SCOPE_TYPE_WORKSPACE;
41     }
42
43     /* (non-Javadoc)
44      * @see org.eclipse.jdt.internal.ui.callhierarchy.SearchScopeAction#getFullDescription()
45      */

46     public String JavaDoc getFullDescription() {
47         JavaSearchScopeFactory factory= JavaSearchScopeFactory.getInstance();
48         return factory.getWorkspaceScopeDescription(true);
49     }
50 }
51
Popular Tags