diff options
Diffstat (limited to 'plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse')
6 files changed, 421 insertions, 416 deletions
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java index be4fa6843a1..6039a1552be 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ActorPartPropertyHandler.java @@ -1,86 +1,87 @@ -/***************************************************************************** - * 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.nattable.menu.handlers; - -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.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.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory; -import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; - -/** - * <pre> - * Command handler for ActorPart (Property) creation - * - * </pre> - * - * @generated - */ -public class ActorPartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler { - - /** - * <pre> - * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate() - * - * @return the IElementType this handler is supposed to create - * - * </pre> - * - * @generated - */ - @Override - protected IElementType getElementTypeToCreate() { - return SysMLElementTypes.ACTOR_PART_PROPERTY; - } - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - 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); - } - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory()); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} +/*****************************************************************************
+ * 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.nattable.menu.handlers;
+
+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.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for ActorPart (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ActorPartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.ACTOR_PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ 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);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
+
+ // 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;
+ }
+}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java index 08d7f200911..ed345c0fe6b 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ConstraintBlockParameterHandler.java @@ -18,7 +18,7 @@ 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.commands.wrappers.GMFtoEMFCommandWrapper; +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; @@ -40,9 +40,9 @@ public class ConstraintBlockParameterHandler extends AbstractSysmlNattableCreate /** * <pre> - * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate() + * @see org.eclipse.papyrus.uml.service.types.ui.handlers.AbstractCreateCommandHandler#getElementTypeToCreate() * - * @return the IElementType this handler is supposed to create + * @return the IElementType this handler is supposed to create * * </pre> * diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java index c81ec2579bd..2b06eeabebd 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/FlowPort_NAHandler.java @@ -1,69 +1,70 @@ -/***************************************************************************** - * 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.nattable.menu.handlers; - -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.requests.CreateElementRequest; -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.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory; - -/** - * <pre> - * Command handler for FlowPort non atomic creation - * - * </pre> - * - * @generated - */ -public class FlowPort_NAHandler extends FlowPortHandler { - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - 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); - } - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory()); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} +/*****************************************************************************
+ * 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.nattable.menu.handlers;
+
+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.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+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.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
+
+/**
+ * <pre>
+ * Command handler for FlowPort non atomic creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class FlowPort_NAHandler extends FlowPortHandler {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ 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);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
+
+ // 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;
+ }
+}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java index 73750172db6..108247b745a 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/PartPropertyHandler.java @@ -1,86 +1,87 @@ -/***************************************************************************** - * 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.nattable.menu.handlers; - -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.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.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory; -import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; - -/** - * <pre> - * Command handler for Part (Property) creation - * - * </pre> - * - * @generated - */ -public class PartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler { - - /** - * <pre> - * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate() - * - * @return the IElementType this handler is supposed to create - * - * </pre> - * - * @generated - */ - @Override - protected IElementType getElementTypeToCreate() { - return SysMLElementTypes.PART_PROPERTY; - } - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - 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); - } - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory()); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} +/*****************************************************************************
+ * 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.nattable.menu.handlers;
+
+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.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Part (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class PartPropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.PART_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ 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);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
+
+ // 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;
+ }
+}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java index 8790f5c6736..9a66f9a4ae0 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java @@ -1,86 +1,87 @@ -/***************************************************************************** - * 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.nattable.menu.handlers; - -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.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.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory; -import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; - -/** - * <pre> - * Command handler for Reference (Property) creation - * - * </pre> - * - * @generated - */ -public class ReferencePropertyHandler extends AbstractSysmlNattableCreateCommandHandler { - - /** - * <pre> - * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate() - * - * @return the IElementType this handler is supposed to create - * - * </pre> - * - * @generated - */ - @Override - protected IElementType getElementTypeToCreate() { - return SysMLElementTypes.REFERENCE_PROPERTY; - } - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - 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); - } - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory()); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} +/*****************************************************************************
+ * 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.nattable.menu.handlers;
+
+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.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Reference (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ReferencePropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.REFERENCE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ 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);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
+
+ // 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;
+ }
+}
diff --git a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java index 30a049bf106..34cb377383d 100644 --- a/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java +++ b/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ValuePropertyHandler.java @@ -1,86 +1,87 @@ -/***************************************************************************** - * 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.nattable.menu.handlers; - -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.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.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory; -import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes; - -/** - * <pre> - * Command handler for Value (Property) creation - * - * </pre> - * - * @generated - */ -public class ValuePropertyHandler extends AbstractSysmlNattableCreateCommandHandler { - - /** - * <pre> - * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate() - * - * @return the IElementType this handler is supposed to create - * - * </pre> - * - * @generated - */ - @Override - protected IElementType getElementTypeToCreate() { - return SysMLElementTypes.VALUE_PROPERTY; - } - - /** - * {@inheritDoc} - */ - @Override - protected Command buildCommand() { - - if (getCommandContext() == null) { - return UnexecutableCommand.INSTANCE; - } - - EObject container = getCommandContext().getContainer(); - EReference reference = getCommandContext().getReference(); - - 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); - } - createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory()); - - // Retrieve create command from the Element Edit service - ICommand createGMFCommand = provider.getEditCommand(createRequest); - if (createGMFCommand != null) { - Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand); - return emfCommand; - } - return UnexecutableCommand.INSTANCE; - } -} +/*****************************************************************************
+ * 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.nattable.menu.handlers;
+
+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.IConfigureCommandFactory;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+
+/**
+ * <pre>
+ * Command handler for Value (Property) creation
+ *
+ * </pre>
+ *
+ * @generated
+ */
+public class ValuePropertyHandler extends AbstractSysmlNattableCreateCommandHandler {
+
+ /**
+ * <pre>
+ * @see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * @return the IElementType this handler is supposed to create
+ *
+ * </pre>
+ *
+ * @generated
+ */
+ @Override
+ protected IElementType getElementTypeToCreate() {
+ return SysMLElementTypes.VALUE_PROPERTY;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command buildCommand() {
+
+ if (getCommandContext() == null) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ EObject container = getCommandContext().getContainer();
+ EReference reference = getCommandContext().getReference();
+
+ 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);
+ }
+ createRequest.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
+
+ // 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;
+ }
+}
|