use of eu.esdihumboldt.hale.ui.service.instance.validation.InstanceValidationListener in project hale by halestudio.
the class InstanceValidationStatusAction method createListeners.
/**
* Registers needed listeners.
*/
private void createListeners() {
InstanceService is = PlatformUI.getWorkbench().getService(InstanceService.class);
is.addListener(new InstanceServiceAdapter() {
@Override
public void datasetAboutToChange(DataSet type) {
report = null;
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
updateStatus();
}
});
}
});
final InstanceValidationService ivs = PlatformUI.getWorkbench().getService(InstanceValidationService.class);
ivs.addListener(new InstanceValidationListener() {
@Override
public void instancesValidated(InstanceValidationReport report) {
InstanceValidationStatusAction.this.report = report;
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
updateStatus();
}
});
}
@Override
public void validationEnabledChange() {
// don't care
}
});
}
Aggregations