1 11 package org.eclipse.jdt.ui.actions; 12 13 import org.eclipse.ui.IWorkbenchSite; 14 import org.eclipse.ui.PlatformUI; 15 16 import org.eclipse.jdt.core.IField; 17 import org.eclipse.jdt.core.ILocalVariable; 18 import org.eclipse.jdt.core.search.IJavaSearchConstants; 19 20 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 21 import org.eclipse.jdt.internal.ui.JavaPluginImages; 22 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; 23 import org.eclipse.jdt.internal.ui.search.SearchMessages; 24 25 35 public class FindReadReferencesInHierarchyAction extends FindReferencesInHierarchyAction { 36 37 44 public FindReadReferencesInHierarchyAction(IWorkbenchSite site) { 45 super(site); 46 } 47 48 52 public FindReadReferencesInHierarchyAction(JavaEditor editor) { 53 super(editor); 54 } 55 56 Class [] getValidTypes() { 57 return new Class [] { IField.class, ILocalVariable.class }; 58 } 59 60 void init() { 61 setText(SearchMessages.Search_FindReadReferencesInHierarchyAction_label); 62 setToolTipText(SearchMessages.Search_FindReadReferencesInHierarchyAction_tooltip); 63 setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF); 64 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_READ_REFERENCES_IN_HIERARCHY_ACTION); 65 } 66 67 int getLimitTo() { 68 return IJavaSearchConstants.READ_ACCESSES; 69 } 70 71 String getOperationUnavailableMessage() { 72 return SearchMessages.JavaElementAction_operationUnavailable_field; 73 } 74 } 75 76 | Popular Tags |