/*
 * Created on 9-Oct-2005
 */
package fmp.provider.command;

import java.util.Collection;
import java.util.Iterator;

import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.edit.domain.EditingDomain;

import fmp.Node;
import fmp.system.ModelManipulation;

/**
 * @author Michal
 * Note the constructor is not really removing anything. ModelManipulation.INSTANCE.remove is just appending
 * remove commands to this compound command.
 */
public class RemoveWithPropertiesCommand extends CompoundCommand {
	public RemoveWithPropertiesCommand(EditingDomain domain, Collection selection) {
		Node node = null;
		for (Iterator i = selection.iterator(); i.hasNext(); ) {
			node = (Node) i.next();
			ModelManipulation.INSTANCE.remove(node, domain, this, true);
		}
	}
}
