/*****************************************************************************
* Copyright (c) 2011 CEA LIST.
*
*
* 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:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
package org.eclipse.papyrus.views.modelexplorer.handler;
import java.util.List;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.command.CopyToClipboardCommand;
/**
* Handler for the Copy Action
*
*
*
*/
public class CopyHandler extends AbstractCommandHandler {
/**
*
* @see org.eclipse.papyrus.views.modelexplorer.handler.AbstractCommandHandler#getCommand()
*
* @return
*/
@Override
protected Command getCommand() {
List<EObject> selection = getSelectedElements();
return CopyToClipboardCommand.create(getEditingDomain(), selection);
}
}