Bug 218467 [Undo] Tighten up IUndoableOperation spec and AbstractOperation to discourage/prevent null labels
GMF creates CompositeCommands with null labels. These NPE when shortenText(getOperation().getLabel()) is invoked from update.
bundles/org.eclipse.core.commands/src/org/eclipse/core/commands/operations/AbstractOperation.java
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
/**
 * <p>
 * Abstract implementation for an undoable operation. At a minimum, subclasses
 * should implement behavior for
 * {@link IUndoableOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)},
 * {@link IUndoableOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)},
 * and
 * {@link IUndoableOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
 * </p>
 * 
 * @see org.eclipse.core.commands.operations.IUndoableOperation
 * 
 * @since 3.1
 */
public abstract class AbstractOperation implements IUndoableOperation {
	List contexts = new ArrayList();
	private String label = ""; 
	/**
	 * Construct an operation that has the specified label.
	 * 
	 * @param label
	 *            the label to be used for the operation.
	 */
	public AbstractOperation(String label) {
		this.label = label;
	}