use of org.eclipse.core.databinding.observable.StaleEvent in project jbosstools-openshift by jbosstools.
the class FormPresenterSupport method init.
/**
* @noreference This method is not intended to be referenced by clients.
*/
protected void init() {
ObservableTracker.setIgnore(true);
try {
aggregateStatusProvider = new MaxSeverityValidationStatusProvider(dbc);
} finally {
ObservableTracker.setIgnore(false);
}
aggregateStatusProvider.addValueChangeListener(new IValueChangeListener() {
@Override
public void handleValueChange(ValueChangeEvent event) {
statusProviderChanged();
}
});
formPresenter.getControl().addListener(SWT.Dispose, new Listener() {
@Override
public void handleEvent(Event event) {
dispose();
}
});
aggregateStatusProvider.addStaleListener(new IStaleListener() {
@Override
public void handleStale(StaleEvent staleEvent) {
currentStatusStale = true;
handleStatusChanged();
}
});
statusProviderChanged();
dbc.getValidationStatusProviders().addListChangeListener(validationStatusProvidersListener);
for (Iterator it = dbc.getValidationStatusProviders().iterator(); it.hasNext(); ) {
ValidationStatusProvider validationStatusProvider = (ValidationStatusProvider) it.next();
IObservableList targets = validationStatusProvider.getTargets();
targets.addListChangeListener(validationStatusProviderTargetsListener);
for (Iterator iter = targets.iterator(); iter.hasNext(); ) {
((IObservable) iter.next()).addChangeListener(uiChangeListener);
}
}
}
Aggregations