Bug 118516 [DataBinding] Asserts should provide meaningful messages
Currently we use JDK Assert in various places in the code. However, if an assert fails, there often is no indication of why it failed or what the assert failure means without looking at the code indicated by the stack trace. It would be nicer if we would log exceptions or throw RuntimeExceptions with useful error messages instead.
bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java
import org.eclipse.core.databinding.observable.map.IObservableMap;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.internal.databinding.ValidationStatusMap;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
/**
 * A DataBindingContext is the point of contact for the creation and management of
 * {@link Binding bindings}.
 * <p>
 * A DataBindingContext provides the following abilities:
 * <ul>
 * <li>Ability to create bindings between
 * {@link IObservableValue observable values}.</li>
 * <li>Ability to create bindings between
 * {@link IObservableList observable lists}.</li>
 * <li>Access to the bindings created by the instance.</li>
 * <li>Access to the validation status of its bindings.</li>
 * </ul>
 * </p>
 * <p>
 * Multiple contexts can be used at any point in time. One strategy for the
 * management of contexts is the aggregation of validation statuses. For example
 * an <code>IWizardPage</code> could use a single context and the statuses
 * could be aggregated to set the page status and fulfillment. Each page in the
 * <code>IWizard</code> would have its own context instance.
 * </p>
 * 
 * @since 1.0
 */
public class DataBindingContext {