blob: de7edc4c9df900c82edd87af3a2d831013655526 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007, 2010 BMW Car IT, Technische Universitaet Muenchen, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* BMW Car IT - Initial API and implementation
* Technische Universitaet Muenchen - Major refactoring and extension
*******************************************************************************/
package org.eclipse.emf.edapt.history.presentation.action;
import java.util.List;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.edapt.spi.history.CompositeChange;
import org.eclipse.emf.edapt.spi.history.PrimitiveChange;
import org.eclipse.emf.edapt.spi.history.Release;
import org.eclipse.emf.edit.domain.EditingDomain;
/**
* Action to combine a number of changes into a {@link CompositeChange}
*
* @author herrmama
* @author $Author$
* @version $Rev$
* @levd.rating RED Rev:
*/
public class CombineChangesHandler extends
SubsequentChangesHandler<PrimitiveChange> {
/** {@inheritDoc} */
@Override
protected Object execute(Release release, List<PrimitiveChange> changes,
EditingDomain domain, ExecutionEvent event) {
final Command command = new CombineChangesCommand(release, changes);
domain.getCommandStack().execute(command);
return null;
}
}