Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStéphane Bégaudeau2016-01-28 14:03:33 +0000
committerPierre-Charles David2016-02-02 10:03:06 +0000
commitcdb9ce32b906f4e956fd364bc8f53d647ac83a1b (patch)
treeda31f88b642ae283fae639b5e1551199400deff2
parent4aaf38da6b74a44f57ca085a739493530a653e0f (diff)
downloadorg.eclipse.sirius-cdb9ce32b906f4e956fd364bc8f53d647ac83a1b.tar.gz
org.eclipse.sirius-cdb9ce32b906f4e956fd364bc8f53d647ac83a1b.tar.xz
org.eclipse.sirius-cdb9ce32b906f4e956fd364bc8f53d647ac83a1b.zip
[482528] Add support for dynamic mappings
Change-Id: I0cc656320c379f420ee809abfc71f72ad17a330d Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--incubation/org.eclipse.sirius.common.interpreter/src/org/eclipse/sirius/common/interpreter/api/EvaluationResult.java1
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_dynamicMappings_DynamicMappingFor.gifbin0 -> 223 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_LabelDescription.gifbin0 -> 223 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_TextDescription.gifbin0 -> 223 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingFor_switch_DynamicMappingSwitch.gifbin0 -> 223 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingSwitch_cases_DynamicMappingCase.gifbin0 -> 223 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gifbin0 -> 129 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingFor.gifbin0 -> 129 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gifbin0 -> 129 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/plugin.properties11
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java7
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java213
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java232
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java208
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java72
-rw-r--r--incubation/org.eclipse.sirius.properties/model/properties.ecore22
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java17
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingCase.java86
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java113
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java78
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java27
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java344
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java43
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingCaseImpl.java253
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java307
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java231
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java33
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java151
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java54
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java63
-rw-r--r--incubation/org.eclipse.sirius.sample.properties/description/project.odesign38
-rw-r--r--incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/ViewDescriptionConverter.java32
32 files changed, 2627 insertions, 9 deletions
diff --git a/incubation/org.eclipse.sirius.common.interpreter/src/org/eclipse/sirius/common/interpreter/api/EvaluationResult.java b/incubation/org.eclipse.sirius.common.interpreter/src/org/eclipse/sirius/common/interpreter/api/EvaluationResult.java
index 82b7bbb8c2..8b59e38bbf 100644
--- a/incubation/org.eclipse.sirius.common.interpreter/src/org/eclipse/sirius/common/interpreter/api/EvaluationResult.java
+++ b/incubation/org.eclipse.sirius.common.interpreter/src/org/eclipse/sirius/common/interpreter/api/EvaluationResult.java
@@ -12,7 +12,6 @@ package org.eclipse.sirius.common.interpreter.api;
import java.util.Collection;
import java.util.Collections;
-import java.util.List;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_dynamicMappings_DynamicMappingFor.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_dynamicMappings_DynamicMappingFor.gif
new file mode 100644
index 0000000000..367326419a
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_dynamicMappings_DynamicMappingFor.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_LabelDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_LabelDescription.gif
new file mode 100644
index 0000000000..2ce9ec86de
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_LabelDescription.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_TextDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_TextDescription.gif
new file mode 100644
index 0000000000..59766c7821
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_TextDescription.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingFor_switch_DynamicMappingSwitch.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingFor_switch_DynamicMappingSwitch.gif
new file mode 100644
index 0000000000..a7ddbdbf85
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingFor_switch_DynamicMappingSwitch.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingSwitch_cases_DynamicMappingCase.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingSwitch_cases_DynamicMappingCase.gif
new file mode 100644
index 0000000000..706dc41283
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingSwitch_cases_DynamicMappingCase.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gif
new file mode 100644
index 0000000000..db7414e937
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingFor.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingFor.gif
new file mode 100644
index 0000000000..33854e98c2
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingFor.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gif
new file mode 100644
index 0000000000..d92f34c8ae
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gif
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties
index 90e160fbec..7c84624b1b 100644
--- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties
+++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties
@@ -49,3 +49,14 @@ _UI_TextDescription_valueExpression_feature = Value Expression
_UI_TextDescription_initialOperation_feature = Initial Operation
_UI_Unknown_feature = Unspecified
_UI_LabelDescription_type = Label Description
+_UI_DynamicMappingFor_type = Dynamic Mapping For
+_UI_DynamicMappingSwitch_type = Dynamic Mapping Switch
+_UI_DynamicMappingCase_type = Dynamic Mapping Case
+_UI_ContainerDescription_dynamicMappings_feature = Dynamic Mappings
+_UI_DynamicMappingFor_iterator_feature = Iterator
+_UI_DynamicMappingFor_domainClassExpression_feature = Domain Class Expression
+_UI_DynamicMappingFor_switch_feature = Switch
+_UI_DynamicMappingSwitch_switchExpression_feature = Switch Expression
+_UI_DynamicMappingSwitch_cases_feature = Cases
+_UI_DynamicMappingCase_caseExpression_feature = Case Expression
+_UI_DynamicMappingCase_widget_feature = Widget
diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java
index 290fd7eb2a..b1bc8e7fe1 100644
--- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java
+++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java
@@ -112,6 +112,7 @@ public class ContainerDescriptionItemProvider
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS);
+ childrenFeatures.add(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS);
}
return childrenFeatures;
}
@@ -171,6 +172,7 @@ public class ContainerDescriptionItemProvider
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS:
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -197,6 +199,11 @@ public class ContainerDescriptionItemProvider
(createChildParameter
(PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS,
PropertiesFactory.eINSTANCE.createLabelDescription()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PropertiesPackage.Literals.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS,
+ PropertiesFactory.eINSTANCE.createDynamicMappingFor()));
}
/**
diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java
new file mode 100644
index 0000000000..faee405bb2
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java
@@ -0,0 +1,213 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.sirius.properties.DynamicMappingCase;
+import org.eclipse.sirius.properties.PropertiesFactory;
+import org.eclipse.sirius.properties.PropertiesPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.properties.DynamicMappingCase} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DynamicMappingCaseItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingCaseItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addCaseExpressionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Case Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCaseExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DynamicMappingCase_caseExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DynamicMappingCase_caseExpression_feature", "_UI_DynamicMappingCase_type"),
+ PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DynamicMappingCase.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicMappingCase"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((DynamicMappingCase)object).getCaseExpression();
+ return label == null || label.length() == 0 ?
+ getString("_UI_DynamicMappingCase_type") :
+ getString("_UI_DynamicMappingCase_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DynamicMappingCase.class)) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET,
+ PropertiesFactory.eINSTANCE.createTextDescription()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET,
+ PropertiesFactory.eINSTANCE.createLabelDescription()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return PropertiesEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java
new file mode 100644
index 0000000000..fc5396f8df
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingForItemProvider.java
@@ -0,0 +1,232 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.sirius.properties.DynamicMappingFor;
+import org.eclipse.sirius.properties.PropertiesFactory;
+import org.eclipse.sirius.properties.PropertiesPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.properties.DynamicMappingFor} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DynamicMappingForItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingForItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addIteratorPropertyDescriptor(object);
+ addDomainClassExpressionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Iterator feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addIteratorPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DynamicMappingFor_iterator_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DynamicMappingFor_iterator_feature", "_UI_DynamicMappingFor_type"),
+ PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__ITERATOR,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Domain Class Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDomainClassExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DynamicMappingFor_domainClassExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DynamicMappingFor_domainClassExpression_feature", "_UI_DynamicMappingFor_type"),
+ PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__SWITCH);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DynamicMappingFor.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicMappingFor"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((DynamicMappingFor)object).getIterator();
+ return label == null || label.length() == 0 ?
+ getString("_UI_DynamicMappingFor_type") :
+ getString("_UI_DynamicMappingFor_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DynamicMappingFor.class)) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR:
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__SWITCH,
+ PropertiesFactory.eINSTANCE.createDynamicMappingSwitch()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return PropertiesEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java
new file mode 100644
index 0000000000..eae1c074c0
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java
@@ -0,0 +1,208 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.eclipse.sirius.properties.DynamicMappingSwitch;
+import org.eclipse.sirius.properties.PropertiesFactory;
+import org.eclipse.sirius.properties.PropertiesPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.properties.DynamicMappingSwitch} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DynamicMappingSwitchItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingSwitchItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addSwitchExpressionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Switch Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addSwitchExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DynamicMappingSwitch_switchExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DynamicMappingSwitch_switchExpression_feature", "_UI_DynamicMappingSwitch_type"),
+ PropertiesPackage.Literals.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_SWITCH__CASES);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DynamicMappingSwitch.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicMappingSwitch"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((DynamicMappingSwitch)object).getSwitchExpression();
+ return label == null || label.length() == 0 ?
+ getString("_UI_DynamicMappingSwitch_type") :
+ getString("_UI_DynamicMappingSwitch_type") + " " + label;
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DynamicMappingSwitch.class)) {
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (PropertiesPackage.Literals.DYNAMIC_MAPPING_SWITCH__CASES,
+ PropertiesFactory.eINSTANCE.createDynamicMappingCase()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return PropertiesEditPlugin.INSTANCE;
+ }
+
+}
diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java
index b8300e2b9f..2a46b1e242 100644
--- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java
+++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java
@@ -236,6 +236,75 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.DynamicMappingFor} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingForItemProvider dynamicMappingForItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.properties.DynamicMappingFor}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDynamicMappingForAdapter() {
+ if (dynamicMappingForItemProvider == null) {
+ dynamicMappingForItemProvider = new DynamicMappingForItemProvider(this);
+ }
+
+ return dynamicMappingForItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.DynamicMappingSwitch} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingSwitchItemProvider dynamicMappingSwitchItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.properties.DynamicMappingSwitch}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDynamicMappingSwitchAdapter() {
+ if (dynamicMappingSwitchItemProvider == null) {
+ dynamicMappingSwitchItemProvider = new DynamicMappingSwitchItemProvider(this);
+ }
+
+ return dynamicMappingSwitchItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.DynamicMappingCase} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingCaseItemProvider dynamicMappingCaseItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.properties.DynamicMappingCase}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDynamicMappingCaseAdapter() {
+ if (dynamicMappingCaseItemProvider == null) {
+ dynamicMappingCaseItemProvider = new DynamicMappingCaseItemProvider(this);
+ }
+
+ return dynamicMappingCaseItemProvider;
+ }
+
+ /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -340,6 +409,9 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto
if (containerDescriptionItemProvider != null) containerDescriptionItemProvider.dispose();
if (textDescriptionItemProvider != null) textDescriptionItemProvider.dispose();
if (labelDescriptionItemProvider != null) labelDescriptionItemProvider.dispose();
+ if (dynamicMappingForItemProvider != null) dynamicMappingForItemProvider.dispose();
+ if (dynamicMappingSwitchItemProvider != null) dynamicMappingSwitchItemProvider.dispose();
+ if (dynamicMappingCaseItemProvider != null) dynamicMappingCaseItemProvider.dispose();
}
/**
diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore
index ec77a622f1..35453f902a 100644
--- a/incubation/org.eclipse.sirius.properties/model/properties.ecore
+++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore
@@ -39,6 +39,8 @@
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="widgets" upperBound="-1"
eType="#//WidgetDescription" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="dynamicMappings" upperBound="-1"
+ eType="#//DynamicMappingFor" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WidgetDescription" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" lowerBound="1"
@@ -52,4 +54,24 @@
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="LabelDescription" eSuperTypes="#//WidgetDescription"/>
+ <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingFor">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="iterator" lowerBound="1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainClassExpression"
+ lowerBound="1" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="switch" lowerBound="1"
+ eType="#//DynamicMappingSwitch" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingSwitch">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="switchExpression" lowerBound="1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="cases" lowerBound="1" upperBound="-1"
+ eType="#//DynamicMappingCase" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingCase">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="caseExpression" lowerBound="1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="widget" lowerBound="1"
+ eType="#//WidgetDescription" containment="true"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java
index 81839f4613..72dde02eef 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java
@@ -25,6 +25,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.sirius.properties.ContainerDescription#getIdentifier <em>Identifier</em>}</li>
* <li>{@link org.eclipse.sirius.properties.ContainerDescription#getWidgets <em>Widgets</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings <em>Dynamic Mappings</em>}</li>
* </ul>
* </p>
*
@@ -75,4 +76,20 @@ public interface ContainerDescription extends EObject {
*/
EList<WidgetDescription> getWidgets();
+ /**
+ * Returns the value of the '<em><b>Dynamic Mappings</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.sirius.properties.DynamicMappingFor}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Dynamic Mappings</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Dynamic Mappings</em>' containment reference list.
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getContainerDescription_DynamicMappings()
+ * @model containment="true"
+ * @generated
+ */
+ EList<DynamicMappingFor> getDynamicMappings();
+
} // ContainerDescription
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingCase.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingCase.java
new file mode 100644
index 0000000000..43aa0ebe60
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingCase.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Dynamic Mapping Case</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression <em>Case Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingCase#getWidget <em>Widget</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingCase()
+ * @model
+ * @generated
+ */
+public interface DynamicMappingCase extends EObject {
+ /**
+ * Returns the value of the '<em><b>Case Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Case Expression</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Case Expression</em>' attribute.
+ * @see #setCaseExpression(String)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingCase_CaseExpression()
+ * @model required="true"
+ * @generated
+ */
+ String getCaseExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression <em>Case Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Case Expression</em>' attribute.
+ * @see #getCaseExpression()
+ * @generated
+ */
+ void setCaseExpression(String value);
+
+ /**
+ * Returns the value of the '<em><b>Widget</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Widget</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Widget</em>' containment reference.
+ * @see #setWidget(WidgetDescription)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingCase_Widget()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ WidgetDescription getWidget();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingCase#getWidget <em>Widget</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Widget</em>' containment reference.
+ * @see #getWidget()
+ * @generated
+ */
+ void setWidget(WidgetDescription value);
+
+} // DynamicMappingCase
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java
new file mode 100644
index 0000000000..1fb543701e
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Dynamic Mapping For</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingFor#getIterator <em>Iterator</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingFor#getDomainClassExpression <em>Domain Class Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingFor#getSwitch <em>Switch</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor()
+ * @model
+ * @generated
+ */
+public interface DynamicMappingFor extends EObject {
+ /**
+ * Returns the value of the '<em><b>Iterator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Iterator</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Iterator</em>' attribute.
+ * @see #setIterator(String)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor_Iterator()
+ * @model required="true"
+ * @generated
+ */
+ String getIterator();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingFor#getIterator <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Iterator</em>' attribute.
+ * @see #getIterator()
+ * @generated
+ */
+ void setIterator(String value);
+
+ /**
+ * Returns the value of the '<em><b>Domain Class Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Domain Class Expression</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Domain Class Expression</em>' attribute.
+ * @see #setDomainClassExpression(String)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor_DomainClassExpression()
+ * @model required="true"
+ * @generated
+ */
+ String getDomainClassExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingFor#getDomainClassExpression <em>Domain Class Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Domain Class Expression</em>' attribute.
+ * @see #getDomainClassExpression()
+ * @generated
+ */
+ void setDomainClassExpression(String value);
+
+ /**
+ * Returns the value of the '<em><b>Switch</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Switch</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Switch</em>' containment reference.
+ * @see #setSwitch(DynamicMappingSwitch)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor_Switch()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ DynamicMappingSwitch getSwitch();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingFor#getSwitch <em>Switch</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Switch</em>' containment reference.
+ * @see #getSwitch()
+ * @generated
+ */
+ void setSwitch(DynamicMappingSwitch value);
+
+} // DynamicMappingFor
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java
new file mode 100644
index 0000000000..80d848176a
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Dynamic Mapping Switch</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingSwitch#getSwitchExpression <em>Switch Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingSwitch#getCases <em>Cases</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingSwitch()
+ * @model
+ * @generated
+ */
+public interface DynamicMappingSwitch extends EObject {
+ /**
+ * Returns the value of the '<em><b>Switch Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Switch Expression</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Switch Expression</em>' attribute.
+ * @see #setSwitchExpression(String)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingSwitch_SwitchExpression()
+ * @model required="true"
+ * @generated
+ */
+ String getSwitchExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.properties.DynamicMappingSwitch#getSwitchExpression <em>Switch Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Switch Expression</em>' attribute.
+ * @see #getSwitchExpression()
+ * @generated
+ */
+ void setSwitchExpression(String value);
+
+ /**
+ * Returns the value of the '<em><b>Cases</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.sirius.properties.DynamicMappingCase}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Cases</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Cases</em>' containment reference list.
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingSwitch_Cases()
+ * @model containment="true" required="true"
+ * @generated
+ */
+ EList<DynamicMappingCase> getCases();
+
+} // DynamicMappingSwitch
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java
index 528ad16845..6711358ba0 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java
@@ -85,6 +85,33 @@ public interface PropertiesFactory extends EFactory {
LabelDescription createLabelDescription();
/**
+ * Returns a new object of class '<em>Dynamic Mapping For</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Dynamic Mapping For</em>'.
+ * @generated
+ */
+ DynamicMappingFor createDynamicMappingFor();
+
+ /**
+ * Returns a new object of class '<em>Dynamic Mapping Switch</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Dynamic Mapping Switch</em>'.
+ * @generated
+ */
+ DynamicMappingSwitch createDynamicMappingSwitch();
+
+ /**
+ * Returns a new object of class '<em>Dynamic Mapping Case</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Dynamic Mapping Case</em>'.
+ * @generated
+ */
+ DynamicMappingCase createDynamicMappingCase();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java
index 2f3dcc3796..f613a49e2f 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java
@@ -296,13 +296,22 @@ public interface PropertiesPackage extends EPackage {
int CONTAINER_DESCRIPTION__WIDGETS = 1;
/**
+ * The feature id for the '<em><b>Dynamic Mappings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS = 2;
+
+ /**
* The number of structural features of the '<em>Container Description</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CONTAINER_DESCRIPTION_FEATURE_COUNT = 2;
+ int CONTAINER_DESCRIPTION_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl <em>Widget Description</em>}' class.
@@ -436,6 +445,127 @@ public interface PropertiesPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor()
+ * @generated
+ */
+ int DYNAMIC_MAPPING_FOR = 7;
+
+ /**
+ * The feature id for the '<em><b>Iterator</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_FOR__ITERATOR = 0;
+
+ /**
+ * The feature id for the '<em><b>Domain Class Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = 1;
+
+ /**
+ * The feature id for the '<em><b>Switch</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_FOR__SWITCH = 2;
+
+ /**
+ * The number of structural features of the '<em>Dynamic Mapping For</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_FOR_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl <em>Dynamic Mapping Switch</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingSwitch()
+ * @generated
+ */
+ int DYNAMIC_MAPPING_SWITCH = 8;
+
+ /**
+ * The feature id for the '<em><b>Switch Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = 0;
+
+ /**
+ * The feature id for the '<em><b>Cases</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_SWITCH__CASES = 1;
+
+ /**
+ * The number of structural features of the '<em>Dynamic Mapping Switch</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_SWITCH_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl <em>Dynamic Mapping Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase()
+ * @generated
+ */
+ int DYNAMIC_MAPPING_CASE = 9;
+
+ /**
+ * The feature id for the '<em><b>Case Expression</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = 0;
+
+ /**
+ * The feature id for the '<em><b>Widget</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_CASE__WIDGET = 1;
+
+ /**
+ * The number of structural features of the '<em>Dynamic Mapping Case</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DYNAMIC_MAPPING_CASE_FEATURE_COUNT = 2;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.sirius.properties.ViewExtensionDescription <em>View Extension Description</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -674,6 +804,17 @@ public interface PropertiesPackage extends EPackage {
EReference getContainerDescription_Widgets();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings <em>Dynamic Mappings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Dynamic Mappings</em>'.
+ * @see org.eclipse.sirius.properties.ContainerDescription#getDynamicMappings()
+ * @see #getContainerDescription()
+ * @generated
+ */
+ EReference getContainerDescription_DynamicMappings();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.sirius.properties.WidgetDescription <em>Widget Description</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -748,6 +889,113 @@ public interface PropertiesPackage extends EPackage {
EClass getLabelDescription();
/**
+ * Returns the meta object for class '{@link org.eclipse.sirius.properties.DynamicMappingFor <em>Dynamic Mapping For</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Dynamic Mapping For</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingFor
+ * @generated
+ */
+ EClass getDynamicMappingFor();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.DynamicMappingFor#getIterator <em>Iterator</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Iterator</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingFor#getIterator()
+ * @see #getDynamicMappingFor()
+ * @generated
+ */
+ EAttribute getDynamicMappingFor_Iterator();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.DynamicMappingFor#getDomainClassExpression <em>Domain Class Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Domain Class Expression</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingFor#getDomainClassExpression()
+ * @see #getDynamicMappingFor()
+ * @generated
+ */
+ EAttribute getDynamicMappingFor_DomainClassExpression();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.sirius.properties.DynamicMappingFor#getSwitch <em>Switch</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Switch</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingFor#getSwitch()
+ * @see #getDynamicMappingFor()
+ * @generated
+ */
+ EReference getDynamicMappingFor_Switch();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.sirius.properties.DynamicMappingSwitch <em>Dynamic Mapping Switch</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Dynamic Mapping Switch</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingSwitch
+ * @generated
+ */
+ EClass getDynamicMappingSwitch();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.DynamicMappingSwitch#getSwitchExpression <em>Switch Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Switch Expression</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingSwitch#getSwitchExpression()
+ * @see #getDynamicMappingSwitch()
+ * @generated
+ */
+ EAttribute getDynamicMappingSwitch_SwitchExpression();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.sirius.properties.DynamicMappingSwitch#getCases <em>Cases</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Cases</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingSwitch#getCases()
+ * @see #getDynamicMappingSwitch()
+ * @generated
+ */
+ EReference getDynamicMappingSwitch_Cases();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.sirius.properties.DynamicMappingCase <em>Dynamic Mapping Case</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Dynamic Mapping Case</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingCase
+ * @generated
+ */
+ EClass getDynamicMappingCase();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression <em>Case Expression</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Case Expression</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression()
+ * @see #getDynamicMappingCase()
+ * @generated
+ */
+ EAttribute getDynamicMappingCase_CaseExpression();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.sirius.properties.DynamicMappingCase#getWidget <em>Widget</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Widget</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingCase#getWidget()
+ * @see #getDynamicMappingCase()
+ * @generated
+ */
+ EReference getDynamicMappingCase_Widget();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -954,6 +1202,14 @@ public interface PropertiesPackage extends EPackage {
EReference CONTAINER_DESCRIPTION__WIDGETS = eINSTANCE.getContainerDescription_Widgets();
/**
+ * The meta object literal for the '<em><b>Dynamic Mappings</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS = eINSTANCE.getContainerDescription_DynamicMappings();
+
+ /**
* The meta object literal for the '{@link org.eclipse.sirius.properties.impl.WidgetDescriptionImpl <em>Widget Description</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1015,6 +1271,92 @@ public interface PropertiesPackage extends EPackage {
*/
EClass LABEL_DESCRIPTION = eINSTANCE.getLabelDescription();
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor()
+ * @generated
+ */
+ EClass DYNAMIC_MAPPING_FOR = eINSTANCE.getDynamicMappingFor();
+
+ /**
+ * The meta object literal for the '<em><b>Iterator</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DYNAMIC_MAPPING_FOR__ITERATOR = eINSTANCE.getDynamicMappingFor_Iterator();
+
+ /**
+ * The meta object literal for the '<em><b>Domain Class Expression</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = eINSTANCE.getDynamicMappingFor_DomainClassExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Switch</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DYNAMIC_MAPPING_FOR__SWITCH = eINSTANCE.getDynamicMappingFor_Switch();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl <em>Dynamic Mapping Switch</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingSwitch()
+ * @generated
+ */
+ EClass DYNAMIC_MAPPING_SWITCH = eINSTANCE.getDynamicMappingSwitch();
+
+ /**
+ * The meta object literal for the '<em><b>Switch Expression</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = eINSTANCE.getDynamicMappingSwitch_SwitchExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Cases</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DYNAMIC_MAPPING_SWITCH__CASES = eINSTANCE.getDynamicMappingSwitch_Cases();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl <em>Dynamic Mapping Case</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase()
+ * @generated
+ */
+ EClass DYNAMIC_MAPPING_CASE = eINSTANCE.getDynamicMappingCase();
+
+ /**
+ * The meta object literal for the '<em><b>Case Expression</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = eINSTANCE.getDynamicMappingCase_CaseExpression();
+
+ /**
+ * The meta object literal for the '<em><b>Widget</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DYNAMIC_MAPPING_CASE__WIDGET = eINSTANCE.getDynamicMappingCase_Widget();
+
}
} //PropertiesPackage
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java
index e460822498..194378e647 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java
@@ -12,22 +12,17 @@
package org.eclipse.sirius.properties.impl;
import java.util.Collection;
-
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
-
import org.eclipse.emf.common.util.EList;
-
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
-
import org.eclipse.sirius.properties.ContainerDescription;
+import org.eclipse.sirius.properties.DynamicMappingFor;
import org.eclipse.sirius.properties.PropertiesPackage;
import org.eclipse.sirius.properties.WidgetDescription;
@@ -40,6 +35,7 @@ import org.eclipse.sirius.properties.WidgetDescription;
* <ul>
* <li>{@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getIdentifier <em>Identifier</em>}</li>
* <li>{@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getWidgets <em>Widgets</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.ContainerDescriptionImpl#getDynamicMappings <em>Dynamic Mappings</em>}</li>
* </ul>
* </p>
*
@@ -77,6 +73,16 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
protected EList<WidgetDescription> widgets;
/**
+ * The cached value of the '{@link #getDynamicMappings() <em>Dynamic Mappings</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDynamicMappings()
+ * @generated
+ * @ordered
+ */
+ protected EList<DynamicMappingFor> dynamicMappings;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -133,11 +139,25 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
* <!-- end-user-doc -->
* @generated
*/
+ public EList<DynamicMappingFor> getDynamicMappings() {
+ if (dynamicMappings == null) {
+ dynamicMappings = new EObjectContainmentEList<DynamicMappingFor>(DynamicMappingFor.class, this, PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS);
+ }
+ return dynamicMappings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS:
return ((InternalEList<?>)getWidgets()).basicRemove(otherEnd, msgs);
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
+ return ((InternalEList<?>)getDynamicMappings()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -154,6 +174,8 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
return getIdentifier();
case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS:
return getWidgets();
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
+ return getDynamicMappings();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -174,6 +196,10 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
getWidgets().clear();
getWidgets().addAll((Collection<? extends WidgetDescription>)newValue);
return;
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
+ getDynamicMappings().clear();
+ getDynamicMappings().addAll((Collection<? extends DynamicMappingFor>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -192,6 +218,9 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS:
getWidgets().clear();
return;
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
+ getDynamicMappings().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -208,6 +237,8 @@ public class ContainerDescriptionImpl extends MinimalEObjectImpl.Container imple
return IDENTIFIER_EDEFAULT == null ? identifier != null : !IDENTIFIER_EDEFAULT.equals(identifier);
case PropertiesPackage.CONTAINER_DESCRIPTION__WIDGETS:
return widgets != null && !widgets.isEmpty();
+ case PropertiesPackage.CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS:
+ return dynamicMappings != null && !dynamicMappings.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingCaseImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingCaseImpl.java
new file mode 100644
index 0000000000..091700871e
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingCaseImpl.java
@@ -0,0 +1,253 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.sirius.properties.DynamicMappingCase;
+import org.eclipse.sirius.properties.PropertiesPackage;
+import org.eclipse.sirius.properties.WidgetDescription;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Dynamic Mapping Case</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl#getCaseExpression <em>Case Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl#getWidget <em>Widget</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container implements DynamicMappingCase {
+ /**
+ * The default value of the '{@link #getCaseExpression() <em>Case Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCaseExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String CASE_EXPRESSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getCaseExpression() <em>Case Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCaseExpression()
+ * @generated
+ * @ordered
+ */
+ protected String caseExpression = CASE_EXPRESSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getWidget() <em>Widget</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getWidget()
+ * @generated
+ * @ordered
+ */
+ protected WidgetDescription widget;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingCaseImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCaseExpression() {
+ return caseExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCaseExpression(String newCaseExpression) {
+ String oldCaseExpression = caseExpression;
+ caseExpression = newCaseExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION, oldCaseExpression, caseExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public WidgetDescription getWidget() {
+ return widget;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetWidget(WidgetDescription newWidget, NotificationChain msgs) {
+ WidgetDescription oldWidget = widget;
+ widget = newWidget;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, oldWidget, newWidget);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setWidget(WidgetDescription newWidget) {
+ if (newWidget != widget) {
+ NotificationChain msgs = null;
+ if (widget != null)
+ msgs = ((InternalEObject)widget).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, null, msgs);
+ if (newWidget != null)
+ msgs = ((InternalEObject)newWidget).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, null, msgs);
+ msgs = basicSetWidget(newWidget, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, newWidget, newWidget));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ return basicSetWidget(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ return getCaseExpression();
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ return getWidget();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ setCaseExpression((String)newValue);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ setWidget((WidgetDescription)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ setCaseExpression(CASE_EXPRESSION_EDEFAULT);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ setWidget((WidgetDescription)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ return CASE_EXPRESSION_EDEFAULT == null ? caseExpression != null : !CASE_EXPRESSION_EDEFAULT.equals(caseExpression);
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ return widget != null;
+ }
+ 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(" (caseExpression: ");
+ result.append(caseExpression);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DynamicMappingCaseImpl
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java
new file mode 100644
index 0000000000..178bdd3a16
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java
@@ -0,0 +1,307 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.sirius.properties.DynamicMappingFor;
+import org.eclipse.sirius.properties.DynamicMappingSwitch;
+import org.eclipse.sirius.properties.PropertiesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Dynamic Mapping For</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl#getIterator <em>Iterator</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl#getDomainClassExpression <em>Domain Class Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl#getSwitch <em>Switch</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implements DynamicMappingFor {
+ /**
+ * The default value of the '{@link #getIterator() <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIterator()
+ * @generated
+ * @ordered
+ */
+ protected static final String ITERATOR_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getIterator() <em>Iterator</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIterator()
+ * @generated
+ * @ordered
+ */
+ protected String iterator = ITERATOR_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getDomainClassExpression() <em>Domain Class Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDomainClassExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String DOMAIN_CLASS_EXPRESSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getDomainClassExpression() <em>Domain Class Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDomainClassExpression()
+ * @generated
+ * @ordered
+ */
+ protected String domainClassExpression = DOMAIN_CLASS_EXPRESSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getSwitch() <em>Switch</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSwitch()
+ * @generated
+ * @ordered
+ */
+ protected DynamicMappingSwitch switch_;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingForImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getIterator() {
+ return iterator;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIterator(String newIterator) {
+ String oldIterator = iterator;
+ iterator = newIterator;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR, oldIterator, iterator));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getDomainClassExpression() {
+ return domainClassExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDomainClassExpression(String newDomainClassExpression) {
+ String oldDomainClassExpression = domainClassExpression;
+ domainClassExpression = newDomainClassExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION, oldDomainClassExpression, domainClassExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingSwitch getSwitch() {
+ return switch_;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSwitch(DynamicMappingSwitch newSwitch, NotificationChain msgs) {
+ DynamicMappingSwitch oldSwitch = switch_;
+ switch_ = newSwitch;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH, oldSwitch, newSwitch);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSwitch(DynamicMappingSwitch newSwitch) {
+ if (newSwitch != switch_) {
+ NotificationChain msgs = null;
+ if (switch_ != null)
+ msgs = ((InternalEObject)switch_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH, null, msgs);
+ if (newSwitch != null)
+ msgs = ((InternalEObject)newSwitch).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH, null, msgs);
+ msgs = basicSetSwitch(newSwitch, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH, newSwitch, newSwitch));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ return basicSetSwitch(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR:
+ return getIterator();
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
+ return getDomainClassExpression();
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ return getSwitch();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR:
+ setIterator((String)newValue);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
+ setDomainClassExpression((String)newValue);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ setSwitch((DynamicMappingSwitch)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR:
+ setIterator(ITERATOR_EDEFAULT);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
+ setDomainClassExpression(DOMAIN_CLASS_EXPRESSION_EDEFAULT);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ setSwitch((DynamicMappingSwitch)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR:
+ return ITERATOR_EDEFAULT == null ? iterator != null : !ITERATOR_EDEFAULT.equals(iterator);
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
+ return DOMAIN_CLASS_EXPRESSION_EDEFAULT == null ? domainClassExpression != null : !DOMAIN_CLASS_EXPRESSION_EDEFAULT.equals(domainClassExpression);
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ return switch_ != null;
+ }
+ 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(" (iterator: ");
+ result.append(iterator);
+ result.append(", domainClassExpression: ");
+ result.append(domainClassExpression);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DynamicMappingForImpl
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java
new file mode 100644
index 0000000000..810894ca31
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2015 Obeo.
+ * 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:
+ * Obeo - initial API and implementation
+ *
+ */
+package org.eclipse.sirius.properties.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.sirius.properties.DynamicMappingCase;
+import org.eclipse.sirius.properties.DynamicMappingSwitch;
+import org.eclipse.sirius.properties.PropertiesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Dynamic Mapping Switch</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl#getSwitchExpression <em>Switch Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl#getCases <em>Cases</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DynamicMappingSwitchImpl extends MinimalEObjectImpl.Container implements DynamicMappingSwitch {
+ /**
+ * The default value of the '{@link #getSwitchExpression() <em>Switch Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSwitchExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String SWITCH_EXPRESSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSwitchExpression() <em>Switch Expression</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSwitchExpression()
+ * @generated
+ * @ordered
+ */
+ protected String switchExpression = SWITCH_EXPRESSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getCases() <em>Cases</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCases()
+ * @generated
+ * @ordered
+ */
+ protected EList<DynamicMappingCase> cases;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DynamicMappingSwitchImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return PropertiesPackage.Literals.DYNAMIC_MAPPING_SWITCH;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSwitchExpression() {
+ return switchExpression;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSwitchExpression(String newSwitchExpression) {
+ String oldSwitchExpression = switchExpression;
+ switchExpression = newSwitchExpression;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION, oldSwitchExpression, switchExpression));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<DynamicMappingCase> getCases() {
+ if (cases == null) {
+ cases = new EObjectContainmentEList<DynamicMappingCase>(DynamicMappingCase.class, this, PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES);
+ }
+ return cases;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ return ((InternalEList<?>)getCases()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION:
+ return getSwitchExpression();
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ return getCases();
+ }
+ 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 PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION:
+ setSwitchExpression((String)newValue);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ getCases().clear();
+ getCases().addAll((Collection<? extends DynamicMappingCase>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION:
+ setSwitchExpression(SWITCH_EXPRESSION_EDEFAULT);
+ return;
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ getCases().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION:
+ return SWITCH_EXPRESSION_EDEFAULT == null ? switchExpression != null : !SWITCH_EXPRESSION_EDEFAULT.equals(switchExpression);
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES:
+ return cases != null && !cases.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(" (switchExpression: ");
+ result.append(switchExpression);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DynamicMappingSwitchImpl
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java
index b1d6689a0d..518da62798 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java
@@ -71,6 +71,9 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac
case PropertiesPackage.CONTAINER_DESCRIPTION: return createContainerDescription();
case PropertiesPackage.TEXT_DESCRIPTION: return createTextDescription();
case PropertiesPackage.LABEL_DESCRIPTION: return createLabelDescription();
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR: return createDynamicMappingFor();
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH: return createDynamicMappingSwitch();
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE: return createDynamicMappingCase();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -141,6 +144,36 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac
* <!-- end-user-doc -->
* @generated
*/
+ public DynamicMappingFor createDynamicMappingFor() {
+ DynamicMappingForImpl dynamicMappingFor = new DynamicMappingForImpl();
+ return dynamicMappingFor;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingSwitch createDynamicMappingSwitch() {
+ DynamicMappingSwitchImpl dynamicMappingSwitch = new DynamicMappingSwitchImpl();
+ return dynamicMappingSwitch;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DynamicMappingCase createDynamicMappingCase() {
+ DynamicMappingCaseImpl dynamicMappingCase = new DynamicMappingCaseImpl();
+ return dynamicMappingCase;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public PropertiesPackage getPropertiesPackage() {
return (PropertiesPackage)getEPackage();
}
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java
index 52db0ac19e..2bac2d71ff 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java
@@ -20,6 +20,9 @@ import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.sirius.properties.ContainerDescription;
+import org.eclipse.sirius.properties.DynamicMappingCase;
+import org.eclipse.sirius.properties.DynamicMappingFor;
+import org.eclipse.sirius.properties.DynamicMappingSwitch;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -92,6 +95,27 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
private EClass labelDescriptionEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass dynamicMappingForEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass dynamicMappingSwitchEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass dynamicMappingCaseEClass = 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.
@@ -358,6 +382,15 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getContainerDescription_DynamicMappings() {
+ return (EReference)containerDescriptionEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getWidgetDescription() {
return widgetDescriptionEClass;
}
@@ -421,6 +454,96 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getDynamicMappingFor() {
+ return dynamicMappingForEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDynamicMappingFor_Iterator() {
+ return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDynamicMappingFor_DomainClassExpression() {
+ return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDynamicMappingFor_Switch() {
+ return (EReference)dynamicMappingForEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDynamicMappingSwitch() {
+ return dynamicMappingSwitchEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDynamicMappingSwitch_SwitchExpression() {
+ return (EAttribute)dynamicMappingSwitchEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDynamicMappingSwitch_Cases() {
+ return (EReference)dynamicMappingSwitchEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDynamicMappingCase() {
+ return dynamicMappingCaseEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDynamicMappingCase_CaseExpression() {
+ return (EAttribute)dynamicMappingCaseEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDynamicMappingCase_Widget() {
+ return (EReference)dynamicMappingCaseEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public PropertiesFactory getPropertiesFactory() {
return (PropertiesFactory)getEFactoryInstance();
}
@@ -469,6 +592,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
containerDescriptionEClass = createEClass(CONTAINER_DESCRIPTION);
createEAttribute(containerDescriptionEClass, CONTAINER_DESCRIPTION__IDENTIFIER);
createEReference(containerDescriptionEClass, CONTAINER_DESCRIPTION__WIDGETS);
+ createEReference(containerDescriptionEClass, CONTAINER_DESCRIPTION__DYNAMIC_MAPPINGS);
widgetDescriptionEClass = createEClass(WIDGET_DESCRIPTION);
createEAttribute(widgetDescriptionEClass, WIDGET_DESCRIPTION__IDENTIFIER);
@@ -479,6 +603,19 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
createEReference(textDescriptionEClass, TEXT_DESCRIPTION__INITIAL_OPERATION);
labelDescriptionEClass = createEClass(LABEL_DESCRIPTION);
+
+ dynamicMappingForEClass = createEClass(DYNAMIC_MAPPING_FOR);
+ createEAttribute(dynamicMappingForEClass, DYNAMIC_MAPPING_FOR__ITERATOR);
+ createEAttribute(dynamicMappingForEClass, DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION);
+ createEReference(dynamicMappingForEClass, DYNAMIC_MAPPING_FOR__SWITCH);
+
+ dynamicMappingSwitchEClass = createEClass(DYNAMIC_MAPPING_SWITCH);
+ createEAttribute(dynamicMappingSwitchEClass, DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION);
+ createEReference(dynamicMappingSwitchEClass, DYNAMIC_MAPPING_SWITCH__CASES);
+
+ dynamicMappingCaseEClass = createEClass(DYNAMIC_MAPPING_CASE);
+ createEAttribute(dynamicMappingCaseEClass, DYNAMIC_MAPPING_CASE__CASE_EXPRESSION);
+ createEReference(dynamicMappingCaseEClass, DYNAMIC_MAPPING_CASE__WIDGET);
}
/**
@@ -544,6 +681,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
initEClass(containerDescriptionEClass, ContainerDescription.class, "ContainerDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getContainerDescription_Identifier(), ecorePackage.getEString(), "identifier", null, 1, 1, ContainerDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getContainerDescription_Widgets(), this.getWidgetDescription(), null, "widgets", null, 0, -1, ContainerDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getContainerDescription_DynamicMappings(), this.getDynamicMappingFor(), null, "dynamicMappings", null, 0, -1, ContainerDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(widgetDescriptionEClass, WidgetDescription.class, "WidgetDescription", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getWidgetDescription_Identifier(), ecorePackage.getEString(), "identifier", null, 1, 1, WidgetDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -555,6 +693,19 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
initEClass(labelDescriptionEClass, LabelDescription.class, "LabelDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEClass(dynamicMappingForEClass, DynamicMappingFor.class, "DynamicMappingFor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDynamicMappingFor_Iterator(), theEcorePackage.getEString(), "iterator", null, 1, 1, DynamicMappingFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getDynamicMappingFor_DomainClassExpression(), theEcorePackage.getEString(), "domainClassExpression", null, 1, 1, DynamicMappingFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDynamicMappingFor_Switch(), this.getDynamicMappingSwitch(), null, "switch", null, 1, 1, DynamicMappingFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(dynamicMappingSwitchEClass, DynamicMappingSwitch.class, "DynamicMappingSwitch", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDynamicMappingSwitch_SwitchExpression(), theEcorePackage.getEString(), "switchExpression", null, 1, 1, DynamicMappingSwitch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDynamicMappingSwitch_Cases(), this.getDynamicMappingCase(), null, "cases", null, 1, -1, DynamicMappingSwitch.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(dynamicMappingCaseEClass, DynamicMappingCase.class, "DynamicMappingCase", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDynamicMappingCase_CaseExpression(), theEcorePackage.getEString(), "caseExpression", null, 1, 1, DynamicMappingCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDynamicMappingCase_Widget(), this.getWidgetDescription(), null, "widget", null, 1, 1, DynamicMappingCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java
index 8d009379f6..8a2d72326f 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java
@@ -107,6 +107,18 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl {
return createLabelDescriptionAdapter();
}
@Override
+ public Adapter caseDynamicMappingFor(DynamicMappingFor object) {
+ return createDynamicMappingForAdapter();
+ }
+ @Override
+ public Adapter caseDynamicMappingSwitch(DynamicMappingSwitch object) {
+ return createDynamicMappingSwitchAdapter();
+ }
+ @Override
+ public Adapter caseDynamicMappingCase(DynamicMappingCase object) {
+ return createDynamicMappingCaseAdapter();
+ }
+ @Override
public Adapter caseExtension(Extension object) {
return createExtensionAdapter();
}
@@ -229,6 +241,48 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingFor <em>Dynamic Mapping For</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.sirius.properties.DynamicMappingFor
+ * @generated
+ */
+ public Adapter createDynamicMappingForAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingSwitch <em>Dynamic Mapping Switch</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.sirius.properties.DynamicMappingSwitch
+ * @generated
+ */
+ public Adapter createDynamicMappingSwitchAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingCase <em>Dynamic Mapping Case</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.sirius.properties.DynamicMappingCase
+ * @generated
+ */
+ public Adapter createDynamicMappingCaseAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.sirius.viewpoint.description.Extension <em>Extension</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java
index 670a2cc148..ee822b44fc 100644
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java
+++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java
@@ -139,6 +139,24 @@ public class PropertiesSwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR: {
+ DynamicMappingFor dynamicMappingFor = (DynamicMappingFor)theEObject;
+ T result = caseDynamicMappingFor(dynamicMappingFor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PropertiesPackage.DYNAMIC_MAPPING_SWITCH: {
+ DynamicMappingSwitch dynamicMappingSwitch = (DynamicMappingSwitch)theEObject;
+ T result = caseDynamicMappingSwitch(dynamicMappingSwitch);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case PropertiesPackage.DYNAMIC_MAPPING_CASE: {
+ DynamicMappingCase dynamicMappingCase = (DynamicMappingCase)theEObject;
+ T result = caseDynamicMappingCase(dynamicMappingCase);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -249,6 +267,51 @@ public class PropertiesSwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping For</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>Dynamic Mapping For</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDynamicMappingFor(DynamicMappingFor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping Switch</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>Dynamic Mapping Switch</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDynamicMappingSwitch(DynamicMappingSwitch object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping Case</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>Dynamic Mapping Case</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDynamicMappingCase(DynamicMappingCase object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Extension</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/incubation/org.eclipse.sirius.sample.properties/description/project.odesign b/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
index 1e27ee55ed..8c8c5ff460 100644
--- a/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
+++ b/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
@@ -84,9 +84,14 @@
<extensions
xsi:type="properties:ViewExtensionDescription"
identifier="Properties"
- defaultPage="//@extensions.0/@pages.0"
+ defaultPage="//@extensions.0/@pages.1"
labelExpression="aql:self.name"
preconditionExpression="">
+ <pages identifier="eclass"
+ labelExpression="aql:self.name"
+ domainClass="ecore.EClass"
+ semanticCandidateExpression="var:self"
+ groups="//@extensions.0/@groups.1"/>
<pages identifier="All EClass attributes"
labelExpression="aql:self.name"
domainClass="ecore.EAttribute"
@@ -121,5 +126,36 @@
labelExpression="feature:name"/>
</container>
</groups>
+ <groups
+ identifier="EClass Dynamic Mapping"
+ labelExpression="aql:self.name"
+ domainClass="ecore.EClass"
+ semanticCandidateExpression="var:self">
+ <container
+ identifier="container dynamic mapping">
+ <dynamicMappings
+ iterator="eStructuralFeature"
+ domainClassExpression="aql:self.eClass().eAllStructuralFeatures">
+ <switch
+ switchExpression="aql:eStructuralFeature.eType.name">
+ <cases
+ caseExpression="EString">
+ <widget
+ xsi:type="properties:TextDescription"
+ identifier=""
+ labelExpression="aql:eStructuralFeature.name"
+ valueExpression="aql:self.eGet(eStructuralFeature)">
+ <initialOperation>
+ <firstModelOperations
+ xsi:type="tool:SetValue"
+ featureName="aql:eStructuralFeature.name"
+ valueExpression="aql:newValue"/>
+ </initialOperation>
+ </widget>
+ </cases>
+ </switch>
+ </dynamicMappings>
+ </container>
+ </groups>
</extensions>
</description:Group>
diff --git a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/ViewDescriptionConverter.java b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/ViewDescriptionConverter.java
index 6b67ed876c..90c640a138 100644
--- a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/ViewDescriptionConverter.java
+++ b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/ViewDescriptionConverter.java
@@ -17,6 +17,9 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.eclipse.eef.EEFContainerDescription;
+import org.eclipse.eef.EEFDynamicMappingCase;
+import org.eclipse.eef.EEFDynamicMappingFor;
+import org.eclipse.eef.EEFDynamicMappingSwitch;
import org.eclipse.eef.EEFGroupDescription;
import org.eclipse.eef.EEFLabelDescription;
import org.eclipse.eef.EEFPageDescription;
@@ -30,6 +33,9 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.sirius.business.api.session.Session;
import org.eclipse.sirius.common.interpreter.api.IEvaluationResult;
import org.eclipse.sirius.common.interpreter.api.IInterpreter;
+import org.eclipse.sirius.properties.DynamicMappingCase;
+import org.eclipse.sirius.properties.DynamicMappingFor;
+import org.eclipse.sirius.properties.DynamicMappingSwitch;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -163,6 +169,32 @@ public class ViewDescriptionConverter {
}
}
+ for (DynamicMappingFor dynamicMappingFor : groupDescription.getContainer().getDynamicMappings()) {
+ EEFDynamicMappingFor eefDynamicMappingFor = EefFactory.eINSTANCE.createEEFDynamicMappingFor();
+ eefDynamicMappingFor.setDomainClassExpression(dynamicMappingFor.getDomainClassExpression());
+ eefDynamicMappingFor.setIterator(dynamicMappingFor.getIterator());
+
+ DynamicMappingSwitch dynamicMappingSwitch = dynamicMappingFor.getSwitch();
+ EEFDynamicMappingSwitch eefDynamicMappingSwitch = EefFactory.eINSTANCE.createEEFDynamicMappingSwitch();
+ eefDynamicMappingSwitch.setSwitchExpression(dynamicMappingSwitch.getSwitchExpression());
+ eefDynamicMappingFor.setSwitch(eefDynamicMappingSwitch);
+
+ for (DynamicMappingCase dynamicMappingCase : dynamicMappingSwitch.getCases()) {
+ EEFDynamicMappingCase eefDynamicMappingCase = EefFactory.eINSTANCE.createEEFDynamicMappingCase();
+ eefDynamicMappingCase.setCaseExpression(dynamicMappingCase.getCaseExpression());
+
+ if (dynamicMappingCase.getWidget() instanceof TextDescription) {
+ eefDynamicMappingCase.setWidget(createEEFTextDescription((TextDescription) dynamicMappingCase.getWidget()));
+ } else if (dynamicMappingCase.getWidget() instanceof LabelDescription) {
+ eefDynamicMappingCase.setWidget(createEEFLabelDescription((LabelDescription) dynamicMappingCase.getWidget()));
+ }
+
+ eefDynamicMappingSwitch.getCases().add(eefDynamicMappingCase);
+ }
+
+ containerDesc.getDynamicMappings().add(eefDynamicMappingFor);
+ }
+
group.setContainer(containerDesc);
}

Back to the top