1 11 package org.eclipse.help.internal.search.federated; 12 13 import org.eclipse.core.runtime.*; 14 import org.eclipse.core.runtime.jobs.Job; 15 16 19 public class FederatedSearchJob extends Job { 20 public static final String FAMILY = "org.eclipse.help.base.searchEngine"; private String expression; 22 private FederatedSearchEntry entry; 23 24 27 public FederatedSearchJob(String expression, FederatedSearchEntry entry) { 28 super(entry.getEngineName()); 29 this.expression = expression; 30 this.entry = entry; 31 } 32 33 36 protected IStatus run(IProgressMonitor monitor) { 37 try { 38 entry.getEngine().run(expression, entry.getScope(), entry.getResultCollector(), monitor); 39 return Status.OK_STATUS; 40 } 41 catch (CoreException e) { 42 return e.getStatus(); 43 } 44 } 45 public boolean belongsTo(Object family) { 46 return family.equals(FAMILY); 47 } 48 } 49 | Popular Tags |