final String ctFile = getCtPath();
final String ctUrl = getCtEndpoint();
PopulatorJob populator = new PopulatorJob(ctFile, ctUrl,getUseRemoteCtSimulator());
final UIJob changeButton = new UIJob("Enable populate button")
{
@Override
public IStatus runInUIThread(IProgressMonitor monitor)
{
populateButton.setEnabled(true);
return new Status(IStatus.OK, DestecsDebugPlugin.PLUGIN_ID, "Enabled populate button");
}
};
populator.addJobChangeListener(new JobChangeAdapter()
{
public void done(IJobChangeEvent event)
{
changeButton.schedule();
}
});
populator.schedule();