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.JavaPluginImages; 21 import org.eclipse.jdt.internal.ui.search.SearchMessages; 22 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 23 import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor; 24 25 35 public class FindWriteReferencesAction extends FindReferencesAction { 36 37 44 public FindWriteReferencesAction(IWorkbenchSite site) { 45 super(site); 46 } 47 48 52 public FindWriteReferencesAction(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_FindWriteReferencesAction_label); 62 setToolTipText(SearchMessages.Search_FindWriteReferencesAction_tooltip); 63 setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF); 64 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_WRITE_REFERENCES_IN_WORKSPACE_ACTION); 65 } 66 67 int getLimitTo() { 68 return IJavaSearchConstants.WRITE_ACCESSES; 69 } 70 71 String getOperationUnavailableMessage() { 72 return SearchMessages.JavaElementAction_operationUnavailable_field; 73 } 74 } 75 | Popular Tags |