Bug 134879 [DataBinding] Provide toString implementations for implementations of IDiff
It can be beneficial for a developer when attempting to debug or learn Data Binding to see what the diffs are that are being sent back and forth through the pipeline. I'm attaching implementations of toString() for: * ValueDiff * SetDiff * ListDiff * ListDiffEntry I didn't create an implementation for MappingDiff because I'm not positive of its usage and what would be an appropriate toString implementation. When I figure that out I'll attach it as well. I'm also attaching a TestCase that asserts that NPEs aren't thrown when any of the properties of these classes are null.
bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/observable/set/SetDiff.java
/*******************************************************************************
 * Copyright (c) 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 ******************************************************************************/
package org.eclipse.jface.internal.databinding.provisional.observable.set;
import java.util.Set;
import org.eclipse.jface.internal.databinding.provisional.observable.IDiff;
/**
 * @since 1.0
 *
 */
public abstract class SetDiff implements IDiff {
	
	/**
	 * @return the set of added elements
	 */
	public abstract Set getAdditions();
	
	/**
	 * @return the set of removed elements
	 */
	public abstract Set getRemovals();
}