use of org.csstudio.swt.widgets.util.IJobErrorHandler in project yamcs-studio by yamcs.
the class SVGSymbolImage method asyncLoadImage.
@Override
public void asyncLoadImage() {
if (imagePath == null)
return;
loadingImage = true;
loadImage(new IJobErrorHandler() {
private int maxAttempts = 5;
@Override
public void handleError(Exception exception) {
if (maxAttempts-- > 0) {
try {
Thread.sleep(100);
loadImage(this);
return;
} catch (InterruptedException e) {
}
}
loadingImage = false;
// fireSymbolImageLoaded();
Activator.getLogger().log(Level.WARNING, "ERROR in loading SVG image " + imagePath, exception);
}
});
}
Aggregations