1 11 package org.eclipse.search2.internal.ui; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.resource.ImageDescriptor; 15 16 import org.eclipse.search.ui.ISearchResult; 17 18 19 class ShowSearchAction extends Action { 20 private ISearchResult fSearch; 21 private SearchView fView; 22 23 26 public ShowSearchAction(SearchView view, ISearchResult search, String text, ImageDescriptor image, String tooltip) { 27 fSearch= search; 28 fView= view; 29 if (text.indexOf('@') >= 0) 31 text+= '@'; 32 setText(text); 33 setImageDescriptor(image); 34 setToolTipText(tooltip); 35 } 36 37 public void run() { 38 fView.showSearchResult(fSearch); 39 } 40 } 41 | Popular Tags |