blob: 74e7d15157e472e6df98146c8e1311fbc09df284 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2005, 2012 IBM Corporation 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.bpel.ui.editparts.policies;
import org.eclipse.bpel.ui.commands.DeleteChildCommand;
import org.eclipse.bpel.ui.commands.OrphanChildCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
/**
* @author Original Contribution, IBM
* @author Michal Chmielewski (michal.chmielewski@oracle.com)
* @date Aug 21, 2007
*
*/
public class BPELComponentEditPolicy extends ComponentEditPolicy {
@Override
protected Command createDeleteCommand(GroupRequest request) {
return new DeleteChildCommand((EObject)getHost().getModel());
}
@Override
protected Command getOrphanCommand() {
return new OrphanChildCommand((EObject) getHost().getModel());
}
}