IStructuredSelection sel = (IStructuredSelection) viewer.getSelection();
final Job j = (Job) sel.getFirstElement();
org.eclipse.core.runtime.jobs.Job sj = new org.eclipse.core.runtime.jobs.Job("Scheduling Hudson build") {
protected IStatus run(IProgressMonitor monitor) {
final HudsonClient hudsonClient = new HudsonClient();
try {
hudsonClient.scheduleJob(j.getName());
} catch (IOException e1) {
return new Status(Status.ERROR, Activator.PLUGIN_ID, 0, "Unable to schedule job", e1);
} catch (ParametersRequiredException e) {
Display.getDefault().syncExec(new Runnable() {
public void run() {