1 14 package org.eclipse.jdt.internal.ui.callhierarchy; 15 16 import org.eclipse.ui.IWorkingSet; 17 import org.eclipse.ui.PlatformUI; 18 19 import org.eclipse.jdt.core.search.IJavaSearchScope; 20 21 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 22 import org.eclipse.jdt.internal.ui.search.JavaSearchScopeFactory; 23 24 25 class SearchScopeWorkingSetAction extends SearchScopeAction { 26 private IWorkingSet[] fWorkingSets; 27 28 public SearchScopeWorkingSetAction(SearchScopeActionGroup group, IWorkingSet[] workingSets, String name) { 29 super(group, name); 30 setToolTipText(CallHierarchyMessages.SearchScopeActionGroup_workingset_tooltip); 31 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_SEARCH_SCOPE_ACTION); 32 33 this.fWorkingSets = workingSets; 34 } 35 36 public IJavaSearchScope getSearchScope() { 37 return JavaSearchScopeFactory.getInstance().createJavaSearchScope(fWorkingSets, true); 38 } 39 40 43 public IWorkingSet[] getWorkingSets() { 44 return fWorkingSets; 45 } 46 47 50 public int getSearchScopeType() { 51 return SearchScopeActionGroup.SEARCH_SCOPE_TYPE_WORKING_SET; 52 } 53 54 57 public String getFullDescription() { 58 return JavaSearchScopeFactory.getInstance().getWorkingSetScopeDescription(fWorkingSets, true); 59 } 60 } 61 | Popular Tags |