use of eu.esdihumboldt.hale.ui.service.instance.validation.InstanceValidationService in project hale by halestudio.
the class ToggleInstanceValidationHandler method updateElement.
@Override
public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) {
InstanceValidationService ivs = PlatformUI.getWorkbench().getService(InstanceValidationService.class);
element.setChecked(ivs.isValidationEnabled());
}
use of eu.esdihumboldt.hale.ui.service.instance.validation.InstanceValidationService in project hale by halestudio.
the class ToggleInstanceValidationState method dispose.
@Override
public void dispose() {
InstanceValidationService ivs = PlatformUI.getWorkbench().getService(InstanceValidationService.class);
ivs.removeListener(listener);
super.dispose();
}
use of eu.esdihumboldt.hale.ui.service.instance.validation.InstanceValidationService 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
}
});
}
use of eu.esdihumboldt.hale.ui.service.instance.validation.InstanceValidationService in project hale by halestudio.
the class ToggleInstanceValidationHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
InstanceValidationService ivs = PlatformUI.getWorkbench().getService(InstanceValidationService.class);
ivs.setValidationEnabled(!ivs.isValidationEnabled());
return null;
}
Aggregations