Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java1
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java18
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java40
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java49
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java18
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java40
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java23
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java38
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java33
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF8
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF14
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore11
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag54
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel19
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml10
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java69
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java52
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java226
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java105
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java195
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java209
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java188
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java172
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java29
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java38
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java121
31 files changed, 1774 insertions, 61 deletions
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
index dfc3330d7a9..53526b072e0 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
@@ -110,6 +110,7 @@ public class ExtendedElementTypeSetRegistry {
configurationTypeToElementTypeFactory = new HashMap<String, IExtendedElementTypeFactory<ElementTypeConfiguration>>();
// 1. creates the resource set
extendedTypesResourceSet = null;
+ registry = null;
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
index 7fe7f0a9bb0..6e05b0347dd 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
@@ -33,7 +33,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.2.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.2",
org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
- org.eclipse.papyrus.uml.diagram.composite;bundle-version="0.10.2"
+ org.eclipse.papyrus.uml.diagram.composite;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="0.10.2"
Export-Package: org.eclipse.papyrus.gmf.diagram.common.commands,
org.eclipse.papyrus.gmf.diagram.common.compatibility,
org.eclipse.papyrus.gmf.diagram.common.edit.part,
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
index 3574d5bf156..811efd555bb 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
@@ -13,10 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +37,17 @@ public class BlockCompositeSemanticEditPolicy extends CompartmentSemanticEditPol
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ }
+ }
+
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
index 109620e6292..7bacaff00ba 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
@@ -13,11 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -42,18 +47,39 @@ public class BlockPropertyCompositeSemanticEditPolicy extends DefaultSemanticEdi
if ((eObject != null) && (eObject instanceof Property)) {
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) {
+ baseType = SysMLElementTypes.FLOW_PORT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(UMLElementTypes.PORT )) {
+ baseType = UMLElementTypes.PORT ;
+ }
+ }
+
- if((SysMLElementTypes.FLOW_PORT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType())
- || (UMLElementTypes.PORT == req.getElementType())) {
+ if((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
req.setContainer(type);
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
index 602faec3a25..8c1f4a10c5e 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
@@ -14,13 +14,16 @@
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
import java.util.Arrays;
+import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -50,36 +53,46 @@ public class BlockPropertyStructureCompartmentSemanticEditPolicy extends Compart
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ } else if(superTypes.contains(UMLElementTypes.PROPERTY)) {
+ baseType = UMLElementTypes.PROPERTY;
+ }
+
+ }
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ }else if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
- }
-
- if(UMLElementTypes.PROPERTY == req.getElementType()) {
+ } else if(UMLElementTypes.PROPERTY == baseType) {
req.setContainer(type);
- }
-
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
-
-
} else if ((UMLElementTypes.PROPERTY == req.getElementType()) || (Arrays.asList(req.getElementType().getAllSuperTypes()).contains(UMLElementTypes.PROPERTY))) {
// Forbid Property::qualifier creation
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
index 73254855eb7..57b7574e813 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
@@ -13,11 +13,17 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.UMLPackage;
@@ -33,7 +39,17 @@ public class ConstraintParameterCompartmentSemanticEditPolicy extends Compartmen
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(UMLElementTypes.PROPERTY)) {
+ baseType = UMLElementTypes.PROPERTY;
+ }
+ }
+
+ if(UMLElementTypes.PROPERTY == baseType) {
String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", req.getContainer().eContents()); //$NON-NLS-1$
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name));
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
index c7e2101c312..e1d81eb1ef0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class FlowPortCompartmentSemanticEditPolicy extends CompartmentSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ }
+ }
+
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
index 87879341944..6d7d2500c9d 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
@@ -13,11 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -44,17 +49,38 @@ public class NestedBlockPropertyCompositeSemanticEditPolicy extends DefaultSeman
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
- if((SysMLElementTypes.FLOW_PORT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType())
- || (UMLElementTypes.PORT == req.getElementType())) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) {
+ baseType = SysMLElementTypes.FLOW_PORT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(UMLElementTypes.PORT )) {
+ baseType = UMLElementTypes.PORT ;
+ }
+ }
+
+ if((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
req.setContainer(type);
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
index 622dd608d3b..d9e20429fa0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
@@ -13,10 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -32,11 +38,24 @@ public class PartCompartmentSemanticEditPolicy extends CompartmentSemanticEditPo
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
index ed795654df5..7da2226fed0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -36,22 +41,43 @@ public class PropertyCompartmentSemanticEditPolicy extends CompartmentSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.ACTOR_PART_PROPERTY ==baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
index 19e6472a30e..b1a0317456f 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class ReferenceCompartmentSemanticEditPolicy extends CompartmentSemanticE
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
index f045b8976ee..2aa9a51e4c2 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -35,23 +40,41 @@ public class StructureCompartmentSemanticEditPolicy extends CompartmentSemanticE
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
index 23d354a9d40..bd61d2b09be 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class ValueCompartmentSemanticEditPolicy extends CompartmentSemanticEditP
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
index 376fc020210..3c533af22db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration;bundle-version="0.10.2";visibility:=reexport,
+ org.eclipse.papyrus.uml.diagram.paletteconfiguration;visibility:=reexport;bundle-version="0.10.2",
org.eclipse.emf.edit;visibility:=reexport,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.edit;visibility:=reexport,
@@ -15,8 +15,6 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-Vendor: %providerName
Bundle-Version: 0.10.2.qualifier
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration
- .edit.provider.PaletteConfigurationEditPlugin$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfigurat
- ion.edit;singleton:=true
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteConfigurationEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit;singleton:=true
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
index 765c6a4faec..9343e0d0071 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
encoding//model/InvariantStereotypeConfiguration.ecore=UTF-8
encoding//model/InvariantStereotypeConfiguration.ecorediag=UTF-8
+encoding//model/SetTypeActionConfiguration.ecorediag=UTF-8
encoding//model/StereotypedElementMatcherConfiguration.ecore=UTF-8
encoding//model/StereotypedElementMatcherConfiguration.ecorediag=UTF-8
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
index 8935b618c56..626aee53f55 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
@@ -8,11 +8,14 @@ Export-Package: org.eclipse.papyrus.uml.tools.extendedtypes,
org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util,
org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration,
org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl,
- org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util
+ org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
- org.eclipse.papyrus.infra.extendedtypes;visibility:=reexport;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="0.10.2";visibility:=reexport,
org.eclipse.uml2.types;visibility:=reexport,
org.eclipse.uml2.uml,
org.eclipse.papyrus.infra.core.log;bundle-version="0.10.2",
@@ -20,7 +23,12 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
org.eclipse.papyrus.infra.extendedtypes.emf;bundle-version="0.10.2",
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.2",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.2"
+ org.eclipse.papyrus.uml.tools;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.2",
+ org.eclipse.papyrus.views.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.uml.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.2",
+ org.eclipse.swt
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore
new file mode 100644
index 00000000000..2540c266ab7
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="settypeactionconfiguration" nsURI="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0"
+ nsPrefix="settypeactionconfiguration">
+ <eClassifiers xsi:type="ecore:EClass" name="SetTypeActionConfiguration" eSuperTypes="../../org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="validTypes" upperBound="-1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationTypes" upperBound="-1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag
new file mode 100644
index 00000000000..3603f6ef5bf
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_EDs_0JSAEeO-cos6HUbWSw" type="EcoreTools" name="SetTypeActionConfiguration.ecorediag" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_EEtFYJSAEeO-cos6HUbWSw" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_EFAAUJSAEeO-cos6HUbWSw" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_EFERwJSAEeO-cos6HUbWSw" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_IQAoMJSAEeO-cos6HUbWSw" type="2001">
+ <element xmi:type="ecore:EAttribute" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/validTypes"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_IQAoMZSAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_KPiP8JSAEeO-cos6HUbWSw" type="2001">
+ <element xmi:type="ecore:EAttribute" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/creationTypes"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KPiP8ZSAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EFERwZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EFERwpSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EFERw5SAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_EFE40JSAEeO-cos6HUbWSw" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EFE40ZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EFE40pSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EFE405SAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_EEtFYZSAEeO-cos6HUbWSw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EEtFYpSAEeO-cos6HUbWSw" x="300" y="395" height="158"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F1JvUJSAEeO-cos6HUbWSw" type="1001">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_F2ucoJSAEeO-cos6HUbWSw" source="Shortcut">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_F2ucoZSAEeO-cos6HUbWSw" key="modelID" value="EcoreTools"/>
+ </eAnnotations>
+ <children xmi:type="notation:Node" xmi:id="_F1K9cJSAEeO-cos6HUbWSw" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_F1LkgJSAEeO-cos6HUbWSw" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F1LkgZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F1LkgpSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F1Lkg5SAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F1MyoJSAEeO-cos6HUbWSw" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F1MyoZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F1MyopSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F1Myo5SAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F1JvUZSAEeO-cos6HUbWSw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12560536" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F1JvUpSAEeO-cos6HUbWSw" x="300" y="265"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_EDs_0ZSAEeO-cos6HUbWSw"/>
+ <element xmi:type="ecore:EPackage" href="SetTypeActionConfiguration.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_F11EwJSAEeO-cos6HUbWSw" type="3003" source="_EEtFYJSAEeO-cos6HUbWSw" target="_F1JvUJSAEeO-cos6HUbWSw">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_F11r0JSAEeO-cos6HUbWSw" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_F11r0ZSAEeO-cos6HUbWSw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_F11r0pSAEeO-cos6HUbWSw" points="[0, -20, -2, 101]$[0, -92, -2, 29]"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel
new file mode 100644
index 00000000000..20e99726e8a
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen" editDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.uml.tools.extendedtypes" modelName="SetTypeActionConfiguration"
+ modelPluginClass="" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ testsDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel#//extendedtypes"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>SetTypeActionConfiguration.ecore</foreignModel>
+ <genPackages prefix="SetTypeActionConfiguration" basePackage="org.eclipse.papyrus.uml.tools.extendedtypes"
+ disposableProviderFactory="true" ecorePackage="SetTypeActionConfiguration.ecore#/">
+ <genClasses ecoreClass="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/validTypes"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/creationTypes"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
index 0ad8d706b2f..5deec45fe83 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
@@ -53,8 +53,14 @@
type="applystereotypeactionconfiguration"
class="org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util.ApplyStereotypeActionConfigurationResourceFactoryImpl"/>
</extension>
-
-
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SetTypeActionConfiguration -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0"
+ class="org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage"
+ genModel="model/SetTypeActionConfiguration.genmodel"/>
+ </extension>
+
<!-- CUSTOM EXTENSIONS -->
<extension
point="org.eclipse.papyrus.infra.extendedtypes.aspectActionConfiguration">
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java
new file mode 100644
index 00000000000..36a150cd7ff
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java
@@ -0,0 +1,69 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Type Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes <em>Valid Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes <em>Creation Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration()
+ * @model
+ * @generated
+ */
+public interface SetTypeActionConfiguration extends SemanticActionConfiguration {
+ /**
+ * Returns the value of the '<em><b>Valid Types</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Valid Types</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Valid Types</em>' attribute list.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_ValidTypes()
+ * @model
+ * @generated
+ */
+ EList<String> getValidTypes();
+
+ /**
+ * Returns the value of the '<em><b>Creation Types</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Creation Types</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Creation Types</em>' attribute list.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_CreationTypes()
+ * @model
+ * @generated
+ */
+ EList<String> getCreationTypes();
+
+} // SetTypeActionConfiguration
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java
new file mode 100644
index 00000000000..436cfde4572
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java
@@ -0,0 +1,52 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public interface SetTypeActionConfigurationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SetTypeActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Set Type Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Set Type Action Configuration</em>'.
+ * @generated
+ */
+ SetTypeActionConfiguration createSetTypeActionConfiguration();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage();
+
+} //SetTypeActionConfigurationFactory
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java
new file mode 100644
index 00000000000..7f2c4924d58
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java
@@ -0,0 +1,226 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface SetTypeActionConfigurationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "settypeactionconfiguration";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "settypeactionconfiguration";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SetTypeActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl <em>Set Type Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration()
+ * @generated
+ */
+ int SET_TYPE_ACTION_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Identifier</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER;
+
+ /**
+ * The feature id for the '<em><b>Icon Entry</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY;
+
+ /**
+ * The feature id for the '<em><b>Valid Types</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Creation Types</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Set Type Action Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 2;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration <em>Set Type Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Set Type Action Configuration</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration
+ * @generated
+ */
+ EClass getSetTypeActionConfiguration();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes <em>Valid Types</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Valid Types</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes()
+ * @see #getSetTypeActionConfiguration()
+ * @generated
+ */
+ EAttribute getSetTypeActionConfiguration_ValidTypes();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes <em>Creation Types</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Creation Types</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes()
+ * @see #getSetTypeActionConfiguration()
+ * @generated
+ */
+ EAttribute getSetTypeActionConfiguration_CreationTypes();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl <em>Set Type Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration()
+ * @generated
+ */
+ EClass SET_TYPE_ACTION_CONFIGURATION = eINSTANCE.getSetTypeActionConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Valid Types</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = eINSTANCE.getSetTypeActionConfiguration_ValidTypes();
+
+ /**
+ * The meta object literal for the '<em><b>Creation Types</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = eINSTANCE.getSetTypeActionConfiguration_CreationTypes();
+
+ }
+
+} //SetTypeActionConfigurationPackage
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java
new file mode 100644
index 00000000000..88b9fcb3b9d
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetTypeActionConfigurationFactoryImpl extends EFactoryImpl implements SetTypeActionConfigurationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SetTypeActionConfigurationFactory init() {
+ try {
+ SetTypeActionConfigurationFactory theSetTypeActionConfigurationFactory = (SetTypeActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(SetTypeActionConfigurationPackage.eNS_URI);
+ if (theSetTypeActionConfigurationFactory != null) {
+ return theSetTypeActionConfigurationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SetTypeActionConfigurationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: return createSetTypeActionConfiguration();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfiguration createSetTypeActionConfiguration() {
+ SetTypeActionConfigurationImpl setTypeActionConfiguration = new SetTypeActionConfigurationImpl();
+ return setTypeActionConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage() {
+ return (SetTypeActionConfigurationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static SetTypeActionConfigurationPackage getPackage() {
+ return SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+
+} //SetTypeActionConfigurationFactoryImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java
new file mode 100644
index 00000000000..a368e94c791
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java
@@ -0,0 +1,195 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Type Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getValidTypes <em>Valid Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getCreationTypes <em>Creation Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SetTypeActionConfigurationImpl extends SemanticActionConfigurationImpl implements SetTypeActionConfiguration {
+ /**
+ * The cached value of the '{@link #getValidTypes() <em>Valid Types</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValidTypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> validTypes;
+
+ /**
+ * The cached value of the '{@link #getCreationTypes() <em>Creation Types</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreationTypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> creationTypes;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SetTypeActionConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SetTypeActionConfigurationPackage.Literals.SET_TYPE_ACTION_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getValidTypes() {
+ if (validTypes == null) {
+ validTypes = new EDataTypeUniqueEList<String>(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES);
+ }
+ return validTypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getCreationTypes() {
+ if (creationTypes == null) {
+ creationTypes = new EDataTypeUniqueEList<String>(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES);
+ }
+ return creationTypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ return getValidTypes();
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ return getCreationTypes();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ getValidTypes().clear();
+ getValidTypes().addAll((Collection<? extends String>)newValue);
+ return;
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ getCreationTypes().clear();
+ getCreationTypes().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ getValidTypes().clear();
+ return;
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ getCreationTypes().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ return validTypes != null && !validTypes.isEmpty();
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ return creationTypes != null && !creationTypes.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (validTypes: ");
+ result.append(validTypes);
+ result.append(", creationTypes: ");
+ result.append(creationTypes);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SetTypeActionConfigurationImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java
new file mode 100644
index 00000000000..431da09544b
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java
@@ -0,0 +1,209 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetTypeActionConfigurationPackageImpl extends EPackageImpl implements SetTypeActionConfigurationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass setTypeActionConfigurationEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SetTypeActionConfigurationPackageImpl() {
+ super(eNS_URI, SetTypeActionConfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link SetTypeActionConfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static SetTypeActionConfigurationPackage init() {
+ if (isInited) return (SetTypeActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(SetTypeActionConfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SetTypeActionConfigurationPackageImpl theSetTypeActionConfigurationPackage = (SetTypeActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SetTypeActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SetTypeActionConfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ExtendedtypesPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theSetTypeActionConfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSetTypeActionConfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSetTypeActionConfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SetTypeActionConfigurationPackage.eNS_URI, theSetTypeActionConfigurationPackage);
+ return theSetTypeActionConfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSetTypeActionConfiguration() {
+ return setTypeActionConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSetTypeActionConfiguration_ValidTypes() {
+ return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSetTypeActionConfiguration_CreationTypes() {
+ return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory() {
+ return (SetTypeActionConfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ setTypeActionConfigurationEClass = createEClass(SET_TYPE_ACTION_CONFIGURATION);
+ createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES);
+ createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ setTypeActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(setTypeActionConfigurationEClass, SetTypeActionConfiguration.class, "SetTypeActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSetTypeActionConfiguration_ValidTypes(), theEcorePackage.getEString(), "validTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSetTypeActionConfiguration_CreationTypes(), theEcorePackage.getEString(), "creationTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //SetTypeActionConfigurationPackageImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java
new file mode 100644
index 00000000000..c0ef8931dcf
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java
@@ -0,0 +1,188 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public class SetTypeActionConfigurationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SetTypeActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SetTypeActionConfigurationSwitch<Adapter> modelSwitch =
+ new SetTypeActionConfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter caseSetTypeActionConfiguration(SetTypeActionConfiguration object) {
+ return createSetTypeActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseConfigurationElement(ConfigurationElement object) {
+ return createConfigurationElementAdapter();
+ }
+ @Override
+ public Adapter caseActionConfiguration(ActionConfiguration object) {
+ return createActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return createSemanticActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration <em>Set Type Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration
+ * @generated
+ */
+ public Adapter createSetTypeActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement <em>Configuration Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement
+ * @generated
+ */
+ public Adapter createConfigurationElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration <em>Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration
+ * @generated
+ */
+ public Adapter createActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration <em>Semantic Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration
+ * @generated
+ */
+ public Adapter createSemanticActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //SetTypeActionConfigurationAdapterFactory
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java
new file mode 100644
index 00000000000..333a7bbb8d4
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java
@@ -0,0 +1,172 @@
+/**
+ * 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public class SetTypeActionConfigurationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SetTypeActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: {
+ SetTypeActionConfiguration setTypeActionConfiguration = (SetTypeActionConfiguration)theEObject;
+ T result = caseSetTypeActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseSemanticActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseConfigurationElement(setTypeActionConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Set Type Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Set Type Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSetTypeActionConfiguration(SetTypeActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConfigurationElement(ConfigurationElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActionConfiguration(ActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //SetTypeActionConfigurationSwitch
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java
new file mode 100644
index 00000000000..23e19395eb6
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation;
+
+
+/**
+ * {@link IActionConfigurationModelCreation} for {@link ApplyStereotypeActionConfiguration}
+ */
+public class SetTypeActionConfigurationModelCreation implements IActionConfigurationModelCreation<SetTypeActionConfiguration> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public SetTypeActionConfiguration createConfigurationModel() {
+ return SetTypeActionConfigurationFactory.eINSTANCE.createSetTypeActionConfiguration();
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java
new file mode 100644
index 00000000000..93787e751a3
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator;
+
+/**
+ * {@link IActionCreationElementValidator} for {@link SetTypeActionConfiguration}
+ */
+public class SetTypeActionCreationElementValidator implements IActionCreationElementValidator<SetTypeActionConfiguration> {
+
+ protected SetTypeActionConfiguration configuration;
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canCreate(CreateElementRequest request) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(SetTypeActionConfiguration configuration) {
+ this.configuration = configuration;
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java
new file mode 100644
index 00000000000..61ddbecfcbd
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * 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:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import java.util.Arrays;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice;
+import org.eclipse.papyrus.infra.extendedtypes.emf.Activator;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
+import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * advice for the {@link ApplyStereotypeActionConfiguration}
+ */
+public class SetTypeActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice<SetTypeActionConfiguration> {
+
+ /** configuration for this edit helper advice */
+ protected SetTypeActionConfiguration configuration;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(SetTypeActionConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ return super.approveRequest(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(ConfigureRequest request) {
+ return super.getBeforeConfigureCommand(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
+ if(configuration==null) {
+ return null;
+ }
+ ICommand resultCommand = null;
+ // retrieve eobject
+ final EObject elementToConfigure = request.getElementToConfigure();
+ if(!(elementToConfigure instanceof Element)) {
+ return null;
+ }
+
+ final TransactionalEditingDomain editingDomain = request.getEditingDomain();
+ if(editingDomain ==null) {
+ return null;
+ }
+ // retrieve edit service to get features from configure command
+ IElementEditService service = ElementEditServiceUtils.getCommandProvider(elementToConfigure);
+ if(service == null) {
+ Activator.log.error("Impossible to get edit service from element: " + elementToConfigure, null);
+ return null;
+ }
+
+ resultCommand = new AbstractTransactionalCommand(editingDomain, "Editing type", Arrays.asList((WorkspaceSynchronizer.getFile(elementToConfigure.eResource())))) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UMLModelElement umlModelElement = new UMLModelElement(elementToConfigure, editingDomain);
+ ReferenceValueFactory factory = umlModelElement.getValueFactory("type");
+ Object elemObject = factory.edit(Display.getDefault().getFocusControl(), elementToConfigure);
+ return CommandResult.newOKCommandResult(elemObject);
+ }
+ };
+
+ return resultCommand;
+ }
+
+ /**
+ * @return
+ */
+ protected EObject getDefaultTypeContainer(ConfigureRequest request) {
+ if(request.getElementToConfigure() instanceof Element) {
+ return ((Element)request.getElementToConfigure()).getNearestPackage();
+ }
+ return request.getElementToConfigure().eContainer();
+ }
+
+
+}

Back to the top