blob: ba8d7b0befef4445c0e7602cf76180f548639150 [file] [log] [blame]
package org.eclipse.uml2.diagram.deploy.edit.policies;
import org.eclipse.gef.commands.Command;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.uml2.diagram.deploy.edit.commands.Artifact3CreateCommand;
import org.eclipse.uml2.diagram.deploy.providers.UMLElementTypes;
import org.eclipse.uml2.uml.UMLPackage;
/**
* @generated
*/
public class ExecutionEnvironmentArtifacts2ItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
/**
* @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
if (UMLElementTypes.Artifact_3006 == req.getElementType()) {
if (req.getContainmentFeature() == null) {
req.setContainmentFeature(UMLPackage.eINSTANCE.getClass_NestedClassifier());
}
return getGEFWrapper(new Artifact3CreateCommand(req));
}
return super.getCreateCommand(req);
}
}