1 11 package org.eclipse.pde.internal.ui.editor.plugin; 12 13 import org.eclipse.core.runtime.IProgressMonitor; 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.core.runtime.OperationCanceledException; 16 import org.eclipse.core.runtime.Status; 17 import org.eclipse.pde.internal.core.text.bundle.PackageObject; 18 import org.eclipse.pde.internal.ui.IPDEUIConstants; 19 import org.eclipse.pde.internal.ui.search.SearchResult; 20 import org.eclipse.search.ui.ISearchQuery; 21 import org.eclipse.search.ui.ISearchResult; 22 23 public class BlankQuery implements ISearchQuery { 24 25 private PackageObject fObject; 26 27 BlankQuery(PackageObject object) { 28 fObject = object; 29 } 30 31 public IStatus run(IProgressMonitor monitor) 32 throws OperationCanceledException { 33 monitor.done(); 34 return new Status(IStatus.OK, IPDEUIConstants.PLUGIN_ID, IStatus.OK, "", null); } 36 37 public String getLabel() { 38 return '\'' + fObject.getName() + '\''; 39 } 40 41 public boolean canRerun() { 42 return true; 43 } 44 45 public boolean canRunInBackground() { 46 return true; 47 } 48 49 public ISearchResult getSearchResult() { 50 return new SearchResult(this); 51 } 52 53 } 54 | Popular Tags |