Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java')
-rw-r--r--plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu/src-gen/org/eclipse/papyrus/sysml/nattable/menu/handlers/ReferencePropertyHandler.java173
1 files changed, 87 insertions, 86 deletions
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>
+ * &#64;see org.eclipse.papyrus.uml.service.creation.handler.CreateHandler#getElementTypeToCreate()
+ *
+ * &#64;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;
+ }
+}

Back to the top