(FeatureToSet.class, this, SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET);
+ }
+ return featuresToSet;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET:
+ return ((InternalEList>)getFeaturesToSet()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET:
+ return getFeaturesToSet();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET:
+ getFeaturesToSet().clear();
+ getFeaturesToSet().addAll((Collection extends FeatureToSet>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET:
+ getFeaturesToSet().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET:
+ return featuresToSet != null && !featuresToSet.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SetValuesActionConfigurationImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java
new file mode 100644
index 00000000000..9c1cfe5c701
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java
@@ -0,0 +1,367 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationFactory;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage;
+
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * An implementation of the model Package .
+ *
+ * @generated
+ */
+public class SetValuesActionConfigurationPackageImpl extends EPackageImpl implements SetValuesActionConfigurationPackage {
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass setValuesActionConfigurationEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass featureToSetEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass featureValueEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass dynamicValueEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass constantValueEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass listValueEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass queryExecutionValueEClass = null;
+
+ /**
+ * Creates an instance of the model Package , registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * 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.
+ *
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SetValuesActionConfigurationPackageImpl() {
+ super(eNS_URI, SetValuesActionConfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the Package for this model, and for any others upon which it depends.
+ *
+ *
This method is used to initialize {@link SetValuesActionConfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static SetValuesActionConfigurationPackage init() {
+ if (isInited) return (SetValuesActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(SetValuesActionConfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SetValuesActionConfigurationPackageImpl theSetValuesActionConfigurationPackage = (SetValuesActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SetValuesActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SetValuesActionConfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ExtendedtypesPackage.eINSTANCE.eClass();
+ UMLPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theSetValuesActionConfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSetValuesActionConfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSetValuesActionConfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SetValuesActionConfigurationPackage.eNS_URI, theSetValuesActionConfigurationPackage);
+ return theSetValuesActionConfigurationPackage;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getSetValuesActionConfiguration() {
+ return setValuesActionConfigurationEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getSetValuesActionConfiguration_FeaturesToSet() {
+ return (EReference)setValuesActionConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getFeatureToSet() {
+ return featureToSetEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EAttribute getFeatureToSet_FeatureName() {
+ return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getFeatureToSet_Value() {
+ return (EReference)featureToSetEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getFeatureValue() {
+ return featureValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getDynamicValue() {
+ return dynamicValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getConstantValue() {
+ return constantValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getConstantValue_ValueInstance() {
+ return (EReference)constantValueEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getListValue() {
+ return listValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EReference getListValue_Values() {
+ return (EReference)listValueEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EClass getQueryExecutionValue() {
+ return queryExecutionValueEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public SetValuesActionConfigurationFactory getSetValuesActionConfigurationFactory() {
+ return (SetValuesActionConfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ *
+ *
+ * @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.
+ *
+ *
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ setValuesActionConfigurationEClass = createEClass(SET_VALUES_ACTION_CONFIGURATION);
+ createEReference(setValuesActionConfigurationEClass, SET_VALUES_ACTION_CONFIGURATION__FEATURES_TO_SET);
+
+ featureToSetEClass = createEClass(FEATURE_TO_SET);
+ createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME);
+ createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE);
+
+ featureValueEClass = createEClass(FEATURE_VALUE);
+
+ dynamicValueEClass = createEClass(DYNAMIC_VALUE);
+
+ constantValueEClass = createEClass(CONSTANT_VALUE);
+ createEReference(constantValueEClass, CONSTANT_VALUE__VALUE_INSTANCE);
+
+ listValueEClass = createEClass(LIST_VALUE);
+ createEReference(listValueEClass, LIST_VALUE__VALUES);
+
+ queryExecutionValueEClass = createEClass(QUERY_EXECUTION_VALUE);
+ }
+
+ /**
+ *
+ *
+ * @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.
+ *
+ *
+ * @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);
+ UMLPackage theUMLPackage = (UMLPackage)EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ setValuesActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration());
+ dynamicValueEClass.getESuperTypes().add(this.getFeatureValue());
+ constantValueEClass.getESuperTypes().add(this.getFeatureValue());
+ listValueEClass.getESuperTypes().add(this.getFeatureValue());
+ queryExecutionValueEClass.getESuperTypes().add(this.getDynamicValue());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(setValuesActionConfigurationEClass, SetValuesActionConfiguration.class, "SetValuesActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSetValuesActionConfiguration_FeaturesToSet(), this.getFeatureToSet(), null, "featuresToSet", null, 0, -1, SetValuesActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getFeatureToSet_FeatureName(), theEcorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(dynamicValueEClass, DynamicValue.class, "DynamicValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(constantValueEClass, ConstantValue.class, "ConstantValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConstantValue_ValueInstance(), theUMLPackage.getValueSpecification(), null, "valueInstance", null, 0, 1, ConstantValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(listValueEClass, ListValue.class, "ListValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getListValue_Values(), this.getFeatureValue(), null, "values", null, 0, -1, ListValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(queryExecutionValueEClass, QueryExecutionValue.class, "QueryExecutionValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //SetValuesActionConfigurationPackageImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java
new file mode 100644
index 00000000000..636f23e3581
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationAdapterFactory.java
@@ -0,0 +1,286 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.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.infra.extendedtypes.emf.setvaluesactionconfiguration.*;
+
+/**
+ *
+ * The Adapter Factory for the model.
+ * It provides an adapter createXXX
method for each class of the model.
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage
+ * @generated
+ */
+public class SetValuesActionConfigurationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ *
+ *
+ * @generated
+ */
+ protected static SetValuesActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ *
+ * @generated
+ */
+ public SetValuesActionConfigurationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = SetValuesActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ *
+ * This implementation returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @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 createXXX
methods.
+ *
+ *
+ * @generated
+ */
+ protected SetValuesActionConfigurationSwitch modelSwitch =
+ new SetValuesActionConfigurationSwitch() {
+ @Override
+ public Adapter caseSetValuesActionConfiguration(SetValuesActionConfiguration object) {
+ return createSetValuesActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseFeatureToSet(FeatureToSet object) {
+ return createFeatureToSetAdapter();
+ }
+ @Override
+ public Adapter caseFeatureValue(FeatureValue object) {
+ return createFeatureValueAdapter();
+ }
+ @Override
+ public Adapter caseDynamicValue(DynamicValue object) {
+ return createDynamicValueAdapter();
+ }
+ @Override
+ public Adapter caseConstantValue(ConstantValue object) {
+ return createConstantValueAdapter();
+ }
+ @Override
+ public Adapter caseListValue(ListValue object) {
+ return createListValueAdapter();
+ }
+ @Override
+ public Adapter caseQueryExecutionValue(QueryExecutionValue object) {
+ return createQueryExecutionValueAdapter();
+ }
+ @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 target
.
+ *
+ *
+ * @param target the object to adapt.
+ * @return the adapter for the target
.
+ * @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.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration Set Values Action Configuration }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration
+ * @generated
+ */
+ public Adapter createSetValuesActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet Feature To Set }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet
+ * @generated
+ */
+ public Adapter createFeatureToSetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue Feature Value }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue
+ * @generated
+ */
+ public Adapter createFeatureValueAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue Dynamic Value }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.DynamicValue
+ * @generated
+ */
+ public Adapter createDynamicValueAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue Constant Value }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ConstantValue
+ * @generated
+ */
+ public Adapter createConstantValueAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue List Value }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.ListValue
+ * @generated
+ */
+ public Adapter createListValueAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue Query Execution Value }'.
+ *
+ * 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.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.QueryExecutionValue
+ * @generated
+ */
+ public Adapter createQueryExecutionValueAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement Configuration Element }'.
+ *
+ * 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.
+ *
+ * @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 Action Configuration }'.
+ *
+ * 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.
+ *
+ * @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 Semantic Action Configuration }'.
+ *
+ * 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.
+ *
+ * @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.
+ *
+ * This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //SetValuesActionConfigurationAdapterFactory
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java
new file mode 100644
index 00000000000..3341457baaf
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceFactoryImpl.java
@@ -0,0 +1,52 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ *
+ * The Resource Factory associated with the package.
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationResourceImpl
+ * @generated
+ */
+public class SetValuesActionConfigurationResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ *
+ *
+ * @generated
+ */
+ public SetValuesActionConfigurationResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new SetValuesActionConfigurationResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} //SetValuesActionConfigurationResourceFactoryImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java
new file mode 100644
index 00000000000..1128b718b84
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationResourceImpl.java
@@ -0,0 +1,28 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ *
+ * The Resource associated with the package.
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationResourceFactoryImpl
+ * @generated
+ */
+public class SetValuesActionConfigurationResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ *
+ *
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public SetValuesActionConfigurationResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //SetValuesActionConfigurationResourceImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java
new file mode 100644
index 00000000000..7d8927760d1
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationSwitch.java
@@ -0,0 +1,293 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.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.infra.extendedtypes.emf.setvaluesactionconfiguration.*;
+
+/**
+ *
+ * The Switch for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the caseXXX
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.
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage
+ * @generated
+ */
+public class SetValuesActionConfigurationSwitch extends Switch {
+ /**
+ * The cached model package
+ *
+ *
+ * @generated
+ */
+ protected static SetValuesActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ *
+ *
+ * @generated
+ */
+ public SetValuesActionConfigurationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = SetValuesActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ *
+ *
+ * @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 caseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case SetValuesActionConfigurationPackage.SET_VALUES_ACTION_CONFIGURATION: {
+ SetValuesActionConfiguration setValuesActionConfiguration = (SetValuesActionConfiguration)theEObject;
+ T result = caseSetValuesActionConfiguration(setValuesActionConfiguration);
+ if (result == null) result = caseSemanticActionConfiguration(setValuesActionConfiguration);
+ if (result == null) result = caseActionConfiguration(setValuesActionConfiguration);
+ if (result == null) result = caseConfigurationElement(setValuesActionConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.FEATURE_TO_SET: {
+ FeatureToSet featureToSet = (FeatureToSet)theEObject;
+ T result = caseFeatureToSet(featureToSet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.FEATURE_VALUE: {
+ FeatureValue featureValue = (FeatureValue)theEObject;
+ T result = caseFeatureValue(featureValue);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.DYNAMIC_VALUE: {
+ DynamicValue dynamicValue = (DynamicValue)theEObject;
+ T result = caseDynamicValue(dynamicValue);
+ if (result == null) result = caseFeatureValue(dynamicValue);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.CONSTANT_VALUE: {
+ ConstantValue constantValue = (ConstantValue)theEObject;
+ T result = caseConstantValue(constantValue);
+ if (result == null) result = caseFeatureValue(constantValue);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.LIST_VALUE: {
+ ListValue listValue = (ListValue)theEObject;
+ T result = caseListValue(listValue);
+ if (result == null) result = caseFeatureValue(listValue);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case SetValuesActionConfigurationPackage.QUERY_EXECUTION_VALUE: {
+ QueryExecutionValue queryExecutionValue = (QueryExecutionValue)theEObject;
+ T result = caseQueryExecutionValue(queryExecutionValue);
+ if (result == null) result = caseDynamicValue(queryExecutionValue);
+ if (result == null) result = caseFeatureValue(queryExecutionValue);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Set Values Action Configuration '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Set Values Action Configuration '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSetValuesActionConfiguration(SetValuesActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Feature To Set '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Feature To Set '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureToSet(FeatureToSet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Feature Value '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Feature Value '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFeatureValue(FeatureValue object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Dynamic Value '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Dynamic Value '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDynamicValue(DynamicValue object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Constant Value '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Constant Value '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConstantValue(ConstantValue object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'List Value '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'List Value '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseListValue(ListValue object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Query Execution Value '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Query Execution Value '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseQueryExecutionValue(QueryExecutionValue object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Configuration Element '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Configuration Element '.
+ * @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 'Action Configuration '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Action Configuration '.
+ * @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 'Semantic Action Configuration '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Semantic Action Configuration '.
+ * @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 'EObject '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //SetValuesActionConfigurationSwitch
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java
new file mode 100644
index 00000000000..ddfb5916c90
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/util/SetValuesActionConfigurationXMLProcessor.java
@@ -0,0 +1,50 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ *
+ *
+ * @generated
+ */
+public class SetValuesActionConfigurationXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ *
+ *
+ * @generated
+ */
+ public SetValuesActionConfigurationXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ SetValuesActionConfigurationPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the SetValuesActionConfigurationResourceFactoryImpl factory.
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected Map getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new SetValuesActionConfigurationResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new SetValuesActionConfigurationResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //SetValuesActionConfigurationXMLProcessor
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java
new file mode 100644
index 00000000000..b98c371da72
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterNotfoundException.java
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.uml2.uml.ValueSpecification;
+
+
+/**
+ * Exception thrown when no converter was found
+ */
+public class ConverterNotfoundException extends Exception {
+
+ /** serialization id */
+ private static final long serialVersionUID = -8863603362830475612L;
+
+ /** target parameter type */
+ private final Class> parameterType;
+
+ /** source value instance */
+ private final ValueSpecification valueInstance;
+
+ /**
+ * Creates a new {@link ConverterNotfoundException}.
+ *
+ * @param parameterType
+ * the target type of the value
+ * @param valueInstance
+ * the value specification defining the entering value and type
+ */
+ public ConverterNotfoundException(Class> parameterType, ValueSpecification valueInstance) {
+ this.parameterType = parameterType;
+ this.valueInstance = valueInstance;
+ }
+
+ /**
+ * Returns the target parameter type
+ *
+ * @return the target parameter type
+ */
+ public Class> getParameterType() {
+ return parameterType;
+ }
+
+ /**
+ * Returns the value specification defining the entering value and type
+ *
+ * @return the value specification defining the entering value and type
+ */
+ public ValueSpecification getValueInstance() {
+ return valueInstance;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getMessage() {
+ return "Converter not found for target type: " + getParameterType() + " and for initial value: " + getValueInstance();
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java
new file mode 100644
index 00000000000..d6e61859cad
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Registry to store onverters.
+ */
+public class ConverterRegistry {
+
+ /** singleton instance */
+ private static ConverterRegistry instance;
+
+ /** map to store converters, identified by their class */
+ private Map, IConverter> converterMaps = new HashMap, IConverter>();
+
+ /**
+ * Constructor (not visible: singleton pattern)
+ */
+ private ConverterRegistry() {
+ }
+
+ /**
+ * Returns the single instance of this registry
+ *
+ * @return the single instance of this registry
+ */
+ public static synchronized ConverterRegistry getSingleton() {
+ if(instance == null) {
+ instance = new ConverterRegistry();
+ instance.initializeRegistry();
+ }
+ return instance;
+ }
+
+ /**
+ * Initialize the registry
+ */
+ protected void initializeRegistry() {
+ converterMaps.put(String.class, new ValueSpecificationToStringConverter());
+ converterMaps.put(int.class, new ValueSpecificationToIntegerConverter());
+ converterMaps.put(boolean.class, new ValueSpecificationToBooleanConverter());
+ converterMaps.put(Enumeration.class, new ValueSpecificationToEnumerationConverter());
+ converterMaps.put(EEnum.class, new ValueSpecificationToEENumConverter());
+ }
+
+ /**
+ * Returns the converter for the convenient type, from an {@link Object}
+ *
+ * @param toType
+ * the class into which the element should be transformed
+ *
+ * @return the converter for the convenient type
+ */
+ public IConverter getConverter(Class> toType) {
+ return converterMaps.get(toType);
+ }
+
+ public Object convert(Class> parameterType, ValueSpecification valueInstance) throws ConverterNotfoundException {
+ // retrieve the converter
+ IConverter converter = getConverter(parameterType);
+
+ if(converter != null) {
+ return converter.convert(valueInstance);
+ } else {
+ throw new ConverterNotfoundException(parameterType, valueInstance);
+ }
+ }
+
+// /**
+// * Converts a parameter value into a list of values
+// *
+// * @param context
+// * the context of the evaluation of the query
+// * @param parameterType
+// * the type of the list
+// * @param parameterValue
+// * the parameter value to transform into a list
+// * @return the list of values contained by the parameter value
+// */
+// public List> convertToList(final EObject context, final Class> parameterType, final ParameterValue parameterValue) {
+// return new ConfigurationSwitch>() {
+//
+// /**
+// * {@inheritDoc}
+// */
+// @Override
+// public java.util.List> caseConstantParameterValue(ConstantParameterValue constantParameterValue) {
+// IConverter converter = getConverter(parameterType);
+//
+// if(converter != null) {
+// return Arrays.asList(converter.convert(constantParameterValue.getValueInstance()));
+// } else {
+// Activator.log.error("Impossible to find a converter for type: " + parameterType, null);
+// return Collections.emptyList();
+// }
+// };
+//
+// /**
+// * {@inheritDoc}
+// */
+// @Override
+// public java.util.List> caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) {
+// // if query returns a list, returns it, else creates an array of one element
+// QueryConfiguration queryConfiguration = queryExecutionValue.getConfiguration();
+// if(!(queryConfiguration instanceof ModiscoQueryConfiguration)) {
+// throw new RuntimeException("List conversion not implemented for this type of configuration. " + queryConfiguration.eClass().getName());
+// }
+// Object executionResult = null;
+// try {
+// executionResult = QueryUtil.evaluateBooleanQuery(context, queryConfiguration);
+// } catch (Exception e) {
+// Activator.log.error(e);
+// }
+// int upperBound = ((ModiscoQueryConfiguration)queryConfiguration).getQuery().getUpperBound();
+// if(upperBound == 1) {
+// return Arrays.asList(executionResult);
+// } else {
+// return (List>)executionResult;
+// }
+// };
+//
+// /**
+// * {@inheritDoc}
+// */
+// @Override
+// public java.util.List> caseListParameterValue(ListParameterValue listParameterValue) {
+// List values = new ArrayList();
+// for(ParameterValue parameterValue : listParameterValue.getValues()) {
+// values.addAll(convertToList(context, parameterType, parameterValue));
+// }
+// return values;
+// };
+//
+// }.doSwitch(parameterValue);
+// }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java
new file mode 100644
index 00000000000..d5253cba6b9
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToBooleanConverter.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+
+
+/**
+ * Converter for Objects to Boolean value
+ */
+public class ObjectToBooleanConverter extends Converter implements IConverter {
+
+ /**
+ * Creates a new ObjectToBooleanConverter
+ */
+ public ObjectToBooleanConverter() {
+ super(Object.class, Boolean.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean convert(Object fromObject) {
+ if(fromObject == null) {
+ return null;
+ }
+
+ if(fromObject instanceof Boolean) {
+ return ((Boolean)fromObject);
+ }
+
+ if(fromObject instanceof String) {
+ return Boolean.valueOf((String)fromObject);
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java
new file mode 100644
index 00000000000..795d3bcff06
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ObjectToIntegerConverter.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+
+/**
+ * Converter from an object to an integer
+ */
+public class ObjectToIntegerConverter extends Converter implements IConverter {
+
+ /**
+ * Default constructor.
+ */
+ public ObjectToIntegerConverter() {
+ super(Object.class, Integer.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Integer convert(Object fromObject) {
+ if(fromObject == null) {
+ return null;
+ }
+
+ if(fromObject instanceof Integer) {
+ return (Integer)fromObject;
+ }
+
+ if(fromObject instanceof String) {
+ return Integer.parseInt((String)fromObject);
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java
new file mode 100644
index 00000000000..316c55b4b97
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToBooleanConverter.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Converter from a {@link ValueSpecification} to a {@link Boolean} value
+ */
+public class ValueSpecificationToBooleanConverter extends Converter implements IConverter {
+
+ /**
+ * Creates a new ValueSpecificationToBooleanConverter.
+ */
+ public ValueSpecificationToBooleanConverter() {
+ super(ValueSpecification.class, boolean.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ return ((ValueSpecification)fromObject).booleanValue();
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java
new file mode 100644
index 00000000000..5e69b4d8e44
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * 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.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+
+/**
+ * @author RS211865
+ */
+public class ValueSpecificationToEENumConverter extends Converter implements IConverter {
+
+ /**
+ * @param fromType
+ * @param toType
+ */
+ public ValueSpecificationToEENumConverter() {
+ super(ValueSpecification.class, EEnum.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ if(fromObject instanceof InstanceValue) {
+ InstanceSpecification instanceSpecification = ((InstanceValue)fromObject).getInstance();
+ if(instanceSpecification instanceof EnumerationLiteral) {
+
+ System.err.println(VisibilityKind.PRIVATE_LITERAL);
+ Class> eclass = ((EnumerationLiteral)instanceSpecification).getEnumeration().eClass().getInstanceClass();
+ System.err.println(eclass.getEnumConstants());
+ System.err.println(eclass);
+
+
+
+
+
+
+// final EEnumLiteral literal = eenum.getEEnumLiteral(umlLiteral.getName());
+// if(literal != null) {
+// return literal.getInstance();
+// }
+// return null;
+//
+ System.err.println(instanceSpecification);
+
+
+ //return ((EnumerationLiteral)instanceSpecification).;
+ }
+ }
+
+ return fromObject;
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java
new file mode 100644
index 00000000000..92f5e460d44
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEnumerationConverter.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * 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.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+
+/**
+ * Converter for enumeration values
+ */
+public class ValueSpecificationToEnumerationConverter extends Converter implements IConverter {
+
+ /**
+ * @param fromType
+ * @param toType
+ */
+ public ValueSpecificationToEnumerationConverter() {
+ super(ValueSpecification.class, Enumeration.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ if(fromObject instanceof InstanceValue) {
+ InstanceSpecification instanceSpecification = ((InstanceValue)fromObject).getInstance();
+ if(instanceSpecification instanceof EnumerationLiteral) {
+ return ((EnumerationLiteral)instanceSpecification);
+ }
+ }
+
+ return fromObject;
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java
new file mode 100644
index 00000000000..084de0ece78
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToIntegerConverter.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Converter from a {@link ValueSpecification} to an {@link Integer}.
+ */
+public class ValueSpecificationToIntegerConverter extends Converter implements IConverter {
+
+ /**
+ * Creates a new {@link ValueSpecificationToIntegerConverter}.
+ */
+ public ValueSpecificationToIntegerConverter() {
+ super(ValueSpecification.class, int.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ return ((ValueSpecification)fromObject).integerValue();
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java
new file mode 100644
index 00000000000..12222332688
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToStringConverter.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * Converter from a {@link ValueSpecification} to an {@link String}.
+ */
+public class ValueSpecificationToStringConverter extends Converter implements IConverter {
+
+ /**
+ * Creates a new {@link ValueSpecificationToStringConverter}.
+ */
+ public ValueSpecificationToStringConverter() {
+ super(ValueSpecification.class, String.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ return ((ValueSpecification)fromObject).stringValue();
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java
deleted file mode 100644
index 5ecc4b638bd..00000000000
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/providers/ModifySemanticValuesActionProvider.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 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) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.extendedtypes.emf.providers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
-import org.eclipse.gmf.runtime.common.core.service.IOperation;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
-import org.eclipse.papyrus.infra.extendedtypes.emf.Activator;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ConstantValue;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureToSet;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.FeatureValue;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ListValue;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.ModifySemanticValuesActionConfiguration;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.QueryExecutionValue;
-import org.eclipse.papyrus.infra.extendedtypes.emf.modifysemanticvaluesactionconfiguration.util.ModifySemanticValuesActionConfigurationSwitch;
-import org.eclipse.papyrus.infra.extendedtypes.providers.GetAllExtendedElementTypeActionProvidersOperation;
-import org.eclipse.papyrus.infra.extendedtypes.providers.GetExtendedElementTypeActionProviderOperation;
-import org.eclipse.papyrus.infra.extendedtypes.providers.IExtendedElementTypeActionProvider;
-import org.eclipse.papyrus.infra.queries.core.configuration.QueryConfiguration;
-import org.eclipse.papyrus.infra.queries.core.converter.ConverterNotfoundException;
-import org.eclipse.papyrus.infra.queries.core.converter.ConverterRegistry;
-import org.eclipse.papyrus.infra.queries.core.modisco.QueryUtil;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-
-/**
- * Provider for Action that set semantic values to an element on creation
- */
-public class ModifySemanticValuesActionProvider extends AbstractProvider implements IExtendedElementTypeActionProvider {
-
- /**
- * {@inheritDoc}
- */
- public boolean provides(IOperation operation) {
- if(operation instanceof GetAllExtendedElementTypeActionProvidersOperation) {
- return true;
- }
- if(operation instanceof GetExtendedElementTypeActionProviderOperation) {
- return (((GetExtendedElementTypeActionProviderOperation)operation).getActionConfiguration() instanceof ModifySemanticValuesActionConfiguration);
- }
- return false;
- }
-
- /**
- * {@inheritDoc}
- */
- public ICommand getICommand(List extends Object> elementsToEdit, ActionConfiguration configuration) {
- // try to create the command that will apply the stereotypes
- if(!(configuration instanceof ModifySemanticValuesActionConfiguration)) {
- Activator.log.error("Trying to configure a modify semantic values action configuration with a configuration which is not a semantic value one: " + configuration, null);
- return UnexecutableCommand.INSTANCE;
- }
-
- CompositeCommand compositeCommand = new CompositeCommand("Set Values");
- ModifySemanticValuesActionConfiguration modifySemanticValuesActionConfiguration = (ModifySemanticValuesActionConfiguration)configuration;
-
- // for each object in the list of eobjects to edit, create the stereotype apply command
- for(Object objectToEdit : elementsToEdit) {
- // for each feature in the configuration, sets the value
- if(objectToEdit instanceof EObject) {
- for(FeatureToSet featureToSet : modifySemanticValuesActionConfiguration.getFeaturesToSet()) {
- // create a command from a set request and use the Papyrus edit service
- EObject eObject = (EObject)objectToEdit;
- EStructuralFeature feature = eObject.eClass().getEStructuralFeature(featureToSet.getFeatureName());
- if(feature != null && feature.isChangeable()) {
- // retrieve the value to set
- FeatureValue featureValue = featureToSet.getValue();
- Object value = computeValue(eObject, feature, featureValue);
- SetRequest request = new SetRequest(eObject, feature, value);
- IElementEditService service = ElementEditServiceUtils.getCommandProvider(eObject);
- ICommand command = service.getEditCommand(request);
- if(command != null) {
- compositeCommand.add(command);
- }
- }
- }
-
- // for dynamic features, opens the pop up and ask for the values to set
- }
- }
- return compositeCommand;
- }
-
- /**
- * Retrieves the value from the feature value parameter
- *
- * @param eObject
- * the context of the value
- * @param feature
- * the feature for which the value is computed
- * @param featureValue
- * the representation of the value of the feature from which to compute the real value
- * @return the value of the feature
- */
- protected Object computeValue(final EObject eObject, final EStructuralFeature feature, FeatureValue featureValue) {
- Object value = new ModifySemanticValuesActionConfigurationSwitch() {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object caseListValue(ListValue listValue) {
- List values = new ArrayList();
- for(FeatureValue fValue : listValue.getValues()) {
- Object value = computeValue(eObject, feature, fValue);
- values.add(value);
- }
- return values;
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object caseQueryExecutionValue(QueryExecutionValue queryExecutionValue) {
- Object value = null;
- QueryConfiguration configuration = queryExecutionValue.getConfiguration();
- try {
- value = QueryUtil.evaluateQuery(eObject, configuration);
- } catch (Exception e) {
- Activator.log.error(e);
- }
- return value;
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object caseConstantValue(ConstantValue constantValue) {
- Class> parameterType = feature.getEType().getInstanceClass();
- try {
- Object convertedValue = ConverterRegistry.getSingleton().convert(parameterType, constantValue.getValueInstance());
- return convertedValue;
- } catch (ConverterNotfoundException e) {
- Activator.log.error(e);
- }
- return null;
- }
-
- }.doSwitch(featureValue);
-
- return value;
- }
-
- /**
- * {@inheritDoc}
- */
- public ICommand getBeforeCreateValidationCommand(List extends Object> elementsToEdit, ActionConfiguration configuration) {
- // here, element to edit should be the parent of the created element on which the stereotype is applied.
- ModifySemanticValuesActionConfiguration modifySemanticValuesActionConfiguration = (ModifySemanticValuesActionConfiguration)configuration;
-
- for(Object objectToEdit : elementsToEdit) {
- // FIXME ...
- }
- // returns a null command, which means it is possible to apply the stereotype
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- public void setConfiguration(IConfigurationElement element) {
- // something to do here ?
- }
-
-}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java
new file mode 100644
index 00000000000..d709ce447ee
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.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.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation;
+
+/**
+ * {@link IActionConfigurationModelCreation} for {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionConfigurationModelCreation implements IActionConfigurationModelCreation {
+
+ /**
+ * {@inheritDoc}
+ */
+ public RuntimeValuesEditionActionConfiguration createConfigurationModel() {
+ return RuntimeValuesEditionActionConfigurationFactory.eINSTANCE.createRuntimeValuesEditionActionConfiguration();
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java
new file mode 100644
index 00000000000..6e0279917f3
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * 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.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator;
+import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator;
+
+/**
+ * {@link ICreationElementValidator} for {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionCreationElementValidator implements IActionCreationElementValidator {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canCreate(CreateElementRequest request) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(RuntimeValuesEditionActionConfiguration configuration) {
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java
new file mode 100644
index 00000000000..5a9b8495d47
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * 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.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+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.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.core.util.EMFCoreUtil;
+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.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration;
+import org.eclipse.papyrus.views.properties.contexts.View;
+import org.eclipse.papyrus.views.properties.creation.EditionDialog;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * advice for the {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice {
+
+ /** list of views to display */
+ protected Set