1 /*******************************************************************************
2 * Copyright (c) 2000, 2011 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 * 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;
16 import org.eclipse.ui.PlatformUI;
18 import org.eclipse.jdt.core.search.IJavaSearchScope;
20 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
21 import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory;
24 class SearchScopeWorkspaceAction extends SearchScopeAction {
25 private JavaSearchScopeFactory fFactory= JavaSearchScopeFactory.getInstance();
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);
33 * @see org.eclipse.jdt.internal.ui.callhierarchy.SearchScopeAction#getSearchScope(int)
36 public IJavaSearchScope getSearchScope(int includeMask) {
37 return fFactory.createWorkspaceScope(includeMask);
41 * @see org.eclipse.jdt.internal.ui.callhierarchy.SearchScopeActionGroup.SearchScopeAction#getSearchScopeType()
44 public int getSearchScopeType() {
45 return SearchScopeActionGroup.SEARCH_SCOPE_TYPE_WORKSPACE;
49 * @see org.eclipse.jdt.internal.ui.callhierarchy.SearchScopeAction#getFullDescription()
52 public String getFullDescription(int includeMask) {
53 return fFactory.getWorkspaceScopeDescription(includeMask);