I upgraded to WindowsBuilderPro 7.1 and the code (shown below) is now throwing an error:
org.eclipse.core.runtime.AssertionFailedException: assertion failed: Getter called on disposed observable org.eclipse.core.internal.databinding.beans.BeanObservableMapDecorator@2635ee49
This error is thrown if I call
m_bindingContext.dispose();
and re-bind immediately after with
m_bindingContext = this.initDataBindings();
I'm thinking of removing all databinding code and recreating it. Appreciate any alternatives to this approach or a link that will explain the differences in databinding between the current and older versions.
Thanks in advance...
Octavio
- Code: Select all
protected DataBindingContext initDataBindings() {
//
ObservableSetContentProvider customerListViewerContentProviderSet = new ObservableSetContentProvider();
listViewer.setContentProvider(customerListViewerContentProviderSet);
//
IObservableMap[] customerListViewerLabelProviderMaps = BeansObservables.observeMaps(customerListViewerContentProviderSet.getKnownElements(), Customer.class, new String[]{"officialName"});
listViewer.setLabelProvider(new ObservableMapLabelProvider(customerListViewerLabelProviderMaps));
//
WritableSet customerSetWritableSet = new WritableSet(customerSet, Customer.class);
listViewer.setInput(customerSetWritableSet);
//
DataBindingContext bindingContext = new DataBindingContext();
//
//
return bindingContext;
}