I have the following behaviour, which in my opinion is a bug of the designer. I have two SWT-Text-fields, add a SWT-databinding for both fields. Ok, works, but when I remove one Text-field (delete) in the designer, the databinding is not removed in the code:
- Code: Select all
protected DataBindingContext initDataBindings() {
IObservableValue projectPlanDescriptionObserveValue = BeansObservables.observeValue(projectPlan, "description");
IObservableValue projectPlanNameObserveValue = BeansObservables.observeValue(projectPlan, "name");
IObservableValue txtPrjPlanDescriptionTextObserveWidget = SWTObservables.observeText(txtPrjPlanDescription, SWT.Modify);
//
//
DataBindingContext bindingContext = new DataBindingContext();
//
bindingContext.bindValue(txtProjNameTextObserveWidget, projectPlanNameObserveValue, null, null);
bindingContext.bindValue(txtPrjPlanDescriptionTextObserveWidget, projectPlanDescriptionObserveValue, null, null);
//
return bindingContext;
}
The txtProjName does not exist anymore, but the databinding for it still exists.