IJobManager jobMan = Platform.getJobManager();
Job[] jobs = jobMan.find(PerlBuilderJob.JOB_FAMILY);
if (jobs.length == 0) return; // no previous build found
jobMan.cancel(PerlBuilderJob.JOB_FAMILY);
try { jobMan.join(PerlBuilderJob.JOB_FAMILY, null); }
catch (InterruptedException e)
{
// nobody should interrupt our thread in this state;
// if they do anyway, we treat is as a build cancellation