diff options
| author | Mélanie Bats | 2016-01-27 13:55:21 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-02-04 10:01:15 +0000 |
| commit | 884a10b5826cb5bc9494394fe1042209e01fe060 (patch) | |
| tree | 392fc4a2ad0d3a5effb5bdb36cac772b80875923 | |
| parent | d7f35f193b6d44b57a00c83901075a4f3f13bf36 (diff) | |
| download | org.eclipse.sirius-884a10b5826cb5bc9494394fe1042209e01fe060.tar.gz org.eclipse.sirius-884a10b5826cb5bc9494394fe1042209e01fe060.tar.xz org.eclipse.sirius-884a10b5826cb5bc9494394fe1042209e01fe060.zip | |
[482528] Contribute checkbox description to the view extension
description
A new CheckboxDescription is defined in properties.ecore.
The CheckboxDescription is a new kind of widget which describes a
checkbox in the proerties view.
Bug: 482528
Change-Id: I777e4ae7c1686ea4b04c685eb372e9bf1a644ee0
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
28 files changed, 1342 insertions, 288 deletions
diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateCheckboxDescription_initialOperation_InitialOperation.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateCheckboxDescription_initialOperation_InitialOperation.gif Binary files differnew file mode 100644 index 0000000000..448138d708 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateCheckboxDescription_initialOperation_InitialOperation.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_widgets_CheckboxDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_widgets_CheckboxDescription.gif Binary files differnew file mode 100644 index 0000000000..45bc7b7b67 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateContainerDescription_widgets_CheckboxDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_CheckboxDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_CheckboxDescription.gif Binary files differnew file mode 100644 index 0000000000..a91d627903 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/ctool16/CreateDynamicMappingCase_widget_CheckboxDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/CheckboxDescription.gif b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/CheckboxDescription.gif Binary files differnew file mode 100644 index 0000000000..739ebbfa6a --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/icons/full/obj16/CheckboxDescription.gif diff --git a/incubation/org.eclipse.sirius.properties.edit/plugin.properties b/incubation/org.eclipse.sirius.properties.edit/plugin.properties index caacb4a544..ba8c474b6c 100644 --- a/incubation/org.eclipse.sirius.properties.edit/plugin.properties +++ b/incubation/org.eclipse.sirius.properties.edit/plugin.properties @@ -65,3 +65,6 @@ _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 diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/CheckboxDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/CheckboxDescriptionItemProvider.java new file mode 100644 index 0000000000..4032f5d275 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/CheckboxDescriptionItemProvider.java @@ -0,0 +1,183 @@ +/** + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +import org.eclipse.sirius.properties.CheckboxDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +import org.eclipse.sirius.viewpoint.description.tool.ToolFactory; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.properties.CheckboxDescription} object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ +public class CheckboxDescriptionItemProvider extends WidgetDescriptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CheckboxDescriptionItemProvider(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); + + addValueExpressionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value Expression feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addValueExpressionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_CheckboxDescription_valueExpression_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_CheckboxDescription_valueExpression_feature", "_UI_CheckboxDescription_type"), + PropertiesPackage.Literals.CHECKBOX_DESCRIPTION__VALUE_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.CHECKBOX_DESCRIPTION__INITIAL_OPERATION); + } + 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 CheckboxDescription.gif. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/CheckboxDescription")); + } + + /** + * This returns the label text for the adapted class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String getText(Object object) { + String label = ((CheckboxDescription)object).getIdentifier(); + return label == null || label.length() == 0 ? + getString("_UI_CheckboxDescription_type") : + getString("_UI_CheckboxDescription_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(CheckboxDescription.class)) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + 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.CHECKBOX_DESCRIPTION__INITIAL_OPERATION, + ToolFactory.eINSTANCE.createInitialOperation())); + } + +} diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java index 2f1f7ce48f..e5b7af870d 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/ContainerDescriptionItemProvider.java @@ -203,6 +203,11 @@ public class ContainerDescriptionItemProvider newChildDescriptors.add (createChildParameter (PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, + PropertiesFactory.eINSTANCE.createCheckboxDescription())); + + newChildDescriptors.add + (createChildParameter + (PropertiesPackage.Literals.CONTAINER_DESCRIPTION__WIDGETS, PropertiesFactory.eINSTANCE.createSelectDescription())); newChildDescriptors.add diff --git a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/DynamicMappingCaseItemProvider.java index a0269421a7..2e19c183f7 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/DynamicMappingCaseItemProvider.java @@ -201,6 +201,11 @@ public class DynamicMappingCaseItemProvider newChildDescriptors.add (createChildParameter (PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, + PropertiesFactory.eINSTANCE.createCheckboxDescription())); + + newChildDescriptors.add + (createChildParameter + (PropertiesPackage.Literals.DYNAMIC_MAPPING_CASE__WIDGET, PropertiesFactory.eINSTANCE.createSelectDescription())); } 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 86d5e59777..82c63ad109 100644 --- a/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties.edit/src-gen/org/eclipse/sirius/properties/provider/PropertiesItemProviderAdapterFactory.java @@ -236,6 +236,52 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto } /** + * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.CheckboxDescription} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CheckboxDescriptionItemProvider checkboxDescriptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.properties.CheckboxDescription}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createCheckboxDescriptionAdapter() { + if (checkboxDescriptionItemProvider == null) { + checkboxDescriptionItemProvider = new CheckboxDescriptionItemProvider(this); + } + + return checkboxDescriptionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.SelectDescription} instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SelectDescriptionItemProvider selectDescriptionItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.properties.SelectDescription}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Adapter createSelectDescriptionAdapter() { + if (selectDescriptionItemProvider == null) { + selectDescriptionItemProvider = new SelectDescriptionItemProvider(this); + } + + return selectDescriptionItemProvider; + } + + /** * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.DynamicMappingFor} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -305,29 +351,6 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto } /** - * This keeps track of the one adapter used for all {@link org.eclipse.sirius.properties.SelectDescription} instances. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected SelectDescriptionItemProvider selectDescriptionItemProvider; - - /** - * This creates an adapter for a {@link org.eclipse.sirius.properties.SelectDescription}. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - @Override - public Adapter createSelectDescriptionAdapter() { - if (selectDescriptionItemProvider == null) { - selectDescriptionItemProvider = new SelectDescriptionItemProvider(this); - } - - return selectDescriptionItemProvider; - } - - /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -432,10 +455,11 @@ public class PropertiesItemProviderAdapterFactory extends PropertiesAdapterFacto if (containerDescriptionItemProvider != null) containerDescriptionItemProvider.dispose(); if (textDescriptionItemProvider != null) textDescriptionItemProvider.dispose(); if (labelDescriptionItemProvider != null) labelDescriptionItemProvider.dispose(); + if (checkboxDescriptionItemProvider != null) checkboxDescriptionItemProvider.dispose(); + if (selectDescriptionItemProvider != null) selectDescriptionItemProvider.dispose(); if (dynamicMappingForItemProvider != null) dynamicMappingForItemProvider.dispose(); if (dynamicMappingSwitchItemProvider != null) dynamicMappingSwitchItemProvider.dispose(); if (dynamicMappingCaseItemProvider != null) dynamicMappingCaseItemProvider.dispose(); - if (selectDescriptionItemProvider != null) selectDescriptionItemProvider.dispose(); } /** diff --git a/incubation/org.eclipse.sirius.properties/model/properties.ecore b/incubation/org.eclipse.sirius.properties/model/properties.ecore index db50ccdb90..4c5b227347 100644 --- a/incubation/org.eclipse.sirius.properties/model/properties.ecore +++ b/incubation/org.eclipse.sirius.properties/model/properties.ecore @@ -54,25 +54,11 @@ containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="LabelDescription" eSuperTypes="#//WidgetDescription"/> - <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingFor"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="iterator" lowerBound="1" - eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainClassExpression" - lowerBound="1" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="switch" lowerBound="1" - eType="#//DynamicMappingSwitch" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingSwitch"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="switchExpression" lowerBound="1" - eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="cases" lowerBound="1" upperBound="-1" - eType="#//DynamicMappingCase" containment="true"/> - </eClassifiers> - <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingCase"> - <eStructuralFeatures xsi:type="ecore:EAttribute" name="caseExpression" lowerBound="1" - eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="widget" lowerBound="1" - eType="#//WidgetDescription" containment="true"/> + <eClassifiers xsi:type="ecore:EClass" name="CheckboxDescription" eSuperTypes="#//WidgetDescription"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="valueExpression" eType="ecore:EDataType ../../org.eclipse.sirius/model/viewpoint.ecore#//description/InterpretedExpression"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="initialOperation" lowerBound="1" + eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//description/tool/InitialOperation" + containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="SelectDescription" eSuperTypes="#//WidgetDescription"> <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> @@ -102,4 +88,24 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingFor"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="iterator" lowerBound="1" + eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainClassExpression" + lowerBound="1" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="switch" lowerBound="1" + eType="#//DynamicMappingSwitch" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingSwitch"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="switchExpression" lowerBound="1" + eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="cases" lowerBound="1" upperBound="-1" + eType="#//DynamicMappingCase" containment="true"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DynamicMappingCase"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="caseExpression" lowerBound="1" + eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="widget" lowerBound="1" + eType="#//WidgetDescription" containment="true"/> + </eClassifiers> </ecore:EPackage> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/CheckboxDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/CheckboxDescription.java new file mode 100644 index 0000000000..4d8a100b8a --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/CheckboxDescription.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties; + +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Checkbox Description</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.sirius.properties.CheckboxDescription#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.sirius.properties.CheckboxDescription#getInitialOperation <em>Initial Operation</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.sirius.properties.PropertiesPackage#getCheckboxDescription() + * @model + * @generated + */ +public interface CheckboxDescription extends WidgetDescription { + /** + * Returns the value of the '<em><b>Value Expression</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value 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>Value Expression</em>' attribute. + * @see #setValueExpression(String) + * @see org.eclipse.sirius.properties.PropertiesPackage#getCheckboxDescription_ValueExpression() + * @model dataType="org.eclipse.sirius.viewpoint.description.InterpretedExpression" + * @generated + */ + String getValueExpression(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.properties.CheckboxDescription#getValueExpression <em>Value Expression</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value Expression</em>' attribute. + * @see #getValueExpression() + * @generated + */ + void setValueExpression(String value); + + /** + * Returns the value of the '<em><b>Initial Operation</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Initial Operation</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Initial Operation</em>' containment reference. + * @see #setInitialOperation(InitialOperation) + * @see org.eclipse.sirius.properties.PropertiesPackage#getCheckboxDescription_InitialOperation() + * @model containment="true" required="true" + * @generated + */ + InitialOperation getInitialOperation(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.properties.CheckboxDescription#getInitialOperation <em>Initial Operation</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Initial Operation</em>' containment reference. + * @see #getInitialOperation() + * @generated + */ + void setInitialOperation(InitialOperation value); + +} // CheckboxDescription diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java index 72dde02eef..7489008e88 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/ContainerDescription.java @@ -81,7 +81,7 @@ public interface ContainerDescription extends EObject { * The list contents are of type {@link org.eclipse.sirius.properties.DynamicMappingFor}. * <!-- begin-user-doc --> * <p> - * If the meaning of the '<em>Dynamic Mappings</em>' reference list isn't clear, + * If the meaning of the '<em>Dynamic Mappings</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> 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 ca2297109f..6353ce578a 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesFactory.java @@ -85,6 +85,24 @@ public interface PropertiesFactory extends EFactory { LabelDescription createLabelDescription(); /** + * Returns a new object of class '<em>Checkbox Description</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Checkbox Description</em>'. + * @generated + */ + CheckboxDescription createCheckboxDescription(); + + /** + * Returns a new object of class '<em>Select Description</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Select Description</em>'. + * @generated + */ + SelectDescription createSelectDescription(); + + /** * Returns a new object of class '<em>Dynamic Mapping For</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -112,15 +130,6 @@ public interface PropertiesFactory extends EFactory { DynamicMappingCase createDynamicMappingCase(); /** - * Returns a new object of class '<em>Select Description</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return a new object of class '<em>Select Description</em>'. - * @generated - */ - SelectDescription createSelectDescription(); - - /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/PropertiesPackage.java index 6a7f5bde62..e5db175b70 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 @@ -405,7 +405,6 @@ public interface PropertiesPackage extends EPackage { */ int TEXT_DESCRIPTION_FEATURE_COUNT = WIDGET_DESCRIPTION_FEATURE_COUNT + 2; - /** * The meta object id for the '{@link org.eclipse.sirius.properties.impl.LabelDescriptionImpl <em>Label Description</em>}' class. * <!-- begin-user-doc --> @@ -443,200 +442,253 @@ public interface PropertiesPackage extends EPackage { */ int LABEL_DESCRIPTION_FEATURE_COUNT = WIDGET_DESCRIPTION_FEATURE_COUNT + 0; + /** + * The meta object id for the '{@link org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl <em>Checkbox Description</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxDescription() + * @generated + */ + int CHECKBOX_DESCRIPTION = 7; /** - * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class. + * The feature id for the '<em><b>Identifier</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor() * @generated + * @ordered */ - int DYNAMIC_MAPPING_FOR = 7; + int CHECKBOX_DESCRIPTION__IDENTIFIER = WIDGET_DESCRIPTION__IDENTIFIER; /** - * The feature id for the '<em><b>Iterator</b></em>' attribute. + * The feature id for the '<em><b>Label Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__ITERATOR = 0; + int CHECKBOX_DESCRIPTION__LABEL_EXPRESSION = WIDGET_DESCRIPTION__LABEL_EXPRESSION; /** - * The feature id for the '<em><b>Domain Class Expression</b></em>' attribute. + * The feature id for the '<em><b>Value Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = 1; + int CHECKBOX_DESCRIPTION__VALUE_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** - * The feature id for the '<em><b>Switch</b></em>' containment reference. + * The feature id for the '<em><b>Initial Operation</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR__SWITCH = 2; + int CHECKBOX_DESCRIPTION__INITIAL_OPERATION = WIDGET_DESCRIPTION_FEATURE_COUNT + 1; /** - * The number of structural features of the '<em>Dynamic Mapping For</em>' class. + * The number of structural features of the '<em>Checkbox Description</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_FOR_FEATURE_COUNT = 3; + int CHECKBOX_DESCRIPTION_FEATURE_COUNT = WIDGET_DESCRIPTION_FEATURE_COUNT + 2; /** - * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl <em>Dynamic Mapping Switch</em>}' class. + * The meta object id for the '{@link org.eclipse.sirius.properties.impl.SelectDescriptionImpl <em>Select Description</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.SelectDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectDescription() * @generated */ - int DYNAMIC_MAPPING_SWITCH = 8; + int SELECT_DESCRIPTION = 8; /** - * The feature id for the '<em><b>Switch Expression</b></em>' attribute. + * The feature id for the '<em><b>Identifier</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = 0; + int SELECT_DESCRIPTION__IDENTIFIER = WIDGET_DESCRIPTION__IDENTIFIER; /** - * The feature id for the '<em><b>Cases</b></em>' containment reference list. + * The feature id for the '<em><b>Label Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_SWITCH__CASES = 1; + int SELECT_DESCRIPTION__LABEL_EXPRESSION = WIDGET_DESCRIPTION__LABEL_EXPRESSION; /** - * The number of structural features of the '<em>Dynamic Mapping Switch</em>' class. + * The feature id for the '<em><b>Value Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_SWITCH_FEATURE_COUNT = 2; + int SELECT_DESCRIPTION__VALUE_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** - * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl <em>Dynamic Mapping Case</em>}' class. + * The feature id for the '<em><b>Initial Operation</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase() * @generated + * @ordered */ - int DYNAMIC_MAPPING_CASE = 9; + int SELECT_DESCRIPTION__INITIAL_OPERATION = WIDGET_DESCRIPTION_FEATURE_COUNT + 1; /** - * The feature id for the '<em><b>Case Expression</b></em>' attribute. + * The feature id for the '<em><b>Candidates Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = 0; + int SELECT_DESCRIPTION__CANDIDATES_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 2; /** - * The feature id for the '<em><b>Widget</b></em>' containment reference. + * The feature id for the '<em><b>Candidate Display Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_CASE__WIDGET = 1; + int SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 3; /** - * The number of structural features of the '<em>Dynamic Mapping Case</em>' class. + * The number of structural features of the '<em>Select Description</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int DYNAMIC_MAPPING_CASE_FEATURE_COUNT = 2; + int SELECT_DESCRIPTION_FEATURE_COUNT = WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + /** + * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor() + * @generated + */ + int DYNAMIC_MAPPING_FOR = 9; /** - * The meta object id for the '{@link org.eclipse.sirius.properties.impl.SelectDescriptionImpl <em>Select Description</em>}' class. + * The feature id for the '<em><b>Iterator</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.SelectDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectDescription() * @generated + * @ordered */ - int SELECT_DESCRIPTION = 10; + int DYNAMIC_MAPPING_FOR__ITERATOR = 0; /** - * The feature id for the '<em><b>Identifier</b></em>' attribute. + * The feature id for the '<em><b>Domain Class Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__IDENTIFIER = WIDGET_DESCRIPTION__IDENTIFIER; + int DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = 1; /** - * The feature id for the '<em><b>Label Expression</b></em>' attribute. + * The feature id for the '<em><b>Switch</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__LABEL_EXPRESSION = WIDGET_DESCRIPTION__LABEL_EXPRESSION; + int DYNAMIC_MAPPING_FOR__SWITCH = 2; /** - * The feature id for the '<em><b>Value Expression</b></em>' attribute. + * The number of structural features of the '<em>Dynamic Mapping For</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__VALUE_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 0; + int DYNAMIC_MAPPING_FOR_FEATURE_COUNT = 3; /** - * The feature id for the '<em><b>Initial Operation</b></em>' containment reference. + * The meta object id for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl <em>Dynamic Mapping Switch</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingSwitch() + * @generated + */ + int DYNAMIC_MAPPING_SWITCH = 10; + + /** + * The feature id for the '<em><b>Switch Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__INITIAL_OPERATION = WIDGET_DESCRIPTION_FEATURE_COUNT + 1; + int DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = 0; /** - * The feature id for the '<em><b>Candidates Expression</b></em>' attribute. + * The feature id for the '<em><b>Cases</b></em>' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__CANDIDATES_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 2; + int DYNAMIC_MAPPING_SWITCH__CASES = 1; /** - * The feature id for the '<em><b>Candidate Display Expression</b></em>' attribute. + * The number of structural features of the '<em>Dynamic Mapping Switch</em>' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION = WIDGET_DESCRIPTION_FEATURE_COUNT + 3; + int DYNAMIC_MAPPING_SWITCH_FEATURE_COUNT = 2; /** - * The number of structural features of the '<em>Select Description</em>' class. + * 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 = 11; + + /** + * The feature id for the '<em><b>Case Expression</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int SELECT_DESCRIPTION_FEATURE_COUNT = WIDGET_DESCRIPTION_FEATURE_COUNT + 4; + int DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = 0; + + /** + * The feature id for the '<em><b>Widget</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DYNAMIC_MAPPING_CASE__WIDGET = 1; + + /** + * The number of structural features of the '<em>Dynamic Mapping Case</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DYNAMIC_MAPPING_CASE_FEATURE_COUNT = 2; /** @@ -963,6 +1015,92 @@ public interface PropertiesPackage extends EPackage { EClass getLabelDescription(); /** + * Returns the meta object for class '{@link org.eclipse.sirius.properties.CheckboxDescription <em>Checkbox Description</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Checkbox Description</em>'. + * @see org.eclipse.sirius.properties.CheckboxDescription + * @generated + */ + EClass getCheckboxDescription(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.CheckboxDescription#getValueExpression <em>Value Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value Expression</em>'. + * @see org.eclipse.sirius.properties.CheckboxDescription#getValueExpression() + * @see #getCheckboxDescription() + * @generated + */ + EAttribute getCheckboxDescription_ValueExpression(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.sirius.properties.CheckboxDescription#getInitialOperation <em>Initial Operation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Initial Operation</em>'. + * @see org.eclipse.sirius.properties.CheckboxDescription#getInitialOperation() + * @see #getCheckboxDescription() + * @generated + */ + EReference getCheckboxDescription_InitialOperation(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.properties.SelectDescription <em>Select Description</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Select Description</em>'. + * @see org.eclipse.sirius.properties.SelectDescription + * @generated + */ + EClass getSelectDescription(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getValueExpression <em>Value Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value Expression</em>'. + * @see org.eclipse.sirius.properties.SelectDescription#getValueExpression() + * @see #getSelectDescription() + * @generated + */ + EAttribute getSelectDescription_ValueExpression(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.sirius.properties.SelectDescription#getInitialOperation <em>Initial Operation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Initial Operation</em>'. + * @see org.eclipse.sirius.properties.SelectDescription#getInitialOperation() + * @see #getSelectDescription() + * @generated + */ + EReference getSelectDescription_InitialOperation(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getCandidatesExpression <em>Candidates Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Candidates Expression</em>'. + * @see org.eclipse.sirius.properties.SelectDescription#getCandidatesExpression() + * @see #getSelectDescription() + * @generated + */ + EAttribute getSelectDescription_CandidatesExpression(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getCandidateDisplayExpression <em>Candidate Display Expression</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Candidate Display Expression</em>'. + * @see org.eclipse.sirius.properties.SelectDescription#getCandidateDisplayExpression() + * @see #getSelectDescription() + * @generated + */ + EAttribute getSelectDescription_CandidateDisplayExpression(); + + /** * Returns the meta object for class '{@link org.eclipse.sirius.properties.DynamicMappingFor <em>Dynamic Mapping For</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1070,60 +1208,6 @@ public interface PropertiesPackage extends EPackage { EReference getDynamicMappingCase_Widget(); /** - * Returns the meta object for class '{@link org.eclipse.sirius.properties.SelectDescription <em>Select Description</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for class '<em>Select Description</em>'. - * @see org.eclipse.sirius.properties.SelectDescription - * @generated - */ - EClass getSelectDescription(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getValueExpression <em>Value Expression</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Value Expression</em>'. - * @see org.eclipse.sirius.properties.SelectDescription#getValueExpression() - * @see #getSelectDescription() - * @generated - */ - EAttribute getSelectDescription_ValueExpression(); - - /** - * Returns the meta object for the containment reference '{@link org.eclipse.sirius.properties.SelectDescription#getInitialOperation <em>Initial Operation</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the containment reference '<em>Initial Operation</em>'. - * @see org.eclipse.sirius.properties.SelectDescription#getInitialOperation() - * @see #getSelectDescription() - * @generated - */ - EReference getSelectDescription_InitialOperation(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getCandidatesExpression <em>Candidates Expression</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Candidates Expression</em>'. - * @see org.eclipse.sirius.properties.SelectDescription#getCandidatesExpression() - * @see #getSelectDescription() - * @generated - */ - EAttribute getSelectDescription_CandidatesExpression(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.sirius.properties.SelectDescription#getCandidateDisplayExpression <em>Candidate Display Expression</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Candidate Display Expression</em>'. - * @see org.eclipse.sirius.properties.SelectDescription#getCandidateDisplayExpression() - * @see #getSelectDescription() - * @generated - */ - EAttribute getSelectDescription_CandidateDisplayExpression(); - - /** * Returns the factory that creates the instances of the model. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1400,132 +1484,158 @@ public interface PropertiesPackage extends EPackage { EClass LABEL_DESCRIPTION = eINSTANCE.getLabelDescription(); /** - * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class. + * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl <em>Checkbox Description</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor() + * @see org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getCheckboxDescription() * @generated */ - EClass DYNAMIC_MAPPING_FOR = eINSTANCE.getDynamicMappingFor(); + EClass CHECKBOX_DESCRIPTION = eINSTANCE.getCheckboxDescription(); /** - * The meta object literal for the '<em><b>Iterator</b></em>' attribute feature. + * The meta object literal for the '<em><b>Value Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute DYNAMIC_MAPPING_FOR__ITERATOR = eINSTANCE.getDynamicMappingFor_Iterator(); + EAttribute CHECKBOX_DESCRIPTION__VALUE_EXPRESSION = eINSTANCE.getCheckboxDescription_ValueExpression(); /** - * The meta object literal for the '<em><b>Domain Class Expression</b></em>' attribute feature. + * The meta object literal for the '<em><b>Initial Operation</b></em>' containment reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = eINSTANCE.getDynamicMappingFor_DomainClassExpression(); + EReference CHECKBOX_DESCRIPTION__INITIAL_OPERATION = eINSTANCE.getCheckboxDescription_InitialOperation(); /** - * The meta object literal for the '<em><b>Switch</b></em>' containment reference feature. + * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.SelectDescriptionImpl <em>Select Description</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.SelectDescriptionImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectDescription() * @generated */ - EReference DYNAMIC_MAPPING_FOR__SWITCH = eINSTANCE.getDynamicMappingFor_Switch(); + EClass SELECT_DESCRIPTION = eINSTANCE.getSelectDescription(); /** - * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl <em>Dynamic Mapping Switch</em>}' class. + * The meta object literal for the '<em><b>Value Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.DynamicMappingSwitchImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingSwitch() * @generated */ - EClass DYNAMIC_MAPPING_SWITCH = eINSTANCE.getDynamicMappingSwitch(); + EAttribute SELECT_DESCRIPTION__VALUE_EXPRESSION = eINSTANCE.getSelectDescription_ValueExpression(); /** - * The meta object literal for the '<em><b>Switch Expression</b></em>' attribute feature. + * The meta object literal for the '<em><b>Initial Operation</b></em>' containment reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = eINSTANCE.getDynamicMappingSwitch_SwitchExpression(); + EReference SELECT_DESCRIPTION__INITIAL_OPERATION = eINSTANCE.getSelectDescription_InitialOperation(); /** - * The meta object literal for the '<em><b>Cases</b></em>' containment reference list feature. + * The meta object literal for the '<em><b>Candidates Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference DYNAMIC_MAPPING_SWITCH__CASES = eINSTANCE.getDynamicMappingSwitch_Cases(); + EAttribute SELECT_DESCRIPTION__CANDIDATES_EXPRESSION = eINSTANCE.getSelectDescription_CandidatesExpression(); /** - * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl <em>Dynamic Mapping Case</em>}' class. + * The meta object literal for the '<em><b>Candidate Display Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase() * @generated */ - EClass DYNAMIC_MAPPING_CASE = eINSTANCE.getDynamicMappingCase(); + EAttribute SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION = eINSTANCE.getSelectDescription_CandidateDisplayExpression(); /** - * The meta object literal for the '<em><b>Case Expression</b></em>' attribute feature. + * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingForImpl <em>Dynamic Mapping For</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.DynamicMappingForImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingFor() * @generated */ - EAttribute DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = eINSTANCE.getDynamicMappingCase_CaseExpression(); + EClass DYNAMIC_MAPPING_FOR = eINSTANCE.getDynamicMappingFor(); /** - * The meta object literal for the '<em><b>Widget</b></em>' containment reference feature. + * The meta object literal for the '<em><b>Iterator</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EReference DYNAMIC_MAPPING_CASE__WIDGET = eINSTANCE.getDynamicMappingCase_Widget(); + EAttribute DYNAMIC_MAPPING_FOR__ITERATOR = eINSTANCE.getDynamicMappingFor_Iterator(); /** - * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.SelectDescriptionImpl <em>Select Description</em>}' class. + * The meta object literal for the '<em><b>Domain Class Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.sirius.properties.impl.SelectDescriptionImpl - * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getSelectDescription() * @generated */ - EClass SELECT_DESCRIPTION = eINSTANCE.getSelectDescription(); + EAttribute DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION = eINSTANCE.getDynamicMappingFor_DomainClassExpression(); /** - * The meta object literal for the '<em><b>Value Expression</b></em>' attribute feature. + * The meta object literal for the '<em><b>Switch</b></em>' containment reference feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute SELECT_DESCRIPTION__VALUE_EXPRESSION = eINSTANCE.getSelectDescription_ValueExpression(); + EReference DYNAMIC_MAPPING_FOR__SWITCH = eINSTANCE.getDynamicMappingFor_Switch(); /** - * The meta object literal for the '<em><b>Initial Operation</b></em>' containment reference feature. + * 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 */ - EReference SELECT_DESCRIPTION__INITIAL_OPERATION = eINSTANCE.getSelectDescription_InitialOperation(); + EClass DYNAMIC_MAPPING_SWITCH = eINSTANCE.getDynamicMappingSwitch(); /** - * The meta object literal for the '<em><b>Candidates Expression</b></em>' attribute feature. + * The meta object literal for the '<em><b>Switch Expression</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute SELECT_DESCRIPTION__CANDIDATES_EXPRESSION = eINSTANCE.getSelectDescription_CandidatesExpression(); + EAttribute DYNAMIC_MAPPING_SWITCH__SWITCH_EXPRESSION = eINSTANCE.getDynamicMappingSwitch_SwitchExpression(); /** - * The meta object literal for the '<em><b>Candidate Display Expression</b></em>' attribute feature. + * The meta object literal for the '<em><b>Cases</b></em>' containment reference list feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION = eINSTANCE.getSelectDescription_CandidateDisplayExpression(); + EReference DYNAMIC_MAPPING_SWITCH__CASES = eINSTANCE.getDynamicMappingSwitch_Cases(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl <em>Dynamic Mapping Case</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.sirius.properties.impl.DynamicMappingCaseImpl + * @see org.eclipse.sirius.properties.impl.PropertiesPackageImpl#getDynamicMappingCase() + * @generated + */ + EClass DYNAMIC_MAPPING_CASE = eINSTANCE.getDynamicMappingCase(); + + /** + * The meta object literal for the '<em><b>Case Expression</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DYNAMIC_MAPPING_CASE__CASE_EXPRESSION = eINSTANCE.getDynamicMappingCase_CaseExpression(); + + /** + * The meta object literal for the '<em><b>Widget</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DYNAMIC_MAPPING_CASE__WIDGET = eINSTANCE.getDynamicMappingCase_Widget(); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/CheckboxDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/CheckboxDescriptionImpl.java new file mode 100644 index 0000000000..bd3b7eca56 --- /dev/null +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/CheckboxDescriptionImpl.java @@ -0,0 +1,253 @@ +/** + * Copyright (c) 2015 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + * + */ +package org.eclipse.sirius.properties.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.sirius.properties.CheckboxDescription; +import org.eclipse.sirius.properties.PropertiesPackage; + +import org.eclipse.sirius.viewpoint.description.tool.InitialOperation; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Checkbox Description</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl#getValueExpression <em>Value Expression</em>}</li> + * <li>{@link org.eclipse.sirius.properties.impl.CheckboxDescriptionImpl#getInitialOperation <em>Initial Operation</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CheckboxDescriptionImpl extends WidgetDescriptionImpl implements CheckboxDescription { + /** + * The default value of the '{@link #getValueExpression() <em>Value Expression</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValueExpression() + * @generated + * @ordered + */ + protected static final String VALUE_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValueExpression() <em>Value Expression</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValueExpression() + * @generated + * @ordered + */ + protected String valueExpression = VALUE_EXPRESSION_EDEFAULT; + + /** + * The cached value of the '{@link #getInitialOperation() <em>Initial Operation</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInitialOperation() + * @generated + * @ordered + */ + protected InitialOperation initialOperation; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CheckboxDescriptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return PropertiesPackage.Literals.CHECKBOX_DESCRIPTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValueExpression() { + return valueExpression; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setValueExpression(String newValueExpression) { + String oldValueExpression = valueExpression; + valueExpression = newValueExpression; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION, oldValueExpression, valueExpression)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public InitialOperation getInitialOperation() { + return initialOperation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NotificationChain basicSetInitialOperation(InitialOperation newInitialOperation, NotificationChain msgs) { + InitialOperation oldInitialOperation = initialOperation; + initialOperation = newInitialOperation; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION, oldInitialOperation, newInitialOperation); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setInitialOperation(InitialOperation newInitialOperation) { + if (newInitialOperation != initialOperation) { + NotificationChain msgs = null; + if (initialOperation != null) + msgs = ((InternalEObject)initialOperation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION, null, msgs); + if (newInitialOperation != null) + msgs = ((InternalEObject)newInitialOperation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION, null, msgs); + msgs = basicSetInitialOperation(newInitialOperation, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION, newInitialOperation, newInitialOperation)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + return basicSetInitialOperation(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION: + return getValueExpression(); + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + return getInitialOperation(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION: + setValueExpression((String)newValue); + return; + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + setInitialOperation((InitialOperation)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION: + setValueExpression(VALUE_EXPRESSION_EDEFAULT); + return; + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + setInitialOperation((InitialOperation)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case PropertiesPackage.CHECKBOX_DESCRIPTION__VALUE_EXPRESSION: + return VALUE_EXPRESSION_EDEFAULT == null ? valueExpression != null : !VALUE_EXPRESSION_EDEFAULT.equals(valueExpression); + case PropertiesPackage.CHECKBOX_DESCRIPTION__INITIAL_OPERATION: + return initialOperation != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (valueExpression: "); + result.append(valueExpression); + result.append(')'); + return result.toString(); + } + +} //CheckboxDescriptionImpl diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java index 194378e647..e5733e2d40 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/ContainerDescriptionImpl.java @@ -12,15 +12,21 @@ package org.eclipse.sirius.properties.impl; import java.util.Collection; + import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; + import org.eclipse.emf.common.util.EList; + import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; + import org.eclipse.sirius.properties.ContainerDescription; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.PropertiesPackage; 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 77679c8180..e232d949cf 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesFactoryImpl.java @@ -71,10 +71,11 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac case PropertiesPackage.CONTAINER_DESCRIPTION: return createContainerDescription(); case PropertiesPackage.TEXT_DESCRIPTION: return createTextDescription(); case PropertiesPackage.LABEL_DESCRIPTION: return createLabelDescription(); + case PropertiesPackage.CHECKBOX_DESCRIPTION: return createCheckboxDescription(); + case PropertiesPackage.SELECT_DESCRIPTION: 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.SELECT_DESCRIPTION: return createSelectDescription(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -145,6 +146,26 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * <!-- end-user-doc --> * @generated */ + public CheckboxDescription createCheckboxDescription() { + CheckboxDescriptionImpl checkboxDescription = new CheckboxDescriptionImpl(); + return checkboxDescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SelectDescription createSelectDescription() { + SelectDescriptionImpl selectDescription = new SelectDescriptionImpl(); + return selectDescription; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public DynamicMappingFor createDynamicMappingFor() { DynamicMappingForImpl dynamicMappingFor = new DynamicMappingForImpl(); return dynamicMappingFor; @@ -175,16 +196,6 @@ public class PropertiesFactoryImpl extends EFactoryImpl implements PropertiesFac * <!-- end-user-doc --> * @generated */ - public SelectDescription createSelectDescription() { - SelectDescriptionImpl selectDescription = new SelectDescriptionImpl(); - return selectDescription; - } - - /** - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ public PropertiesPackage getPropertiesPackage() { return (PropertiesPackage)getEPackage(); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/impl/PropertiesPackageImpl.java index 56be628ba8..a67a1a6f0d 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 @@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.ContainerDescription; import org.eclipse.sirius.properties.DynamicMappingCase; import org.eclipse.sirius.properties.DynamicMappingFor; @@ -100,28 +101,35 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - private EClass dynamicMappingForEClass = null; + private EClass checkboxDescriptionEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - private EClass dynamicMappingSwitchEClass = null; + private EClass selectDescriptionEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - private EClass dynamicMappingCaseEClass = null; + private EClass dynamicMappingForEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - private EClass selectDescriptionEClass = null; + private EClass dynamicMappingSwitchEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass dynamicMappingCaseEClass = null; /** * Creates an instance of the model <b>Package</b>, registered with @@ -462,8 +470,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EClass getDynamicMappingFor() { - return dynamicMappingForEClass; + public EClass getCheckboxDescription() { + return checkboxDescriptionEClass; } /** @@ -471,8 +479,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getDynamicMappingFor_Iterator() { - return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(0); + public EAttribute getCheckboxDescription_ValueExpression() { + return (EAttribute)checkboxDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -480,8 +488,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getDynamicMappingFor_DomainClassExpression() { - return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(1); + public EReference getCheckboxDescription_InitialOperation() { + return (EReference)checkboxDescriptionEClass.getEStructuralFeatures().get(1); } /** @@ -489,8 +497,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EReference getDynamicMappingFor_Switch() { - return (EReference)dynamicMappingForEClass.getEStructuralFeatures().get(2); + public EClass getSelectDescription() { + return selectDescriptionEClass; } /** @@ -498,8 +506,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EClass getDynamicMappingSwitch() { - return dynamicMappingSwitchEClass; + public EAttribute getSelectDescription_ValueExpression() { + return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -507,8 +515,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getDynamicMappingSwitch_SwitchExpression() { - return (EAttribute)dynamicMappingSwitchEClass.getEStructuralFeatures().get(0); + public EReference getSelectDescription_InitialOperation() { + return (EReference)selectDescriptionEClass.getEStructuralFeatures().get(1); } /** @@ -516,8 +524,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EReference getDynamicMappingSwitch_Cases() { - return (EReference)dynamicMappingSwitchEClass.getEStructuralFeatures().get(1); + public EAttribute getSelectDescription_CandidatesExpression() { + return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(2); } /** @@ -525,8 +533,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EClass getDynamicMappingCase() { - return dynamicMappingCaseEClass; + public EAttribute getSelectDescription_CandidateDisplayExpression() { + return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(3); } /** @@ -534,8 +542,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getDynamicMappingCase_CaseExpression() { - return (EAttribute)dynamicMappingCaseEClass.getEStructuralFeatures().get(0); + public EClass getDynamicMappingFor() { + return dynamicMappingForEClass; } /** @@ -543,8 +551,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EReference getDynamicMappingCase_Widget() { - return (EReference)dynamicMappingCaseEClass.getEStructuralFeatures().get(1); + public EAttribute getDynamicMappingFor_Iterator() { + return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(0); } /** @@ -552,8 +560,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EClass getSelectDescription() { - return selectDescriptionEClass; + public EAttribute getDynamicMappingFor_DomainClassExpression() { + return (EAttribute)dynamicMappingForEClass.getEStructuralFeatures().get(1); } /** @@ -561,8 +569,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getSelectDescription_ValueExpression() { - return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(0); + public EReference getDynamicMappingFor_Switch() { + return (EReference)dynamicMappingForEClass.getEStructuralFeatures().get(2); } /** @@ -570,8 +578,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EReference getSelectDescription_InitialOperation() { - return (EReference)selectDescriptionEClass.getEStructuralFeatures().get(1); + public EClass getDynamicMappingSwitch() { + return dynamicMappingSwitchEClass; } /** @@ -579,8 +587,8 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getSelectDescription_CandidatesExpression() { - return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(2); + public EAttribute getDynamicMappingSwitch_SwitchExpression() { + return (EAttribute)dynamicMappingSwitchEClass.getEStructuralFeatures().get(0); } /** @@ -588,8 +596,35 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac * <!-- end-user-doc --> * @generated */ - public EAttribute getSelectDescription_CandidateDisplayExpression() { - return (EAttribute)selectDescriptionEClass.getEStructuralFeatures().get(3); + public EReference getDynamicMappingSwitch_Cases() { + return (EReference)dynamicMappingSwitchEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDynamicMappingCase() { + return dynamicMappingCaseEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDynamicMappingCase_CaseExpression() { + return (EAttribute)dynamicMappingCaseEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDynamicMappingCase_Widget() { + return (EReference)dynamicMappingCaseEClass.getEStructuralFeatures().get(1); } /** @@ -657,6 +692,16 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac labelDescriptionEClass = createEClass(LABEL_DESCRIPTION); + checkboxDescriptionEClass = createEClass(CHECKBOX_DESCRIPTION); + createEAttribute(checkboxDescriptionEClass, CHECKBOX_DESCRIPTION__VALUE_EXPRESSION); + createEReference(checkboxDescriptionEClass, CHECKBOX_DESCRIPTION__INITIAL_OPERATION); + + selectDescriptionEClass = createEClass(SELECT_DESCRIPTION); + createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__VALUE_EXPRESSION); + createEReference(selectDescriptionEClass, SELECT_DESCRIPTION__INITIAL_OPERATION); + createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__CANDIDATES_EXPRESSION); + createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION); + dynamicMappingForEClass = createEClass(DYNAMIC_MAPPING_FOR); createEAttribute(dynamicMappingForEClass, DYNAMIC_MAPPING_FOR__ITERATOR); createEAttribute(dynamicMappingForEClass, DYNAMIC_MAPPING_FOR__DOMAIN_CLASS_EXPRESSION); @@ -669,12 +714,6 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac dynamicMappingCaseEClass = createEClass(DYNAMIC_MAPPING_CASE); createEAttribute(dynamicMappingCaseEClass, DYNAMIC_MAPPING_CASE__CASE_EXPRESSION); createEReference(dynamicMappingCaseEClass, DYNAMIC_MAPPING_CASE__WIDGET); - - selectDescriptionEClass = createEClass(SELECT_DESCRIPTION); - createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__VALUE_EXPRESSION); - createEReference(selectDescriptionEClass, SELECT_DESCRIPTION__INITIAL_OPERATION); - createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__CANDIDATES_EXPRESSION); - createEAttribute(selectDescriptionEClass, SELECT_DESCRIPTION__CANDIDATE_DISPLAY_EXPRESSION); } /** @@ -713,6 +752,7 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac viewExtensionDescriptionEClass.getESuperTypes().add(theDescriptionPackage.getExtension()); textDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); labelDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); + checkboxDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); selectDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); // Initialize classes and features; add operations and parameters @@ -753,6 +793,16 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEClass(labelDescriptionEClass, LabelDescription.class, "LabelDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEClass(checkboxDescriptionEClass, CheckboxDescription.class, "CheckboxDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCheckboxDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, CheckboxDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCheckboxDescription_InitialOperation(), theToolPackage.getInitialOperation(), null, "initialOperation", null, 1, 1, CheckboxDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(selectDescriptionEClass, SelectDescription.class, "SelectDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSelectDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSelectDescription_InitialOperation(), theToolPackage.getInitialOperation(), null, "initialOperation", null, 1, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSelectDescription_CandidatesExpression(), theDescriptionPackage.getInterpretedExpression(), "candidatesExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSelectDescription_CandidateDisplayExpression(), theDescriptionPackage.getInterpretedExpression(), "candidateDisplayExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(dynamicMappingForEClass, DynamicMappingFor.class, "DynamicMappingFor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getDynamicMappingFor_Iterator(), theEcorePackage.getEString(), "iterator", null, 1, 1, DynamicMappingFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getDynamicMappingFor_DomainClassExpression(), theEcorePackage.getEString(), "domainClassExpression", null, 1, 1, DynamicMappingFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -766,12 +816,6 @@ public class PropertiesPackageImpl extends EPackageImpl implements PropertiesPac initEAttribute(getDynamicMappingCase_CaseExpression(), theEcorePackage.getEString(), "caseExpression", null, 1, 1, DynamicMappingCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getDynamicMappingCase_Widget(), this.getWidgetDescription(), null, "widget", null, 1, 1, DynamicMappingCase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEClass(selectDescriptionEClass, SelectDescription.class, "SelectDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSelectDescription_ValueExpression(), theDescriptionPackage.getInterpretedExpression(), "valueExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSelectDescription_InitialOperation(), theToolPackage.getInitialOperation(), null, "initialOperation", null, 1, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSelectDescription_CandidatesExpression(), theDescriptionPackage.getInterpretedExpression(), "candidatesExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSelectDescription_CandidateDisplayExpression(), theDescriptionPackage.getInterpretedExpression(), "candidateDisplayExpression", null, 0, 1, SelectDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - // Create resource createResource(eNS_URI); } diff --git a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java index 7add736092..c16c4e05d2 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesAdapterFactory.java @@ -107,6 +107,14 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { return createLabelDescriptionAdapter(); } @Override + public Adapter caseCheckboxDescription(CheckboxDescription object) { + return createCheckboxDescriptionAdapter(); + } + @Override + public Adapter caseSelectDescription(SelectDescription object) { + return createSelectDescriptionAdapter(); + } + @Override public Adapter caseDynamicMappingFor(DynamicMappingFor object) { return createDynamicMappingForAdapter(); } @@ -119,10 +127,6 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { return createDynamicMappingCaseAdapter(); } @Override - public Adapter caseSelectDescription(SelectDescription object) { - return createSelectDescriptionAdapter(); - } - @Override public Adapter caseExtension(Extension object) { return createExtensionAdapter(); } @@ -245,58 +249,72 @@ public class PropertiesAdapterFactory extends AdapterFactoryImpl { } /** - * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingFor <em>Dynamic Mapping For</em>}'. + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.CheckboxDescription <em>Checkbox Description</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. - * @see org.eclipse.sirius.properties.DynamicMappingFor + * @see org.eclipse.sirius.properties.CheckboxDescription * @generated */ - public Adapter createDynamicMappingForAdapter() { + public Adapter createCheckboxDescriptionAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingSwitch <em>Dynamic Mapping Switch</em>}'. + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.SelectDescription <em>Select Description</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 + * @see org.eclipse.sirius.properties.SelectDescription * @generated */ - public Adapter createDynamicMappingSwitchAdapter() { + public Adapter createSelectDescriptionAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingCase <em>Dynamic Mapping Case</em>}'. + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingFor <em>Dynamic Mapping For</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. - * @see org.eclipse.sirius.properties.DynamicMappingCase + * @see org.eclipse.sirius.properties.DynamicMappingFor * @generated */ - public Adapter createDynamicMappingCaseAdapter() { + public Adapter createDynamicMappingForAdapter() { return null; } /** - * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.SelectDescription <em>Select Description</em>}'. + * 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.SelectDescription + * @see org.eclipse.sirius.properties.DynamicMappingSwitch * @generated */ - public Adapter createSelectDescriptionAdapter() { + public Adapter createDynamicMappingSwitchAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.properties.DynamicMappingCase <em>Dynamic Mapping Case</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.sirius.properties.DynamicMappingCase + * @generated + */ + public Adapter createDynamicMappingCaseAdapter() { return null; } 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 d31368a396..af75db54d6 100644 --- a/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java +++ b/incubation/org.eclipse.sirius.properties/src-gen/org/eclipse/sirius/properties/util/PropertiesSwitch.java @@ -139,6 +139,20 @@ public class PropertiesSwitch<T> { if (result == null) result = defaultCase(theEObject); return result; } + case PropertiesPackage.CHECKBOX_DESCRIPTION: { + CheckboxDescription checkboxDescription = (CheckboxDescription)theEObject; + T result = caseCheckboxDescription(checkboxDescription); + if (result == null) result = caseWidgetDescription(checkboxDescription); + if (result == null) result = defaultCase(theEObject); + return result; + } + case PropertiesPackage.SELECT_DESCRIPTION: { + SelectDescription selectDescription = (SelectDescription)theEObject; + T result = caseSelectDescription(selectDescription); + if (result == null) result = caseWidgetDescription(selectDescription); + if (result == null) result = defaultCase(theEObject); + return result; + } case PropertiesPackage.DYNAMIC_MAPPING_FOR: { DynamicMappingFor dynamicMappingFor = (DynamicMappingFor)theEObject; T result = caseDynamicMappingFor(dynamicMappingFor); @@ -157,13 +171,6 @@ public class PropertiesSwitch<T> { if (result == null) result = defaultCase(theEObject); return result; } - case PropertiesPackage.SELECT_DESCRIPTION: { - SelectDescription selectDescription = (SelectDescription)theEObject; - T result = caseSelectDescription(selectDescription); - if (result == null) result = caseWidgetDescription(selectDescription); - if (result == null) result = defaultCase(theEObject); - return result; - } default: return defaultCase(theEObject); } } @@ -274,62 +281,77 @@ public class PropertiesSwitch<T> { } /** - * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping For</em>'. + * Returns the result of interpreting the object as an instance of '<em>Checkbox Description</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Dynamic Mapping For</em>'. + * @return the result of interpreting the object as an instance of '<em>Checkbox Description</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseDynamicMappingFor(DynamicMappingFor object) { + public T caseCheckboxDescription(CheckboxDescription object) { return null; } /** - * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping Switch</em>'. + * Returns the result of interpreting the object as an instance of '<em>Select Description</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>'. + * @return the result of interpreting the object as an instance of '<em>Select Description</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseDynamicMappingSwitch(DynamicMappingSwitch object) { + public T caseSelectDescription(SelectDescription object) { return null; } /** - * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping Case</em>'. + * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping For</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Dynamic Mapping Case</em>'. + * @return the result of interpreting the object as an instance of '<em>Dynamic Mapping For</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseDynamicMappingCase(DynamicMappingCase object) { + public T caseDynamicMappingFor(DynamicMappingFor object) { return null; } /** - * Returns the result of interpreting the object as an instance of '<em>Select Description</em>'. + * 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>Select Description</em>'. + * @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 caseSelectDescription(SelectDescription object) { + public T caseDynamicMappingSwitch(DynamicMappingSwitch object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Dynamic Mapping Case</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Dynamic Mapping Case</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDynamicMappingCase(DynamicMappingCase object) { return null; } diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/.classpath b/incubation/org.eclipse.sirius.sample.properties.checkbox/.classpath new file mode 100644 index 0000000000..39810b7d6c --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/.project b/incubation/org.eclipse.sirius.sample.properties.checkbox/.project new file mode 100644 index 0000000000..7379664cbf --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.sample.properties.checkbox</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/META-INF/MANIFEST.MF b/incubation/org.eclipse.sirius.sample.properties.checkbox/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..053e157f79 --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: my.project.design +Bundle-SymbolicName: org.eclipse.sirius.sample.properties.checkbox;singleton:=true +Bundle-Version: 1.0.0 +Bundle-Activator: my.project.design.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/build.properties b/incubation/org.eclipse.sirius.sample.properties.checkbox/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/description/project.odesign b/incubation/org.eclipse.sirius.sample.properties.checkbox/description/project.odesign new file mode 100644 index 0000000000..e3d395b1a1 --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/description/project.odesign @@ -0,0 +1,125 @@ +<?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']"/> + </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']"/> + </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> + </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="" + domainClass="ecore.EAttribute" + semanticCandidateExpression=""> + <container> + <widgets + xsi:type="properties:CheckboxDescription" + identifier="Derived" + labelExpression="Derived" + valueExpression="feature:derived"> + <initialOperation> + <firstModelOperations + xsi:type="tool:ChangeContext" + browseExpression="var:self"> + <subModelOperations + xsi:type="tool:SetValue" + featureName="derived" + valueExpression="var:newValue"/> + </firstModelOperations> + </initialOperation> + </widgets> + </container> + </groups> + </extensions> +</description:Group> diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/plugin.xml b/incubation/org.eclipse.sirius.sample.properties.checkbox/plugin.xml new file mode 100644 index 0000000000..d6fa17bcad --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="my.project.design.Activator" + id="my.project.design" + name="project"> + </component> + </extension> +</plugin> diff --git a/incubation/org.eclipse.sirius.sample.properties.checkbox/src/my/project/design/Activator.java b/incubation/org.eclipse.sirius.sample.properties.checkbox/src/my/project/design/Activator.java new file mode 100644 index 0000000000..9f3153d28c --- /dev/null +++ b/incubation/org.eclipse.sirius.sample.properties.checkbox/src/my/project/design/Activator.java @@ -0,0 +1,66 @@ +package my.project.design; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "my.project.design"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/project.odesign")); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint: viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} 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 2dd67532e3..bf46c1543e 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 @@ -12,6 +12,7 @@ package org.eclipse.sirius.ui.properties.internal.tabprovider; import java.util.List; +import org.eclipse.eef.EEFCheckboxDescription; import org.eclipse.eef.EEFContainerDescription; import org.eclipse.eef.EEFDynamicMappingCase; import org.eclipse.eef.EEFDynamicMappingFor; @@ -25,6 +26,7 @@ import org.eclipse.eef.EEFViewDescription; import org.eclipse.eef.EEFWidgetDescription; import org.eclipse.eef.EefFactory; import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.properties.CheckboxDescription; import org.eclipse.sirius.properties.DynamicMappingCase; import org.eclipse.sirius.properties.DynamicMappingFor; import org.eclipse.sirius.properties.DynamicMappingSwitch; @@ -144,6 +146,8 @@ public class ViewDescriptionConverter { description = createEEFTextDescription((TextDescription) widgetDescription); } else if (widgetDescription instanceof LabelDescription) { description = createEEFLabelDescription((LabelDescription) widgetDescription); + } else if (widgetDescription instanceof CheckboxDescription) { + description = createEEFCheckboxDescription((CheckboxDescription) widgetDescription); } else if (widgetDescription instanceof SelectDescription) { description = createEEFSelectDescription((SelectDescription) widgetDescription); } @@ -171,6 +175,15 @@ public class ViewDescriptionConverter { return eefLabelDescription; } + private EEFCheckboxDescription createEEFCheckboxDescription(CheckboxDescription checkboxDescription) { + EEFCheckboxDescription eefCheckboxDescription = EefFactory.eINSTANCE.createEEFCheckboxDescription(); + + eefCheckboxDescription.setIdentifier(checkboxDescription.getIdentifier()); + eefCheckboxDescription.setLabelExpression(checkboxDescription.getLabelExpression()); + eefCheckboxDescription.setValueExpression(checkboxDescription.getValueExpression()); + return eefCheckboxDescription; + } + private EEFSelectDescription createEEFSelectDescription(SelectDescription selectDescription) { EEFSelectDescription eefSelectDescription = EefFactory.eINSTANCE.createEEFSelectDescription(); @@ -181,4 +194,5 @@ public class ViewDescriptionConverter { eefSelectDescription.setCandidateDisplayExpression(selectDescription.getCandidateDisplayExpression()); return eefSelectDescription; } + } |
