1 11 package org.eclipse.jdt.ui.actions; 12 13 import org.eclipse.ui.IWorkbenchSite; 14 import org.eclipse.ui.IWorkingSet; 15 import org.eclipse.ui.PlatformUI; 16 17 import org.eclipse.jdt.core.IField; 18 import org.eclipse.jdt.core.ILocalVariable; 19 import org.eclipse.jdt.core.search.IJavaSearchConstants; 20 21 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 22 import org.eclipse.jdt.internal.ui.JavaPluginImages; 23 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; 24 import org.eclipse.jdt.internal.ui.search.SearchMessages; 25 26 36 public class FindReadReferencesInWorkingSetAction extends FindReferencesInWorkingSetAction { 37 38 46 public FindReadReferencesInWorkingSetAction(IWorkbenchSite site) { 47 super(site); 48 } 49 50 58 public FindReadReferencesInWorkingSetAction(IWorkbenchSite site, IWorkingSet[] workingSets) { 59 super(site, workingSets); 60 } 61 62 66 public FindReadReferencesInWorkingSetAction(JavaEditor editor) { 67 super(editor); 68 } 69 70 75 public FindReadReferencesInWorkingSetAction(JavaEditor editor, IWorkingSet[] workingSets) { 76 super(editor, workingSets); 77 } 78 79 Class [] getValidTypes() { 80 return new Class [] { IField.class, ILocalVariable.class }; 81 } 82 83 void init() { 84 setText(SearchMessages.Search_FindReadReferencesInWorkingSetAction_label); 85 setToolTipText(SearchMessages.Search_FindReadReferencesInWorkingSetAction_tooltip); 86 setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF); 87 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_READ_REFERENCES_IN_WORKING_SET_ACTION); 88 } 89 90 int getLimitTo() { 91 return IJavaSearchConstants.READ_ACCESSES; 92 } 93 94 String getOperationUnavailableMessage() { 95 return SearchMessages.JavaElementAction_operationUnavailable_field; 96 } 97 } 98 | Popular Tags |