Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2016-02-18 13:46:05 +0000
committerPierre-Charles David2016-02-18 13:46:05 +0000
commitc328957cf6a17b54234a998b1923f84026171b0f (patch)
tree86708b43ac7cb33f063eaf8eaefcbe632c0b8087
parent84c5183ef0e3296da08828a2b1ed48db7d05ca26 (diff)
downloadorg.eclipse.sirius-c328957cf6a17b54234a998b1923f84026171b0f.tar.gz
org.eclipse.sirius-c328957cf6a17b54234a998b1923f84026171b0f.tar.xz
org.eclipse.sirius-c328957cf6a17b54234a998b1923f84026171b0f.zip
[482528] Update to the API changes in EEF for dynamic mappings
EEF has removed the concepts of "switch" and "case" for the definition of a dynamic mapping in order to use the concept "if". Change-Id: Ie1c9145ccd41cd49c1595498faac65d8b99a1766 Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/help/.gitignore1
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/help/contexts.xml17
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/plugin.xml15
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionFilter.java (renamed from incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionFilter.java)10
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionFilter.java45
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionPropertySection.java (renamed from incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionPropertySection.java)10
-rw-r--r--incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionPropertySection.java99
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gifbin227 -> 0 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingIf.gifbin0 -> 221 bytes
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gifbin328 -> 0 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/DynamicMappingForItemProvider.java6
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingIfItemProvider.java (renamed from incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java)54
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java187
-rw-r--r--incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java48
-rw-r--r--incubation/org.eclipse.sirius.properties/model/properties.ecore14
-rw-r--r--incubation/org.eclipse.sirius.properties/model/properties.genmodel12
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingFor.java35
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingIf.java (renamed from incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingCase.java)45
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java85
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java15
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java200
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingForImpl.java90
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingIfImpl.java (renamed from incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingCaseImpl.java)85
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java237
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java26
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java83
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java36
-rw-r--r--incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java44
-rw-r--r--incubation/org.eclipse.sirius.sample.properties/description/project.odesign105
-rw-r--r--incubation/org.eclipse.sirius.ui.properties/model/properties.xmi65
-rw-r--r--incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java26
32 files changed, 381 insertions, 1325 deletions
diff --git a/incubation/org.eclipse.sirius.editor.properties/help/.gitignore b/incubation/org.eclipse.sirius.editor.properties/help/.gitignore
new file mode 100644
index 0000000000..0f10ee6166
--- /dev/null
+++ b/incubation/org.eclipse.sirius.editor.properties/help/.gitignore
@@ -0,0 +1 @@
+/contexts.xml.lost
diff --git a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml
index 1528f9e6d4..125dc28aa9 100644
--- a/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml
+++ b/incubation/org.eclipse.sirius.editor.properties/help/contexts.xml
@@ -122,25 +122,14 @@
</description>
</context>
- <context id="DynamicMappingSwitch">
+ <context id="DynamicMappingIf">
<description>
- <!-- Start of user code DynamicMappingSwitch description -->
+ <!-- Start of user code DynamicMappingIf description -->
- <!-- End of user code DynamicMappingSwitch description -->
-
- </description>
- </context>
- <context id="DynamicMappingCase">
- <description>
-
-
-
- <!-- Start of user code DynamicMappingCase description -->
-
- <!-- End of user code DynamicMappingCase description -->
+ <!-- End of user code DynamicMappingIf description -->
</description>
</context>
diff --git a/incubation/org.eclipse.sirius.editor.properties/plugin.xml b/incubation/org.eclipse.sirius.editor.properties/plugin.xml
index 6dd6dbeac5..a14e0d29a8 100644
--- a/incubation/org.eclipse.sirius.editor.properties/plugin.xml
+++ b/incubation/org.eclipse.sirius.editor.properties/plugin.xml
@@ -49,18 +49,11 @@
<input type="org.eclipse.sirius.properties.TextAreaDescription"/>
</propertySection>
<propertySection
- class="org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingcase.DynamicMappingCaseCaseExpressionPropertySection"
- id="properties.section.dynamicMappingCase.CaseExpression"
- filter="org.eclipse.sirius.properties.editor.properties.filters.properties.dynamicmappingcase.DynamicMappingCaseCaseExpressionFilter"
+ class="org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingif.DynamicMappingIfPredicateExpressionPropertySection"
+ id="properties.section.dynamicMappingIf.PredicateExpression"
+ filter="org.eclipse.sirius.properties.editor.properties.filters.properties.dynamicmappingif.DynamicMappingIfPredicateExpressionFilter"
tab="viewpoint.tab.general">
- <input type="org.eclipse.sirius.properties.DynamicMappingCase"/>
- </propertySection>
- <propertySection
- class="org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingswitch.DynamicMappingSwitchSwitchExpressionPropertySection"
- id="properties.section.dynamicMappingSwitch.SwitchExpression"
- filter="org.eclipse.sirius.properties.editor.properties.filters.properties.dynamicmappingswitch.DynamicMappingSwitchSwitchExpressionFilter"
- tab="viewpoint.tab.general">
- <input type="org.eclipse.sirius.properties.DynamicMappingSwitch"/>
+ <input type="org.eclipse.sirius.properties.DynamicMappingIf"/>
</propertySection>
<propertySection
class="org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingfor.DynamicMappingForDomainClassExpressionPropertySection"
diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionFilter.java
index e8244d5f6d..fc907e63f8 100644
--- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionFilter.java
+++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionFilter.java
@@ -7,7 +7,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.sirius.properties.editor.properties.filters.properties.dynamicmappingcase;
+package org.eclipse.sirius.properties.editor.properties.filters.properties.dynamicmappingif;
// Start of user code specific imports
@@ -18,16 +18,16 @@ import org.eclipse.sirius.properties.PropertiesPackage;
// End of user code specific imports
/**
- * A filter for the caseExpression property section.
+ * A filter for the predicateExpression property section.
*/
-public class DynamicMappingCaseCaseExpressionFilter extends ViewpointPropertyFilter {
+public class DynamicMappingIfPredicateExpressionFilter extends ViewpointPropertyFilter {
/**
* {@inheritDoc}
*/
@Override
protected EStructuralFeature getFeature() {
- return PropertiesPackage.eINSTANCE.getDynamicMappingCase_CaseExpression();
+ return PropertiesPackage.eINSTANCE.getDynamicMappingIf_PredicateExpression();
}
/**
@@ -35,7 +35,7 @@ public class DynamicMappingCaseCaseExpressionFilter extends ViewpointPropertyFil
*/
@Override
protected boolean isRightInputType(Object arg0) {
- return arg0 instanceof org.eclipse.sirius.properties.DynamicMappingCase;
+ return arg0 instanceof org.eclipse.sirius.properties.DynamicMappingIf;
}
// Start of user code user methods
diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionFilter.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionFilter.java
deleted file mode 100644
index b4c2f1651f..0000000000
--- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/filters/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionFilter.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 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.editor.properties.filters.properties.dynamicmappingswitch;
-
-// Start of user code specific imports
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.sirius.editor.properties.filters.common.ViewpointPropertyFilter;
-import org.eclipse.sirius.properties.PropertiesPackage;
-
-// End of user code specific imports
-
-/**
- * A filter for the switchExpression property section.
- */
-public class DynamicMappingSwitchSwitchExpressionFilter extends ViewpointPropertyFilter {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected EStructuralFeature getFeature() {
- return PropertiesPackage.eINSTANCE.getDynamicMappingSwitch_SwitchExpression();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected boolean isRightInputType(Object arg0) {
- return arg0 instanceof org.eclipse.sirius.properties.DynamicMappingSwitch;
- }
-
- // Start of user code user methods
-
- // End of user code user methods
-
-}
diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionPropertySection.java
index cb124dc5ff..e86daee9c6 100644
--- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingcase/DynamicMappingCaseCaseExpressionPropertySection.java
+++ b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingif/DynamicMappingIfPredicateExpressionPropertySection.java
@@ -7,7 +7,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-package org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingcase;
+package org.eclipse.sirius.properties.editor.properties.sections.properties.dynamicmappingif;
// Start of user code imports
@@ -21,16 +21,16 @@ import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
// End of user code imports
/**
- * A section for the caseExpression property of a DynamicMappingCase object.
+ * A section for the predicateExpression property of a DynamicMappingIf object.
*/
-public class DynamicMappingCaseCaseExpressionPropertySection extends AbstractTextPropertySection {
+public class DynamicMappingIfPredicateExpressionPropertySection extends AbstractTextPropertySection {
/**
* @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getDefaultLabelText()
*/
@Override
protected String getDefaultLabelText() {
- return "CaseExpression"; //$NON-NLS-1$
+ return "PredicateExpression"; //$NON-NLS-1$
}
/**
@@ -51,7 +51,7 @@ public class DynamicMappingCaseCaseExpressionPropertySection extends AbstractTex
*/
@Override
public EAttribute getFeature() {
- return PropertiesPackage.eINSTANCE.getDynamicMappingCase_CaseExpression();
+ return PropertiesPackage.eINSTANCE.getDynamicMappingIf_PredicateExpression();
}
/**
diff --git a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionPropertySection.java b/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionPropertySection.java
deleted file mode 100644
index ac7a0b1c13..0000000000
--- a/incubation/org.eclipse.sirius.editor.properties/src-gen/org/eclipse/sirius/properties/editor/properties/sections/properties/dynamicmappingswitch/DynamicMappingSwitchSwitchExpressionPropertySection.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2016 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.editor.properties.sections.properties.dynamicmappingswitch;
-
-// Start of user code imports
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.sirius.editor.editorPlugin.SiriusEditor;
-import org.eclipse.sirius.editor.properties.sections.common.AbstractTextPropertySection;
-import org.eclipse.sirius.properties.PropertiesPackage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-
-// End of user code imports
-
-/**
- * A section for the switchExpression property of a DynamicMappingSwitch object.
- */
-public class DynamicMappingSwitchSwitchExpressionPropertySection extends AbstractTextPropertySection {
-
- /**
- * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getDefaultLabelText()
- */
- @Override
- protected String getDefaultLabelText() {
- return "SwitchExpression"; //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getLabelText()
- */
- @Override
- protected String getLabelText() {
- String labelText;
- labelText = super.getLabelText() + "*:"; //$NON-NLS-1$
- // Start of user code get label text
-
- // End of user code get label text
- return labelText;
- }
-
- /**
- * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getFeature()
- */
- @Override
- public EAttribute getFeature() {
- return PropertiesPackage.eINSTANCE.getDynamicMappingSwitch_SwitchExpression();
- }
-
- /**
- * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#getFeatureValue(String)
- */
- @Override
- protected Object getFeatureValue(String newText) {
- return newText;
- }
-
- /**
- * @see org.eclipse.sirius.properties.editor.properties.sections.AbstractTextPropertySection#isEqual(String)
- */
- @Override
- protected boolean isEqual(String newText) {
- return getFeatureAsText().equals(newText);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
- super.createControls(parent, tabbedPropertySheetPage);
-
- nameLabel.setFont(SiriusEditor.getFontRegistry().get("required"));
-
- // Start of user code create controls
-
- // End of user code create controls
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getPropertyDescription() {
- return "";
- }
-
- // Start of user code user operations
-
- // End of user code user operations
-}
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
deleted file mode 100644
index 8f0d32338c..0000000000
--- a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingCase.gif
+++ /dev/null
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingIf.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingIf.gif
new file mode 100644
index 0000000000..4635a7178c
--- /dev/null
+++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingIf.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
deleted file mode 100644
index 9f2b4acc73..0000000000
--- a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/DynamicMappingSwitch.gif
+++ /dev/null
Binary files differ
diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties
index fabcc2eeea..2f4bf8c342 100644
--- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties
+++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties
@@ -50,8 +50,6 @@ _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_SelectDescription_type = Select Description
@@ -60,11 +58,6 @@ _UI_SelectDescription_initialOperation_feature = Initial Operation
_UI_SelectDescription_candidatesExpression_feature = Candidates Expression
_UI_SelectDescription_candidateDisplayExpression_feature = Candidate Display Expression
_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
_UI_CheckboxDescription_type = Checkbox Description
_UI_CheckboxDescription_valueExpression_feature = Value Expression
_UI_CheckboxDescription_initialOperation_feature = Initial Operation
@@ -79,3 +72,7 @@ _UI_RadioDescription_initialOperation_feature = Initial Operation
_UI_RadioDescription_candidatesExpression_feature = Candidates Expression
_UI_RadioDescription_candidateDisplayExpression_feature = Candidate Display Expression
_UI_TextAreaDescription_lineCount_feature = Line Count
+_UI_DynamicMappingIf_type = Dynamic Mapping If
+_UI_DynamicMappingFor_ifs_feature = Ifs
+_UI_DynamicMappingIf_predicateExpression_feature = Predicate Expression
+_UI_DynamicMappingIf_widget_feature = Widget
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
index 65a58cfed2..448043edba 100644
--- 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
@@ -107,7 +107,7 @@ IItemPropertySource {
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__SWITCH);
+ childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__IFS);
}
return childrenFeatures;
}
@@ -166,7 +166,7 @@ IItemPropertySource {
case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -184,7 +184,7 @@ IItemPropertySource {
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__SWITCH, PropertiesFactory.eINSTANCE.createDynamicMappingSwitch()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_FOR__IFS, PropertiesFactory.eINSTANCE.createDynamicMappingIf()));
}
/**
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/DynamicMappingIfItemProvider.java
index d657aa0856..c519ef922c 100644
--- 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/DynamicMappingIfItemProvider.java
@@ -28,18 +28,18 @@ 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.DynamicMappingIf;
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. <!--
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf} object. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
-public class DynamicMappingCaseItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
+public class DynamicMappingIfItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier. <!--
@@ -47,7 +47,7 @@ IItemPropertySource {
*
* @generated
*/
- public DynamicMappingCaseItemProvider(AdapterFactory adapterFactory) {
+ public DynamicMappingIfItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -62,22 +62,22 @@ IItemPropertySource {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addCaseExpressionPropertyDescriptor(object);
+ addPredicateExpressionPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Case Expression feature. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
+ * This adds a property descriptor for the Predicate Expression feature.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void addCaseExpressionPropertyDescriptor(Object object) {
+ protected void addPredicateExpressionPropertyDescriptor(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));
+ getString("_UI_DynamicMappingIf_predicateExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DynamicMappingIf_predicateExpression_feature", "_UI_DynamicMappingIf_type"),
+ PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
}
/**
@@ -94,7 +94,7 @@ IItemPropertySource {
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
- childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET);
+ childrenFeatures.add(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET);
}
return childrenFeatures;
}
@@ -114,14 +114,14 @@ IItemPropertySource {
}
/**
- * This returns DynamicMappingCase.gif. <!-- begin-user-doc --> <!--
+ * This returns DynamicMappingIf.gif. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicMappingCase"));
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DynamicMappingIf"));
}
/**
@@ -132,8 +132,8 @@ IItemPropertySource {
*/
@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;
+ String label = ((DynamicMappingIf) object).getPredicateExpression();
+ return label == null || label.length() == 0 ? getString("_UI_DynamicMappingIf_type") : getString("_UI_DynamicMappingIf_type") + " " + label;
}
/**
@@ -148,11 +148,11 @@ IItemPropertySource {
public void notifyChanged(Notification notification) {
updateChildren(notification);
- switch (notification.getFeatureID(DynamicMappingCase.class)) {
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
+ switch (notification.getFeatureID(DynamicMappingIf.class)) {
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -170,19 +170,19 @@ IItemPropertySource {
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_IF__WIDGET, PropertiesFactory.eINSTANCE.createTextDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createButtonDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createButtonDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createLabelDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createLabelDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createCheckboxDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createCheckboxDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createSelectDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createSelectDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createTextAreaDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createTextAreaDescription()));
- newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createRadioDescription()));
+ newChildDescriptors.add(createChildParameter(PropertiesPackage.Literals.DYNAMIC_MAPPING_IF__WIDGET, PropertiesFactory.eINSTANCE.createRadioDescription()));
}
/**
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
deleted file mode 100644
index 7c96958693..0000000000
--- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingSwitchItemProvider.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/**
- * Copyright (c) 2016 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 04bf5a33b5..ef14f5d176 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
@@ -343,52 +343,27 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto
/**
* 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}. <!--
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf} instances. <!--
* 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;
+ protected DynamicMappingIfItemProvider dynamicMappingIfItemProvider;
/**
* This creates an adapter for a
- * {@link org.eclipse.sirius.properties.DynamicMappingCase}. <!--
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf}. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
- public Adapter createDynamicMappingCaseAdapter() {
- if (dynamicMappingCaseItemProvider == null) {
- dynamicMappingCaseItemProvider = new DynamicMappingCaseItemProvider(this);
+ public Adapter createDynamicMappingIfAdapter() {
+ if (dynamicMappingIfItemProvider == null) {
+ dynamicMappingIfItemProvider = new DynamicMappingIfItemProvider(this);
}
- return dynamicMappingCaseItemProvider;
+ return dynamicMappingIfItemProvider;
}
/**
@@ -444,7 +419,7 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto
/**
* This returns the root adapter factory that contains this factory. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -575,11 +550,8 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto
if (dynamicMappingForItemProvider != null) {
dynamicMappingForItemProvider.dispose();
}
- if (dynamicMappingSwitchItemProvider != null) {
- dynamicMappingSwitchItemProvider.dispose();
- }
- if (dynamicMappingCaseItemProvider != null) {
- dynamicMappingCaseItemProvider.dispose();
+ if (dynamicMappingIfItemProvider != null) {
+ dynamicMappingIfItemProvider.dispose();
}
if (textAreaDescriptionItemProvider != null) {
textAreaDescriptionItemProvider.dispose();
diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore
index a551e13121..60fce36669 100644
--- a/incubation/org.eclipse.sirius.properties/model/properties.ecore
+++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore
@@ -100,17 +100,11 @@
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"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ifs" lowerBound="1" upperBound="-1"
+ eType="#//DynamicMappingIf" 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"
+ <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingIf">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="predicateExpression" 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"/>
diff --git a/incubation/org.eclipse.sirius.properties/model/properties.genmodel b/incubation/org.eclipse.sirius.properties/model/properties.genmodel
index da36a8a3f4..c6d618afa5 100644
--- a/incubation/org.eclipse.sirius.properties/model/properties.genmodel
+++ b/incubation/org.eclipse.sirius.properties/model/properties.genmodel
@@ -66,15 +66,11 @@
<genClasses ecoreClass="properties.ecore#//DynamicMappingFor">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//DynamicMappingFor/iterator"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//DynamicMappingFor/domainClassExpression"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//DynamicMappingFor/switch"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//DynamicMappingFor/ifs"/>
</genClasses>
- <genClasses ecoreClass="properties.ecore#//DynamicMappingSwitch">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//DynamicMappingSwitch/switchExpression"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//DynamicMappingSwitch/cases"/>
- </genClasses>
- <genClasses ecoreClass="properties.ecore#//DynamicMappingCase">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//DynamicMappingCase/caseExpression"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//DynamicMappingCase/widget"/>
+ <genClasses ecoreClass="properties.ecore#//DynamicMappingIf">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//DynamicMappingIf/predicateExpression"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference properties.ecore#//DynamicMappingIf/widget"/>
</genClasses>
<genClasses ecoreClass="properties.ecore#//TextAreaDescription">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute properties.ecore#//TextAreaDescription/lineCount"/>
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
index 29da3d81ef..3bac07a604 100644
--- 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
@@ -11,6 +11,7 @@
*/
package org.eclipse.sirius.properties;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
@@ -25,8 +26,8 @@ import org.eclipse.emf.ecore.EObject;
* <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>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingFor#getIfs <em>Ifs
+ * </em>}</li>
* </ul>
* </p>
*
@@ -97,33 +98,21 @@ public interface DynamicMappingFor extends EObject {
void setDomainClassExpression(String value);
/**
- * Returns the value of the '<em><b>Switch</b></em>' containment reference.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Ifs</b></em>' containment reference
+ * list. The list contents are of type
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf}. <!--
+ * begin-user-doc -->
* <p>
- * If the meaning of the '<em>Switch</em>' containment reference isn't
+ * If the meaning of the '<em>Ifs</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>Switch</em>' containment reference.
- * @see #setSwitch(DynamicMappingSwitch)
- * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor_Switch()
+ *
+ * @return the value of the '<em>Ifs</em>' containment reference list.
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingFor_Ifs()
* @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);
+ EList<DynamicMappingIf> getIfs();
} // DynamicMappingFor
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/DynamicMappingIf.java
index 6fdb3381d6..1e17d228d7 100644
--- 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/DynamicMappingIf.java
@@ -15,53 +15,54 @@ 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 -->
+ * <em><b>Dynamic Mapping If</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>
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf#getPredicateExpression
+ * <em>Predicate Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.DynamicMappingIf#getWidget <em>
* Widget</em>}</li>
* </ul>
* </p>
*
- * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingCase()
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingIf()
* @model
* @generated
*/
-public interface DynamicMappingCase extends EObject {
+public interface DynamicMappingIf extends EObject {
/**
- * Returns the value of the '<em><b>Case Expression</b></em>' attribute.
- * <!-- begin-user-doc -->
+ * Returns the value of the '<em><b>Predicate 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...
+ * If the meaning of the '<em>Predicate 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()
+ * @return the value of the '<em>Predicate Expression</em>' attribute.
+ * @see #setPredicateExpression(String)
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingIf_PredicateExpression()
* @model required="true"
* @generated
*/
- String getCaseExpression();
+ String getPredicateExpression();
/**
* Sets the value of the '
- * {@link org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression
- * <em>Case Expression</em>}' attribute. <!-- begin-user-doc --> <!--
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf#getPredicateExpression
+ * <em>Predicate Expression</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @param value
- * the new value of the '<em>Case Expression</em>' attribute.
- * @see #getCaseExpression()
+ * the new value of the '<em>Predicate Expression</em>'
+ * attribute.
+ * @see #getPredicateExpression()
* @generated
*/
- void setCaseExpression(String value);
+ void setPredicateExpression(String value);
/**
* Returns the value of the '<em><b>Widget</b></em>' containment reference.
@@ -74,7 +75,7 @@ public interface DynamicMappingCase extends EObject {
*
* @return the value of the '<em>Widget</em>' containment reference.
* @see #setWidget(WidgetDescription)
- * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingCase_Widget()
+ * @see org.eclipse.sirius.properties.PropertiesPackage#getDynamicMappingIf_Widget()
* @model containment="true" required="true"
* @generated
*/
@@ -82,7 +83,7 @@ public interface DynamicMappingCase extends EObject {
/**
* Sets the value of the '
- * {@link org.eclipse.sirius.properties.DynamicMappingCase#getWidget
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf#getWidget
* <em>Widget</em>}' containment reference. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
@@ -93,4 +94,4 @@ public interface DynamicMappingCase extends EObject {
*/
void setWidget(WidgetDescription value);
-} // DynamicMappingCase
+} // DynamicMappingIf
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
deleted file mode 100644
index 4f160ea34a..0000000000
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/DynamicMappingSwitch.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Copyright (c) 2016 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 f7fe35d8dc..71a7874abc 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
@@ -120,22 +120,13 @@ public interface PropertiesFactory extends EFactory {
DynamicMappingFor createDynamicMappingFor();
/**
- * Returns a new object of class '<em>Dynamic Mapping Switch</em>'. <!--
+ * Returns a new object of class '<em>Dynamic Mapping If</em>'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
- * @return a new object of class '<em>Dynamic Mapping Switch</em>'.
+ * @return a new object of class '<em>Dynamic Mapping If</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();
+ DynamicMappingIf createDynamicMappingIf();
/**
* Returns a new object of class '<em>Text Area Description</em>'. <!--
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 1b07b10f3c..59e569fceb 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
@@ -673,13 +673,13 @@ public interface PropertiesPackage extends EPackage {
int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = 1;
/**
- * The feature id for the '<em><b>Switch</b></em>' containment reference.
+ * The feature id for the '<em><b>Ifs</b></em>' containment reference list.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int DYNAMIC_MAPPING_FOR__SWITCH = 2;
+ int DYNAMIC_MAPPING_FOR__IFS = 2;
/**
* The number of structural features of the '<em>Dynamic Mapping For</em>'
@@ -692,63 +692,24 @@ public interface PropertiesPackage extends EPackage {
/**
* The meta object id for the '
- * {@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl
- * <em>Dynamic Mapping Switch</em>}' class. <!-- begin-user-doc --> <!--
+ * {@link org.eclipse.sirius.properties.impl.DynamicMappingIfImpl
+ * <em>Dynamic Mapping If</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
- * @see org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl
- * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingSwitch()
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingIfImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingIf()
* @generated
*/
- int DYNAMIC_MAPPING_SWITCH = 11;
+ int DYNAMIC_MAPPING_IF = 11;
/**
- * The feature id for the '<em><b>Switch Expression</b></em>' attribute.
+ * The feature id for the '<em><b>Predicate 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 = 12;
-
- /**
- * 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;
+ int DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION = 0;
/**
* The feature id for the '<em><b>Widget</b></em>' containment reference.
@@ -757,16 +718,16 @@ public interface PropertiesPackage extends EPackage {
* @generated
* @ordered
*/
- int DYNAMIC_MAPPING_CASE__WIDGET = 1;
+ int DYNAMIC_MAPPING_IF__WIDGET = 1;
/**
- * The number of structural features of the '<em>Dynamic Mapping Case</em>'
+ * The number of structural features of the '<em>Dynamic Mapping If</em>'
* class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int DYNAMIC_MAPPING_CASE_FEATURE_COUNT = 2;
+ int DYNAMIC_MAPPING_IF_FEATURE_COUNT = 2;
/**
* The meta object id for the '
@@ -778,7 +739,7 @@ public interface PropertiesPackage extends EPackage {
* @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getTextAreaDescription()
* @generated
*/
- int TEXT_AREA_DESCRIPTION = 13;
+ int TEXT_AREA_DESCRIPTION = 12;
/**
* The feature id for the '<em><b>Identifier</b></em>' attribute. <!--
@@ -844,7 +805,7 @@ public interface PropertiesPackage extends EPackage {
* @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getRadioDescription()
* @generated
*/
- int RADIO_DESCRIPTION = 14;
+ int RADIO_DESCRIPTION = 13;
/**
* The feature id for the '<em><b>Identifier</b></em>' attribute. <!--
@@ -1466,90 +1427,55 @@ public interface PropertiesPackage extends EPackage {
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 -->
+ * Returns the meta object for the containment reference list '
+ * {@link org.eclipse.sirius.properties.DynamicMappingFor#getIfs
+ * <em>Ifs</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()
+ * @return the meta object for the containment reference list '<em>Ifs</em>
+ * '.
+ * @see org.eclipse.sirius.properties.DynamicMappingFor#getIfs()
* @see #getDynamicMappingFor()
* @generated
*/
- EReference getDynamicMappingFor_Switch();
+ EReference getDynamicMappingFor_Ifs();
/**
* 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
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf
+ * <em>Dynamic Mapping If</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()
+ * @return the meta object for class '<em>Dynamic Mapping If</em>'.
+ * @see org.eclipse.sirius.properties.DynamicMappingIf
* @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();
+ EClass getDynamicMappingIf();
/**
* Returns the meta object for the attribute '
- * {@link org.eclipse.sirius.properties.DynamicMappingCase#getCaseExpression
- * <em>Case Expression</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf#getPredicateExpression
+ * <em>Predicate 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()
+ * @return the meta object for the attribute '<em>Predicate Expression</em>
+ * '.
+ * @see org.eclipse.sirius.properties.DynamicMappingIf#getPredicateExpression()
+ * @see #getDynamicMappingIf()
* @generated
*/
- EAttribute getDynamicMappingCase_CaseExpression();
+ EAttribute getDynamicMappingIf_PredicateExpression();
/**
* Returns the meta object for the containment reference '
- * {@link org.eclipse.sirius.properties.DynamicMappingCase#getWidget
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf#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()
+ * @see org.eclipse.sirius.properties.DynamicMappingIf#getWidget()
+ * @see #getDynamicMappingIf()
* @generated
*/
- EReference getDynamicMappingCase_Widget();
+ EReference getDynamicMappingIf_Widget();
/**
* Returns the meta object for class '
@@ -2071,60 +1997,32 @@ public interface PropertiesPackage extends EPackage {
EAttribute DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = PropertiesPackage.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 = PropertiesPackage.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 = PropertiesPackage.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 = PropertiesPackage.eINSTANCE.getDynamicMappingSwitch_SwitchExpression();
-
- /**
- * The meta object literal for the '<em><b>Cases</b></em>' containment
+ * The meta object literal for the '<em><b>Ifs</b></em>' containment
* reference list feature. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- EReference DYNAMIC_MAPPING_SWITCH__CASES = PropertiesPackage.eINSTANCE.getDynamicMappingSwitch_Cases();
+ EReference DYNAMIC_MAPPING_FOR__IFS = PropertiesPackage.eINSTANCE.getDynamicMappingFor_Ifs();
/**
* The meta object literal for the '
- * {@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl
- * <em>Dynamic Mapping Case</em>}' class. <!-- begin-user-doc --> <!--
+ * {@link org.eclipse.sirius.properties.impl.DynamicMappingIfImpl
+ * <em>Dynamic Mapping If</em>}' class. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
- * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl
- * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase()
+ * @see org.eclipse.sirius.properties.impl.DynamicMappingIfImpl
+ * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingIf()
* @generated
*/
- EClass DYNAMIC_MAPPING_CASE = PropertiesPackage.eINSTANCE.getDynamicMappingCase();
+ EClass DYNAMIC_MAPPING_IF = PropertiesPackage.eINSTANCE.getDynamicMappingIf();
/**
- * The meta object literal for the '<em><b>Case Expression</b></em>'
- * attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The meta object literal for the '<em><b>Predicate Expression</b></em>
+ * ' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
- EAttribute DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = PropertiesPackage.eINSTANCE.getDynamicMappingCase_CaseExpression();
+ EAttribute DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION = PropertiesPackage.eINSTANCE.getDynamicMappingIf_PredicateExpression();
/**
* The meta object literal for the '<em><b>Widget</b></em>' containment
@@ -2132,7 +2030,7 @@ public interface PropertiesPackage extends EPackage {
*
* @generated
*/
- EReference DYNAMIC_MAPPING_CASE__WIDGET = PropertiesPackage.eINSTANCE.getDynamicMappingCase_Widget();
+ EReference DYNAMIC_MAPPING_IF__WIDGET = PropertiesPackage.eINSTANCE.getDynamicMappingIf_Widget();
/**
* The meta object literal for the '
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
index fe72e60c0e..a8ef9d3072 100644
--- 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
@@ -11,14 +11,19 @@
*/
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.DynamicMappingFor;
-import org.eclipse.sirius.properties.DynamicMappingSwitch;
+import org.eclipse.sirius.properties.DynamicMappingIf;
import org.eclipse.sirius.properties.PropertiesPackage;
/**
@@ -33,9 +38,8 @@ import org.eclipse.sirius.properties.PropertiesPackage;
* <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>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl#getIfs
+ * <em>Ifs</em>}</li>
* </ul>
* </p>
*
@@ -85,14 +89,14 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
protected String domainClassExpression = DynamicMappingForImpl.DOMAIN_CLASS_EXPRESSION_EDEFAULT;
/**
- * The cached value of the '{@link #getSwitch() <em>Switch</em>}'
- * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The cached value of the '{@link #getIfs() <em>Ifs</em>}' containment
+ * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @see #getSwitch()
+ * @see #getIfs()
* @generated
* @ordered
*/
- protected DynamicMappingSwitch switch_;
+ protected EList<DynamicMappingIf> ifs;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -167,51 +171,11 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
* @generated
*/
@Override
- 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
- */
- @Override
- public void setSwitch(DynamicMappingSwitch newSwitch) {
- if (newSwitch != switch_) {
- NotificationChain msgs = null;
- if (switch_ != null) {
- msgs = ((InternalEObject) switch_).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH, null, msgs);
- }
- if (newSwitch != null) {
- msgs = ((InternalEObject) newSwitch).eInverseAdd(this, InternalEObject.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));
+ public EList<DynamicMappingIf> getIfs() {
+ if (ifs == null) {
+ ifs = new EObjectContainmentEList<DynamicMappingIf>(DynamicMappingIf.class, this, PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS);
}
+ return ifs;
}
/**
@@ -222,8 +186,8 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
- return basicSetSwitch(null, msgs);
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
+ return ((InternalEList<?>) getIfs()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -240,8 +204,8 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
return getIterator();
case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
return getDomainClassExpression();
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
- return getSwitch();
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
+ return getIfs();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -251,6 +215,7 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
*
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
@@ -260,8 +225,9 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
setDomainClassExpression((String) newValue);
return;
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
- setSwitch((DynamicMappingSwitch) newValue);
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
+ getIfs().clear();
+ getIfs().addAll((Collection<? extends DynamicMappingIf>) newValue);
return;
}
super.eSet(featureID, newValue);
@@ -281,8 +247,8 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
setDomainClassExpression(DynamicMappingForImpl.DOMAIN_CLASS_EXPRESSION_EDEFAULT);
return;
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
- setSwitch((DynamicMappingSwitch) null);
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
+ getIfs().clear();
return;
}
super.eUnset(featureID);
@@ -301,8 +267,8 @@ public class DynamicMappingForImpl extends MinimalEObjectImpl.Container implemen
case PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION:
return DynamicMappingForImpl.DOMAIN_CLASS_EXPRESSION_EDEFAULT == null ? domainClassExpression != null : !DynamicMappingForImpl.DOMAIN_CLASS_EXPRESSION_EDEFAULT
.equals(domainClassExpression);
- case PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH:
- return switch_ != null;
+ case PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS:
+ return ifs != null && !ifs.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/DynamicMappingIfImpl.java
index 1930fab4f3..7c3414ada4 100644
--- 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/DynamicMappingIfImpl.java
@@ -17,49 +17,48 @@ 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.DynamicMappingIf;
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 -->
+ * <em><b>Dynamic Mapping If</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
+ * {@link org.eclipse.sirius.properties.impl.DynamicMappingIfImpl#getPredicateExpression
+ * <em>Predicate Expression</em>}</li>
+ * <li>{@link org.eclipse.sirius.properties.impl.DynamicMappingIfImpl#getWidget
* <em>Widget</em>}</li>
* </ul>
* </p>
*
* @generated
*/
-public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container implements DynamicMappingCase {
+public class DynamicMappingIfImpl extends MinimalEObjectImpl.Container implements DynamicMappingIf {
/**
- * The default value of the '{@link #getCaseExpression()
- * <em>Case Expression</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The default value of the '{@link #getPredicateExpression()
+ * <em>Predicate Expression</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
- * @see #getCaseExpression()
+ * @see #getPredicateExpression()
* @generated
* @ordered
*/
- protected static final String CASE_EXPRESSION_EDEFAULT = null;
+ protected static final String PREDICATE_EXPRESSION_EDEFAULT = null;
/**
- * The cached value of the '{@link #getCaseExpression()
- * <em>Case Expression</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getPredicateExpression()
+ * <em>Predicate Expression</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
- * @see #getCaseExpression()
+ * @see #getPredicateExpression()
* @generated
* @ordered
*/
- protected String caseExpression = DynamicMappingCaseImpl.CASE_EXPRESSION_EDEFAULT;
+ protected String predicateExpression = DynamicMappingIfImpl.PREDICATE_EXPRESSION_EDEFAULT;
/**
* The cached value of the '{@link #getWidget() <em>Widget</em>}'
@@ -76,7 +75,7 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
*
* @generated
*/
- protected DynamicMappingCaseImpl() {
+ protected DynamicMappingIfImpl() {
super();
}
@@ -87,7 +86,7 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
*/
@Override
protected EClass eStaticClass() {
- return PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE;
+ return PropertiesPackage.Literals.DYNAMIC_MAPPING_IF;
}
/**
@@ -96,8 +95,8 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
* @generated
*/
@Override
- public String getCaseExpression() {
- return caseExpression;
+ public String getPredicateExpression() {
+ return predicateExpression;
}
/**
@@ -106,11 +105,11 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
* @generated
*/
@Override
- public void setCaseExpression(String newCaseExpression) {
- String oldCaseExpression = caseExpression;
- caseExpression = newCaseExpression;
+ public void setPredicateExpression(String newPredicateExpression) {
+ String oldPredicateExpression = predicateExpression;
+ predicateExpression = newPredicateExpression;
if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION, oldCaseExpression, caseExpression));
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION, oldPredicateExpression, predicateExpression));
}
}
@@ -133,7 +132,7 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
WidgetDescription oldWidget = widget;
widget = newWidget;
if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, oldWidget, newWidget);
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET, oldWidget, newWidget);
if (msgs == null) {
msgs = notification;
} else {
@@ -153,17 +152,17 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
if (newWidget != widget) {
NotificationChain msgs = null;
if (widget != null) {
- msgs = ((InternalEObject) widget).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, null, msgs);
+ msgs = ((InternalEObject) widget).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET, null, msgs);
}
if (newWidget != null) {
- msgs = ((InternalEObject) newWidget).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET, null, msgs);
+ msgs = ((InternalEObject) newWidget).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - PropertiesPackage.DYNAMIC_MAPPING_IF__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));
+ eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET, newWidget, newWidget));
}
}
@@ -175,7 +174,7 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
return basicSetWidget(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
@@ -189,9 +188,9 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
@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:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION:
+ return getPredicateExpression();
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
return getWidget();
}
return super.eGet(featureID, resolve, coreType);
@@ -205,10 +204,10 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
- setCaseExpression((String) newValue);
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION:
+ setPredicateExpression((String) newValue);
return;
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
setWidget((WidgetDescription) newValue);
return;
}
@@ -223,10 +222,10 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
- setCaseExpression(DynamicMappingCaseImpl.CASE_EXPRESSION_EDEFAULT);
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION:
+ setPredicateExpression(DynamicMappingIfImpl.PREDICATE_EXPRESSION_EDEFAULT);
return;
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
setWidget((WidgetDescription) null);
return;
}
@@ -241,9 +240,9 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION:
- return DynamicMappingCaseImpl.CASE_EXPRESSION_EDEFAULT == null ? caseExpression != null : !DynamicMappingCaseImpl.CASE_EXPRESSION_EDEFAULT.equals(caseExpression);
- case PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET:
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION:
+ return DynamicMappingIfImpl.PREDICATE_EXPRESSION_EDEFAULT == null ? predicateExpression != null : !DynamicMappingIfImpl.PREDICATE_EXPRESSION_EDEFAULT.equals(predicateExpression);
+ case PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET:
return widget != null;
}
return super.eIsSet(featureID);
@@ -261,10 +260,10 @@ public class DynamicMappingCaseImpl extends MinimalEObjectImpl.Container impleme
}
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (caseExpression: ");
- result.append(caseExpression);
+ result.append(" (predicateExpression: ");
+ result.append(predicateExpression);
result.append(')');
return result.toString();
}
-} // DynamicMappingCaseImpl
+} // DynamicMappingIfImpl
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
deleted file mode 100644
index 331f1f0a22..0000000000
--- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/DynamicMappingSwitchImpl.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * Copyright (c) 2016 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 = DynamicMappingSwitchImpl.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
- */
- @Override
- public String getSwitchExpression() {
- return switchExpression;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- 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
- */
- @Override
- 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(DynamicMappingSwitchImpl.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 DynamicMappingSwitchImpl.SWITCH_EXPRESSION_EDEFAULT == null ? switchExpression != null : !DynamicMappingSwitchImpl.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 93833e1ad2..e0cc2f4d43 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
@@ -19,9 +19,8 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.sirius.properties.ButtonDescription;
import org.eclipse.sirius.properties.CheckboxDescription;
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.DynamicMappingIf;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -96,10 +95,8 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac
return createSelectDescription();
case PropertiesPackage.DYNAMIC_MAPPING_FOR:
return createDynamicMappingFor();
- case PropertiesPackage.DYNAMIC_MAPPING_SWITCH:
- return createDynamicMappingSwitch();
- case PropertiesPackage.DYNAMIC_MAPPING_CASE:
- return createDynamicMappingCase();
+ case PropertiesPackage.DYNAMIC_MAPPING_IF:
+ return createDynamicMappingIf();
case PropertiesPackage.TEXT_AREA_DESCRIPTION:
return createTextAreaDescription();
case PropertiesPackage.RADIO_DESCRIPTION:
@@ -225,20 +222,9 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac
* @generated
*/
@Override
- public DynamicMappingSwitch createDynamicMappingSwitch() {
- DynamicMappingSwitchImpl dynamicMappingSwitch = new DynamicMappingSwitchImpl();
- return dynamicMappingSwitch;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public DynamicMappingCase createDynamicMappingCase() {
- DynamicMappingCaseImpl dynamicMappingCase = new DynamicMappingCaseImpl();
- return dynamicMappingCase;
+ public DynamicMappingIf createDynamicMappingIf() {
+ DynamicMappingIfImpl dynamicMappingIf = new DynamicMappingIfImpl();
+ return dynamicMappingIf;
}
/**
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 41b7fb07be..76b7ffaa2b 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,9 +20,8 @@ import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.sirius.properties.ButtonDescription;
import org.eclipse.sirius.properties.CheckboxDescription;
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.DynamicMappingIf;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -127,14 +126,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
*
* @generated
*/
- private EClass dynamicMappingSwitchEClass = null;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- private EClass dynamicMappingCaseEClass = null;
+ private EClass dynamicMappingIfEClass = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -665,7 +657,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* @generated
*/
@Override
- public EReference getDynamicMappingFor_Switch() {
+ public EReference getDynamicMappingFor_Ifs() {
return (EReference) dynamicMappingForEClass.getEStructuralFeatures().get(2);
}
@@ -675,18 +667,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* @generated
*/
@Override
- public EClass getDynamicMappingSwitch() {
- return dynamicMappingSwitchEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public EAttribute getDynamicMappingSwitch_SwitchExpression() {
- return (EAttribute) dynamicMappingSwitchEClass.getEStructuralFeatures().get(0);
+ public EClass getDynamicMappingIf() {
+ return dynamicMappingIfEClass;
}
/**
@@ -695,8 +677,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* @generated
*/
@Override
- public EReference getDynamicMappingSwitch_Cases() {
- return (EReference) dynamicMappingSwitchEClass.getEStructuralFeatures().get(1);
+ public EAttribute getDynamicMappingIf_PredicateExpression() {
+ return (EAttribute) dynamicMappingIfEClass.getEStructuralFeatures().get(0);
}
/**
@@ -705,28 +687,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
* @generated
*/
@Override
- public EClass getDynamicMappingCase() {
- return dynamicMappingCaseEClass;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public EAttribute getDynamicMappingCase_CaseExpression() {
- return (EAttribute) dynamicMappingCaseEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- public EReference getDynamicMappingCase_Widget() {
- return (EReference) dynamicMappingCaseEClass.getEStructuralFeatures().get(1);
+ public EReference getDynamicMappingIf_Widget() {
+ return (EReference) dynamicMappingIfEClass.getEStructuralFeatures().get(1);
}
/**
@@ -884,15 +846,11 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
dynamicMappingForEClass = createEClass(PropertiesPackage.DYNAMIC_MAPPING_FOR);
createEAttribute(dynamicMappingForEClass, PropertiesPackage.DYNAMIC_MAPPING_FOR__ITERATOR);
createEAttribute(dynamicMappingForEClass, PropertiesPackage.DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION);
- createEReference(dynamicMappingForEClass, PropertiesPackage.DYNAMIC_MAPPING_FOR__SWITCH);
-
- dynamicMappingSwitchEClass = createEClass(PropertiesPackage.DYNAMIC_MAPPING_SWITCH);
- createEAttribute(dynamicMappingSwitchEClass, PropertiesPackage.DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION);
- createEReference(dynamicMappingSwitchEClass, PropertiesPackage.DYNAMIC_MAPPING_SWITCH__CASES);
+ createEReference(dynamicMappingForEClass, PropertiesPackage.DYNAMIC_MAPPING_FOR__IFS);
- dynamicMappingCaseEClass = createEClass(PropertiesPackage.DYNAMIC_MAPPING_CASE);
- createEAttribute(dynamicMappingCaseEClass, PropertiesPackage.DYNAMIC_MAPPING_CASE__CASE_EXPRESSION);
- createEReference(dynamicMappingCaseEClass, PropertiesPackage.DYNAMIC_MAPPING_CASE__WIDGET);
+ dynamicMappingIfEClass = createEClass(PropertiesPackage.DYNAMIC_MAPPING_IF);
+ createEAttribute(dynamicMappingIfEClass, PropertiesPackage.DYNAMIC_MAPPING_IF__PREDICATE_EXPRESSION);
+ createEReference(dynamicMappingIfEClass, PropertiesPackage.DYNAMIC_MAPPING_IF__WIDGET);
textAreaDescriptionEClass = createEClass(PropertiesPackage.TEXT_AREA_DESCRIPTION);
createEAttribute(textAreaDescriptionEClass, PropertiesPackage.TEXT_AREA_DESCRIPTION__LINE_COUNT);
@@ -1056,21 +1014,14 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac
EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
initEAttribute(getDynamicMappingFor_DomainClassExpression(), theEcorePackage.getEString(), "domainClassExpression", null, 1, 1, DynamicMappingFor.class, !EPackageImpl.IS_TRANSIENT,
!EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
- initEReference(getDynamicMappingFor_Switch(), this.getDynamicMappingSwitch(), null, "switch", null, 1, 1, DynamicMappingFor.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
- EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED,
- EPackageImpl.IS_ORDERED);
-
- initEClass(dynamicMappingSwitchEClass, DynamicMappingSwitch.class, "DynamicMappingSwitch", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getDynamicMappingSwitch_SwitchExpression(), theEcorePackage.getEString(), "switchExpression", null, 1, 1, DynamicMappingSwitch.class, !EPackageImpl.IS_TRANSIENT,
- !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
- initEReference(getDynamicMappingSwitch_Cases(), this.getDynamicMappingCase(), null, "cases", null, 1, -1, DynamicMappingSwitch.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
+ initEReference(getDynamicMappingFor_Ifs(), this.getDynamicMappingIf(), null, "ifs", null, 1, -1, DynamicMappingFor.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED,
EPackageImpl.IS_ORDERED);
- initEClass(dynamicMappingCaseEClass, DynamicMappingCase.class, "DynamicMappingCase", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getDynamicMappingCase_CaseExpression(), theEcorePackage.getEString(), "caseExpression", null, 1, 1, DynamicMappingCase.class, !EPackageImpl.IS_TRANSIENT,
+ initEClass(dynamicMappingIfEClass, DynamicMappingIf.class, "DynamicMappingIf", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDynamicMappingIf_PredicateExpression(), theEcorePackage.getEString(), "predicateExpression", null, 1, 1, DynamicMappingIf.class, !EPackageImpl.IS_TRANSIENT,
!EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, !EPackageImpl.IS_UNSETTABLE, !EPackageImpl.IS_ID, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
- initEReference(getDynamicMappingCase_Widget(), this.getWidgetDescription(), null, "widget", null, 1, 1, DynamicMappingCase.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
+ initEReference(getDynamicMappingIf_Widget(), this.getWidgetDescription(), null, "widget", null, 1, 1, DynamicMappingIf.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE,
EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE, !EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED,
EPackageImpl.IS_ORDERED);
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 7224607d3b..88c186fd42 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
@@ -18,9 +18,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.sirius.properties.ButtonDescription;
import org.eclipse.sirius.properties.CheckboxDescription;
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.DynamicMappingIf;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -144,13 +143,8 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl {
}
@Override
- public Adapter caseDynamicMappingSwitch(DynamicMappingSwitch object) {
- return createDynamicMappingSwitchAdapter();
- }
-
- @Override
- public Adapter caseDynamicMappingCase(DynamicMappingCase object) {
- return createDynamicMappingCaseAdapter();
+ public Adapter caseDynamicMappingIf(DynamicMappingIf object) {
+ return createDynamicMappingIfAdapter();
}
@Override
@@ -366,33 +360,17 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl {
/**
* 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
+ * {@link org.eclipse.sirius.properties.DynamicMappingIf
+ * <em>Dynamic Mapping If</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
+ * @see org.eclipse.sirius.properties.DynamicMappingIf
* @generated
*/
- public Adapter createDynamicMappingCaseAdapter() {
+ public Adapter createDynamicMappingIfAdapter() {
return null;
}
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 3e058d46d6..93c146ba5f 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
@@ -18,9 +18,8 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.sirius.properties.ButtonDescription;
import org.eclipse.sirius.properties.CheckboxDescription;
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.DynamicMappingIf;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -212,17 +211,9 @@ public class PropertiesSwitch<T> {
}
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);
+ case PropertiesPackage.DYNAMIC_MAPPING_IF: {
+ DynamicMappingIf dynamicMappingIf = (DynamicMappingIf) theEObject;
+ T result = caseDynamicMappingIf(dynamicMappingIf);
if (result == null) {
result = defaultCase(theEObject);
}
@@ -447,35 +438,18 @@ public class PropertiesSwitch<T> {
/**
* 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 -->
+ * <em>Dynamic Mapping If</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>'.
+ * <em>Dynamic Mapping If</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseDynamicMappingCase(DynamicMappingCase object) {
+ public T caseDynamicMappingIf(DynamicMappingIf object) {
return null;
}
diff --git a/incubation/org.eclipse.sirius.sample.properties/description/project.odesign b/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
index 89770e496a..332178523e 100644
--- a/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
+++ b/incubation/org.eclipse.sirius.sample.properties/description/project.odesign
@@ -1,45 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
-<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" name="project" version="11.0.0.201601261200">
- <ownedViewpoints name="Design">
- <ownedRepresentations xsi:type="description_1:DiagramDescription" name="Class Diagram" domainClass="ecore.EPackage" enablePopupBars="true">
- <defaultLayer name="Default">
- <containerMappings name="CD_Class" domainClass="ecore.EClass" childrenPresentation="List">
- <subNodeMappings name="CD_Attribute" semanticCandidatesExpression="feature:eAllContents" domainClass="ecore.EAttribute">
- <style xsi:type="style:BundledImageDescription" labelPosition="node" resizeKind="NSEW">
- <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+<description:Group
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:description="http://www.eclipse.org/sirius/description/1.1.0"
+ xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0"
+ xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0"
+ name="project"
+ version="11.0.0.201601261200">
+ <ownedViewpoints
+ name="Design">
+ <ownedRepresentations
+ xsi:type="description_1:DiagramDescription"
+ name="Class Diagram"
+ domainClass="ecore.EPackage"
+ enablePopupBars="true">
+ <defaultLayer
+ name="Default">
+ <containerMappings
+ name="CD_Class"
+ domainClass="ecore.EClass"
+ childrenPresentation="List">
+ <subNodeMappings
+ name="CD_Attribute"
+ semanticCandidatesExpression="feature:eAllContents"
+ domainClass="ecore.EAttribute">
+ <style
+ xsi:type="style:BundledImageDescription"
+ labelPosition="node"
+ resizeKind="NSEW">
+ <borderColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <subNodeMappings name="CD_Reference" semanticCandidatesExpression="feature:eAllContents" domainClass="ecore.EReference">
- <style xsi:type="style:BundledImageDescription" labelPosition="node" resizeKind="NSEW">
- <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <subNodeMappings
+ name="CD_Reference"
+ semanticCandidatesExpression="feature:eAllContents"
+ domainClass="ecore.EReference">
+ <style
+ xsi:type="style:BundledImageDescription"
+ labelPosition="node"
+ resizeKind="NSEW">
+ <borderColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
- <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1">
- <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
- <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
- <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
+ <style
+ xsi:type="style:FlatContainerStyleDescription"
+ borderSizeComputationExpression="1">
+ <borderColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='white']"/>
+ <foregroundColor
+ xsi:type="description:SystemColor"
+ href="environment:/viewpoint#//@systemColors/@entries[name='light_gray']"/>
</style>
</containerMappings>
</defaultLayer>
</ownedRepresentations>
</ownedViewpoints>
- <extensions xsi:type="properties:ViewExtensionDescription" identifier="Properties" defaultPage="//@extensions.0/@pages.0" labelExpression="aql:self.name" preconditionExpression="">
- <pages identifier="All EClass attributes" labelExpression="aql:self.name" domainClass="ecore.EAttribute" semanticCandidateExpression="aql:self.eContents(ecore::EAttribute)" groups="//@extensions.0/@groups.0"/>
- <pages identifier="Single EAttribute" labelExpression="aql:self.name" domainClass="ecore.EAttribute" semanticCandidateExpression="var:self" groups="//@extensions.0/@groups.0"/>
- <groups identifier="EAttribute properties" labelExpression="EAttribute properties" domainClass="ecore.EAttribute" semanticCandidateExpression="">
- <container identifier="container">
- <widgets xsi:type="properties:TextDescription" identifier="Name" labelExpression="Name" valueExpression="feature:name">
- <initialOperation>
- <firstModelOperations xsi:type="tool:SetValue" featureName="name" valueExpression="aql:newValue"/>
- </initialOperation>
- </widgets>
- <widgets xsi:type="properties:LabelDescription" identifier="Label" labelExpression="feature:name"/>
- </container>
- </groups>
- </extensions>
</description:Group>
diff --git a/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi b/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi
index 6b613ee086..9fa9950f78 100644
--- a/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi
+++ b/incubation/org.eclipse.sirius.ui.properties/model/properties.xmi
@@ -18,36 +18,41 @@
<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).toString()">
- <initialOperation>
- <firstModelOperations
- xsi:type="tool:ChangeContext"
- browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/>
- </initialOperation>
- </widget>
- </cases>
- <cases
- caseExpression="EBoolean">
- <widget
- xsi:type="properties:CheckboxDescription"
- labelExpression="aql:eStructuralFeature.name"
- valueExpression="aql:self.eGet(eStructuralFeature)">
- <initialOperation>
- <firstModelOperations
- xsi:type="tool:ChangeContext"
- browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/>
- </initialOperation>
- </widget>
- </cases>
- </switch>
+ <ifs
+ predicateExpression="aql:eStructuralFeature.eType = ecore::EString">
+ <widget
+ xsi:type="properties:TextDescription"
+ labelExpression="aql:eStructuralFeature.name"
+ valueExpression="aql:self.eGet(eStructuralFeature)">
+ <initialOperation>
+ <firstModelOperations
+ xsi:type="tool:ChangeContext"
+ browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/>
+ </initialOperation>
+ </widget>
+ </ifs>
+ <ifs
+ predicateExpression="aql:eStructuralFeature.eType = ecore::EBoolean">
+ <widget
+ xsi:type="properties:CheckboxDescription"
+ labelExpression="aql:eStructuralFeature.name"
+ valueExpression="aql:self.eGet(eStructuralFeature)">
+ <initialOperation>
+ <firstModelOperations
+ xsi:type="tool:ChangeContext"
+ browseExpression="aql:self.eSet(eStructuralFeature, newValue)"/>
+ </initialOperation>
+ </widget>
+ </ifs>
+ <ifs
+ predicateExpression="aql:eStructuralFeature.oclIsKindOf(ecore::EReference) and not(eStructuralFeature.many) and not(eStructuralFeature.containment) and not(eStructuralFeature.container) and not(eStructuralFeature.derived)">
+ <widget
+ xsi:type="properties:SelectDescription"
+ labelExpression="aql:eStructuralFeature.name"
+ valueExpression="aql:self.eGet(eStructuralFeature)"
+ candidatesExpression="aql:self.eResource().getContents().eAllContents()->filter(eStructuralFeature.eType)"
+ candidateDisplayExpression="aql:candidate.name"/>
+ </ifs>
</dynamicMappings>
</container>
</groups>
diff --git a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java
index 038a0fe0f3..6cc1500ebc 100644
--- a/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java
+++ b/incubation/org.eclipse.sirius.ui.properties/src/org/eclipse/sirius/ui/properties/internal/tabprovider/ViewDescriptionConverter.java
@@ -15,9 +15,8 @@ import java.util.List;
import org.eclipse.eef.EEFButtonDescription;
import org.eclipse.eef.EEFCheckboxDescription;
import org.eclipse.eef.EEFContainerDescription;
-import org.eclipse.eef.EEFDynamicMappingCase;
import org.eclipse.eef.EEFDynamicMappingFor;
-import org.eclipse.eef.EEFDynamicMappingSwitch;
+import org.eclipse.eef.EEFDynamicMappingIf;
import org.eclipse.eef.EEFGroupDescription;
import org.eclipse.eef.EEFLabelDescription;
import org.eclipse.eef.EEFPageDescription;
@@ -30,9 +29,8 @@ import org.eclipse.eef.EefFactory;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.sirius.properties.ButtonDescription;
import org.eclipse.sirius.properties.CheckboxDescription;
-import org.eclipse.sirius.properties.DynamicMappingCase;
import org.eclipse.sirius.properties.DynamicMappingFor;
-import org.eclipse.sirius.properties.DynamicMappingSwitch;
+import org.eclipse.sirius.properties.DynamicMappingIf;
import org.eclipse.sirius.properties.GroupDescription;
import org.eclipse.sirius.properties.LabelDescription;
import org.eclipse.sirius.properties.PageDescription;
@@ -122,21 +120,15 @@ public class ViewDescriptionConverter {
eefDynamicMappingFor.setDomainClassExpression(dynamicMappingFor.getDomainClassExpression());
eefDynamicMappingFor.setIterator(dynamicMappingFor.getIterator());
- DynamicMappingSwitch dynamicMappingSwitch = dynamicMappingFor.getSwitch();
- EEFDynamicMappingSwitch eefDynamicMappingSwitch = EefFactory.eINSTANCE.createEEFDynamicMappingSwitch();
- eefDynamicMappingSwitch.setSwitchExpression(dynamicMappingSwitch.getSwitchExpression());
- eefDynamicMappingFor.setSwitch(eefDynamicMappingSwitch);
+ List<DynamicMappingIf> dynamicMappingIfs = dynamicMappingFor.getIfs();
+ for (DynamicMappingIf dynamicMappingIf : dynamicMappingIfs) {
+ EEFDynamicMappingIf eefDynamicMappingIf = EefFactory.eINSTANCE.createEEFDynamicMappingIf();
+ eefDynamicMappingIf.setPredicateExpression(dynamicMappingIf.getPredicateExpression());
- for (DynamicMappingCase dynamicMappingCase : dynamicMappingSwitch.getCases()) {
- EEFDynamicMappingCase eefDynamicMappingCase = EefFactory.eINSTANCE.createEEFDynamicMappingCase();
- eefDynamicMappingCase.setCaseExpression(dynamicMappingCase.getCaseExpression());
+ EEFWidgetDescription eefWidgetDescription = this.createEEFWidgetDescription(dynamicMappingIf.getWidget());
+ eefDynamicMappingIf.setWidget(eefWidgetDescription);
- EEFWidgetDescription widgetDescription = this.createEEFWidgetDescription(dynamicMappingCase.getWidget());
- if (widgetDescription != null) {
- eefDynamicMappingCase.setWidget(widgetDescription);
- }
-
- eefDynamicMappingSwitch.getCases().add(eefDynamicMappingCase);
+ eefDynamicMappingFor.getIfs().add(eefDynamicMappingIf);
}
containerDesc.getDynamicMappings().add(eefDynamicMappingFor);

Back to the top