diff options
Diffstat (limited to 'plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java')
-rw-r--r-- | plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java b/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java deleted file mode 100644 index 1c8cc33068f..00000000000 --- a/plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer/src-gen/org/eclipse/papyrus/sysml/modelexplorer/handler/ConstraintBlockParameterHandler.java +++ /dev/null @@ -1,96 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2013 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: - * Juan Cadavid (CEA LIST) juan.cadavid@cea.fr - Initial API and implementation - *****************************************************************************/ -package org.eclipse.papyrus.sysml.modelexplorer.handler; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.command.UnexecutableCommand; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.gmf.runtime.common.core.command.ICommand; -import org.eclipse.gmf.runtime.emf.type.core.IElementType; -import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; -import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper; -import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory; -import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory; -import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils; -import org.eclipse.papyrus.infra.services.edit.service.IElementEditService; -import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes; -import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil; -import org.eclipse.uml2.uml.Element; -import org.eclipse.uml2.uml.UMLPackage; - -/** - * <pre> - * Command handler for Problem creation - * - * </pre> - * - * @generated - */ -public class ConstraintBlockParameterHandler extends AbstractSysmlModelExplorerCreateCommandHandler { - - /** - * <pre> - * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate() - * - * @return the IElementType this handler is supposed to create - * - * </pre> - * - * @generated - */ - @Override - protected IElementType getElementTypeToCreate() { - return UMLElementTypes.PROPERTY; - } - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - if (!(container instanceof Element)) { - return UnexecutableCommand.INSTANCE; - } - - IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container); - if (provider == null) { - return UnexecutableCommand.INSTANCE; - } - - CreateElementRequest createRequest = null; - if (reference == null) { - createRequest = new CreateElementRequest(container, getElementTypeToCreate()); - } else { - createRequest = new CreateElementRequest(container, getElementTypeToCreate(), reference); - } - - String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", ((Element) container).eContents()); //$NON-NLS-1$ - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name)); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} |