} catch (GitAPIException e) {
Activator.logError(e.getMessage(), e);
return null;
}
final CherryPickOperation op = new CherryPickOperation(repo, commits);
Job job = new Job(MessageFormat.format(
UIText.CherryPickHandler_JobName,
Integer.valueOf(commits.size()))) {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
op.execute(monitor);
RebaseResult result = op.getResult();
if (result.getStatus() != RebaseResult.Status.OK) {
RebaseResultDialog.show(result, repo);
}
} catch (CoreException e) {
Activator.logError(
UIText.CherryPickOperation_InternalError, e);
}
return Status.OK_STATUS;
}
@Override
public boolean belongsTo(Object family) {
if (JobFamilies.CHERRY_PICK.equals(family))
return true;
return super.belongsTo(family);
}
};
job.setUser(true);
job.setRule(op.getSchedulingRule());
job.schedule();
return null;
}