use of de.janrufmonitor.service.fritzbox.SynchronizerService in project janrufmonitor by tbrandt77.
the class Refresh method run.
public void run() {
ProgressMonitorDialog pmd = new ProgressMonitorDialog(DisplayManager.getDefaultDisplay().getActiveShell());
try {
IRunnableWithProgress r = new IRunnableWithProgress() {
public void run(IProgressMonitor progressMonitor) {
IService srv = getRuntime().getServiceFactory().getService(SynchronizerService.ID);
if (srv != null && srv instanceof SynchronizerService && srv.isEnabled()) {
((SynchronizerService) srv).synchronize(progressMonitor);
}
}
};
pmd.setBlockOnOpen(false);
pmd.run(true, false, r);
// ModalContext.run(r, true, pmd.getProgressMonitor(), DisplayManager.getDefaultDisplay());
} catch (InterruptedException e) {
m_logger.log(Level.SEVERE, e.getMessage(), e);
} catch (InvocationTargetException e) {
m_logger.log(Level.SEVERE, e.getMessage(), e);
}
m_app.updateViews(true);
return;
}
Aggregations