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 25 import org.eclipse.jdt.internal.ui.search.SearchMessages; 26 27 37 public class FindWriteReferencesInWorkingSetAction extends FindReferencesInWorkingSetAction { 38 39 47 public FindWriteReferencesInWorkingSetAction(IWorkbenchSite site) { 48 super(site); 49 } 50 51 59 public FindWriteReferencesInWorkingSetAction(IWorkbenchSite site, IWorkingSet[] workingSets) { 60 super(site, workingSets); 61 } 62 63 67 public FindWriteReferencesInWorkingSetAction(JavaEditor editor) { 68 super(editor); 69 } 70 71 76 public FindWriteReferencesInWorkingSetAction(JavaEditor editor, IWorkingSet[] workingSets) { 77 super(editor, workingSets); 78 } 79 80 Class [] getValidTypes() { 81 return new Class [] { IField.class, ILocalVariable.class }; 82 } 83 84 void init() { 85 setText(SearchMessages.Search_FindWriteReferencesInWorkingSetAction_label); 86 setToolTipText(SearchMessages.Search_FindWriteReferencesInWorkingSetAction_tooltip); 87 setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF); 88 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_WRITE_REFERENCES_IN_WORKING_SET_ACTION); 89 } 90 91 int getLimitTo() { 92 return IJavaSearchConstants.WRITE_ACCESSES; 93 } 94 95 String getOperationUnavailableMessage() { 96 return SearchMessages.JavaElementAction_operationUnavailable_field; 97 } 98 } 99 100 | Popular Tags |