From 3540ddeaa7455bae66e4ffd9e64235163566aa8b Mon Sep 17 00:00:00 2001 From: Pierre-Charles David Date: Wed, 9 Aug 2023 11:21:59 +0200 Subject: [PATCH] [2236] Update View.Form metamodel Bug: https://github.com/eclipse-sirius/sirius-web/issues/2236 Signed-off-by: Pierre-Charles David --- CHANGELOG.adoc | 11 + ...nceWidgetDescriptionStyleItemProvider.java | 107 ++-- .../provider/ReferenceEditPlugin.java | 176 +++--- .../ReferenceItemProviderAdapterFactory.java | 123 ++-- ...eferenceWidgetDescriptionItemProvider.java | 126 ++-- ...nceWidgetDescriptionStyleItemProvider.java | 110 ++-- ...tionalReferenceWidgetDescriptionStyle.java | 3 +- .../widgets/reference/ReferencePackage.java | 56 +- .../reference/ReferenceWidgetDescription.java | 34 +- .../ReferenceWidgetDescriptionStyle.java | 11 +- ...alReferenceWidgetDescriptionStyleImpl.java | 124 ++-- .../reference/impl/ReferencePackageImpl.java | 7 +- .../impl/ReferenceWidgetDescriptionImpl.java | 70 ++- .../ReferenceWidgetDescriptionStyleImpl.java | 98 +-- .../util/ReferenceAdapterFactory.java | 35 +- .../reference/util/ReferenceSwitch.java | 57 +- ...stomwidgetsItemProviderAdapterFactory.java | 28 +- .../SliderDescriptionItemProvider.java | 8 +- .../customwidgets/CustomwidgetsPackage.java | 2 +- .../web/customwidgets/SliderDescription.java | 11 +- .../impl/SliderDescriptionImpl.java | 21 +- .../util/CustomwidgetsAdapterFactory.java | 20 + .../util/CustomwidgetsSwitch.java | 18 + .../generated/ControlDescriptionBuilder.java | 40 ++ .../builder/generated/DynamicForBuilder.java | 86 +++ .../builder/generated/DynamicIfBuilder.java | 74 +++ .../FlexboxContainerDescriptionBuilder.java | 4 +- .../view/builder/generated/FormBuilders.java | 20 + .../generated/GroupDescriptionBuilder.java | 4 +- ...exboxContainerDescriptionItemProvider.java | 5 +- .../FormElementDescriptionItemProvider.java | 140 +++++ .../provider/FormElementForItemProvider.java | 214 +++++++ .../provider/FormElementIfItemProvider.java | 201 ++++++ .../FormItemProviderAdapterFactory.java | 51 ++ .../GroupDescriptionItemProvider.java | 42 +- .../provider/PageDescriptionItemProvider.java | 2 +- .../WidgetDescriptionItemProvider.java | 34 +- .../icons/full/obj16/FormElementFor.svg | 1 + .../icons/full/obj16/FormElementIf.svg | 1 + .../src/main/resources/plugin.properties | 19 +- .../view/form/ButtonDescription.java | 9 +- .../view/form/CheckboxDescription.java | 9 +- .../view/form/CheckboxDescriptionStyle.java | 7 +- .../form/ConditionalContainerBorderStyle.java | 3 +- .../view/form/ContainerBorderLineStyle.java | 21 +- .../view/form/ContainerBorderStyle.java | 9 +- .../view/form/ControlDescription.java | 55 ++ .../form/FlexboxContainerDescription.java | 23 +- .../view/form/FormElementDescription.java | 55 ++ .../components/view/form/FormElementFor.java | 93 +++ .../components/view/form/FormElementIf.java | 69 +++ .../components/view/form/FormFactory.java | 16 + .../components/view/form/FormPackage.java | 581 ++++++++++++++---- .../view/form/GroupDescription.java | 20 +- .../components/view/form/LabelPlacement.java | 34 +- .../components/view/form/ListDescription.java | 9 +- .../view/form/MultiSelectDescription.java | 9 +- .../view/form/RadioDescription.java | 9 +- .../view/form/RichTextDescription.java | 9 +- .../view/form/SelectDescription.java | 9 +- .../view/form/TextAreaDescription.java | 9 +- .../view/form/TextfieldDescription.java | 9 +- .../view/form/WidgetDescription.java | 26 +- .../form/impl/BarChartDescriptionImpl.java | 3 +- .../view/form/impl/ButtonDescriptionImpl.java | 21 +- .../form/impl/CheckboxDescriptionImpl.java | 12 +- .../impl/CheckboxDescriptionStyleImpl.java | 29 +- ...nditionalCheckboxDescriptionStyleImpl.java | 29 +- .../ConditionalContainerBorderStyleImpl.java | 31 +- .../form/impl/ContainerBorderStyleImpl.java | 31 +- .../impl/FlexboxContainerDescriptionImpl.java | 24 +- .../form/impl/FormElementDescriptionImpl.java | 172 ++++++ .../view/form/impl/FormElementForImpl.java | 285 +++++++++ .../view/form/impl/FormElementIfImpl.java | 229 +++++++ .../view/form/impl/FormFactoryImpl.java | 28 + .../view/form/impl/FormPackageImpl.java | 162 ++++- .../view/form/impl/GroupDescriptionImpl.java | 47 +- .../view/form/impl/ListDescriptionImpl.java | 21 +- .../form/impl/MultiSelectDescriptionImpl.java | 24 +- .../form/impl/PieChartDescriptionImpl.java | 3 +- .../view/form/impl/RadioDescriptionImpl.java | 21 +- .../form/impl/RichTextDescriptionImpl.java | 21 +- .../view/form/impl/SelectDescriptionImpl.java | 21 +- .../form/impl/TextAreaDescriptionImpl.java | 12 +- .../form/impl/TextfieldDescriptionImpl.java | 12 +- .../view/form/impl/WidgetDescriptionImpl.java | 60 +- .../view/form/util/FormAdapterFactory.java | 64 +- .../components/view/form/util/FormSwitch.java | 111 +++- .../src/main/resources/model/form.ecore | 24 +- .../src/main/resources/model/form.genmodel | 15 +- 90 files changed, 3643 insertions(+), 1156 deletions(-) create mode 100644 packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/ControlDescriptionBuilder.java create mode 100644 packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DynamicForBuilder.java create mode 100644 packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DynamicIfBuilder.java create mode 100644 packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementDescriptionItemProvider.java create mode 100644 packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementForItemProvider.java create mode 100644 packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementIfItemProvider.java create mode 100644 packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementFor.svg create mode 100644 packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementIf.svg create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ControlDescription.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementDescription.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementFor.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementIf.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementDescriptionImpl.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementForImpl.java create mode 100644 packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementIfImpl.java diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index fbdf867120..815a984d6f 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -29,6 +29,12 @@ All of its remaining content was only relevant inside of Sirius Web and it has t - [releng] Stop minifying the code of Sirius Components packages. As a result the development of applications consuming Sirius Components packages will be easier and it will be the responsability of the application to minify everything (which they should already be doing). - https://github.com/eclipse-sirius/sirius-web/issues/2296[#2296] [diagram] `sirius-components-diagrams-reactflow` now depends on `html-to-image` node package. +- https://github.com/eclipse-sirius/sirius-web/issues/2236[#2236] [forms] The introduction of _ForDescription_ and _IfDescription_ elements to the Forms DSL introduced breaking changes in the metamodel. +Existing FormDescription documents will need to be modified to load correctly, and any custom widget's metamodel will need to be regenerated using the new `form.ecore` version as reference. +See [ADR-107] _Add support for dynamic and conditional widgets in Forms_ for the details of the changes. +Also, all widget descriptions now have a `Function targetObjectIdProvider`, needed to compute the widget instance's id. +The new `targetObjectIdProvider` is required to be non-null, so any code which programatically builds core Form Descriptions (not View-based ones), needs to pass a non-null provider. +A suitable implementation is to get the id of the `self` object using `IObjectService.getId()`. === Dependency update @@ -55,6 +61,11 @@ As a result the development of applications consuming Sirius Components packages - https://github.com/eclipse-sirius/sirius-web/issues/2185[#2185] [diagram] Add support for drop tool from the explorer with React Flow. - https://github.com/eclipse-sirius/sirius-web/issues/2117[#2117] [form] Add a modal to select new values for multi-valued references +- https://github.com/eclipse-sirius/sirius-web/issues/2236[#2236] [forms] It is now possible to use `For` and `If` constructs inside the definition of Form (currently only inside _Groups_ and _Flexbox containers_). +Both constructs are commonly combined together, with e.g. _For_ iterating on the different features of the current semantic element and several _If_ inside the loop to decide which concrete widget(s) to instantiate depending on the feature's type. +They can however also be used independently (e.g. a single _If_ ouside of a _For_ to make the presence of a widget conditional) and combined in arbitrary ways (e.g. nested loops or conditionals). +Note that this first version has a known limitation: _FormDescriptions_ which use _For_ or _If_ elements can not be reliably edited using the _Form Description Editor_. +This will be fixed in the next version. === Improvements diff --git a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ConditionalReferenceWidgetDescriptionStyleItemProvider.java b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ConditionalReferenceWidgetDescriptionStyleItemProvider.java index a07bc65077..598ea981bd 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ConditionalReferenceWidgetDescriptionStyleItemProvider.java +++ b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ConditionalReferenceWidgetDescriptionStyleItemProvider.java @@ -29,16 +29,15 @@ /** * This is the item provider adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle} - * object. + * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle} object. * * @generated */ public class ConditionalReferenceWidgetDescriptionStyleItemProvider extends ConditionalItemProvider { /** - * This constructs an instance from a factory and a notifier. + * This constructs an instance from a factory and a notifier. * * @generated */ @@ -47,8 +46,7 @@ public ConditionalReferenceWidgetDescriptionStyleItemProvider(AdapterFactory ada } /** - * This returns the property descriptors for the adapted class. + * This returns the property descriptors for the adapted class. * * @generated */ @@ -68,104 +66,74 @@ public List getPropertyDescriptors(Object object) { } /** - * This adds a property descriptor for the Font Size feature. + * This adds a property descriptor for the Font Size feature. * * @generated */ protected void addFontSizePropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_fontSize_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_fontSize_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__FONT_SIZE, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_fontSize_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_fontSize_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Italic feature. + * This adds a property descriptor for the Italic feature. * * @generated */ protected void addItalicPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_italic_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_italic_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__ITALIC, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_italic_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_italic_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__ITALIC, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Bold feature. - * + * This adds a property descriptor for the Bold feature. * * @generated */ protected void addBoldPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_bold_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_bold_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__BOLD, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_bold_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_bold_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__BOLD, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Underline feature. + * This adds a property descriptor for the Underline feature. * * @generated */ protected void addUnderlinePropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_underline_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_underline_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__UNDERLINE, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_underline_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_underline_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__UNDERLINE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Strike Through feature. + * This adds a property descriptor for the Strike Through feature. * * @generated */ protected void addStrikeThroughPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_strikeThrough_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_strikeThrough_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__STRIKE_THROUGH, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_strikeThrough_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_strikeThrough_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__STRIKE_THROUGH, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Color feature. + * This adds a property descriptor for the Color feature. * * @generated */ protected void addColorPropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor( - ((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), this.getString("_UI_ReferenceWidgetDescriptionStyle_color_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescriptionStyle_color_feature", - "_UI_ReferenceWidgetDescriptionStyle_type"), - ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR, true, false, true, null, null, - null)); + this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescriptionStyle_color_feature", "_UI_ReferenceWidgetDescriptionStyle_type"), + ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR, true, false, true, null, null, null)); } /** - * This returns ConditionalReferenceWidgetDescriptionStyle.gif. + * This returns ConditionalReferenceWidgetDescriptionStyle.gif. * * @generated NOT */ @@ -185,8 +153,7 @@ protected boolean shouldComposeCreationImage() { } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. * * @generated */ @@ -198,9 +165,9 @@ public String getText(Object object) { } /** - * 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}. + * 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}. * * @generated */ @@ -221,9 +188,8 @@ public void notifyChanged(Notification notification) { } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing - * the children that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. * * @generated */ @@ -233,8 +199,7 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors } /** - * Return the resource locator for this item provider's resources. + * Return the resource locator for this item provider's resources. * * @generated */ diff --git a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceEditPlugin.java b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceEditPlugin.java index 312a80f090..319b6e9537 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceEditPlugin.java +++ b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceEditPlugin.java @@ -22,109 +22,101 @@ import org.eclipse.sirius.components.view.provider.ViewEditPlugin; /** - * This is the central singleton for the Reference edit plugin. + * This is the central singleton for the Reference edit plugin. * * @generated */ public final class ReferenceEditPlugin extends EMFPlugin { - /** - * Keep track of the singleton. - * - * @generated - */ - public static final ReferenceEditPlugin INSTANCE = new ReferenceEditPlugin(); + /** + * Keep track of the singleton. + * + * @generated + */ + public static final ReferenceEditPlugin INSTANCE = new ReferenceEditPlugin(); - /** - * Keep track of the singleton. - * - * @generated - */ - private static Implementation plugin; + /** + * Keep track of the singleton. + * + * @generated + */ + private static Implementation plugin; - /** - * Create the instance. - * - * @generated - */ - public ReferenceEditPlugin() { - super(new ResourceLocator[] { FormEditPlugin.INSTANCE, ViewEditPlugin.INSTANCE, }); - } + /** + * Create the instance. + * + * @generated + */ + public ReferenceEditPlugin() { + super(new ResourceLocator[] { FormEditPlugin.INSTANCE, ViewEditPlugin.INSTANCE, }); + } - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - @Override - public ResourceLocator getPluginResourceLocator() { - return plugin; - } + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } - @Override - protected Object doGetImage(String key) throws IOException { - URL url = new URL(this.getBaseURL() + "icons/" + key + extensionFor(key)); - InputStream inputStream = url.openStream(); - inputStream.close(); - return url; - } + @Override + protected Object doGetImage(String key) throws IOException { + URL url = new URL(this.getBaseURL() + "icons/" + key + extensionFor(key)); + InputStream inputStream = url.openStream(); + inputStream.close(); + return url; + } - /** - * Computes the file extension to be used with the key to specify an image - * resource. - * - * @param key the key for the imagine. - * @return the file extension to be used with the key to specify an image - * resource. - */ - protected static String extensionFor(String key) { - String result = ".gif"; - int index = key.lastIndexOf('.'); - if (index != -1) { - String extension = key.substring(index + 1); - if ("png".equalsIgnoreCase(extension) || "gif".equalsIgnoreCase(extension) - || "bmp".equalsIgnoreCase(extension) || "ico".equalsIgnoreCase(extension) - || "jpg".equalsIgnoreCase(extension) || "jpeg".equalsIgnoreCase(extension) - || "tif".equalsIgnoreCase(extension) || "tiff".equalsIgnoreCase(extension) - || "svg".equalsIgnoreCase(extension)) { - result = ""; - } - } - return result; - } + /** + * Computes the file extension to be used with the key to specify an image resource. + * + * @param key + * the key for the imagine. + * @return the file extension to be used with the key to specify an image resource. + */ + protected static String extensionFor(String key) { + String result = ".gif"; + int index = key.lastIndexOf('.'); + if (index != -1) { + String extension = key.substring(index + 1); + if ("png".equalsIgnoreCase(extension) || "gif".equalsIgnoreCase(extension) || "bmp".equalsIgnoreCase(extension) || "ico".equalsIgnoreCase(extension) || "jpg".equalsIgnoreCase(extension) + || "jpeg".equalsIgnoreCase(extension) || "tif".equalsIgnoreCase(extension) || "tiff".equalsIgnoreCase(extension) || "svg".equalsIgnoreCase(extension)) { + result = ""; + } + } + return result; + } - /** - * Returns the singleton instance of the Eclipse plugin. - * - * - * @return the singleton instance. - * @generated - */ - public static Implementation getPlugin() { - return plugin; - } + /** + * Returns the singleton instance of the Eclipse plugin. + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } - /** - * The actual implementation of the Eclipse Plugin. - * - * @generated - */ - public static class Implementation extends EclipsePlugin { - /** - * Creates an instance. - * - * @generated - */ - public Implementation() { - super(); + /** + * The actual implementation of the Eclipse Plugin. + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * @generated + */ + public Implementation() { + super(); - // Remember the static instance. - // - plugin = this; - } - } + // Remember the static instance. + // + plugin = this; + } + } } diff --git a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceItemProviderAdapterFactory.java b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceItemProviderAdapterFactory.java index 280eb6dade..ca3e518fa7 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceItemProviderAdapterFactory.java +++ b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceItemProviderAdapterFactory.java @@ -36,6 +36,8 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; import org.eclipse.sirius.components.view.form.util.FormSwitch; @@ -43,63 +45,61 @@ import org.eclipse.sirius.components.widgets.reference.util.ReferenceAdapterFactory; /** - * This is the factory that is used to provide the interfaces needed to support - * Viewers. The adapters generated by this factory convert EMF adapter - * notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The - * adapters also support Eclipse property sheets. Note that most of the adapters - * are shared among multiple instances. + * This is the factory that is used to provide the interfaces needed to support Viewers. The adapters generated by this + * factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters + * also support Eclipse property sheets. Note that most of the adapters are shared among multiple instances. * * @generated */ -public class ReferenceItemProviderAdapterFactory extends ReferenceAdapterFactory - implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { +public class ReferenceItemProviderAdapterFactory extends ReferenceAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { /** - * This keeps track of the root adapter factory that delegates to this adapter - * factory. + * This keeps track of the root adapter factory that delegates to this adapter factory. * * @generated */ protected ComposedAdapterFactory parentAdapterFactory; /** - * This is used to implement - * {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. * * @generated */ protected IChangeNotifier changeNotifier = new ChangeNotifier(); /** - * This keeps track of all the supported types checked by - * {@link #isFactoryForType isFactoryForType}. + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. * * @generated */ protected Collection supportedTypes = new ArrayList<>(); + /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription} - * instances. + * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription} instances. * * @generated */ protected ReferenceWidgetDescriptionItemProvider referenceWidgetDescriptionItemProvider; + /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle} - * instances. + * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle} instances. * * @generated */ protected ReferenceWidgetDescriptionStyleItemProvider referenceWidgetDescriptionStyleItemProvider; + /** * This keeps track of the one adapter used for all - * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle} - * instances. + * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle} instances. + * * * @generated */ @@ -119,8 +119,7 @@ public ReferenceItemProviderAdapterFactory() { } /** - * This creates an adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription}. + * This creates an adapter for a {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription}. * * * @generated @@ -136,8 +135,8 @@ public Adapter createReferenceWidgetDescriptionAdapter() { /** * This creates an adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle}. - * + * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle}. + * * * @generated */ @@ -152,24 +151,22 @@ public Adapter createReferenceWidgetDescriptionStyleAdapter() { /** * This creates an adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle}. - * + * {@link org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle}. * * @generated */ @Override public Adapter createConditionalReferenceWidgetDescriptionStyleAdapter() { if (this.conditionalReferenceWidgetDescriptionStyleItemProvider == null) { - this.conditionalReferenceWidgetDescriptionStyleItemProvider = new ConditionalReferenceWidgetDescriptionStyleItemProvider( - this); + this.conditionalReferenceWidgetDescriptionStyleItemProvider = new ConditionalReferenceWidgetDescriptionStyleItemProvider(this); } return this.conditionalReferenceWidgetDescriptionStyleItemProvider; } /** - * This returns the root adapter factory that contains this factory. + * This returns the root adapter factory that contains this factory. * * @generated */ @@ -179,8 +176,7 @@ public ComposeableAdapterFactory getRootAdapterFactory() { } /** - * This sets the composed adapter factory that contains this factory. + * This sets the composed adapter factory that contains this factory. * * @generated */ @@ -200,8 +196,8 @@ public boolean isFactoryForType(Object type) { } /** - * This implementation substitutes the factory itself as the key for the - * adapter. + * This implementation substitutes the factory itself as the key for the adapter. * * @generated */ @@ -248,8 +244,8 @@ public void removeListener(INotifyChangedListener notifyChangedListener) { } /** - * This delegates to {@link #changeNotifier} and to - * {@link #parentAdapterFactory}. + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. * * @generated */ @@ -263,8 +259,7 @@ public void fireNotifyChanged(Notification notification) { } /** - * This disposes all of the item providers created by this factory. + * This disposes all of the item providers created by this factory. * * @generated */ @@ -279,8 +274,7 @@ public void dispose() { } /** - * A child creation extender for the {@link FormPackage}. + * A child creation extender for the {@link FormPackage}. * * @generated */ @@ -309,32 +303,30 @@ public ResourceLocator getResourceLocator() { } /** - * The switch for creating child descriptors specific to each extended class. - * + * The switch for creating child descriptors specific to each extended class. * * @generated */ protected static class CreationSwitch extends FormSwitch { /** - * The child descriptors being populated. + * The child descriptors being populated. * * @generated */ protected List newChildDescriptors; /** - * The domain in which to create the children. + * The domain in which to create the children. * * @generated */ protected EditingDomain editingDomain; /** - * Creates the a switch for populating child descriptors in the given domain. - * + * Creates the a switch for populating child descriptors in the given domain. * * @generated */ @@ -350,8 +342,7 @@ protected static class CreationSwitch extends FormSwitch { */ @Override public Object caseGroupDescription(GroupDescription object) { - this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, - ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); return null; } @@ -363,9 +354,31 @@ public Object caseGroupDescription(GroupDescription object) { */ @Override public Object caseFlexboxContainerDescription(FlexboxContainerDescription object) { - this.newChildDescriptors - .add(this.createChildParameter(FormPackage.Literals.FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN, - ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN, ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); + + return null; + } + + /** + * + * + * @generated + */ + @Override + public Object caseFormElementFor(FormElementFor object) { + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); + + return null; + } + + /** + * + * + * @generated + */ + @Override + public Object caseFormElementIf(FormElementIf object) { + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, ReferenceFactory.eINSTANCE.createReferenceWidgetDescription())); return null; } diff --git a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionItemProvider.java b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionItemProvider.java index cd276499a0..ca24744e55 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionItemProvider.java +++ b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionItemProvider.java @@ -31,16 +31,15 @@ /** * This is the item provider adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription} - * object. + * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription} object. + * * * @generated */ public class ReferenceWidgetDescriptionItemProvider extends WidgetDescriptionItemProvider { /** - * This constructs an instance from a factory and a notifier. + * This constructs an instance from a factory and a notifier. * * @generated */ @@ -49,8 +48,7 @@ public ReferenceWidgetDescriptionItemProvider(AdapterFactory adapterFactory) { } /** - * This returns the property descriptors for the adapted class. + * This returns the property descriptors for the adapted class. * * @generated */ @@ -67,45 +65,36 @@ public List getPropertyDescriptors(Object object) { } /** - * This adds a property descriptor for the Reference Owner Expression feature. - * + * This adds a property descriptor for the Reference Owner Expression feature. * * @generated */ protected void addReferenceOwnerExpressionPropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor( - ((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), this.getString("_UI_ReferenceWidgetDescription_referenceOwnerExpression_feature"), - this.getString("_UI_PropertyDescriptor_description", - "_UI_ReferenceWidgetDescription_referenceOwnerExpression_feature", - "_UI_ReferenceWidgetDescription_type"), - ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_OWNER_EXPRESSION, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescription_referenceOwnerExpression_feature", "_UI_ReferenceWidgetDescription_type"), + ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_OWNER_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Reference Name Expression feature. - * + * This adds a property descriptor for the Reference Name Expression feature. * * @generated */ protected void addReferenceNameExpressionPropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor( - ((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), this.getString("_UI_ReferenceWidgetDescription_referenceNameExpression_feature"), - this.getString("_UI_PropertyDescriptor_description", - "_UI_ReferenceWidgetDescription_referenceNameExpression_feature", - "_UI_ReferenceWidgetDescription_type"), - ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_NAME_EXPRESSION, true, false, false, - ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescription_referenceNameExpression_feature", "_UI_ReferenceWidgetDescription_type"), + ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_NAME_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}. - * + * 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}. * * @generated */ @@ -127,40 +116,33 @@ public Collection getChildrenFeatures(Object objec */ @Override protected EStructuralFeature getChildFeature(Object object, Object child) { - // Check the type of the specified child object and return the proper feature to - // use for + // 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 adds a property descriptor for the Is Enabled Expression feature. + * This adds a property descriptor for the Is Enabled Expression feature. * * @generated */ protected void addIsEnabledExpressionPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_ReferenceWidgetDescription_isEnabledExpression_feature"), - this.getString("_UI_PropertyDescriptor_description", - "_UI_ReferenceWidgetDescription_isEnabledExpression_feature", - "_UI_ReferenceWidgetDescription_type"), - ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__IS_ENABLED_EXPRESSION, true, false, - false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_ReferenceWidgetDescription_isEnabledExpression_feature"), + this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescription_isEnabledExpression_feature", "_UI_ReferenceWidgetDescription_type"), + ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__IS_ENABLED_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** - * This returns ReferenceWidgetDescription.gif. + * This returns ReferenceWidgetDescription.gif. * * @generated NOT */ @Override public Object getImage(Object object) { - return this.overlayImage(object, - this.getResourceLocator().getImage("full/obj16/ReferenceWidgetDescription.svg")); + return this.overlayImage(object, this.getResourceLocator().getImage("full/obj16/ReferenceWidgetDescription.svg")); } /** @@ -174,22 +156,20 @@ protected boolean shouldComposeCreationImage() { } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. * * @generated */ @Override public String getText(Object object) { String label = ((ReferenceWidgetDescription) object).getName(); - return label == null || label.length() == 0 ? this.getString("_UI_ReferenceWidgetDescription_type") - : this.getString("_UI_ReferenceWidgetDescription_type") + " " + label; + return label == null || label.length() == 0 ? this.getString("_UI_ReferenceWidgetDescription_type") : this.getString("_UI_ReferenceWidgetDescription_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}. + * 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}. * * @generated */ @@ -213,9 +193,8 @@ public void notifyChanged(Notification notification) { } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing - * the children that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. * * @generated NOT */ @@ -223,33 +202,25 @@ public void notifyChanged(Notification notification) { protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, - ViewFactory.eINSTANCE.createChangeContext())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, ViewFactory.eINSTANCE.createChangeContext())); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, - ViewFactory.eINSTANCE.createCreateInstance())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, ViewFactory.eINSTANCE.createCreateInstance())); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, - ViewFactory.eINSTANCE.createSetValue())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, ViewFactory.eINSTANCE.createSetValue())); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, - ViewFactory.eINSTANCE.createUnsetValue())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, ViewFactory.eINSTANCE.createUnsetValue())); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, - ViewFactory.eINSTANCE.createDeleteElement())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__BODY, ViewFactory.eINSTANCE.createDeleteElement())); - newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__STYLE, - ReferenceFactory.eINSTANCE.createReferenceWidgetDescriptionStyle())); + newChildDescriptors.add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__STYLE, ReferenceFactory.eINSTANCE.createReferenceWidgetDescriptionStyle())); - newChildDescriptors - .add(this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES, - ReferenceFactory.eINSTANCE.createConditionalReferenceWidgetDescriptionStyle())); + newChildDescriptors.add( + this.createChildParameter(ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES, ReferenceFactory.eINSTANCE.createConditionalReferenceWidgetDescriptionStyle())); } /** - * This returns the label text for - * {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * * * @generated */ @@ -258,19 +229,16 @@ public String getCreateChildText(Object owner, Object feature, Object child, Col Object childFeature = feature; Object childObject = child; - boolean qualify = childFeature == ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__STYLE - || childFeature == ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES; + boolean qualify = childFeature == ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__STYLE || childFeature == ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES; if (qualify) { - return this.getString("_UI_CreateChild_text2", - new Object[]{this.getTypeText(childObject), this.getFeatureText(childFeature), this.getTypeText(owner)}); + return this.getString("_UI_CreateChild_text2", new Object[] { this.getTypeText(childObject), this.getFeatureText(childFeature), this.getTypeText(owner) }); } return super.getCreateChildText(owner, feature, child, selection); } /** - * Return the resource locator for this item provider's resources. + * Return the resource locator for this item provider's resources. * * @generated */ diff --git a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionStyleItemProvider.java b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionStyleItemProvider.java index 357f75112d..1c001395c2 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionStyleItemProvider.java +++ b/packages/forms/backend/sirius-components-widget-reference-view-edit/src/main/java/org/eclipse/sirius/components/widgets/reference/provider/ReferenceWidgetDescriptionStyleItemProvider.java @@ -29,16 +29,15 @@ /** * This is the item provider adapter for a - * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle} - * object. + * {@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle} object. * * @generated */ public class ReferenceWidgetDescriptionStyleItemProvider extends WidgetDescriptionStyleItemProvider { /** - * This constructs an instance from a factory and a notifier. + * This constructs an instance from a factory and a notifier. * * @generated */ @@ -47,8 +46,7 @@ public ReferenceWidgetDescriptionStyleItemProvider(AdapterFactory adapterFactory } /** - * This returns the property descriptors for the adapted class. + * This returns the property descriptors for the adapted class. * * @generated */ @@ -68,104 +66,74 @@ public List getPropertyDescriptors(Object object) { } /** - * This adds a property descriptor for the Font Size feature. + * This adds a property descriptor for the Font Size feature. * * @generated */ protected void addFontSizePropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_fontSize_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_fontSize_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__FONT_SIZE, true, false, false, - ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_fontSize_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_fontSize_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__FONT_SIZE, true, false, false, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Italic feature. + * This adds a property descriptor for the Italic feature. * * @generated */ protected void addItalicPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_italic_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_italic_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__ITALIC, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_italic_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_italic_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__ITALIC, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Bold feature. - * + * This adds a property descriptor for the Bold feature. * * @generated */ protected void addBoldPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_bold_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_bold_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__BOLD, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_bold_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_bold_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__BOLD, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Underline feature. + * This adds a property descriptor for the Underline feature. * * @generated */ protected void addUnderlinePropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_underline_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_underline_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__UNDERLINE, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_underline_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_underline_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__UNDERLINE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Strike Through feature. + * This adds a property descriptor for the Strike Through feature. * * @generated */ protected void addStrikeThroughPropertyDescriptor(Object object) { - this.itemPropertyDescriptors - .add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), - this.getResourceLocator(), this.getString("_UI_LabelStyle_strikeThrough_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_strikeThrough_feature", - "_UI_LabelStyle_type"), - ViewPackage.Literals.LABEL_STYLE__STRIKE_THROUGH, true, false, false, - ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_LabelStyle_strikeThrough_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_LabelStyle_strikeThrough_feature", "_UI_LabelStyle_type"), + ViewPackage.Literals.LABEL_STYLE__STRIKE_THROUGH, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } /** - * This adds a property descriptor for the Color feature. + * This adds a property descriptor for the Color feature. * * @generated */ protected void addColorPropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor( - ((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), this.getString("_UI_ReferenceWidgetDescriptionStyle_color_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescriptionStyle_color_feature", - "_UI_ReferenceWidgetDescriptionStyle_type"), - ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR, true, false, true, null, null, - null)); + this.getString("_UI_PropertyDescriptor_description", "_UI_ReferenceWidgetDescriptionStyle_color_feature", "_UI_ReferenceWidgetDescriptionStyle_type"), + ReferencePackage.Literals.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR, true, false, true, null, null, null)); } /** - * This returns ReferenceWidgetDescriptionStyle.gif. - * + * This returns ReferenceWidgetDescriptionStyle.gif. * * @generated NOT */ @@ -185,22 +153,20 @@ protected boolean shouldComposeCreationImage() { } /** - * This returns the label text for the adapted class. - * + * This returns the label text for the adapted class. * * @generated */ @Override public String getText(Object object) { ReferenceWidgetDescriptionStyle referenceWidgetDescriptionStyle = (ReferenceWidgetDescriptionStyle) object; - return this.getString("_UI_ReferenceWidgetDescriptionStyle_type") + " " - + referenceWidgetDescriptionStyle.getFontSize(); + return this.getString("_UI_ReferenceWidgetDescriptionStyle_type") + " " + referenceWidgetDescriptionStyle.getFontSize(); } /** - * 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}. + * 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}. * * @generated */ @@ -221,9 +187,8 @@ public void notifyChanged(Notification notification) { } /** - * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing - * the children that can be created under this object. - * + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. * * @generated */ @@ -233,8 +198,7 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors } /** - * Return the resource locator for this item provider's resources. + * Return the resource locator for this item provider's resources. * * @generated */ diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ConditionalReferenceWidgetDescriptionStyle.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ConditionalReferenceWidgetDescriptionStyle.java index f00bcf80c3..e165a764d8 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ConditionalReferenceWidgetDescriptionStyle.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ConditionalReferenceWidgetDescriptionStyle.java @@ -18,9 +18,10 @@ * A representation of the model object 'Conditional Reference Widget Description * Style'. * + * + * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getConditionalReferenceWidgetDescriptionStyle() * @model * @generated - * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getConditionalReferenceWidgetDescriptionStyle() */ public interface ConditionalReferenceWidgetDescriptionStyle extends Conditional, ReferenceWidgetDescriptionStyle { diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferencePackage.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferencePackage.java index ee752efd89..fd204ee7e6 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferencePackage.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferencePackage.java @@ -30,9 +30,9 @@ * * * + * @see org.eclipse.sirius.components.widgets.reference.ReferenceFactory * @model kind="package" * @generated - * @see org.eclipse.sirius.components.widgets.reference.ReferenceFactory */ public interface ReferencePackage extends EPackage { @@ -62,9 +62,9 @@ public interface ReferencePackage extends EPackage { * '{@link org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionImpl Widget * Description}' class. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionImpl * @see org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl#getReferenceWidgetDescription() + * @generated */ int REFERENCE_WIDGET_DESCRIPTION = 0; @@ -100,7 +100,7 @@ public interface ReferencePackage extends EPackage { * @generated * @ordered */ - int REFERENCE_WIDGET_DESCRIPTION__IS_ENABLED_EXPRESSION = FormPackage.WIDGET_DESCRIPTION_FEATURE_COUNT; + int REFERENCE_WIDGET_DESCRIPTION__IS_ENABLED_EXPRESSION = FormPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 0; /** * The feature id for the 'Reference Owner Expression' attribute. @@ -154,6 +155,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_FEATURE_COUNT = FormPackage.WIDGET_DESCRIPTION_FEATURE_COUNT + 6; + /** * The number of operations of the 'Widget Description' class. @@ -161,24 +163,27 @@ public interface ReferencePackage extends EPackage { * @generated * @ordered */ - int REFERENCE_WIDGET_DESCRIPTION_OPERATION_COUNT = FormPackage.WIDGET_DESCRIPTION_OPERATION_COUNT; + int REFERENCE_WIDGET_DESCRIPTION_OPERATION_COUNT = FormPackage.WIDGET_DESCRIPTION_OPERATION_COUNT + 0; + /** * The meta object id for the * '{@link org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionStyleImpl Widget * Description Style}' class. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionStyleImpl * @see org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl#getReferenceWidgetDescriptionStyle() + * @generated */ int REFERENCE_WIDGET_DESCRIPTION_STYLE = 1; + /** * The feature id for the 'Font Size' attribute. * * @generated * @ordered */ - int REFERENCE_WIDGET_DESCRIPTION_STYLE__FONT_SIZE = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT; + int REFERENCE_WIDGET_DESCRIPTION_STYLE__FONT_SIZE = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 0; + /** * The feature id for the 'Italic' attribute. * @@ -186,6 +191,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE__ITALIC = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 1; + /** * The feature id for the 'Bold' attribute. * @@ -193,6 +199,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE__BOLD = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 2; + /** * The feature id for the 'Underline' attribute. * @@ -200,6 +207,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE__UNDERLINE = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 3; + /** * The feature id for the 'Strike Through' attribute. * @@ -207,6 +215,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE__STRIKE_THROUGH = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4; + /** * The feature id for the 'Color' reference. * @@ -214,6 +223,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5; + /** * The number of structural features of the 'Widget Description Style' class. @@ -222,6 +232,7 @@ public interface ReferencePackage extends EPackage { * @ordered */ int REFERENCE_WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT = FormPackage.WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 6; + /** * The number of operations of the 'Widget Description Style' class. @@ -229,23 +240,26 @@ public interface ReferencePackage extends EPackage { * @generated * @ordered */ - int REFERENCE_WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT = FormPackage.WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT; + int REFERENCE_WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT = FormPackage.WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0; + /** * The meta object id for the * '{@link org.eclipse.sirius.components.widgets.reference.impl.ConditionalReferenceWidgetDescriptionStyleImpl * Conditional Reference Widget Description Style}' class. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.impl.ConditionalReferenceWidgetDescriptionStyleImpl * @see org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl#getConditionalReferenceWidgetDescriptionStyle() + * @generated */ int CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE = 2; + /** * The singleton instance of the package. * * @generated */ ReferencePackage eINSTANCE = org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl.init(); + /** * The feature id for the 'Condition' attribute. * @@ -260,7 +274,7 @@ public interface ReferencePackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__FONT_SIZE = ViewPackage.CONDITIONAL_FEATURE_COUNT; + int CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__FONT_SIZE = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; /** * The feature id for the 'Italic' attribute. @@ -318,7 +332,7 @@ public interface ReferencePackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; + int CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; /** * Returns the meta object for class @@ -326,8 +340,8 @@ public interface ReferencePackage extends EPackage { * * * @return the meta object for class 'Widget Description'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription + * @generated */ EClass getReferenceWidgetDescription(); @@ -337,9 +351,9 @@ public interface ReferencePackage extends EPackage { * Reference Owner Expression}'. * * @return the meta object for the attribute 'Reference Owner Expression'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getReferenceOwnerExpression() * @see #getReferenceWidgetDescription() + * @generated */ EAttribute getReferenceWidgetDescription_ReferenceOwnerExpression(); @@ -349,9 +363,9 @@ public interface ReferencePackage extends EPackage { * Reference Name Expression}'. * * @return the meta object for the attribute 'Reference Name Expression'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getReferenceNameExpression() * @see #getReferenceWidgetDescription() + * @generated */ EAttribute getReferenceWidgetDescription_ReferenceNameExpression(); @@ -373,9 +387,9 @@ public interface ReferencePackage extends EPackage { * * * @return the meta object for the containment reference 'Style'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getStyle() * @see #getReferenceWidgetDescription() + * @generated */ EReference getReferenceWidgetDescription_Style(); @@ -385,9 +399,9 @@ public interface ReferencePackage extends EPackage { * Conditional Styles}'. * * @return the meta object for the containment reference list 'Conditional Styles'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getConditionalStyles() * @see #getReferenceWidgetDescription() + * @generated */ EReference getReferenceWidgetDescription_ConditionalStyles(); @@ -397,8 +411,8 @@ public interface ReferencePackage extends EPackage { * Style}'. * * @return the meta object for class 'Widget Description Style'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle + * @generated */ EClass getReferenceWidgetDescriptionStyle(); @@ -408,9 +422,9 @@ public interface ReferencePackage extends EPackage { * Color}'. * * @return the meta object for the reference 'Color'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle#getColor() * @see #getReferenceWidgetDescriptionStyle() + * @generated */ EReference getReferenceWidgetDescriptionStyle_Color(); @@ -420,8 +434,8 @@ public interface ReferencePackage extends EPackage { * Conditional Reference Widget Description Style}'. * * @return the meta object for class 'Conditional Reference Widget Description Style'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle + * @generated */ EClass getConditionalReferenceWidgetDescriptionStyle(); @@ -431,9 +445,9 @@ public interface ReferencePackage extends EPackage { * Enabled Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getIsEnabledExpression() * @see #getReferenceWidgetDescription() + * @generated */ EAttribute getReferenceWidgetDescription_IsEnabledExpression(); @@ -465,9 +479,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionImpl Widget * Description}' class. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionImpl * @see org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl#getReferenceWidgetDescription() + * @generated */ EClass REFERENCE_WIDGET_DESCRIPTION = eINSTANCE.getReferenceWidgetDescription(); @@ -516,9 +530,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionStyleImpl Widget * Description Style}' class. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.impl.ReferenceWidgetDescriptionStyleImpl * @see org.eclipse.sirius.components.widgets.reference.impl.ReferencePackageImpl#getReferenceWidgetDescriptionStyle() + * @generated */ EClass REFERENCE_WIDGET_DESCRIPTION_STYLE = eINSTANCE.getReferenceWidgetDescriptionStyle(); diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescription.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescription.java index 9071777358..b4a6c8ade9 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescription.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescription.java @@ -41,10 +41,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Reference Owner Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setReferenceOwnerExpression(String) * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescription_ReferenceOwnerExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getReferenceOwnerExpression(); @@ -53,9 +53,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * '{@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getReferenceOwnerExpression * Reference Owner Expression}' attribute. * - * @param value the new value of the 'Reference Owner Expression' attribute. - * @generated + * @param value + * the new value of the 'Reference Owner Expression' attribute. * @see #getReferenceOwnerExpression() + * @generated */ void setReferenceOwnerExpression(String value); @@ -64,10 +65,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Reference Name Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" required="true" - * @generated * @see #setReferenceNameExpression(String) * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescription_ReferenceNameExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" required="true" + * @generated */ String getReferenceNameExpression(); @@ -76,9 +77,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * '{@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getReferenceNameExpression * Reference Name Expression}' attribute. * - * @param value the new value of the 'Reference Name Expression' attribute. - * @generated + * @param value + * the new value of the 'Reference Name Expression' attribute. * @see #getReferenceNameExpression() + * @generated */ void setReferenceNameExpression(String value); @@ -87,9 +89,9 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * {@link org.eclipse.sirius.components.view.Operation}. * * @return the value of the 'Body' containment reference list. + * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescription_Body() * @model containment="true" * @generated - * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescription_Body() */ EList getBody(); @@ -109,9 +111,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getStyle * Style}' containment reference. * - * @param value the new value of the 'Style' containment reference. - * @generated + * @param value + * the new value of the 'Style' containment reference. * @see #getStyle() + * @generated */ void setStyle(ReferenceWidgetDescriptionStyle value); @@ -132,10 +135,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -144,9 +147,10 @@ public interface ReferenceWidgetDescription extends WidgetDescription { * '{@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription#getIsEnabledExpression Is * Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescriptionStyle.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescriptionStyle.java index ac9bd45d73..fcec8eada6 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescriptionStyle.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/ReferenceWidgetDescriptionStyle.java @@ -28,9 +28,9 @@ * Color} * * + * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescriptionStyle() * @model * @generated - * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescriptionStyle() */ public interface ReferenceWidgetDescriptionStyle extends WidgetDescriptionStyle, LabelStyle { @@ -38,10 +38,10 @@ public interface ReferenceWidgetDescriptionStyle extends WidgetDescriptionStyle, * Returns the value of the 'Color' reference. * * @return the value of the 'Color' reference. - * @model - * @generated * @see #setColor(UserColor) * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage#getReferenceWidgetDescriptionStyle_Color() + * @model + * @generated */ UserColor getColor(); @@ -50,9 +50,10 @@ public interface ReferenceWidgetDescriptionStyle extends WidgetDescriptionStyle, * '{@link org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle#getColor Color}' * reference. * - * @param value the new value of the 'Color' reference. - * @generated + * @param value + * the new value of the 'Color' reference. * @see #getColor() + * @generated */ void setColor(UserColor value); diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ConditionalReferenceWidgetDescriptionStyleImpl.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ConditionalReferenceWidgetDescriptionStyleImpl.java index 0bbb5edce6..6bceedb2b1 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ConditionalReferenceWidgetDescriptionStyleImpl.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ConditionalReferenceWidgetDescriptionStyleImpl.java @@ -54,90 +54,99 @@ public class ConditionalReferenceWidgetDescriptionStyleImpl extends ConditionalI * The default value of the '{@link #getFontSize() Font Size}' attribute. * + * @see #getFontSize() * @generated * @ordered - * @see #getFontSize() */ protected static final int FONT_SIZE_EDEFAULT = 14; + /** - * The default value of the '{@link #isItalic() Italic}' attribute. * + * @see #getFontSize() * @generated * @ordered - * @see #isItalic() */ - protected static final boolean ITALIC_EDEFAULT = false; + protected int fontSize = FONT_SIZE_EDEFAULT; + /** - * The default value of the '{@link #isBold() Bold}' attribute. + * The default value of the '{@link #isItalic() Italic}' attribute. * + * @see #isItalic() * @generated * @ordered - * @see #isBold() */ - protected static final boolean BOLD_EDEFAULT = false; + protected static final boolean ITALIC_EDEFAULT = false; + /** - * The default value of the '{@link #isUnderline() Underline}' attribute. * + * @see #isItalic() * @generated * @ordered - * @see #isUnderline() */ - protected static final boolean UNDERLINE_EDEFAULT = false; + protected boolean italic = ITALIC_EDEFAULT; + /** - * The default value of the '{@link #isStrikeThrough() Strike Through}' attribute. - * + * The default value of the '{@link #isBold() Bold}' attribute. * * @generated * @ordered - * @see #isStrikeThrough() + * @see #isBold() */ - protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + protected static final boolean BOLD_EDEFAULT = false; + /** - * The cached value of the '{@link #getFontSize() Font Size}' attribute. + * The cached value of the '{@link #isBold() Bold}' attribute. * * @generated * @ordered - * @see #getFontSize() + * @see #isBold() */ - protected int fontSize = FONT_SIZE_EDEFAULT; + protected boolean bold = BOLD_EDEFAULT; + /** - * The cached value of the '{@link #isItalic() Italic}' attribute. * + * @see #isUnderline() * @generated * @ordered - * @see #isItalic() */ - protected boolean italic = ITALIC_EDEFAULT; + protected static final boolean UNDERLINE_EDEFAULT = false; + /** - * The cached value of the '{@link #isBold() Bold}' attribute. + * The cached value of the '{@link #isUnderline() Underline}' attribute. * + * @see #isUnderline() * @generated * @ordered - * @see #isBold() */ - protected boolean bold = BOLD_EDEFAULT; + protected boolean underline = UNDERLINE_EDEFAULT; + /** - * The cached value of the '{@link #isUnderline() Underline}' attribute. + * The default value of the '{@link #isStrikeThrough() Strike Through}' attribute. + * * + * @see #isStrikeThrough() * @generated * @ordered - * @see #isUnderline() */ - protected boolean underline = UNDERLINE_EDEFAULT; + protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + /** * The cached value of the '{@link #isStrikeThrough() Strike Through}' attribute. * * + * @see #isStrikeThrough() * @generated * @ordered - * @see #isStrikeThrough() */ protected boolean strikeThrough = STRIKE_THROUGH_EDEFAULT; @@ -405,7 +414,7 @@ public void eUnset(int featureID) { this.setStrikeThrough(STRIKE_THROUGH_EDEFAULT); return; case ReferencePackage.CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR: - this.setColor(null); + this.setColor((UserColor) null); return; } super.eUnset(featureID); @@ -443,7 +452,10 @@ public boolean eIsSet(int featureID) { @Override public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { if (baseClass == WidgetDescriptionStyle.class) { - return -1; + switch (derivedFeatureID) { + default: + return -1; + } } if (baseClass == LabelStyle.class) { switch (derivedFeatureID) { @@ -462,10 +474,12 @@ public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { } } if (baseClass == ReferenceWidgetDescriptionStyle.class) { - if (derivedFeatureID == ReferencePackage.CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR) { - return ReferencePackage.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR; + switch (derivedFeatureID) { + case ReferencePackage.CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR: + return ReferencePackage.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR; + default: + return -1; } - return -1; } return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); } @@ -478,7 +492,10 @@ public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { @Override public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { if (baseClass == WidgetDescriptionStyle.class) { - return -1; + switch (baseFeatureID) { + default: + return -1; + } } if (baseClass == LabelStyle.class) { switch (baseFeatureID) { @@ -497,10 +514,12 @@ public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { } } if (baseClass == ReferenceWidgetDescriptionStyle.class) { - if (baseFeatureID == ReferencePackage.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR) { - return ReferencePackage.CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR; + switch (baseFeatureID) { + case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR: + return ReferencePackage.CONDITIONAL_REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR; + default: + return -1; } - return -1; } return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); } @@ -515,18 +534,19 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (fontSize: " + - this.fontSize + - ", italic: " + - this.italic + - ", bold: " + - this.bold + - ", underline: " + - this.underline + - ", strikeThrough: " + - this.strikeThrough + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (fontSize: "); + result.append(this.fontSize); + result.append(", italic: "); + result.append(this.italic); + result.append(", bold: "); + result.append(this.bold); + result.append(", underline: "); + result.append(this.underline); + result.append(", strikeThrough: "); + result.append(this.strikeThrough); + result.append(')'); + return result.toString(); } } // ConditionalReferenceWidgetDescriptionStyleImpl diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferencePackageImpl.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferencePackageImpl.java index b094e64b9d..69d750ecdd 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferencePackageImpl.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferencePackageImpl.java @@ -38,30 +38,35 @@ public class ReferencePackageImpl extends EPackageImpl implements ReferencePacka * @generated */ private static boolean isInited = false; + /** * * * @generated */ private EClass referenceWidgetDescriptionEClass = null; + /** * * * @generated */ private EClass referenceWidgetDescriptionStyleEClass = null; + /** * * * @generated */ private EClass conditionalReferenceWidgetDescriptionStyleEClass = null; + /** * * * @generated */ private boolean isCreated = false; + /** * * @@ -94,10 +99,10 @@ private ReferencePackageImpl() { * not invoke it directly. Instead, they should simply access that field to obtain the package. * - * @generated * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() + * @generated */ public static ReferencePackage init() { if (isInited) diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionImpl.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionImpl.java index 1eea9771d2..06e19582e1 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionImpl.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.widgets.reference.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -56,49 +55,54 @@ public class ReferenceWidgetDescriptionImpl extends WidgetDescriptionImpl implem * @see #getIsEnabledExpression() */ protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** - * The default value of the '{@link #getReferenceOwnerExpression() Reference Owner Expression}' attribute. - * + * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getReferenceOwnerExpression() + * @see #getIsEnabledExpression() */ - protected static final String REFERENCE_OWNER_EXPRESSION_EDEFAULT = null; + protected String isEnabledExpression = IS_ENABLED_EXPRESSION_EDEFAULT; + /** - * The default value of the '{@link #getReferenceNameExpression() Reference Name Expression}' attribute. + * The default value of the '{@link #getReferenceOwnerExpression() Reference Owner Expression}' attribute. * * + * @see #getReferenceOwnerExpression() * @generated * @ordered - * @see #getReferenceNameExpression() */ - protected static final String REFERENCE_NAME_EXPRESSION_EDEFAULT = null; + protected static final String REFERENCE_OWNER_EXPRESSION_EDEFAULT = null; + /** - * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getReferenceOwnerExpression() Reference Owner Expression}' attribute. + * * + * @see #getReferenceOwnerExpression() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected String isEnabledExpression = IS_ENABLED_EXPRESSION_EDEFAULT; + protected String referenceOwnerExpression = REFERENCE_OWNER_EXPRESSION_EDEFAULT; + /** - * The cached value of the '{@link #getReferenceOwnerExpression() Reference Owner Expression}' attribute. + * The default value of the '{@link #getReferenceNameExpression() Reference Name Expression}' attribute. * * + * @see #getReferenceNameExpression() * @generated * @ordered - * @see #getReferenceOwnerExpression() */ - protected String referenceOwnerExpression = REFERENCE_OWNER_EXPRESSION_EDEFAULT; + protected static final String REFERENCE_NAME_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getReferenceNameExpression() Reference Name Expression}' attribute. * * + * @see #getReferenceNameExpression() * @generated * @ordered - * @see #getReferenceNameExpression() */ protected String referenceNameExpression = REFERENCE_NAME_EXPRESSION_EDEFAULT; @@ -106,9 +110,9 @@ public class ReferenceWidgetDescriptionImpl extends WidgetDescriptionImpl implem * The cached value of the '{@link #getBody() Body}' containment reference list. * * + * @see #getBody() * @generated * @ordered - * @see #getBody() */ protected EList body; @@ -116,9 +120,9 @@ public class ReferenceWidgetDescriptionImpl extends WidgetDescriptionImpl implem * The cached value of the '{@link #getStyle() Style}' containment reference. * + * @see #getStyle() * @generated * @ordered - * @see #getStyle() */ protected ReferenceWidgetDescriptionStyle style; @@ -126,9 +130,9 @@ public class ReferenceWidgetDescriptionImpl extends WidgetDescriptionImpl implem * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getConditionalStyles() */ protected EList conditionalStyles; @@ -268,8 +272,7 @@ public NotificationChain basicSetStyle(ReferenceWidgetDescriptionStyle newStyle, @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalReferenceWidgetDescriptionStyle.class, this, - ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalReferenceWidgetDescriptionStyle.class, this, ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } @@ -393,7 +396,7 @@ public void eUnset(int featureID) { this.getBody().clear(); return; case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__STYLE: - this.setStyle(null); + this.setStyle((ReferenceWidgetDescriptionStyle) null); return; case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__CONDITIONAL_STYLES: this.getConditionalStyles().clear(); @@ -411,11 +414,11 @@ public void eUnset(int featureID) { public boolean eIsSet(int featureID) { switch (featureID) { case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_OWNER_EXPRESSION: - return !Objects.equals(REFERENCE_OWNER_EXPRESSION_EDEFAULT, this.referenceOwnerExpression); + return REFERENCE_OWNER_EXPRESSION_EDEFAULT == null ? this.referenceOwnerExpression != null : !REFERENCE_OWNER_EXPRESSION_EDEFAULT.equals(this.referenceOwnerExpression); case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__REFERENCE_NAME_EXPRESSION: - return !Objects.equals(REFERENCE_NAME_EXPRESSION_EDEFAULT, this.referenceNameExpression); + return REFERENCE_NAME_EXPRESSION_EDEFAULT == null ? this.referenceNameExpression != null : !REFERENCE_NAME_EXPRESSION_EDEFAULT.equals(this.referenceNameExpression); case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__BODY: return this.body != null && !this.body.isEmpty(); case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION__STYLE: @@ -436,14 +439,15 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (isEnabledExpression: " + - this.isEnabledExpression + - ", referenceOwnerExpression: " + - this.referenceOwnerExpression + - ", referenceNameExpression: " + - this.referenceNameExpression + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (isEnabledExpression: "); + result.append(this.isEnabledExpression); + result.append(", referenceOwnerExpression: "); + result.append(this.referenceOwnerExpression); + result.append(", referenceNameExpression: "); + result.append(this.referenceNameExpression); + result.append(')'); + return result.toString(); } } // ReferenceWidgetDescriptionImpl diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionStyleImpl.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionStyleImpl.java index d171a05a0d..37e4657be5 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionStyleImpl.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/impl/ReferenceWidgetDescriptionStyleImpl.java @@ -52,90 +52,99 @@ public class ReferenceWidgetDescriptionStyleImpl extends WidgetDescriptionStyleI * The default value of the '{@link #getFontSize() Font Size}' attribute. * + * @see #getFontSize() * @generated * @ordered - * @see #getFontSize() */ protected static final int FONT_SIZE_EDEFAULT = 14; + /** - * The default value of the '{@link #isItalic() Italic}' attribute. * + * @see #getFontSize() * @generated * @ordered - * @see #isItalic() */ - protected static final boolean ITALIC_EDEFAULT = false; + protected int fontSize = FONT_SIZE_EDEFAULT; + /** - * The default value of the '{@link #isBold() Bold}' attribute. + * The default value of the '{@link #isItalic() Italic}' attribute. * + * @see #isItalic() * @generated * @ordered - * @see #isBold() */ - protected static final boolean BOLD_EDEFAULT = false; + protected static final boolean ITALIC_EDEFAULT = false; + /** - * The default value of the '{@link #isUnderline() Underline}' attribute. * + * @see #isItalic() * @generated * @ordered - * @see #isUnderline() */ - protected static final boolean UNDERLINE_EDEFAULT = false; + protected boolean italic = ITALIC_EDEFAULT; + /** - * The default value of the '{@link #isStrikeThrough() Strike Through}' attribute. - * + * The default value of the '{@link #isBold() Bold}' attribute. * * @generated * @ordered - * @see #isStrikeThrough() + * @see #isBold() */ - protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + protected static final boolean BOLD_EDEFAULT = false; + /** - * The cached value of the '{@link #getFontSize() Font Size}' attribute. + * The cached value of the '{@link #isBold() Bold}' attribute. * * @generated * @ordered - * @see #getFontSize() + * @see #isBold() */ - protected int fontSize = FONT_SIZE_EDEFAULT; + protected boolean bold = BOLD_EDEFAULT; + /** - * The cached value of the '{@link #isItalic() Italic}' attribute. * + * @see #isUnderline() * @generated * @ordered - * @see #isItalic() */ - protected boolean italic = ITALIC_EDEFAULT; + protected static final boolean UNDERLINE_EDEFAULT = false; + /** - * The cached value of the '{@link #isBold() Bold}' attribute. + * The cached value of the '{@link #isUnderline() Underline}' attribute. * + * @see #isUnderline() * @generated * @ordered - * @see #isBold() */ - protected boolean bold = BOLD_EDEFAULT; + protected boolean underline = UNDERLINE_EDEFAULT; + /** - * The cached value of the '{@link #isUnderline() Underline}' attribute. + * The default value of the '{@link #isStrikeThrough() Strike Through}' attribute. + * * + * @see #isStrikeThrough() * @generated * @ordered - * @see #isUnderline() */ - protected boolean underline = UNDERLINE_EDEFAULT; + protected static final boolean STRIKE_THROUGH_EDEFAULT = false; + /** * The cached value of the '{@link #isStrikeThrough() Strike Through}' attribute. * * + * @see #isStrikeThrough() * @generated * @ordered - * @see #isStrikeThrough() */ protected boolean strikeThrough = STRIKE_THROUGH_EDEFAULT; @@ -403,7 +412,7 @@ public void eUnset(int featureID) { this.setStrikeThrough(STRIKE_THROUGH_EDEFAULT); return; case ReferencePackage.REFERENCE_WIDGET_DESCRIPTION_STYLE__COLOR: - this.setColor(null); + this.setColor((UserColor) null); return; } super.eUnset(featureID); @@ -495,18 +504,19 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (fontSize: " + - this.fontSize + - ", italic: " + - this.italic + - ", bold: " + - this.bold + - ", underline: " + - this.underline + - ", strikeThrough: " + - this.strikeThrough + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (fontSize: "); + result.append(this.fontSize); + result.append(", italic: "); + result.append(this.italic); + result.append(", bold: "); + result.append(this.bold); + result.append(", underline: "); + result.append(this.underline); + result.append(", strikeThrough: "); + result.append(this.strikeThrough); + result.append(')'); + return result.toString(); } } // ReferenceWidgetDescriptionStyleImpl diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceAdapterFactory.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceAdapterFactory.java index c12153216e..9251ec4b0e 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceAdapterFactory.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceAdapterFactory.java @@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.sirius.components.view.Conditional; import org.eclipse.sirius.components.view.LabelStyle; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.WidgetDescription; import org.eclipse.sirius.components.view.form.WidgetDescriptionStyle; import org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle; @@ -29,8 +30,8 @@ * The Adapter Factory for the model. It provides an adapter createXXX * method for each class of the model. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage + * @generated */ public class ReferenceAdapterFactory extends AdapterFactoryImpl { @@ -62,6 +63,11 @@ public Adapter caseConditionalReferenceWidgetDescriptionStyle(ConditionalReferen return ReferenceAdapterFactory.this.createConditionalReferenceWidgetDescriptionStyleAdapter(); } + @Override + public Adapter caseFormElementDescription(FormElementDescription object) { + return ReferenceAdapterFactory.this.createFormElementDescriptionAdapter(); + } + @Override public Adapter caseWidgetDescription(WidgetDescription object) { return ReferenceAdapterFactory.this.createWidgetDescriptionAdapter(); @@ -121,7 +127,8 @@ public boolean isFactoryForType(Object object) { /** * Creates an adapter for the target. * - * @param target the object to adapt. + * @param target + * the object to adapt. * @return the adapter for the target. * @generated */ @@ -137,8 +144,8 @@ public Adapter createAdapter(Notifier target) { * to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescription + * @generated */ public Adapter createReferenceWidgetDescriptionAdapter() { return null; @@ -151,8 +158,8 @@ public Adapter createReferenceWidgetDescriptionAdapter() { * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferenceWidgetDescriptionStyle + * @generated */ public Adapter createReferenceWidgetDescriptionStyleAdapter() { return null; @@ -166,13 +173,27 @@ public Adapter createReferenceWidgetDescriptionStyleAdapter() { * cases anyway. * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle + * @generated */ public Adapter createConditionalReferenceWidgetDescriptionStyleAdapter() { return null; } + /** + * Creates a new adapter for an object of class + * '{@link org.eclipse.sirius.components.view.form.FormElementDescription Element Description}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.form.FormElementDescription + * @generated + */ + public Adapter createFormElementDescriptionAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.form.WidgetDescription * Widget Description}'. This default implementation returns null so that we can @@ -180,8 +201,8 @@ public Adapter createConditionalReferenceWidgetDescriptionStyleAdapter() { * end-user-doc --> * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.view.form.WidgetDescription + * @generated */ public Adapter createWidgetDescriptionAdapter() { return null; @@ -207,8 +228,8 @@ public Adapter createWidgetDescriptionStyleAdapter() { * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.view.LabelStyle + * @generated */ public Adapter createLabelStyleAdapter() { return null; diff --git a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceSwitch.java b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceSwitch.java index 287d05f756..0ad1603c8b 100644 --- a/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceSwitch.java +++ b/packages/forms/backend/sirius-components-widget-reference-view/src/main/java/org/eclipse/sirius/components/widgets/reference/util/ReferenceSwitch.java @@ -17,6 +17,7 @@ import org.eclipse.emf.ecore.util.Switch; import org.eclipse.sirius.components.view.Conditional; import org.eclipse.sirius.components.view.LabelStyle; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.WidgetDescription; import org.eclipse.sirius.components.view.form.WidgetDescriptionStyle; import org.eclipse.sirius.components.widgets.reference.ConditionalReferenceWidgetDescriptionStyle; @@ -30,8 +31,8 @@ * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is * returned, which is the result of the switch. * - * @generated * @see org.eclipse.sirius.components.widgets.reference.ReferencePackage + * @generated */ public class ReferenceSwitch extends Switch { @@ -56,7 +57,8 @@ public ReferenceSwitch() { /** * Checks whether this is a switch for the given package. * - * @param ePackage the package in question. + * @param ePackage + * the package in question. * @return whether this is a switch for the given package. * @generated */ @@ -80,6 +82,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseReferenceWidgetDescription(referenceWidgetDescription); if (result == null) result = this.caseWidgetDescription(referenceWidgetDescription); + if (result == null) + result = this.caseFormElementDescription(referenceWidgetDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -120,7 +124,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Widget Description'. * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) @@ -134,7 +139,8 @@ public T caseReferenceWidgetDescription(ReferenceWidgetDescription object) { * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Widget Description Style'. * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) @@ -148,22 +154,39 @@ public T caseReferenceWidgetDescriptionStyle(ReferenceWidgetDescriptionStyle obj * Style'. This implementation returns null; returning a non-null result will terminate * the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Conditional Reference Widget Description - * Style'. - * @generated + * Style'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated */ public T caseConditionalReferenceWidgetDescriptionStyle(ConditionalReferenceWidgetDescriptionStyle object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Element Description'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFormElementDescription(FormElementDescription object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Widget Description'. This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Widget Description'. * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) @@ -177,7 +200,8 @@ public T caseWidgetDescription(WidgetDescription object) { * begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Widget Description Style'. * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) @@ -190,10 +214,11 @@ public T caseWidgetDescriptionStyle(WidgetDescriptionStyle object) { * Returns the result of interpreting the object as an instance of 'Label Style'. * This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Label Style'. - * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated */ public T caseLabelStyle(LabelStyle object) { return null; @@ -203,10 +228,11 @@ public T caseLabelStyle(LabelStyle object) { * Returns the result of interpreting the object as an instance of 'Conditional'. * This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Conditional'. - * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated */ public T caseConditional(Conditional object) { return null; @@ -217,10 +243,11 @@ public T caseConditional(Conditional object) { * implementation returns null; returning a non-null result will terminate the switch, but this is the last case * anyway. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. - * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated */ @Override public T defaultCase(EObject object) { diff --git a/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/CustomwidgetsItemProviderAdapterFactory.java b/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/CustomwidgetsItemProviderAdapterFactory.java index e60e915ee8..6d64009186 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/CustomwidgetsItemProviderAdapterFactory.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/CustomwidgetsItemProviderAdapterFactory.java @@ -36,6 +36,8 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; import org.eclipse.sirius.components.view.form.util.FormSwitch; @@ -260,7 +262,7 @@ protected static class CreationSwitch extends FormSwitch { */ @Override public Object caseGroupDescription(GroupDescription object) { - this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, CustomwidgetsFactory.eINSTANCE.createSliderDescription())); + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, CustomwidgetsFactory.eINSTANCE.createSliderDescription())); return null; } @@ -277,6 +279,30 @@ public Object caseFlexboxContainerDescription(FlexboxContainerDescription object return null; } + /** + * + * + * @generated + */ + @Override + public Object caseFormElementFor(FormElementFor object) { + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, CustomwidgetsFactory.eINSTANCE.createSliderDescription())); + + return null; + } + + /** + * + * + * @generated + */ + @Override + public Object caseFormElementIf(FormElementIf object) { + this.newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, CustomwidgetsFactory.eINSTANCE.createSliderDescription())); + + return null; + } + /** * * diff --git a/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/SliderDescriptionItemProvider.java b/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/SliderDescriptionItemProvider.java index 4d709c182e..721cbe6f8b 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/SliderDescriptionItemProvider.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets-edit/src/main/java/org/eclipse/sirius/web/customwidgets/provider/SliderDescriptionItemProvider.java @@ -108,10 +108,10 @@ protected void addCurrentValueExpressionPropertyDescriptor(Object object) { * @generated */ protected void addIsEnabledExpressionPropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add( - this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), this.getString("_UI_SliderDescription_isEnabledExpression_feature"), - this.getString("_UI_PropertyDescriptor_description", "_UI_SliderDescription_isEnabledExpression_feature", "_UI_SliderDescription_type"), - CustomwidgetsPackage.Literals.SLIDER_DESCRIPTION__IS_ENABLED_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_SliderDescription_isEnabledExpression_feature"), + this.getString("_UI_PropertyDescriptor_description", "_UI_SliderDescription_isEnabledExpression_feature", "_UI_SliderDescription_type"), + CustomwidgetsPackage.Literals.SLIDER_DESCRIPTION__IS_ENABLED_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } /** diff --git a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/CustomwidgetsPackage.java b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/CustomwidgetsPackage.java index 161e8cd5cb..3e129406f4 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/CustomwidgetsPackage.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/CustomwidgetsPackage.java @@ -224,9 +224,9 @@ public interface CustomwidgetsPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.web.customwidgets.SliderDescription#getIsEnabledExpression() * @see #getSliderDescription() + * @generated */ EAttribute getSliderDescription_IsEnabledExpression(); diff --git a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/SliderDescription.java b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/SliderDescription.java index 0b80a03b19..182bb8a44f 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/SliderDescription.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/SliderDescription.java @@ -113,9 +113,9 @@ public interface SliderDescription extends WidgetDescription { * {@link org.eclipse.sirius.components.view.Operation}. * * @return the value of the 'Body' containment reference list. + * @see org.eclipse.sirius.web.customwidgets.CustomwidgetsPackage#getSliderDescription_Body() * @model containment="true" * @generated - * @see org.eclipse.sirius.web.customwidgets.CustomwidgetsPackage#getSliderDescription_Body() */ EList getBody(); @@ -124,10 +124,10 @@ public interface SliderDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.web.customwidgets.CustomwidgetsPackage#getSliderDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -135,9 +135,10 @@ public interface SliderDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.web.customwidgets.SliderDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/impl/SliderDescriptionImpl.java b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/impl/SliderDescriptionImpl.java index b8bd15ca92..1dc0156dc7 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/impl/SliderDescriptionImpl.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/impl/SliderDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.web.customwidgets.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -108,23 +107,25 @@ public class SliderDescriptionImpl extends WidgetDescriptionImpl implements Slid protected String currentValueExpression = CURRENT_VALUE_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getBody() Body}' containment reference list. + * * + * @see #getBody() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList body; + /** - * The cached value of the '{@link #getBody() Body}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getBody() + * @see #getIsEnabledExpression() */ - protected EList body; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -368,7 +369,7 @@ public boolean eIsSet(int featureID) { case CustomwidgetsPackage.SLIDER_DESCRIPTION__BODY: return this.body != null && !this.body.isEmpty(); case CustomwidgetsPackage.SLIDER_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsAdapterFactory.java b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsAdapterFactory.java index edcbed5c9f..f5f5389356 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsAdapterFactory.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsAdapterFactory.java @@ -16,6 +16,7 @@ import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.WidgetDescription; import org.eclipse.sirius.web.customwidgets.CustomwidgetsPackage; import org.eclipse.sirius.web.customwidgets.SliderDescription; @@ -76,6 +77,11 @@ public Adapter caseSliderDescription(SliderDescription object) { return CustomwidgetsAdapterFactory.this.createSliderDescriptionAdapter(); } + @Override + public Adapter caseFormElementDescription(FormElementDescription object) { + return CustomwidgetsAdapterFactory.this.createFormElementDescriptionAdapter(); + } + @Override public Adapter caseWidgetDescription(WidgetDescription object) { return CustomwidgetsAdapterFactory.this.createWidgetDescriptionAdapter(); @@ -114,6 +120,20 @@ public Adapter createSliderDescriptionAdapter() { return null; } + /** + * Creates a new adapter for an object of class + * '{@link org.eclipse.sirius.components.view.form.FormElementDescription Element Description}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.form.FormElementDescription + * @generated + */ + public Adapter createFormElementDescriptionAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.form.WidgetDescription * Widget Description}'. This default implementation returns null so that we can diff --git a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsSwitch.java b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsSwitch.java index eab00bf2f6..bed14ccefd 100644 --- a/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsSwitch.java +++ b/packages/sirius-web/backend/sirius-web-customwidgets/src/main/java/org/eclipse/sirius/web/customwidgets/util/CustomwidgetsSwitch.java @@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.WidgetDescription; import org.eclipse.sirius.web.customwidgets.CustomwidgetsPackage; import org.eclipse.sirius.web.customwidgets.SliderDescription; @@ -75,6 +76,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseSliderDescription(sliderDescription); if (result == null) result = this.caseWidgetDescription(sliderDescription); + if (result == null) + result = this.caseFormElementDescription(sliderDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -99,6 +102,21 @@ public T caseSliderDescription(SliderDescription object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Element Description'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFormElementDescription(FormElementDescription object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Widget Description'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @generated + */ +public class FormElementDescriptionItemProvider extends ItemProviderAdapter + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public FormElementDescriptionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (this.itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + this.addNamePropertyDescriptor(object); + } + return this.itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_FormElementDescription_name_feature"), + this.getString("_UI_PropertyDescriptor_description", "_UI_FormElementDescription_name_feature", "_UI_FormElementDescription_type"), FormPackage.Literals.FORM_ELEMENT_DESCRIPTION__NAME, + true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FormElementDescription) object).getName(); + return label == null || label.length() == 0 ? this.getString("_UI_FormElementDescription_type") : this.getString("_UI_FormElementDescription_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}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + this.updateChildren(notification); + + switch (notification.getFeatureID(FormElementDescription.class)) { + case FormPackage.FORM_ELEMENT_DESCRIPTION__NAME: + this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ((IChildCreationExtender) this.adapterFactory).getResourceLocator(); + } + +} diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementForItemProvider.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementForItemProvider.java new file mode 100644 index 0000000000..7dfdf3568c --- /dev/null +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementForItemProvider.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form.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.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormFactory; +import org.eclipse.sirius.components.view.form.FormPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.components.view.form.FormElementFor} object. + * + * @generated + */ +public class FormElementForItemProvider extends FormElementDescriptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public FormElementForItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (this.itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + this.addIteratorPropertyDescriptor(object); + this.addIterableExpressionPropertyDescriptor(object); + } + return this.itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Iterator feature. + * + * @generated + */ + protected void addIteratorPropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_FormElementFor_iterator_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_FormElementFor_iterator_feature", "_UI_FormElementFor_type"), + FormPackage.Literals.FORM_ELEMENT_FOR__ITERATOR, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); + } + + /** + * This adds a property descriptor for the Iterable Expression feature. + * + * @generated + */ + protected void addIterableExpressionPropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_FormElementFor_iterableExpression_feature"), + this.getString("_UI_PropertyDescriptor_description", "_UI_FormElementFor_iterableExpression_feature", "_UI_FormElementFor_type"), + FormPackage.Literals.FORM_ELEMENT_FOR__ITERABLE_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}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (this.childrenFeatures == null) { + super.getChildrenFeatures(object); + this.childrenFeatures.add(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN); + } + return this.childrenFeatures; + } + + /** + * + * + * @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 FormElementFor.gif. + * + * @generated NOT + */ + @Override + public Object getImage(Object object) { + return this.overlayImage(object, this.getResourceLocator().getImage("full/obj16/FormElementFor.svg")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FormElementFor) object).getName(); + return label == null || label.length() == 0 ? this.getString("_UI_FormElementFor_type") : this.getString("_UI_FormElementFor_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}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + this.updateChildren(notification); + + switch (notification.getFeatureID(FormElementFor.class)) { + case FormPackage.FORM_ELEMENT_FOR__ITERATOR: + case FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION: + this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + this.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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createBarChartDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createButtonDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createCheckboxDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createFlexboxContainerDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createImageDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createLabelDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createLinkDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createListDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createMultiSelectDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createPieChartDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createRadioDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createRichTextDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createSelectDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createTextAreaDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createTextfieldDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createFormElementFor())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_FOR__CHILDREN, FormFactory.eINSTANCE.createFormElementIf())); + } + +} diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementIfItemProvider.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementIfItemProvider.java new file mode 100644 index 0000000000..2a6580c63f --- /dev/null +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormElementIfItemProvider.java @@ -0,0 +1,201 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form.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.components.view.form.FormElementIf; +import org.eclipse.sirius.components.view.form.FormFactory; +import org.eclipse.sirius.components.view.form.FormPackage; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.components.view.form.FormElementIf} object. + * + * @generated + */ +public class FormElementIfItemProvider extends FormElementDescriptionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public FormElementIfItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (this.itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + this.addPredicateExpressionPropertyDescriptor(object); + } + return this.itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Predicate Expression feature. + * + * @generated + */ + protected void addPredicateExpressionPropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_FormElementIf_predicateExpression_feature"), + this.getString("_UI_PropertyDescriptor_description", "_UI_FormElementIf_predicateExpression_feature", "_UI_FormElementIf_type"), + FormPackage.Literals.FORM_ELEMENT_IF__PREDICATE_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}. + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (this.childrenFeatures == null) { + super.getChildrenFeatures(object); + this.childrenFeatures.add(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN); + } + return this.childrenFeatures; + } + + /** + * + * + * @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 FormElementIf.gif. + * + * @generated NOT + */ + @Override + public Object getImage(Object object) { + return this.overlayImage(object, this.getResourceLocator().getImage("full/obj16/FormElementIf.svg")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((FormElementIf) object).getName(); + return label == null || label.length() == 0 ? this.getString("_UI_FormElementIf_type") : this.getString("_UI_FormElementIf_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}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + this.updateChildren(notification); + + switch (notification.getFeatureID(FormElementIf.class)) { + case FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION: + this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + this.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. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createBarChartDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createButtonDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createCheckboxDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createFlexboxContainerDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createImageDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createLabelDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createLinkDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createListDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createMultiSelectDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createPieChartDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createRadioDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createRichTextDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createSelectDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createTextAreaDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createTextfieldDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createFormElementFor())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.FORM_ELEMENT_IF__CHILDREN, FormFactory.eINSTANCE.createFormElementIf())); + } + +} diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormItemProviderAdapterFactory.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormItemProviderAdapterFactory.java index c741b816a6..11eb2e7e67 100644 --- a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormItemProviderAdapterFactory.java +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/FormItemProviderAdapterFactory.java @@ -1113,6 +1113,7 @@ public Adapter createConditionalTextfieldDescriptionStyleAdapter() { * @generated */ protected ContainerBorderStyleItemProvider containerBorderStyleItemProvider; + /** * This keeps track of the one adapter used for all * {@link org.eclipse.sirius.components.view.form.ConditionalContainerBorderStyle} instances. + * + * @generated + */ + protected FormElementForItemProvider formElementForItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.components.view.form.FormElementFor}. + * + * @generated + */ + @Override + public Adapter createFormElementForAdapter() { + if (this.formElementForItemProvider == null) { + this.formElementForItemProvider = new FormElementForItemProvider(this); + } + + return this.formElementForItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link org.eclipse.sirius.components.view.form.FormElementIf} + * instances. + * + * @generated + */ + protected FormElementIfItemProvider formElementIfItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.components.view.form.FormElementIf}. + * + * @generated + */ + @Override + public Adapter createFormElementIfAdapter() { + if (this.formElementIfItemProvider == null) { + this.formElementIfItemProvider = new FormElementIfItemProvider(this); + } + + return this.formElementIfItemProvider; + } + /** * This returns the root adapter factory that contains this factory. * @@ -1369,6 +1416,10 @@ public void dispose() { this.containerBorderStyleItemProvider.dispose(); if (this.conditionalContainerBorderStyleItemProvider != null) this.conditionalContainerBorderStyleItemProvider.dispose(); + if (this.formElementForItemProvider != null) + this.formElementForItemProvider.dispose(); + if (this.formElementIfItemProvider != null) + this.formElementIfItemProvider.dispose(); } /** diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/GroupDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/GroupDescriptionItemProvider.java index 9cb40c1055..a818250450 100644 --- a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/GroupDescriptionItemProvider.java +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/GroupDescriptionItemProvider.java @@ -130,7 +130,7 @@ public Collection getChildrenFeatures(Object objec if (this.childrenFeatures == null) { super.getChildrenFeatures(object); this.childrenFeatures.add(FormPackage.Literals.GROUP_DESCRIPTION__TOOLBAR_ACTIONS); - this.childrenFeatures.add(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS); + this.childrenFeatures.add(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN); this.childrenFeatures.add(FormPackage.Literals.GROUP_DESCRIPTION__BORDER_STYLE); this.childrenFeatures.add(FormPackage.Literals.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES); } @@ -200,7 +200,7 @@ public void notifyChanged(Notification notification) { this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case FormPackage.GROUP_DESCRIPTION__TOOLBAR_ACTIONS: - case FormPackage.GROUP_DESCRIPTION__WIDGETS: + case FormPackage.GROUP_DESCRIPTION__CHILDREN: case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: case FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES: this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); @@ -221,35 +221,39 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__TOOLBAR_ACTIONS, FormFactory.eINSTANCE.createButtonDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createBarChartDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createFormElementFor())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createButtonDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createFormElementIf())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createCheckboxDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createBarChartDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createFlexboxContainerDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createButtonDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createImageDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createCheckboxDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createLabelDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createFlexboxContainerDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createLinkDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createImageDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createListDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createLabelDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createMultiSelectDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createLinkDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createPieChartDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createListDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createRadioDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createMultiSelectDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createRichTextDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createPieChartDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createSelectDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createRadioDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createTextAreaDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createRichTextDescription())); - newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS, FormFactory.eINSTANCE.createTextfieldDescription())); + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createSelectDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createTextAreaDescription())); + + newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN, FormFactory.eINSTANCE.createTextfieldDescription())); newChildDescriptors.add(this.createChildParameter(FormPackage.Literals.GROUP_DESCRIPTION__BORDER_STYLE, FormFactory.eINSTANCE.createContainerBorderStyle())); @@ -267,11 +271,11 @@ public String getCreateChildText(Object owner, Object feature, Object child, Col Object childFeature = feature; Object childObject = child; - boolean qualify = childFeature == FormPackage.Literals.GROUP_DESCRIPTION__TOOLBAR_ACTIONS || childFeature == FormPackage.Literals.GROUP_DESCRIPTION__WIDGETS + boolean qualify = childFeature == FormPackage.Literals.GROUP_DESCRIPTION__TOOLBAR_ACTIONS || childFeature == FormPackage.Literals.GROUP_DESCRIPTION__CHILDREN || childFeature == FormPackage.Literals.GROUP_DESCRIPTION__BORDER_STYLE || childFeature == FormPackage.Literals.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES; if (qualify) { - return this.getString("_UI_CreateChild_text2", new Object[]{this.getTypeText(childObject), this.getFeatureText(childFeature), this.getTypeText(owner)}); + return this.getString("_UI_CreateChild_text2", new Object[] { this.getTypeText(childObject), this.getFeatureText(childFeature), this.getTypeText(owner) }); } return super.getCreateChildText(owner, feature, child, selection); } diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/PageDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/PageDescriptionItemProvider.java index f87309876c..49dd129a7a 100644 --- a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/PageDescriptionItemProvider.java +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/PageDescriptionItemProvider.java @@ -42,7 +42,7 @@ * @generated */ public class PageDescriptionItemProvider extends ItemProviderAdapter -implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { + implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { /** * This constructs an instance from a factory and a notifier. * diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/WidgetDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/WidgetDescriptionItemProvider.java index 4f69f7be78..76a10064d1 100644 --- a/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/WidgetDescriptionItemProvider.java +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/java/org/eclipse/sirius/components/view/form/provider/WidgetDescriptionItemProvider.java @@ -17,17 +17,9 @@ import org.eclipse.emf.common.notify.AdapterFactory; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; -import org.eclipse.emf.edit.provider.IChildCreationExtender; -import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; -import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.IItemPropertySource; -import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; -import org.eclipse.emf.edit.provider.ITreeItemContentProvider; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; -import org.eclipse.emf.edit.provider.ItemProviderAdapter; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.WidgetDescription; @@ -38,8 +30,7 @@ * * @generated */ -public class WidgetDescriptionItemProvider extends ItemProviderAdapter - implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { +public class WidgetDescriptionItemProvider extends FormElementDescriptionItemProvider { /** * This constructs an instance from a factory and a notifier. * @@ -59,24 +50,12 @@ public List getPropertyDescriptors(Object object) { if (this.itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); - this.addNamePropertyDescriptor(object); this.addLabelExpressionPropertyDescriptor(object); this.addHelpExpressionPropertyDescriptor(object); } return this.itemPropertyDescriptors; } - /** - * This adds a property descriptor for the Name feature. - * - * @generated - */ - protected void addNamePropertyDescriptor(Object object) { - this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), - this.getString("_UI_WidgetDescription_name_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_WidgetDescription_name_feature", "_UI_WidgetDescription_type"), - FormPackage.Literals.WIDGET_DESCRIPTION__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); - } - /** * This adds a property descriptor for the Label Expression feature. * @@ -134,7 +113,6 @@ public void notifyChanged(Notification notification) { this.updateChildren(notification); switch (notification.getFeatureID(WidgetDescription.class)) { - case FormPackage.WIDGET_DESCRIPTION__NAME: case FormPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: case FormPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); @@ -154,14 +132,4 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors super.collectNewChildDescriptors(newChildDescriptors, object); } - /** - * Return the resource locator for this item provider's resources. - * - * @generated - */ - @Override - public ResourceLocator getResourceLocator() { - return ((IChildCreationExtender) this.adapterFactory).getResourceLocator(); - } - } diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementFor.svg b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementFor.svg new file mode 100644 index 0000000000..b1344738ee --- /dev/null +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementFor.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementIf.svg b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementIf.svg new file mode 100644 index 0000000000..a647c68296 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/icons/full/obj16/FormElementIf.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/view/backend/sirius-components-view-form-edit/src/main/resources/plugin.properties b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/plugin.properties index d52d7306b9..7a8361d83b 100644 --- a/packages/view/backend/sirius-components-view-form-edit/src/main/resources/plugin.properties +++ b/packages/view/backend/sirius-components-view-form-edit/src/main/resources/plugin.properties @@ -12,16 +12,19 @@ ################################################################################# pluginName = Form Edit Support providerName = www.example.org + _UI_CreateChild_text = {0} _UI_CreateChild_text2 = {1} {0} _UI_CreateChild_text3 = {1} _UI_CreateChild_tooltip = Create New {0} Under {1} Feature _UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. _UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + _UI_PropertyDescriptor_description = The {0} of the {1} _UI_FormDescription_type = Form Description _UI_PageDescription_type = Page Description _UI_GroupDescription_type = Group Description +_UI_FormElementDescription_type = Element Description _UI_WidgetDescription_type = Widget Description _UI_BarChartDescription_type = Bar Chart Description _UI_ButtonDescription_type = Button Description @@ -65,8 +68,12 @@ _UI_TextfieldDescriptionStyle_type = Textfield Description Style _UI_ConditionalTextfieldDescriptionStyle_type = Conditional Textfield Description Style _UI_ContainerBorderStyle_type = Container Border Style _UI_ConditionalContainerBorderStyle_type = Conditional Container Border Style +_UI_FormElementFor_type = Element For +_UI_FormElementIf_type = Element If _UI_Unknown_type = Object -_UI_Unknown_datatype = Value + +_UI_Unknown_datatype= Value + _UI_FormDescription_pages_feature = Pages _UI_PageDescription_name_feature = Name _UI_PageDescription_labelExpression_feature = Label Expression @@ -80,10 +87,10 @@ _UI_GroupDescription_labelExpression_feature = Label Expression _UI_GroupDescription_displayMode_feature = Display Mode _UI_GroupDescription_semanticCandidatesExpression_feature = Semantic Candidates Expression _UI_GroupDescription_toolbarActions_feature = Toolbar Actions -_UI_GroupDescription_widgets_feature = Widgets +_UI_GroupDescription_children_feature = Children _UI_GroupDescription_borderStyle_feature = Border Style _UI_GroupDescription_conditionalBorderStyles_feature = Conditional Border Styles -_UI_WidgetDescription_name_feature = Name +_UI_FormElementDescription_name_feature = Name _UI_WidgetDescription_labelExpression_feature = Label Expression _UI_WidgetDescription_helpExpression_feature = Help Expression _UI_BarChartDescription_valuesExpression_feature = Values Expression @@ -188,7 +195,13 @@ _UI_ContainerBorderStyle_borderColor_feature = Border Color _UI_ContainerBorderStyle_borderRadius_feature = Border Radius _UI_ContainerBorderStyle_borderSize_feature = Border Size _UI_ContainerBorderStyle_borderLineStyle_feature = Border Line Style +_UI_FormElementFor_iterator_feature = Iterator +_UI_FormElementFor_iterableExpression_feature = Iterable Expression +_UI_FormElementFor_children_feature = Children +_UI_FormElementIf_predicateExpression_feature = Predicate Expression +_UI_FormElementIf_children_feature = Children _UI_Unknown_feature = Unspecified + _UI_FlexDirection_row_literal = row _UI_FlexDirection_rowReverse_literal = row-reverse _UI_FlexDirection_column_literal = column diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ButtonDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ButtonDescription.java index a41aa241af..115a0b2540 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ButtonDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ButtonDescription.java @@ -136,10 +136,10 @@ public interface ButtonDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getButtonDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -147,9 +147,10 @@ public interface ButtonDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.ButtonDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescription.java index 4e3d882cf7..8d3bfbcd34 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescription.java @@ -113,10 +113,10 @@ public interface CheckboxDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getCheckboxDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -124,9 +124,10 @@ public interface CheckboxDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.CheckboxDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescriptionStyle.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescriptionStyle.java index 2c434d7cc6..81c75f2653 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescriptionStyle.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/CheckboxDescriptionStyle.java @@ -27,9 +27,9 @@ * Placement} * * + * @see org.eclipse.sirius.components.view.form.FormPackage#getCheckboxDescriptionStyle() * @model * @generated - * @see org.eclipse.sirius.components.view.form.FormPackage#getCheckboxDescriptionStyle() */ public interface CheckboxDescriptionStyle extends WidgetDescriptionStyle { @@ -73,10 +73,11 @@ public interface CheckboxDescriptionStyle extends WidgetDescriptionStyle { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.CheckboxDescriptionStyle#getLabelPlacement * Label Placement}' attribute. * - * @param value the new value of the 'Label Placement' attribute. - * @generated + * @param value + * the new value of the 'Label Placement' attribute. * @see org.eclipse.sirius.components.view.form.LabelPlacement * @see #getLabelPlacement() + * @generated */ void setLabelPlacement(LabelPlacement value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ConditionalContainerBorderStyle.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ConditionalContainerBorderStyle.java index 9e368a58df..8b8e2b2c64 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ConditionalContainerBorderStyle.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ConditionalContainerBorderStyle.java @@ -18,9 +18,10 @@ * A representation of the model object 'Conditional Container Border Style'. * * + * + * @see org.eclipse.sirius.components.view.form.FormPackage#getConditionalContainerBorderStyle() * @model * @generated - * @see org.eclipse.sirius.components.view.form.FormPackage#getConditionalContainerBorderStyle() */ public interface ConditionalContainerBorderStyle extends Conditional, ContainerBorderStyle { } // ConditionalContainerBorderStyle diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderLineStyle.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderLineStyle.java index 1e47d4e1ab..adac8e4d61 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderLineStyle.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderLineStyle.java @@ -22,65 +22,65 @@ * A representation of the literals of the enumeration 'Container Border Line * Style', and utility methods for working with them. * + * @see org.eclipse.sirius.components.view.form.FormPackage#getContainerBorderLineStyle() * @model * @generated - * @see org.eclipse.sirius.components.view.form.FormPackage#getContainerBorderLineStyle() */ public enum ContainerBorderLineStyle implements Enumerator { /** * The 'Solid' literal object. * + * @see #SOLID_VALUE * @generated * @ordered - * @see #SOLID_VALUE */ SOLID(0, "Solid", "Solid"), /** * The 'Dashed' literal object. * + * @see #DASHED_VALUE * @generated * @ordered - * @see #DASHED_VALUE */ DASHED(1, "Dashed", "Dashed"), /** * The 'Dotted' literal object. * + * @see #DOTTED_VALUE * @generated * @ordered - * @see #DOTTED_VALUE */ DOTTED(2, "Dotted", "Dotted"); /** * The 'Solid' literal value. * + * @see #SOLID * @model name="Solid" * @generated * @ordered - * @see #SOLID */ public static final int SOLID_VALUE = 0; /** * The 'Dashed' literal value. * + * @see #DASHED * @model name="Dashed" * @generated * @ordered - * @see #DASHED */ public static final int DASHED_VALUE = 1; /** * The 'Dotted' literal value. * + * @see #DOTTED * @model name="Dotted" * @generated * @ordered - * @see #DOTTED */ public static final int DOTTED_VALUE = 2; @@ -90,7 +90,7 @@ public enum ContainerBorderLineStyle implements Enumerator { * * @generated */ - private static final ContainerBorderLineStyle[] VALUES_ARRAY = new ContainerBorderLineStyle[]{SOLID, DASHED, DOTTED,}; + private static final ContainerBorderLineStyle[] VALUES_ARRAY = new ContainerBorderLineStyle[] { SOLID, DASHED, DOTTED, }; /** * A public read-only list of all the 'Container Border Line Style' enumerators. * - * @param literal the literal. + * @param literal + * the literal. * @return the matching enumerator or null. * @generated */ @@ -184,7 +185,7 @@ public static ContainerBorderLineStyle get(int value) { * * @generated */ - ContainerBorderLineStyle(int value, String name, String literal) { + private ContainerBorderLineStyle(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderStyle.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderStyle.java index d4dc764431..6105f75721 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderStyle.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ContainerBorderStyle.java @@ -40,10 +40,10 @@ public interface ContainerBorderStyle extends EObject { * Returns the value of the 'Border Color' reference. * * @return the value of the 'Border Color' reference. - * @model required="true" - * @generated * @see #setBorderColor(UserColor) * @see org.eclipse.sirius.components.view.form.FormPackage#getContainerBorderStyle_BorderColor() + * @model required="true" + * @generated */ UserColor getBorderColor(); @@ -51,9 +51,10 @@ public interface ContainerBorderStyle extends EObject { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.ContainerBorderStyle#getBorderColor * Border Color}' reference. * - * @param value the new value of the 'Border Color' reference. - * @generated + * @param value + * the new value of the 'Border Color' reference. * @see #getBorderColor() + * @generated */ void setBorderColor(UserColor value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ControlDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ControlDescription.java new file mode 100644 index 0000000000..2b1936d4b4 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ControlDescription.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.view.form; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Control Description'. + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.ControlDescription#getName Name}
  • + *
+ * + * @see org.eclipse.sirius.components.view.form.FormPackage#getControlDescription() + * @model abstract="true" + * @generated + */ +public interface ControlDescription extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.sirius.components.view.form.FormPackage#getControlDescription_Name() + * @model dataType="org.eclipse.sirius.components.view.Identifier" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.form.ControlDescription#getName Name}' + * attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // ControlDescription diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FlexboxContainerDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FlexboxContainerDescription.java index 0be2475c8c..d03ea69a89 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FlexboxContainerDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FlexboxContainerDescription.java @@ -41,14 +41,15 @@ public interface FlexboxContainerDescription extends WidgetDescription { /** * Returns the value of the 'Children' containment reference list. The list contents are of type - * {@link org.eclipse.sirius.components.view.form.WidgetDescription}. + * {@link org.eclipse.sirius.components.view.form.FormElementDescription}. * * @return the value of the 'Children' containment reference list. * @see org.eclipse.sirius.components.view.form.FormPackage#getFlexboxContainerDescription_Children() * @model containment="true" * @generated */ - EList getChildren(); + EList getChildren(); /** * Returns the value of the 'Flex Direction' attribute. The default value is "row". The @@ -82,10 +83,10 @@ public interface FlexboxContainerDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getFlexboxContainerDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -94,9 +95,10 @@ public interface FlexboxContainerDescription extends WidgetDescription { * '{@link org.eclipse.sirius.components.view.form.FlexboxContainerDescription#getIsEnabledExpression Is Enabled * Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); @@ -105,10 +107,10 @@ public interface FlexboxContainerDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Border Style' containment reference. - * @model containment="true" - * @generated * @see #setBorderStyle(ContainerBorderStyle) * @see org.eclipse.sirius.components.view.form.FormPackage#getFlexboxContainerDescription_BorderStyle() + * @model containment="true" + * @generated */ ContainerBorderStyle getBorderStyle(); @@ -116,9 +118,10 @@ public interface FlexboxContainerDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.FlexboxContainerDescription#getBorderStyle * Border Style}' containment reference. * - * @param value the new value of the 'Border Style' containment reference. - * @generated + * @param value + * the new value of the 'Border Style' containment reference. * @see #getBorderStyle() + * @generated */ void setBorderStyle(ContainerBorderStyle value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementDescription.java new file mode 100644 index 0000000000..f9039668f7 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementDescription.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Element Description'. + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.FormElementDescription#getName Name}
  • + *
+ * + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementDescription() + * @model abstract="true" + * @generated + */ +public interface FormElementDescription extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementDescription_Name() + * @model dataType="org.eclipse.sirius.components.view.Identifier" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.form.FormElementDescription#getName + * Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // FormElementDescription diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementFor.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementFor.java new file mode 100644 index 0000000000..cbafdcc7a3 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementFor.java @@ -0,0 +1,93 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Element For'. + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.FormElementFor#getIterator Iterator}
  • + *
  • {@link org.eclipse.sirius.components.view.form.FormElementFor#getIterableExpression Iterable + * Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.form.FormElementFor#getChildren Children}
  • + *
+ * + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementFor() + * @model + * @generated + */ +public interface FormElementFor extends FormElementDescription { + /** + * Returns the value of the 'Iterator' attribute. The default value is "it". + * + * @return the value of the 'Iterator' attribute. + * @see #setIterator(String) + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementFor_Iterator() + * @model default="it" required="true" + * @generated + */ + String getIterator(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.form.FormElementFor#getIterator + * Iterator}' attribute. + * + * @param value + * the new value of the 'Iterator' attribute. + * @see #getIterator() + * @generated + */ + void setIterator(String value); + + /** + * Returns the value of the 'Iterable Expression' attribute. + * + * @return the value of the 'Iterable Expression' attribute. + * @see #setIterableExpression(String) + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementFor_IterableExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" required="true" + * @generated + */ + String getIterableExpression(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.form.FormElementFor#getIterableExpression + * Iterable Expression}' attribute. + * + * @param value + * the new value of the 'Iterable Expression' attribute. + * @see #getIterableExpression() + * @generated + */ + void setIterableExpression(String value); + + /** + * Returns the value of the 'Children' containment reference list. The list contents are of type + * {@link org.eclipse.sirius.components.view.form.FormElementDescription}. + * + * @return the value of the 'Children' containment reference list. + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementFor_Children() + * @model containment="true" + * @generated + */ + EList getChildren(); + +} // FormElementFor diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementIf.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementIf.java new file mode 100644 index 0000000000..2206f30598 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormElementIf.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Element If'. + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.FormElementIf#getPredicateExpression Predicate + * Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.form.FormElementIf#getChildren Children}
  • + *
+ * + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementIf() + * @model + * @generated + */ +public interface FormElementIf extends FormElementDescription { + /** + * Returns the value of the 'Predicate Expression' attribute. + * + * @return the value of the 'Predicate Expression' attribute. + * @see #setPredicateExpression(String) + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementIf_PredicateExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" required="true" + * @generated + */ + String getPredicateExpression(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.form.FormElementIf#getPredicateExpression + * Predicate Expression}' attribute. + * + * @param value + * the new value of the 'Predicate Expression' attribute. + * @see #getPredicateExpression() + * @generated + */ + void setPredicateExpression(String value); + + /** + * Returns the value of the 'Children' containment reference list. The list contents are of type + * {@link org.eclipse.sirius.components.view.form.FormElementDescription}. + * + * @return the value of the 'Children' containment reference list. + * @see org.eclipse.sirius.components.view.form.FormPackage#getFormElementIf_Children() + * @model containment="true" + * @generated + */ + EList getChildren(); + +} // FormElementIf diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormFactory.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormFactory.java index ec95c9becd..4e91978843 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormFactory.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormFactory.java @@ -401,6 +401,22 @@ public interface FormFactory extends EFactory { */ ConditionalContainerBorderStyle createConditionalContainerBorderStyle(); + /** + * Returns a new object of class 'Element For'. + * + * @return a new object of class 'Element For'. + * @generated + */ + FormElementFor createFormElementFor(); + + /** + * Returns a new object of class 'Element If'. + * + * @return a new object of class 'Element If'. + * @generated + */ + FormElementIf createFormElementIf(); + /** * Returns the package supported by this factory. * diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormPackage.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormPackage.java index 0af861149b..ea4b51dc71 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormPackage.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/FormPackage.java @@ -275,13 +275,13 @@ public interface FormPackage extends EPackage { int GROUP_DESCRIPTION__TOOLBAR_ACTIONS = 4; /** - * The feature id for the 'Widgets' containment reference list. * * @generated * @ordered */ - int GROUP_DESCRIPTION__WIDGETS = 5; + int GROUP_DESCRIPTION__CHILDREN = 5; /** * The feature id for the 'Border Style' containment reference. + * + * @see org.eclipse.sirius.components.view.form.impl.FormElementDescriptionImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementDescription() + * @generated + */ + int FORM_ELEMENT_DESCRIPTION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_DESCRIPTION__NAME = 0; + + /** + * The number of structural features of the 'Element Description' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Element Description' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_DESCRIPTION_OPERATION_COUNT = 0; + /** * The meta object id for the '{@link org.eclipse.sirius.components.view.form.impl.WidgetDescriptionImpl Widget * Description}' class. @@ -326,7 +362,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getWidgetDescription() * @generated */ - int WIDGET_DESCRIPTION = 3; + int WIDGET_DESCRIPTION = 4; /** * The feature id for the 'Name' attribute. @@ -334,7 +370,7 @@ public interface FormPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION__NAME = 0; + int WIDGET_DESCRIPTION__NAME = FORM_ELEMENT_DESCRIPTION__NAME; /** * The feature id for the 'Label Expression' attribute. @@ -351,7 +387,7 @@ public interface FormPackage extends EPackage { * @generated * @ordered */ - int WIDGET_DESCRIPTION__HELP_EXPRESSION = 2; + int WIDGET_DESCRIPTION__HELP_EXPRESSION = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 1; /** * The number of structural features of the 'Widget Description' class. @@ -492,7 +528,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getButtonDescription() * @generated */ - int BUTTON_DESCRIPTION = 5; + int BUTTON_DESCRIPTION = 6; /** * The feature id for the 'Name' attribute. @@ -599,7 +635,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getCheckboxDescription() * @generated */ - int CHECKBOX_DESCRIPTION = 6; + int CHECKBOX_DESCRIPTION = 7; /** * The feature id for the 'Name' attribute. @@ -697,7 +733,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFlexboxContainerDescription() * @generated */ - int FLEXBOX_CONTAINER_DESCRIPTION = 7; + int FLEXBOX_CONTAINER_DESCRIPTION = 8; /** * The feature id for the 'Name' attribute. @@ -794,7 +830,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getImageDescription() * @generated */ - int IMAGE_DESCRIPTION = 8; + int IMAGE_DESCRIPTION = 9; /** * The feature id for the 'Name' attribute. @@ -863,7 +899,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLabelDescription() * @generated */ - int LABEL_DESCRIPTION = 9; + int LABEL_DESCRIPTION = 10; /** * The feature id for the 'Name' attribute. @@ -942,7 +978,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLinkDescription() * @generated */ - int LINK_DESCRIPTION = 10; + int LINK_DESCRIPTION = 11; /** * The feature id for the 'Name' attribute. @@ -1021,7 +1057,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getListDescription() * @generated */ - int LIST_DESCRIPTION = 11; + int LIST_DESCRIPTION = 12; /** * The feature id for the 'Name' attribute. @@ -1136,7 +1172,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getMultiSelectDescription() * @generated */ - int MULTI_SELECT_DESCRIPTION = 12; + int MULTI_SELECT_DESCRIPTION = 13; /** * The feature id for the 'Name' attribute. @@ -1252,7 +1288,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getPieChartDescription() * @generated */ - int PIE_CHART_DESCRIPTION = 13; + int PIE_CHART_DESCRIPTION = 14; /** * The feature id for the 'Name' attribute. @@ -1340,7 +1376,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getRadioDescription() * @generated */ - int RADIO_DESCRIPTION = 14; + int RADIO_DESCRIPTION = 15; /** * The feature id for the 'Name' attribute. @@ -1455,7 +1491,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getRichTextDescription() * @generated */ - int RICH_TEXT_DESCRIPTION = 15; + int RICH_TEXT_DESCRIPTION = 16; /** * The feature id for the 'Name' attribute. @@ -1535,7 +1571,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getSelectDescription() * @generated */ - int SELECT_DESCRIPTION = 16; + int SELECT_DESCRIPTION = 17; /** * The feature id for the 'Name' attribute. @@ -1651,7 +1687,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextAreaDescription() * @generated */ - int TEXT_AREA_DESCRIPTION = 17; + int TEXT_AREA_DESCRIPTION = 18; /** * The feature id for the 'Name' attribute. @@ -1749,7 +1785,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextfieldDescription() * @generated */ - int TEXTFIELD_DESCRIPTION = 18; + int TEXTFIELD_DESCRIPTION = 19; /** * The feature id for the 'Name' attribute. @@ -1847,7 +1883,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getWidgetDescriptionStyle() * @generated */ - int WIDGET_DESCRIPTION_STYLE = 19; + int WIDGET_DESCRIPTION_STYLE = 20; /** * The number of structural features of the 'Widget Description Style' class. @@ -1952,7 +1988,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalBarChartDescriptionStyle() * @generated */ - int CONDITIONAL_BAR_CHART_DESCRIPTION_STYLE = 21; + int CONDITIONAL_BAR_CHART_DESCRIPTION_STYLE = 22; /** * The feature id for the 'Condition' attribute. @@ -2036,7 +2072,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getButtonDescriptionStyle() * @generated */ - int BUTTON_DESCRIPTION_STYLE = 22; + int BUTTON_DESCRIPTION_STYLE = 23; /** * The feature id for the 'Font Size' attribute. @@ -2123,7 +2159,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalButtonDescriptionStyle() * @generated */ - int CONDITIONAL_BUTTON_DESCRIPTION_STYLE = 23; + int CONDITIONAL_BUTTON_DESCRIPTION_STYLE = 24; /** * The feature id for the 'Condition' attribute. @@ -2217,7 +2253,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getCheckboxDescriptionStyle() * @generated */ - int CHECKBOX_DESCRIPTION_STYLE = 24; + int CHECKBOX_DESCRIPTION_STYLE = 25; /** * The feature id for the 'Color' reference. @@ -2262,7 +2298,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalCheckboxDescriptionStyle() * @generated */ - int CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE = 25; + int CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE = 26; /** * The feature id for the 'Condition' attribute. @@ -2314,7 +2350,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLabelDescriptionStyle() * @generated */ - int LABEL_DESCRIPTION_STYLE = 26; + int LABEL_DESCRIPTION_STYLE = 27; /** * The feature id for the 'Font Size' attribute. @@ -2391,7 +2427,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalLabelDescriptionStyle() * @generated */ - int CONDITIONAL_LABEL_DESCRIPTION_STYLE = 27; + int CONDITIONAL_LABEL_DESCRIPTION_STYLE = 28; /** * The feature id for the 'Condition' attribute. @@ -2475,7 +2511,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLinkDescriptionStyle() * @generated */ - int LINK_DESCRIPTION_STYLE = 28; + int LINK_DESCRIPTION_STYLE = 29; /** * The feature id for the 'Font Size' attribute. @@ -2552,7 +2588,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalLinkDescriptionStyle() * @generated */ - int CONDITIONAL_LINK_DESCRIPTION_STYLE = 29; + int CONDITIONAL_LINK_DESCRIPTION_STYLE = 30; /** * The feature id for the 'Condition' attribute. @@ -2636,7 +2672,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getListDescriptionStyle() * @generated */ - int LIST_DESCRIPTION_STYLE = 30; + int LIST_DESCRIPTION_STYLE = 31; /** * The feature id for the 'Font Size' attribute. @@ -2713,7 +2749,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalListDescriptionStyle() * @generated */ - int CONDITIONAL_LIST_DESCRIPTION_STYLE = 31; + int CONDITIONAL_LIST_DESCRIPTION_STYLE = 32; /** * The feature id for the 'Condition' attribute. @@ -2797,7 +2833,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getMultiSelectDescriptionStyle() * @generated */ - int MULTI_SELECT_DESCRIPTION_STYLE = 32; + int MULTI_SELECT_DESCRIPTION_STYLE = 33; /** * The feature id for the 'Font Size' attribute. @@ -2892,7 +2928,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalMultiSelectDescriptionStyle() * @generated */ - int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE = 33; + int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE = 34; /** * The feature id for the 'Condition' attribute. @@ -2994,7 +3030,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getPieChartDescriptionStyle() * @generated */ - int PIE_CHART_DESCRIPTION_STYLE = 34; + int PIE_CHART_DESCRIPTION_STYLE = 35; /** * The feature id for the 'Font Size' attribute. @@ -3087,7 +3123,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalPieChartDescriptionStyle() * @generated */ - int CONDITIONAL_PIE_CHART_DESCRIPTION_STYLE = 35; + int CONDITIONAL_PIE_CHART_DESCRIPTION_STYLE = 36; /** * The feature id for the 'Condition' attribute. @@ -3187,7 +3223,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getRadioDescriptionStyle() * @generated */ - int RADIO_DESCRIPTION_STYLE = 36; + int RADIO_DESCRIPTION_STYLE = 37; /** * The feature id for the 'Font Size' attribute. @@ -3264,7 +3300,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalRadioDescriptionStyle() * @generated */ - int CONDITIONAL_RADIO_DESCRIPTION_STYLE = 37; + int CONDITIONAL_RADIO_DESCRIPTION_STYLE = 38; /** * The feature id for the 'Condition' attribute. @@ -3348,7 +3384,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getSelectDescriptionStyle() * @generated */ - int SELECT_DESCRIPTION_STYLE = 38; + int SELECT_DESCRIPTION_STYLE = 39; /** * The feature id for the 'Font Size' attribute. @@ -3443,7 +3479,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalSelectDescriptionStyle() * @generated */ - int CONDITIONAL_SELECT_DESCRIPTION_STYLE = 39; + int CONDITIONAL_SELECT_DESCRIPTION_STYLE = 40; /** * The feature id for the 'Condition' attribute. @@ -3545,7 +3581,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextareaDescriptionStyle() * @generated */ - int TEXTAREA_DESCRIPTION_STYLE = 40; + int TEXTAREA_DESCRIPTION_STYLE = 41; /** * The feature id for the 'Font Size' attribute. @@ -3632,7 +3668,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalTextareaDescriptionStyle() * @generated */ - int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE = 41; + int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE = 42; /** * The feature id for the 'Condition' attribute. @@ -3726,7 +3762,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextfieldDescriptionStyle() * @generated */ - int TEXTFIELD_DESCRIPTION_STYLE = 42; + int TEXTFIELD_DESCRIPTION_STYLE = 43; /** * The feature id for the 'Font Size' attribute. @@ -3813,7 +3849,7 @@ public interface FormPackage extends EPackage { * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalTextfieldDescriptionStyle() * @generated */ - int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE = 43; + int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE = 44; /** * The feature id for the 'Condition' attribute. @@ -3903,11 +3939,11 @@ public interface FormPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.form.impl.ContainerBorderStyleImpl * Container Border Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ContainerBorderStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getContainerBorderStyle() + * @generated */ - int CONTAINER_BORDER_STYLE = 44; + int CONTAINER_BORDER_STYLE = 45; /** * The feature id for the 'Border Color' reference. @@ -3965,11 +4001,11 @@ public interface FormPackage extends EPackage { * '{@link org.eclipse.sirius.components.view.form.impl.ConditionalContainerBorderStyleImpl Conditional * Container Border Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ConditionalContainerBorderStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalContainerBorderStyle() + * @generated */ - int CONDITIONAL_CONTAINER_BORDER_STYLE = 45; + int CONDITIONAL_CONTAINER_BORDER_STYLE = 46; /** * The feature id for the 'Condition' attribute. @@ -3985,7 +4021,7 @@ public interface FormPackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_CONTAINER_BORDER_STYLE__BORDER_COLOR = ViewPackage.CONDITIONAL_FEATURE_COUNT; + int CONDITIONAL_CONTAINER_BORDER_STYLE__BORDER_COLOR = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; /** * The feature id for the 'Border Radius' attribute. @@ -4028,55 +4064,169 @@ public interface FormPackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_CONTAINER_BORDER_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; + int CONDITIONAL_CONTAINER_BORDER_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.sirius.components.view.form.impl.FormElementForImpl Element + * For}' class. + * + * @see org.eclipse.sirius.components.view.form.impl.FormElementForImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementFor() + * @generated + */ + int FORM_ELEMENT_FOR = 47; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR__NAME = FORM_ELEMENT_DESCRIPTION__NAME; + + /** + * The feature id for the 'Iterator' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR__ITERATOR = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Iterable Expression' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR__ITERABLE_EXPRESSION = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR__CHILDREN = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Element For' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR_FEATURE_COUNT = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Element For' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_FOR_OPERATION_COUNT = FORM_ELEMENT_DESCRIPTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.eclipse.sirius.components.view.form.impl.FormElementIfImpl Element + * If}' class. + * + * @see org.eclipse.sirius.components.view.form.impl.FormElementIfImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementIf() + * @generated + */ + int FORM_ELEMENT_IF = 48; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_IF__NAME = FORM_ELEMENT_DESCRIPTION__NAME; + + /** + * The feature id for the 'Predicate Expression' attribute. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_IF__PREDICATE_EXPRESSION = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_IF__CHILDREN = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Element If' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_IF_FEATURE_COUNT = FORM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Element If' class. + * + * @generated + * @ordered + */ + int FORM_ELEMENT_IF_OPERATION_COUNT = FORM_ELEMENT_DESCRIPTION_OPERATION_COUNT + 0; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.form.FlexDirection Flex * Direction}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.FlexDirection * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFlexDirection() + * @generated */ - int FLEX_DIRECTION = 46; + int FLEX_DIRECTION = 49; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.form.GroupDisplayMode Group Display * Mode}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.GroupDisplayMode * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getGroupDisplayMode() + * @generated */ - int GROUP_DISPLAY_MODE = 47; + int GROUP_DISPLAY_MODE = 50; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.form.LabelPlacement Label * Placement}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.LabelPlacement * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLabelPlacement() + * @generated */ - int LABEL_PLACEMENT = 48; + int LABEL_PLACEMENT = 51; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.form.ContainerBorderLineStyle Container * Border Line Style}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderLineStyle * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getContainerBorderLineStyle() + * @generated */ - int CONTAINER_BORDER_LINE_STYLE = 49; + int CONTAINER_BORDER_LINE_STYLE = 52; /** * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.FormDescription * Description}'. * * @return the meta object for class 'Description'. - * @generated * @see org.eclipse.sirius.components.view.form.FormDescription + * @generated */ EClass getFormDescription(); @@ -4257,15 +4407,15 @@ public interface FormPackage extends EPackage { /** * Returns the meta object for the containment reference list - * '{@link org.eclipse.sirius.components.view.form.GroupDescription#getWidgets Widgets}'. * - * @return the meta object for the containment reference list 'Widgets'. - * @see org.eclipse.sirius.components.view.form.GroupDescription#getWidgets() + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.sirius.components.view.form.GroupDescription#getChildren() * @see #getGroupDescription() * @generated */ - EReference getGroupDescription_Widgets(); + EReference getGroupDescription_Children(); /** * Returns the meta object for the containment reference @@ -4285,33 +4435,43 @@ public interface FormPackage extends EPackage { * Border Styles}'. * * @return the meta object for the containment reference list 'Conditional Border Styles'. - * @generated * @see org.eclipse.sirius.components.view.form.GroupDescription#getConditionalBorderStyles() * @see #getGroupDescription() + * @generated */ EReference getGroupDescription_ConditionalBorderStyles(); /** - * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.WidgetDescription Widget - * Description}'. + * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.FormElementDescription + * Element Description}'. * - * @return the meta object for class 'Widget Description'. + * @return the meta object for class 'Element Description'. + * @see org.eclipse.sirius.components.view.form.FormElementDescription * @generated - * @see org.eclipse.sirius.components.view.form.WidgetDescription */ - EClass getWidgetDescription(); + EClass getFormElementDescription(); /** * Returns the meta object for the attribute - * '{@link org.eclipse.sirius.components.view.form.WidgetDescription#getName Name}'. + * '{@link org.eclipse.sirius.components.view.form.FormElementDescription#getName Name}'. * * @return the meta object for the attribute 'Name'. - * @see org.eclipse.sirius.components.view.form.WidgetDescription#getName() - * @see #getWidgetDescription() + * @see org.eclipse.sirius.components.view.form.FormElementDescription#getName() + * @see #getFormElementDescription() + * @generated + */ + EAttribute getFormElementDescription_Name(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.WidgetDescription Widget + * Description}'. + * + * @return the meta object for class 'Widget Description'. + * @see org.eclipse.sirius.components.view.form.WidgetDescription * @generated */ - EAttribute getWidgetDescription_Name(); + EClass getWidgetDescription(); /** * Returns the meta object for the attribute @@ -4507,9 +4667,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.ButtonDescription#getIsEnabledExpression() * @see #getButtonDescription() + * @generated */ EAttribute getButtonDescription_IsEnabledExpression(); @@ -4518,8 +4678,8 @@ public interface FormPackage extends EPackage { * Checkbox Description}'. * * @return the meta object for class 'Checkbox Description'. - * @generated * @see org.eclipse.sirius.components.view.form.CheckboxDescription + * @generated */ EClass getCheckboxDescription(); @@ -4577,9 +4737,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.CheckboxDescription#getIsEnabledExpression() * @see #getCheckboxDescription() + * @generated */ EAttribute getCheckboxDescription_IsEnabledExpression(); @@ -4588,8 +4748,8 @@ public interface FormPackage extends EPackage { * Flexbox Container Description}'. * * @return the meta object for class 'Flexbox Container Description'. - * @generated * @see org.eclipse.sirius.components.view.form.FlexboxContainerDescription + * @generated */ EClass getFlexboxContainerDescription(); @@ -4623,9 +4783,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.FlexboxContainerDescription#getIsEnabledExpression() * @see #getFlexboxContainerDescription() + * @generated */ EAttribute getFlexboxContainerDescription_IsEnabledExpression(); @@ -4635,9 +4795,9 @@ public interface FormPackage extends EPackage { * Style}'. * * @return the meta object for the containment reference 'Border Style'. - * @generated * @see org.eclipse.sirius.components.view.form.FlexboxContainerDescription#getBorderStyle() * @see #getFlexboxContainerDescription() + * @generated */ EReference getFlexboxContainerDescription_BorderStyle(); @@ -4647,9 +4807,9 @@ public interface FormPackage extends EPackage { * Conditional Border Styles}'. * * @return the meta object for the containment reference list 'Conditional Border Styles'. - * @generated * @see org.eclipse.sirius.components.view.form.FlexboxContainerDescription#getConditionalBorderStyles() * @see #getFlexboxContainerDescription() + * @generated */ EReference getFlexboxContainerDescription_ConditionalBorderStyles(); @@ -4658,8 +4818,8 @@ public interface FormPackage extends EPackage { * Description}'. * * @return the meta object for class 'Image Description'. - * @generated * @see org.eclipse.sirius.components.view.form.ImageDescription + * @generated */ EClass getImageDescription(); @@ -4867,9 +5027,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.ListDescription#getIsEnabledExpression() * @see #getListDescription() + * @generated */ EAttribute getListDescription_IsEnabledExpression(); @@ -4878,8 +5038,8 @@ public interface FormPackage extends EPackage { * Multi Select Description}'. * * @return the meta object for class 'Multi Select Description'. - * @generated * @see org.eclipse.sirius.components.view.form.MultiSelectDescription + * @generated */ EClass getMultiSelectDescription(); @@ -4961,9 +5121,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.MultiSelectDescription#getIsEnabledExpression() * @see #getMultiSelectDescription() + * @generated */ EAttribute getMultiSelectDescription_IsEnabledExpression(); @@ -4972,8 +5132,8 @@ public interface FormPackage extends EPackage { * Chart Description}'. * * @return the meta object for class 'Pie Chart Description'. - * @generated * @see org.eclipse.sirius.components.view.form.PieChartDescription + * @generated */ EClass getPieChartDescription(); @@ -5113,9 +5273,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.RadioDescription#getIsEnabledExpression() * @see #getRadioDescription() + * @generated */ EAttribute getRadioDescription_IsEnabledExpression(); @@ -5124,8 +5284,8 @@ public interface FormPackage extends EPackage { * Text Description}'. * * @return the meta object for class 'Rich Text Description'. - * @generated * @see org.eclipse.sirius.components.view.form.RichTextDescription + * @generated */ EClass getRichTextDescription(); @@ -5159,9 +5319,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.RichTextDescription#getIsEnabledExpression() * @see #getRichTextDescription() + * @generated */ EAttribute getRichTextDescription_IsEnabledExpression(); @@ -5170,8 +5330,8 @@ public interface FormPackage extends EPackage { * Description}'. * * @return the meta object for class 'Select Description'. - * @generated * @see org.eclipse.sirius.components.view.form.SelectDescription + * @generated */ EClass getSelectDescription(); @@ -5253,9 +5413,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.SelectDescription#getIsEnabledExpression() * @see #getSelectDescription() + * @generated */ EAttribute getSelectDescription_IsEnabledExpression(); @@ -5264,8 +5424,8 @@ public interface FormPackage extends EPackage { * Area Description}'. * * @return the meta object for class 'Text Area Description'. - * @generated * @see org.eclipse.sirius.components.view.form.TextAreaDescription + * @generated */ EClass getTextAreaDescription(); @@ -5323,9 +5483,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.TextAreaDescription#getIsEnabledExpression() * @see #getTextAreaDescription() + * @generated */ EAttribute getTextAreaDescription_IsEnabledExpression(); @@ -5334,8 +5494,8 @@ public interface FormPackage extends EPackage { * Textfield Description}'. * * @return the meta object for class 'Textfield Description'. - * @generated * @see org.eclipse.sirius.components.view.form.TextfieldDescription + * @generated */ EClass getTextfieldDescription(); @@ -5393,9 +5553,9 @@ public interface FormPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Is Enabled Expression'. - * @generated * @see org.eclipse.sirius.components.view.form.TextfieldDescription#getIsEnabledExpression() * @see #getTextfieldDescription() + * @generated */ EAttribute getTextfieldDescription_IsEnabledExpression(); @@ -5404,8 +5564,8 @@ public interface FormPackage extends EPackage { * Widget Description Style}'. * * @return the meta object for class 'Widget Description Style'. - * @generated * @see org.eclipse.sirius.components.view.form.WidgetDescriptionStyle + * @generated */ EClass getWidgetDescriptionStyle(); @@ -5515,9 +5675,9 @@ public interface FormPackage extends EPackage { * Placement}'. * * @return the meta object for the attribute 'Label Placement'. - * @generated * @see org.eclipse.sirius.components.view.form.CheckboxDescriptionStyle#getLabelPlacement() * @see #getCheckboxDescriptionStyle() + * @generated */ EAttribute getCheckboxDescriptionStyle_LabelPlacement(); @@ -5527,8 +5687,8 @@ public interface FormPackage extends EPackage { * Description Style}'. * * @return the meta object for class 'Conditional Checkbox Description Style'. - * @generated * @see org.eclipse.sirius.components.view.form.ConditionalCheckboxDescriptionStyle + * @generated */ EClass getConditionalCheckboxDescriptionStyle(); @@ -5928,8 +6088,8 @@ public interface FormPackage extends EPackage { * Container Border Style}'. * * @return the meta object for class 'Container Border Style'. - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderStyle + * @generated */ EClass getContainerBorderStyle(); @@ -5951,9 +6111,9 @@ public interface FormPackage extends EPackage { * * * @return the meta object for the attribute 'Border Radius'. - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderStyle#getBorderRadius() * @see #getContainerBorderStyle() + * @generated */ EAttribute getContainerBorderStyle_BorderRadius(); @@ -5975,9 +6135,9 @@ public interface FormPackage extends EPackage { * Style}'. * * @return the meta object for the attribute 'Border Line Style'. - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderStyle#getBorderLineStyle() * @see #getContainerBorderStyle() + * @generated */ EAttribute getContainerBorderStyle_BorderLineStyle(); @@ -5986,18 +6146,98 @@ public interface FormPackage extends EPackage { * Conditional Container Border Style}'. * * @return the meta object for class 'Conditional Container Border Style'. - * @generated * @see org.eclipse.sirius.components.view.form.ConditionalContainerBorderStyle + * @generated */ EClass getConditionalContainerBorderStyle(); + /** + * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.FormElementFor Element + * For}'. + * + * @return the meta object for class 'Element For'. + * @see org.eclipse.sirius.components.view.form.FormElementFor + * @generated + */ + EClass getFormElementFor(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.components.view.form.FormElementFor#getIterator Iterator}'. + * + * @return the meta object for the attribute 'Iterator'. + * @see org.eclipse.sirius.components.view.form.FormElementFor#getIterator() + * @see #getFormElementFor() + * @generated + */ + EAttribute getFormElementFor_Iterator(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.components.view.form.FormElementFor#getIterableExpression Iterable + * Expression}'. + * + * @return the meta object for the attribute 'Iterable Expression'. + * @see org.eclipse.sirius.components.view.form.FormElementFor#getIterableExpression() + * @see #getFormElementFor() + * @generated + */ + EAttribute getFormElementFor_IterableExpression(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.sirius.components.view.form.FormElementFor#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.sirius.components.view.form.FormElementFor#getChildren() + * @see #getFormElementFor() + * @generated + */ + EReference getFormElementFor_Children(); + + /** + * Returns the meta object for class '{@link org.eclipse.sirius.components.view.form.FormElementIf Element + * If}'. + * + * @return the meta object for class 'Element If'. + * @see org.eclipse.sirius.components.view.form.FormElementIf + * @generated + */ + EClass getFormElementIf(); + + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.components.view.form.FormElementIf#getPredicateExpression Predicate + * Expression}'. + * + * @return the meta object for the attribute 'Predicate Expression'. + * @see org.eclipse.sirius.components.view.form.FormElementIf#getPredicateExpression() + * @see #getFormElementIf() + * @generated + */ + EAttribute getFormElementIf_PredicateExpression(); + + /** + * Returns the meta object for the containment reference list + * '{@link org.eclipse.sirius.components.view.form.FormElementIf#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.sirius.components.view.form.FormElementIf#getChildren() + * @see #getFormElementIf() + * @generated + */ + EReference getFormElementIf_Children(); + /** * Returns the meta object for enum '{@link org.eclipse.sirius.components.view.form.FlexDirection Flex * Direction}'. * * @return the meta object for enum 'Flex Direction'. - * @generated * @see org.eclipse.sirius.components.view.form.FlexDirection + * @generated */ EEnum getFlexDirection(); @@ -6006,8 +6246,8 @@ public interface FormPackage extends EPackage { * Display Mode}'. * * @return the meta object for enum 'Group Display Mode'. - * @generated * @see org.eclipse.sirius.components.view.form.GroupDisplayMode + * @generated */ EEnum getGroupDisplayMode(); @@ -6016,8 +6256,8 @@ public interface FormPackage extends EPackage { * Placement}'. * * @return the meta object for enum 'Label Placement'. - * @generated * @see org.eclipse.sirius.components.view.form.LabelPlacement + * @generated */ EEnum getLabelPlacement(); @@ -6026,8 +6266,8 @@ public interface FormPackage extends EPackage { * Container Border Line Style}'. * * @return the meta object for enum 'Container Border Line Style'. - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderLineStyle + * @generated */ EEnum getContainerBorderLineStyle(); @@ -6188,12 +6428,12 @@ interface Literals { EReference GROUP_DESCRIPTION__TOOLBAR_ACTIONS = eINSTANCE.getGroupDescription_ToolbarActions(); /** - * The meta object literal for the 'Widgets' containment reference list feature. * * @generated */ - EReference GROUP_DESCRIPTION__WIDGETS = eINSTANCE.getGroupDescription_Widgets(); + EReference GROUP_DESCRIPTION__CHILDREN = eINSTANCE.getGroupDescription_Children(); /** * The meta object literal for the 'Border Style' containment reference feature. + * The meta object literal for the + * '{@link org.eclipse.sirius.components.view.form.impl.FormElementDescriptionImpl Element + * Description}' class. * + * @see org.eclipse.sirius.components.view.form.impl.FormElementDescriptionImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementDescription() * @generated - * @see org.eclipse.sirius.components.view.form.impl.WidgetDescriptionImpl - * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getWidgetDescription() */ - EClass WIDGET_DESCRIPTION = eINSTANCE.getWidgetDescription(); + EClass FORM_ELEMENT_DESCRIPTION = eINSTANCE.getFormElementDescription(); /** * The meta object literal for the 'Name' attribute feature. + * + * @see org.eclipse.sirius.components.view.form.impl.WidgetDescriptionImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getWidgetDescription() + * @generated + */ + EClass WIDGET_DESCRIPTION = eINSTANCE.getWidgetDescription(); /** * The meta object literal for the 'Label Expression' attribute feature. @@ -6373,9 +6624,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.CheckboxDescriptionImpl * Checkbox Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.CheckboxDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getCheckboxDescription() + * @generated */ EClass CHECKBOX_DESCRIPTION = eINSTANCE.getCheckboxDescription(); @@ -6424,9 +6675,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.form.impl.FlexboxContainerDescriptionImpl Flexbox Container * Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.FlexboxContainerDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFlexboxContainerDescription() + * @generated */ EClass FLEXBOX_CONTAINER_DESCRIPTION = eINSTANCE.getFlexboxContainerDescription(); @@ -6474,9 +6725,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.ImageDescriptionImpl * Image Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ImageDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getImageDescription() + * @generated */ EClass IMAGE_DESCRIPTION = eINSTANCE.getImageDescription(); @@ -6635,9 +6886,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.form.impl.MultiSelectDescriptionImpl Multi Select * Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.MultiSelectDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getMultiSelectDescription() + * @generated */ EClass MULTI_SELECT_DESCRIPTION = eINSTANCE.getMultiSelectDescription(); @@ -6701,9 +6952,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.PieChartDescriptionImpl * Pie Chart Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.PieChartDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getPieChartDescription() + * @generated */ EClass PIE_CHART_DESCRIPTION = eINSTANCE.getPieChartDescription(); @@ -6809,9 +7060,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.RichTextDescriptionImpl * Rich Text Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.RichTextDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getRichTextDescription() + * @generated */ EClass RICH_TEXT_DESCRIPTION = eINSTANCE.getRichTextDescription(); @@ -6843,9 +7094,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.SelectDescriptionImpl * Select Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.SelectDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getSelectDescription() + * @generated */ EClass SELECT_DESCRIPTION = eINSTANCE.getSelectDescription(); @@ -6909,9 +7160,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.TextAreaDescriptionImpl * Text Area Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.TextAreaDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextAreaDescription() + * @generated */ EClass TEXT_AREA_DESCRIPTION = eINSTANCE.getTextAreaDescription(); @@ -6959,9 +7210,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.TextfieldDescriptionImpl * Textfield Description}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.TextfieldDescriptionImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getTextfieldDescription() + * @generated */ EClass TEXTFIELD_DESCRIPTION = eINSTANCE.getTextfieldDescription(); @@ -7010,9 +7261,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.form.impl.WidgetDescriptionStyleImpl Widget Description * Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.WidgetDescriptionStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getWidgetDescriptionStyle() + * @generated */ EClass WIDGET_DESCRIPTION_STYLE = eINSTANCE.getWidgetDescriptionStyle(); @@ -7116,9 +7367,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.form.impl.ConditionalCheckboxDescriptionStyleImpl Conditional * Checkbox Description Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ConditionalCheckboxDescriptionStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalCheckboxDescriptionStyle() + * @generated */ EClass CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE = eINSTANCE.getConditionalCheckboxDescriptionStyle(); @@ -7458,9 +7709,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.ContainerBorderStyleImpl * Container Border Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ContainerBorderStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getContainerBorderStyle() + * @generated */ EClass CONTAINER_BORDER_STYLE = eINSTANCE.getContainerBorderStyle(); @@ -7501,19 +7752,79 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.form.impl.ConditionalContainerBorderStyleImpl Conditional * Container Border Style}' class. * - * @generated * @see org.eclipse.sirius.components.view.form.impl.ConditionalContainerBorderStyleImpl * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getConditionalContainerBorderStyle() + * @generated */ EClass CONDITIONAL_CONTAINER_BORDER_STYLE = eINSTANCE.getConditionalContainerBorderStyle(); + /** + * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.FormElementForImpl + * Element For}' class. + * + * @see org.eclipse.sirius.components.view.form.impl.FormElementForImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementFor() + * @generated + */ + EClass FORM_ELEMENT_FOR = eINSTANCE.getFormElementFor(); + + /** + * The meta object literal for the 'Iterator' attribute feature. + * + * @generated + */ + EAttribute FORM_ELEMENT_FOR__ITERATOR = eINSTANCE.getFormElementFor_Iterator(); + + /** + * The meta object literal for the 'Iterable Expression' attribute feature. + * + * @generated + */ + EAttribute FORM_ELEMENT_FOR__ITERABLE_EXPRESSION = eINSTANCE.getFormElementFor_IterableExpression(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference FORM_ELEMENT_FOR__CHILDREN = eINSTANCE.getFormElementFor_Children(); + + /** + * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.impl.FormElementIfImpl + * Element If}' class. + * + * @see org.eclipse.sirius.components.view.form.impl.FormElementIfImpl + * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFormElementIf() + * @generated + */ + EClass FORM_ELEMENT_IF = eINSTANCE.getFormElementIf(); + + /** + * The meta object literal for the 'Predicate Expression' attribute feature. + * + * @generated + */ + EAttribute FORM_ELEMENT_IF__PREDICATE_EXPRESSION = eINSTANCE.getFormElementIf_PredicateExpression(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference FORM_ELEMENT_IF__CHILDREN = eINSTANCE.getFormElementIf_Children(); + /** * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.FlexDirection Flex * Direction}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.FlexDirection * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getFlexDirection() + * @generated */ EEnum FLEX_DIRECTION = eINSTANCE.getFlexDirection(); @@ -7521,9 +7832,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.GroupDisplayMode Group * Display Mode}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.GroupDisplayMode * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getGroupDisplayMode() + * @generated */ EEnum GROUP_DISPLAY_MODE = eINSTANCE.getGroupDisplayMode(); @@ -7531,9 +7842,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.LabelPlacement Label * Placement}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.LabelPlacement * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getLabelPlacement() + * @generated */ EEnum LABEL_PLACEMENT = eINSTANCE.getLabelPlacement(); @@ -7541,9 +7852,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.form.ContainerBorderLineStyle * Container Border Line Style}' enum. * - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderLineStyle * @see org.eclipse.sirius.components.view.form.impl.FormPackageImpl#getContainerBorderLineStyle() + * @generated */ EEnum CONTAINER_BORDER_LINE_STYLE = eINSTANCE.getContainerBorderLineStyle(); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/GroupDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/GroupDescription.java index 252cfa6d94..253af91274 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/GroupDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/GroupDescription.java @@ -147,25 +147,26 @@ public interface GroupDescription extends EObject { EList getToolbarActions(); /** - * Returns the value of the 'Widgets' containment reference list. The list contents are of type - * {@link org.eclipse.sirius.components.view.form.WidgetDescription}. + * Returns the value of the 'Children' containment reference list. The list contents are of type + * {@link org.eclipse.sirius.components.view.form.FormElementDescription}. * - * @return the value of the 'Widgets' containment reference list. - * @see org.eclipse.sirius.components.view.form.FormPackage#getGroupDescription_Widgets() + * @return the value of the 'Children' containment reference list. + * @see org.eclipse.sirius.components.view.form.FormPackage#getGroupDescription_Children() * @model containment="true" * @generated */ - EList getWidgets(); + EList getChildren(); /** * Returns the value of the 'Border Style' containment reference. * * @return the value of the 'Border Style' containment reference. - * @model containment="true" - * @generated * @see #setBorderStyle(ContainerBorderStyle) * @see org.eclipse.sirius.components.view.form.FormPackage#getGroupDescription_BorderStyle() + * @model containment="true" + * @generated */ ContainerBorderStyle getBorderStyle(); @@ -173,9 +174,10 @@ public interface GroupDescription extends EObject { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.GroupDescription#getBorderStyle Border * Style}' containment reference. * - * @param value the new value of the 'Border Style' containment reference. - * @generated + * @param value + * the new value of the 'Border Style' containment reference. * @see #getBorderStyle() + * @generated */ void setBorderStyle(ContainerBorderStyle value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/LabelPlacement.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/LabelPlacement.java index 2f8cb755d9..380b0cd59f 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/LabelPlacement.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/LabelPlacement.java @@ -22,84 +22,84 @@ * A representation of the literals of the enumeration 'Label Placement', and * utility methods for working with them. * + * @see org.eclipse.sirius.components.view.form.FormPackage#getLabelPlacement() * @model * @generated - * @see org.eclipse.sirius.components.view.form.FormPackage#getLabelPlacement() */ public enum LabelPlacement implements Enumerator { /** * The 'End' literal object. * + * @see #END_VALUE * @generated * @ordered - * @see #END_VALUE */ END(0, "end", "end"), /** * The 'Top' literal object. * + * @see #TOP_VALUE * @generated * @ordered - * @see #TOP_VALUE */ TOP(1, "top", "top"), /** * The 'Start' literal object. * + * @see #START_VALUE * @generated * @ordered - * @see #START_VALUE */ START(2, "start", "start"), /** * The 'Bottom' literal object. * + * @see #BOTTOM_VALUE * @generated * @ordered - * @see #BOTTOM_VALUE */ BOTTOM(3, "bottom", "bottom"); /** * The 'End' literal value. * + * @see #END * @model name="end" * @generated * @ordered - * @see #END */ public static final int END_VALUE = 0; /** * The 'Top' literal value. * + * @see #TOP * @model name="top" * @generated * @ordered - * @see #TOP */ public static final int TOP_VALUE = 1; /** * The 'Start' literal value. * + * @see #START * @model name="start" * @generated * @ordered - * @see #START */ public static final int START_VALUE = 2; /** * The 'Bottom' literal value. * + * @see #BOTTOM * @model name="bottom" * @generated * @ordered - * @see #BOTTOM */ public static final int BOTTOM_VALUE = 3; @@ -108,7 +108,7 @@ public enum LabelPlacement implements Enumerator { * * @generated */ - private static final LabelPlacement[] VALUES_ARRAY = new LabelPlacement[]{END, TOP, START, BOTTOM,}; + private static final LabelPlacement[] VALUES_ARRAY = new LabelPlacement[] { END, TOP, START, BOTTOM, }; /** * A public read-only list of all the 'Label Placement' enumerators. * * @generated */ private final int value; + /** * * * @generated */ private final String name; + /** * * @@ -141,7 +144,7 @@ public enum LabelPlacement implements Enumerator { * * @generated */ - LabelPlacement(int value, String name, String literal) { + private LabelPlacement(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; @@ -151,7 +154,8 @@ public enum LabelPlacement implements Enumerator { * Returns the 'Label Placement' literal with the specified literal value. * * - * @param literal the literal. + * @param literal + * the literal. * @return the matching enumerator or null. * @generated */ @@ -169,7 +173,8 @@ public static LabelPlacement get(String literal) { * Returns the 'Label Placement' literal with the specified name. * - * @param name the name. + * @param name + * the name. * @return the matching enumerator or null. * @generated */ @@ -187,7 +192,8 @@ public static LabelPlacement getByName(String name) { * Returns the 'Label Placement' literal with the specified integer value. * * - * @param value the integer value. + * @param value + * the integer value. * @return the matching enumerator or null. * @generated */ diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ListDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ListDescription.java index cad29c4bf4..de9f62a9cd 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ListDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/ListDescription.java @@ -160,10 +160,10 @@ public interface ListDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getListDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -171,9 +171,10 @@ public interface ListDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.ListDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/MultiSelectDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/MultiSelectDescription.java index 45d2ee666f..109cbb2430 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/MultiSelectDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/MultiSelectDescription.java @@ -165,10 +165,10 @@ public interface MultiSelectDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getMultiSelectDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -177,9 +177,10 @@ public interface MultiSelectDescription extends WidgetDescription { * '{@link org.eclipse.sirius.components.view.form.MultiSelectDescription#getIsEnabledExpression Is Enabled * Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RadioDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RadioDescription.java index ba78ccbec7..038d0c7932 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RadioDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RadioDescription.java @@ -162,10 +162,10 @@ public interface RadioDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getRadioDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -173,9 +173,10 @@ public interface RadioDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.RadioDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RichTextDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RichTextDescription.java index ff5e6d002b..a1821562aa 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RichTextDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/RichTextDescription.java @@ -75,10 +75,10 @@ public interface RichTextDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getRichTextDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -86,9 +86,10 @@ public interface RichTextDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.RichTextDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/SelectDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/SelectDescription.java index 33e6195f60..46218faec8 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/SelectDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/SelectDescription.java @@ -162,10 +162,10 @@ public interface SelectDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getSelectDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -173,9 +173,10 @@ public interface SelectDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.SelectDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextAreaDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextAreaDescription.java index 9a46e515bf..ab8a3ac13b 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextAreaDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextAreaDescription.java @@ -113,10 +113,10 @@ public interface TextAreaDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getTextAreaDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -124,9 +124,10 @@ public interface TextAreaDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.TextAreaDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextfieldDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextfieldDescription.java index a2e89fb179..8d1c0e1184 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextfieldDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/TextfieldDescription.java @@ -113,10 +113,10 @@ public interface TextfieldDescription extends WidgetDescription { * end-user-doc --> * * @return the value of the 'Is Enabled Expression' attribute. - * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" - * @generated * @see #setIsEnabledExpression(String) * @see org.eclipse.sirius.components.view.form.FormPackage#getTextfieldDescription_IsEnabledExpression() + * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" + * @generated */ String getIsEnabledExpression(); @@ -124,9 +124,10 @@ public interface TextfieldDescription extends WidgetDescription { * Sets the value of the '{@link org.eclipse.sirius.components.view.form.TextfieldDescription#getIsEnabledExpression * Is Enabled Expression}' attribute. * - * @param value the new value of the 'Is Enabled Expression' attribute. - * @generated + * @param value + * the new value of the 'Is Enabled Expression' attribute. * @see #getIsEnabledExpression() + * @generated */ void setIsEnabledExpression(String value); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/WidgetDescription.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/WidgetDescription.java index 464cd38732..71fa3c50ab 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/WidgetDescription.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/WidgetDescription.java @@ -12,8 +12,6 @@ *******************************************************************************/ package org.eclipse.sirius.components.view.form; -import org.eclipse.emf.ecore.EObject; - /** * A representation of the model object 'Widget Description'. @@ -32,29 +30,7 @@ * @model abstract="true" * @generated */ -public interface WidgetDescription extends EObject { - /** - * Returns the value of the 'Name' attribute. - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.sirius.components.view.form.FormPackage#getWidgetDescription_Name() - * @model dataType="org.eclipse.sirius.components.view.Identifier" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.sirius.components.view.form.WidgetDescription#getName Name}' - * attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - +public interface WidgetDescription extends FormElementDescription { /** * Returns the value of the 'Label Expression' attribute. diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/BarChartDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/BarChartDescriptionImpl.java index 15027a725d..d9a5517610 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/BarChartDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/BarChartDescriptionImpl.java @@ -314,8 +314,7 @@ public void setStyle(BarChartDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalBarChartDescriptionStyle.class, this, - FormPackage.BAR_CHART_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalBarChartDescriptionStyle.class, this, FormPackage.BAR_CHART_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ButtonDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ButtonDescriptionImpl.java index b1a22547f1..e715fe87d5 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ButtonDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ButtonDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -110,23 +109,25 @@ public class ButtonDescriptionImpl extends WidgetDescriptionImpl implements Butt protected ButtonDescriptionStyle style; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. + * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList conditionalStyles; + /** - * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getConditionalStyles() + * @see #getIsEnabledExpression() */ - protected EList conditionalStyles; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -423,7 +424,7 @@ public boolean eIsSet(int featureID) { case FormPackage.BUTTON_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.BUTTON_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionImpl.java index e4abaae5e4..45912a4d06 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -73,9 +72,9 @@ public class CheckboxDescriptionImpl extends WidgetDescriptionImpl implements Ch * The cached value of the '{@link #getBody() Body}' containment reference list. * * + * @see #getBody() * @generated * @ordered - * @see #getBody() */ protected EList body; @@ -83,9 +82,9 @@ public class CheckboxDescriptionImpl extends WidgetDescriptionImpl implements Ch * The cached value of the '{@link #getStyle() Style}' containment reference. * + * @see #getStyle() * @generated * @ordered - * @see #getStyle() */ protected CheckboxDescriptionStyle style; @@ -93,9 +92,9 @@ public class CheckboxDescriptionImpl extends WidgetDescriptionImpl implements Ch * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getConditionalStyles() */ protected EList conditionalStyles; @@ -230,8 +229,7 @@ public void setStyle(CheckboxDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalCheckboxDescriptionStyle.class, this, - FormPackage.CHECKBOX_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalCheckboxDescriptionStyle.class, this, FormPackage.CHECKBOX_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } @@ -373,7 +371,7 @@ public boolean eIsSet(int featureID) { case FormPackage.CHECKBOX_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.CHECKBOX_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionStyleImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionStyleImpl.java index 72c112cc50..9bd883e00d 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionStyleImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/CheckboxDescriptionStyleImpl.java @@ -38,30 +38,32 @@ public class CheckboxDescriptionStyleImpl extends WidgetDescriptionStyleImpl implements CheckboxDescriptionStyle { /** - * The default value of the '{@link #getLabelPlacement() Label Placement}' attribute. + * The cached value of the '{@link #getColor() Color}' reference. * * @generated * @ordered - * @see #getLabelPlacement() + * @see #getColor() */ - protected static final LabelPlacement LABEL_PLACEMENT_EDEFAULT = LabelPlacement.END; + protected UserColor color; + /** - * The cached value of the '{@link #getColor() Color}' reference. + * The default value of the '{@link #getLabelPlacement() Label Placement}' attribute. * + * @see #getLabelPlacement() * @generated * @ordered - * @see #getColor() */ - protected UserColor color; + protected static final LabelPlacement LABEL_PLACEMENT_EDEFAULT = LabelPlacement.END; + /** * The cached value of the '{@link #getLabelPlacement() Label Placement}' attribute. * + * @see #getLabelPlacement() * @generated * @ordered - * @see #getLabelPlacement() */ protected LabelPlacement labelPlacement = LABEL_PLACEMENT_EDEFAULT; @@ -227,10 +229,11 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (labelPlacement: " + - this.labelPlacement + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (labelPlacement: "); + result.append(this.labelPlacement); + result.append(')'); + return result.toString(); } } // CheckboxDescriptionStyleImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalCheckboxDescriptionStyleImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalCheckboxDescriptionStyleImpl.java index c8d53dd32d..58b144b83b 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalCheckboxDescriptionStyleImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalCheckboxDescriptionStyleImpl.java @@ -42,30 +42,32 @@ public class ConditionalCheckboxDescriptionStyleImpl extends ConditionalImpl implements ConditionalCheckboxDescriptionStyle { /** - * The default value of the '{@link #getLabelPlacement() Label Placement}' attribute. + * The cached value of the '{@link #getColor() Color}' reference. * * @generated * @ordered - * @see #getLabelPlacement() + * @see #getColor() */ - protected static final LabelPlacement LABEL_PLACEMENT_EDEFAULT = LabelPlacement.END; + protected UserColor color; + /** - * The cached value of the '{@link #getColor() Color}' reference. + * The default value of the '{@link #getLabelPlacement() Label Placement}' attribute. * + * @see #getLabelPlacement() * @generated * @ordered - * @see #getColor() */ - protected UserColor color; + protected static final LabelPlacement LABEL_PLACEMENT_EDEFAULT = LabelPlacement.END; + /** * The cached value of the '{@link #getLabelPlacement() Label Placement}' attribute. * + * @see #getLabelPlacement() * @generated * @ordered - * @see #getLabelPlacement() */ protected LabelPlacement labelPlacement = LABEL_PLACEMENT_EDEFAULT; @@ -283,10 +285,11 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (labelPlacement: " + - this.labelPlacement + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (labelPlacement: "); + result.append(this.labelPlacement); + result.append(')'); + return result.toString(); } } // ConditionalCheckboxDescriptionStyleImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalContainerBorderStyleImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalContainerBorderStyleImpl.java index c5856e02d4..026379902e 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalContainerBorderStyleImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ConditionalContainerBorderStyleImpl.java @@ -48,9 +48,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The cached value of the '{@link #getBorderColor() Border Color}' reference. * + * @see #getBorderColor() * @generated * @ordered - * @see #getBorderColor() */ protected UserColor borderColor; @@ -58,9 +58,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The default value of the '{@link #getBorderRadius() Border Radius}' attribute. * * + * @see #getBorderRadius() * @generated * @ordered - * @see #getBorderRadius() */ protected static final int BORDER_RADIUS_EDEFAULT = 3; @@ -68,9 +68,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The cached value of the '{@link #getBorderRadius() Border Radius}' attribute. * * + * @see #getBorderRadius() * @generated * @ordered - * @see #getBorderRadius() */ protected int borderRadius = BORDER_RADIUS_EDEFAULT; @@ -78,9 +78,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The default value of the '{@link #getBorderSize() Border Size}' attribute. * + * @see #getBorderSize() * @generated * @ordered - * @see #getBorderSize() */ protected static final int BORDER_SIZE_EDEFAULT = 1; @@ -88,9 +88,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The cached value of the '{@link #getBorderSize() Border Size}' attribute. * + * @see #getBorderSize() * @generated * @ordered - * @see #getBorderSize() */ protected int borderSize = BORDER_SIZE_EDEFAULT; @@ -108,9 +108,9 @@ public class ConditionalContainerBorderStyleImpl extends ConditionalImpl impleme * The cached value of the '{@link #getBorderLineStyle() Border Line Style}' attribute. * + * @see #getBorderLineStyle() * @generated * @ordered - * @see #getBorderLineStyle() */ protected ContainerBorderLineStyle borderLineStyle = BORDER_LINE_STYLE_EDEFAULT; @@ -297,7 +297,7 @@ public void eSet(int featureID, Object newValue) { public void eUnset(int featureID) { switch (featureID) { case FormPackage.CONDITIONAL_CONTAINER_BORDER_STYLE__BORDER_COLOR: - this.setBorderColor(null); + this.setBorderColor((UserColor) null); return; case FormPackage.CONDITIONAL_CONTAINER_BORDER_STYLE__BORDER_RADIUS: this.setBorderRadius(BORDER_RADIUS_EDEFAULT); @@ -390,14 +390,15 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (borderRadius: " + - this.borderRadius + - ", borderSize: " + - this.borderSize + - ", borderLineStyle: " + - this.borderLineStyle + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (borderRadius: "); + result.append(this.borderRadius); + result.append(", borderSize: "); + result.append(this.borderSize); + result.append(", borderLineStyle: "); + result.append(this.borderLineStyle); + result.append(')'); + return result.toString(); } } // ConditionalContainerBorderStyleImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ContainerBorderStyleImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ContainerBorderStyleImpl.java index 8ccdfa00e2..afef22762d 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ContainerBorderStyleImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ContainerBorderStyleImpl.java @@ -47,9 +47,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The cached value of the '{@link #getBorderColor() Border Color}' reference. * + * @see #getBorderColor() * @generated * @ordered - * @see #getBorderColor() */ protected UserColor borderColor; @@ -57,9 +57,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The default value of the '{@link #getBorderRadius() Border Radius}' attribute. * * + * @see #getBorderRadius() * @generated * @ordered - * @see #getBorderRadius() */ protected static final int BORDER_RADIUS_EDEFAULT = 3; @@ -67,9 +67,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The cached value of the '{@link #getBorderRadius() Border Radius}' attribute. * * + * @see #getBorderRadius() * @generated * @ordered - * @see #getBorderRadius() */ protected int borderRadius = BORDER_RADIUS_EDEFAULT; @@ -77,9 +77,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The default value of the '{@link #getBorderSize() Border Size}' attribute. * + * @see #getBorderSize() * @generated * @ordered - * @see #getBorderSize() */ protected static final int BORDER_SIZE_EDEFAULT = 1; @@ -87,9 +87,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The cached value of the '{@link #getBorderSize() Border Size}' attribute. * + * @see #getBorderSize() * @generated * @ordered - * @see #getBorderSize() */ protected int borderSize = BORDER_SIZE_EDEFAULT; @@ -107,9 +107,9 @@ public class ContainerBorderStyleImpl extends MinimalEObjectImpl.Container imple * The cached value of the '{@link #getBorderLineStyle() Border Line Style}' attribute. * + * @see #getBorderLineStyle() * @generated * @ordered - * @see #getBorderLineStyle() */ protected ContainerBorderLineStyle borderLineStyle = BORDER_LINE_STYLE_EDEFAULT; @@ -296,7 +296,7 @@ public void eSet(int featureID, Object newValue) { public void eUnset(int featureID) { switch (featureID) { case FormPackage.CONTAINER_BORDER_STYLE__BORDER_COLOR: - this.setBorderColor(null); + this.setBorderColor((UserColor) null); return; case FormPackage.CONTAINER_BORDER_STYLE__BORDER_RADIUS: this.setBorderRadius(BORDER_RADIUS_EDEFAULT); @@ -341,14 +341,15 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - String result = super.toString() + " (borderRadius: " + - this.borderRadius + - ", borderSize: " + - this.borderSize + - ", borderLineStyle: " + - this.borderLineStyle + - ')'; - return result; + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (borderRadius: "); + result.append(this.borderRadius); + result.append(", borderSize: "); + result.append(this.borderSize); + result.append(", borderLineStyle: "); + result.append(this.borderLineStyle); + result.append(')'); + return result.toString(); } } // ContainerBorderStyleImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FlexboxContainerDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FlexboxContainerDescriptionImpl.java index 39d26ba3bc..8a5ed17309 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FlexboxContainerDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FlexboxContainerDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -27,8 +26,8 @@ import org.eclipse.sirius.components.view.form.ContainerBorderStyle; import org.eclipse.sirius.components.view.form.FlexDirection; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.FormPackage; -import org.eclipse.sirius.components.view.form.WidgetDescription; /** * An implementation of the model object 'Flexbox Container Description'. * * + * @see #getFlexDirection() * @generated * @ordered - * @see #getFlexDirection() */ protected static final FlexDirection FLEX_DIRECTION_EDEFAULT = FlexDirection.ROW; @@ -76,9 +75,9 @@ public class FlexboxContainerDescriptionImpl extends WidgetDescriptionImpl imple * The cached value of the '{@link #getFlexDirection() Flex Direction}' attribute. * * + * @see #getFlexDirection() * @generated * @ordered - * @see #getFlexDirection() */ protected FlexDirection flexDirection = FLEX_DIRECTION_EDEFAULT; @@ -116,9 +115,9 @@ public class FlexboxContainerDescriptionImpl extends WidgetDescriptionImpl imple * The cached value of the '{@link #getConditionalBorderStyles() Conditional Border Styles}' containment * reference list. * + * @see #getConditionalBorderStyles() * @generated * @ordered - * @see #getConditionalBorderStyles() */ protected EList conditionalBorderStyles; @@ -147,9 +146,9 @@ protected EClass eStaticClass() { * @generated */ @Override - public EList getChildren() { + public EList getChildren() { if (this.children == null) { - this.children = new EObjectContainmentEList<>(WidgetDescription.class, this, FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN); + this.children = new EObjectContainmentEList<>(FormElementDescription.class, this, FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN); } return this.children; } @@ -256,8 +255,7 @@ public NotificationChain basicSetBorderStyle(ContainerBorderStyle newBorderStyle @Override public EList getConditionalBorderStyles() { if (this.conditionalBorderStyles == null) { - this.conditionalBorderStyles = new EObjectContainmentEList<>(ConditionalContainerBorderStyle.class, this, - FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CONDITIONAL_BORDER_STYLES); + this.conditionalBorderStyles = new EObjectContainmentEList<>(ConditionalContainerBorderStyle.class, this, FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CONDITIONAL_BORDER_STYLES); } return this.conditionalBorderStyles; } @@ -313,7 +311,7 @@ public void eSet(int featureID, Object newValue) { switch (featureID) { case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN: this.getChildren().clear(); - this.getChildren().addAll((Collection) newValue); + this.getChildren().addAll((Collection) newValue); return; case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__FLEX_DIRECTION: this.setFlexDirection((FlexDirection) newValue); @@ -350,7 +348,7 @@ public void eUnset(int featureID) { this.setIsEnabledExpression(IS_ENABLED_EXPRESSION_EDEFAULT); return; case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__BORDER_STYLE: - this.setBorderStyle(null); + this.setBorderStyle((ContainerBorderStyle) null); return; case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CONDITIONAL_BORDER_STYLES: this.getConditionalBorderStyles().clear(); @@ -372,7 +370,7 @@ public boolean eIsSet(int featureID) { case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__FLEX_DIRECTION: return this.flexDirection != FLEX_DIRECTION_EDEFAULT; case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__BORDER_STYLE: return this.borderStyle != null; case FormPackage.FLEXBOX_CONTAINER_DESCRIPTION__CONDITIONAL_BORDER_STYLES: diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementDescriptionImpl.java new file mode 100644 index 0000000000..59a5c0c801 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementDescriptionImpl.java @@ -0,0 +1,172 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormPackage; + +/** + * An implementation of the model object 'Element Description'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementDescriptionImpl#getName Name}
  • + *
+ * + * @generated + */ +public abstract class FormElementDescriptionImpl extends MinimalEObjectImpl.Container implements FormElementDescription { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected FormElementDescriptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FormPackage.Literals.FORM_ELEMENT_DESCRIPTION; + } + + /** + * + * + * @generated + */ + @Override + public String getName() { + return this.name; + } + + /** + * + * + * @generated + */ + @Override + public void setName(String newName) { + String oldName = this.name; + this.name = newName; + if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.FORM_ELEMENT_DESCRIPTION__NAME, oldName, this.name)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_DESCRIPTION__NAME: + return this.getName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_DESCRIPTION__NAME: + this.setName((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_DESCRIPTION__NAME: + this.setName(NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_DESCRIPTION__NAME: + return NAME_EDEFAULT == null ? this.name != null : !NAME_EDEFAULT.equals(this.name); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (this.eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (name: "); + result.append(this.name); + result.append(')'); + return result.toString(); + } + +} // FormElementDescriptionImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementForImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementForImpl.java new file mode 100644 index 0000000000..439a02a0b0 --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementForImpl.java @@ -0,0 +1,285 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form.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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormPackage; + +/** + * An implementation of the model object 'Element For'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementForImpl#getIterator Iterator}
  • + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementForImpl#getIterableExpression Iterable + * Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementForImpl#getChildren Children}
  • + *
+ * + * @generated + */ +public class FormElementForImpl extends FormElementDescriptionImpl implements FormElementFor { + /** + * The default value of the '{@link #getIterator() Iterator}' attribute. + * + * @see #getIterator() + * @generated + * @ordered + */ + protected static final String ITERATOR_EDEFAULT = "it"; + + /** + * The cached value of the '{@link #getIterator() Iterator}' attribute. + * + * @see #getIterator() + * @generated + * @ordered + */ + protected String iterator = ITERATOR_EDEFAULT; + + /** + * The default value of the '{@link #getIterableExpression() Iterable Expression}' attribute. + * + * @see #getIterableExpression() + * @generated + * @ordered + */ + protected static final String ITERABLE_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getIterableExpression() Iterable Expression}' attribute. + * + * @see #getIterableExpression() + * @generated + * @ordered + */ + protected String iterableExpression = ITERABLE_EXPRESSION_EDEFAULT; + + /** + * The cached value of the '{@link #getChildren() Children}' containment reference list. + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList children; + + /** + * + * + * @generated + */ + protected FormElementForImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FormPackage.Literals.FORM_ELEMENT_FOR; + } + + /** + * + * + * @generated + */ + @Override + public String getIterator() { + return this.iterator; + } + + /** + * + * + * @generated + */ + @Override + public void setIterator(String newIterator) { + String oldIterator = this.iterator; + this.iterator = newIterator; + if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.FORM_ELEMENT_FOR__ITERATOR, oldIterator, this.iterator)); + } + + /** + * + * + * @generated + */ + @Override + public String getIterableExpression() { + return this.iterableExpression; + } + + /** + * + * + * @generated + */ + @Override + public void setIterableExpression(String newIterableExpression) { + String oldIterableExpression = this.iterableExpression; + this.iterableExpression = newIterableExpression; + if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION, oldIterableExpression, this.iterableExpression)); + } + + /** + * + * + * @generated + */ + @Override + public EList getChildren() { + if (this.children == null) { + this.children = new EObjectContainmentEList<>(FormElementDescription.class, this, FormPackage.FORM_ELEMENT_FOR__CHILDREN); + } + return this.children; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + return ((InternalEList) this.getChildren()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_FOR__ITERATOR: + return this.getIterator(); + case FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION: + return this.getIterableExpression(); + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + return this.getChildren(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_FOR__ITERATOR: + this.setIterator((String) newValue); + return; + case FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION: + this.setIterableExpression((String) newValue); + return; + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + this.getChildren().clear(); + this.getChildren().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_FOR__ITERATOR: + this.setIterator(ITERATOR_EDEFAULT); + return; + case FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION: + this.setIterableExpression(ITERABLE_EXPRESSION_EDEFAULT); + return; + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + this.getChildren().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_FOR__ITERATOR: + return ITERATOR_EDEFAULT == null ? this.iterator != null : !ITERATOR_EDEFAULT.equals(this.iterator); + case FormPackage.FORM_ELEMENT_FOR__ITERABLE_EXPRESSION: + return ITERABLE_EXPRESSION_EDEFAULT == null ? this.iterableExpression != null : !ITERABLE_EXPRESSION_EDEFAULT.equals(this.iterableExpression); + case FormPackage.FORM_ELEMENT_FOR__CHILDREN: + return this.children != null && !this.children.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (this.eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (iterator: "); + result.append(this.iterator); + result.append(", iterableExpression: "); + result.append(this.iterableExpression); + result.append(')'); + return result.toString(); + } + +} // FormElementForImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementIfImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementIfImpl.java new file mode 100644 index 0000000000..03769c161f --- /dev/null +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormElementIfImpl.java @@ -0,0 +1,229 @@ +/** + * Copyright (c) 2021, 2023 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + */ +package org.eclipse.sirius.components.view.form.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.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormElementIf; +import org.eclipse.sirius.components.view.form.FormPackage; + +/** + * An implementation of the model object 'Element If'. + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementIfImpl#getPredicateExpression Predicate + * Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.form.impl.FormElementIfImpl#getChildren Children}
  • + *
+ * + * @generated + */ +public class FormElementIfImpl extends FormElementDescriptionImpl implements FormElementIf { + /** + * The default value of the '{@link #getPredicateExpression() Predicate Expression}' attribute. + * + * @see #getPredicateExpression() + * @generated + * @ordered + */ + protected static final String PREDICATE_EXPRESSION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPredicateExpression() Predicate Expression}' attribute. + * + * @see #getPredicateExpression() + * @generated + * @ordered + */ + protected String predicateExpression = PREDICATE_EXPRESSION_EDEFAULT; + + /** + * The cached value of the '{@link #getChildren() Children}' containment reference list. + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList children; + + /** + * + * + * @generated + */ + protected FormElementIfImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FormPackage.Literals.FORM_ELEMENT_IF; + } + + /** + * + * + * @generated + */ + @Override + public String getPredicateExpression() { + return this.predicateExpression; + } + + /** + * + * + * @generated + */ + @Override + public void setPredicateExpression(String newPredicateExpression) { + String oldPredicateExpression = this.predicateExpression; + this.predicateExpression = newPredicateExpression; + if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION, oldPredicateExpression, this.predicateExpression)); + } + + /** + * + * + * @generated + */ + @Override + public EList getChildren() { + if (this.children == null) { + this.children = new EObjectContainmentEList<>(FormElementDescription.class, this, FormPackage.FORM_ELEMENT_IF__CHILDREN); + } + return this.children; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + return ((InternalEList) this.getChildren()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION: + return this.getPredicateExpression(); + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + return this.getChildren(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION: + this.setPredicateExpression((String) newValue); + return; + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + this.getChildren().clear(); + this.getChildren().addAll((Collection) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION: + this.setPredicateExpression(PREDICATE_EXPRESSION_EDEFAULT); + return; + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + this.getChildren().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FormPackage.FORM_ELEMENT_IF__PREDICATE_EXPRESSION: + return PREDICATE_EXPRESSION_EDEFAULT == null ? this.predicateExpression != null : !PREDICATE_EXPRESSION_EDEFAULT.equals(this.predicateExpression); + case FormPackage.FORM_ELEMENT_IF__CHILDREN: + return this.children != null && !this.children.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (this.eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (predicateExpression: "); + result.append(this.predicateExpression); + result.append(')'); + return result.toString(); + } + +} // FormElementIfImpl diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormFactoryImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormFactoryImpl.java index 07fd394fb9..dcf9a2350b 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormFactoryImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormFactoryImpl.java @@ -42,6 +42,8 @@ import org.eclipse.sirius.components.view.form.FlexDirection; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; import org.eclipse.sirius.components.view.form.FormDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormFactory; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; @@ -197,6 +199,10 @@ public EObject create(EClass eClass) { return this.createContainerBorderStyle(); case FormPackage.CONDITIONAL_CONTAINER_BORDER_STYLE: return this.createConditionalContainerBorderStyle(); + case FormPackage.FORM_ELEMENT_FOR: + return this.createFormElementFor(); + case FormPackage.FORM_ELEMENT_IF: + return this.createFormElementIf(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -728,6 +734,28 @@ public ConditionalContainerBorderStyle createConditionalContainerBorderStyle() { return conditionalContainerBorderStyle; } + /** + * + * + * @generated + */ + @Override + public FormElementFor createFormElementFor() { + FormElementForImpl formElementFor = new FormElementForImpl(); + return formElementFor; + } + + /** + * + * + * @generated + */ + @Override + public FormElementIf createFormElementIf() { + FormElementIfImpl formElementIf = new FormElementIfImpl(); + return formElementIf; + } + /** * * diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormPackageImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormPackageImpl.java index 86aedd4273..9c0fe98dfa 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormPackageImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/FormPackageImpl.java @@ -43,6 +43,9 @@ import org.eclipse.sirius.components.view.form.FlexDirection; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; import org.eclipse.sirius.components.view.form.FormDescription; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormFactory; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; @@ -99,6 +102,13 @@ public class FormPackageImpl extends EPackageImpl implements FormPackage { */ private EClass groupDescriptionEClass = null; + /** + * + * + * @generated + */ + private EClass formElementDescriptionEClass = null; + /** * * @@ -400,6 +410,20 @@ public class FormPackageImpl extends EPackageImpl implements FormPackage { */ private EClass conditionalContainerBorderStyleEClass = null; + /** + * + * + * @generated + */ + private EClass formElementForEClass = null; + + /** + * + * + * @generated + */ + private EClass formElementIfEClass = null; + /** * * @@ -658,7 +682,7 @@ public EReference getGroupDescription_ToolbarActions() { * @generated */ @Override - public EReference getGroupDescription_Widgets() { + public EReference getGroupDescription_Children() { return (EReference) this.groupDescriptionEClass.getEStructuralFeatures().get(5); } @@ -688,8 +712,8 @@ public EReference getGroupDescription_ConditionalBorderStyles() { * @generated */ @Override - public EClass getWidgetDescription() { - return this.widgetDescriptionEClass; + public EClass getFormElementDescription() { + return this.formElementDescriptionEClass; } /** @@ -698,8 +722,18 @@ public EClass getWidgetDescription() { * @generated */ @Override - public EAttribute getWidgetDescription_Name() { - return (EAttribute) this.widgetDescriptionEClass.getEStructuralFeatures().get(0); + public EAttribute getFormElementDescription_Name() { + return (EAttribute) this.formElementDescriptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EClass getWidgetDescription() { + return this.widgetDescriptionEClass; } /** @@ -709,7 +743,7 @@ public EAttribute getWidgetDescription_Name() { */ @Override public EAttribute getWidgetDescription_LabelExpression() { - return (EAttribute) this.widgetDescriptionEClass.getEStructuralFeatures().get(1); + return (EAttribute) this.widgetDescriptionEClass.getEStructuralFeatures().get(0); } /** @@ -719,7 +753,7 @@ public EAttribute getWidgetDescription_LabelExpression() { */ @Override public EAttribute getWidgetDescription_HelpExpression() { - return (EAttribute) this.widgetDescriptionEClass.getEStructuralFeatures().get(2); + return (EAttribute) this.widgetDescriptionEClass.getEStructuralFeatures().get(1); } /** @@ -2162,6 +2196,76 @@ public EClass getConditionalContainerBorderStyle() { return this.conditionalContainerBorderStyleEClass; } + /** + * + * + * @generated + */ + @Override + public EClass getFormElementFor() { + return this.formElementForEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFormElementFor_Iterator() { + return (EAttribute) this.formElementForEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFormElementFor_IterableExpression() { + return (EAttribute) this.formElementForEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + @Override + public EReference getFormElementFor_Children() { + return (EReference) this.formElementForEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + @Override + public EClass getFormElementIf() { + return this.formElementIfEClass; + } + + /** + * + * + * @generated + */ + @Override + public EAttribute getFormElementIf_PredicateExpression() { + return (EAttribute) this.formElementIfEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + @Override + public EReference getFormElementIf_Children() { + return (EReference) this.formElementIfEClass.getEStructuralFeatures().get(1); + } + /** * * @@ -2249,12 +2353,14 @@ public void createPackageContents() { this.createEAttribute(this.groupDescriptionEClass, GROUP_DESCRIPTION__DISPLAY_MODE); this.createEAttribute(this.groupDescriptionEClass, GROUP_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION); this.createEReference(this.groupDescriptionEClass, GROUP_DESCRIPTION__TOOLBAR_ACTIONS); - this.createEReference(this.groupDescriptionEClass, GROUP_DESCRIPTION__WIDGETS); + this.createEReference(this.groupDescriptionEClass, GROUP_DESCRIPTION__CHILDREN); this.createEReference(this.groupDescriptionEClass, GROUP_DESCRIPTION__BORDER_STYLE); this.createEReference(this.groupDescriptionEClass, GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES); + this.formElementDescriptionEClass = this.createEClass(FORM_ELEMENT_DESCRIPTION); + this.createEAttribute(this.formElementDescriptionEClass, FORM_ELEMENT_DESCRIPTION__NAME); + this.widgetDescriptionEClass = this.createEClass(WIDGET_DESCRIPTION); - this.createEAttribute(this.widgetDescriptionEClass, WIDGET_DESCRIPTION__NAME); this.createEAttribute(this.widgetDescriptionEClass, WIDGET_DESCRIPTION__LABEL_EXPRESSION); this.createEAttribute(this.widgetDescriptionEClass, WIDGET_DESCRIPTION__HELP_EXPRESSION); @@ -2444,6 +2550,15 @@ public void createPackageContents() { this.conditionalContainerBorderStyleEClass = this.createEClass(CONDITIONAL_CONTAINER_BORDER_STYLE); + this.formElementForEClass = this.createEClass(FORM_ELEMENT_FOR); + this.createEAttribute(this.formElementForEClass, FORM_ELEMENT_FOR__ITERATOR); + this.createEAttribute(this.formElementForEClass, FORM_ELEMENT_FOR__ITERABLE_EXPRESSION); + this.createEReference(this.formElementForEClass, FORM_ELEMENT_FOR__CHILDREN); + + this.formElementIfEClass = this.createEClass(FORM_ELEMENT_IF); + this.createEAttribute(this.formElementIfEClass, FORM_ELEMENT_IF__PREDICATE_EXPRESSION); + this.createEReference(this.formElementIfEClass, FORM_ELEMENT_IF__CHILDREN); + // Create enums this.flexDirectionEEnum = this.createEEnum(FLEX_DIRECTION); this.groupDisplayModeEEnum = this.createEEnum(GROUP_DISPLAY_MODE); @@ -2483,6 +2598,7 @@ public void initializePackageContents() { // Add supertypes to classes this.formDescriptionEClass.getESuperTypes().add(theViewPackage.getRepresentationDescription()); + this.widgetDescriptionEClass.getESuperTypes().add(this.getFormElementDescription()); this.barChartDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); this.buttonDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); this.checkboxDescriptionEClass.getESuperTypes().add(this.getWidgetDescription()); @@ -2547,6 +2663,8 @@ public void initializePackageContents() { this.conditionalTextfieldDescriptionStyleEClass.getESuperTypes().add(this.getTextfieldDescriptionStyle()); this.conditionalContainerBorderStyleEClass.getESuperTypes().add(theViewPackage.getConditional()); this.conditionalContainerBorderStyleEClass.getESuperTypes().add(this.getContainerBorderStyle()); + this.formElementForEClass.getESuperTypes().add(this.getFormElementDescription()); + this.formElementIfEClass.getESuperTypes().add(this.getFormElementDescription()); // Initialize classes, features, and operations; add parameters this.initEClass(this.formDescriptionEClass, FormDescription.class, "FormDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -2580,16 +2698,18 @@ public void initializePackageContents() { GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEReference(this.getGroupDescription_ToolbarActions(), this.getButtonDescription(), null, "toolbarActions", null, 0, -1, GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - this.initEReference(this.getGroupDescription_Widgets(), this.getWidgetDescription(), null, "widgets", null, 0, -1, GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + this.initEReference(this.getGroupDescription_Children(), this.getFormElementDescription(), null, "children", null, 0, -1, GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEReference(this.getGroupDescription_BorderStyle(), this.getContainerBorderStyle(), null, "borderStyle", null, 0, 1, GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEReference(this.getGroupDescription_ConditionalBorderStyles(), this.getConditionalContainerBorderStyle(), null, "conditionalBorderStyles", null, 0, -1, GroupDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEClass(this.formElementDescriptionEClass, FormElementDescription.class, "FormElementDescription", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + this.initEAttribute(this.getFormElementDescription_Name(), theViewPackage.getIdentifier(), "name", null, 0, 1, FormElementDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEClass(this.widgetDescriptionEClass, WidgetDescription.class, "WidgetDescription", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - this.initEAttribute(this.getWidgetDescription_Name(), theViewPackage.getIdentifier(), "name", null, 0, 1, WidgetDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, - !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getWidgetDescription_LabelExpression(), theViewPackage.getInterpretedExpression(), "labelExpression", null, 0, 1, WidgetDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getWidgetDescription_HelpExpression(), theViewPackage.getInterpretedExpression(), "helpExpression", null, 0, 1, WidgetDescription.class, !IS_TRANSIENT, !IS_VOLATILE, @@ -2638,8 +2758,8 @@ public void initializePackageContents() { !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEClass(this.flexboxContainerDescriptionEClass, FlexboxContainerDescription.class, "FlexboxContainerDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - this.initEReference(this.getFlexboxContainerDescription_Children(), this.getWidgetDescription(), null, "children", null, 0, -1, FlexboxContainerDescription.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEReference(this.getFlexboxContainerDescription_Children(), this.getFormElementDescription(), null, "children", null, 0, -1, FlexboxContainerDescription.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getFlexboxContainerDescription_FlexDirection(), this.getFlexDirection(), "flexDirection", "row", 1, 1, FlexboxContainerDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getFlexboxContainerDescription_IsEnabledExpression(), theViewPackage.getInterpretedExpression(), "IsEnabledExpression", null, 0, 1, FlexboxContainerDescription.class, @@ -2893,6 +3013,20 @@ public void initializePackageContents() { this.initEClass(this.conditionalContainerBorderStyleEClass, ConditionalContainerBorderStyle.class, "ConditionalContainerBorderStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + this.initEClass(this.formElementForEClass, FormElementFor.class, "FormElementFor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + this.initEAttribute(this.getFormElementFor_Iterator(), this.ecorePackage.getEString(), "iterator", "it", 1, 1, FormElementFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEAttribute(this.getFormElementFor_IterableExpression(), theViewPackage.getInterpretedExpression(), "iterableExpression", null, 1, 1, FormElementFor.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEReference(this.getFormElementFor_Children(), this.getFormElementDescription(), null, "children", null, 0, -1, FormElementFor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + this.initEClass(this.formElementIfEClass, FormElementIf.class, "FormElementIf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + this.initEAttribute(this.getFormElementIf_PredicateExpression(), theViewPackage.getInterpretedExpression(), "predicateExpression", null, 1, 1, FormElementIf.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEReference(this.getFormElementIf_Children(), this.getFormElementDescription(), null, "children", null, 0, -1, FormElementIf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals this.initEEnum(this.flexDirectionEEnum, FlexDirection.class, "FlexDirection"); this.addEEnumLiteral(this.flexDirectionEEnum, FlexDirection.ROW); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/GroupDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/GroupDescriptionImpl.java index d105e51a08..b519a7e032 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/GroupDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/GroupDescriptionImpl.java @@ -26,10 +26,10 @@ import org.eclipse.sirius.components.view.form.ButtonDescription; import org.eclipse.sirius.components.view.form.ConditionalContainerBorderStyle; import org.eclipse.sirius.components.view.form.ContainerBorderStyle; +import org.eclipse.sirius.components.view.form.FormElementDescription; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; import org.eclipse.sirius.components.view.form.GroupDisplayMode; -import org.eclipse.sirius.components.view.form.WidgetDescription; /** * An implementation of the model object 'Group Description'. + * The cached value of the '{@link #getChildren() Children}' containment reference list. * + * @see #getChildren() * @generated * @ordered - * @see #getWidgets() */ - protected EList widgets; + protected EList children; /** * The cached value of the '{@link #getBorderStyle() Border Style}' containment reference. * + * @see #getConditionalBorderStyles() * @generated * @ordered - * @see #getConditionalBorderStyles() */ protected EList conditionalBorderStyles; @@ -304,11 +304,11 @@ public EList getToolbarActions() { * @generated */ @Override - public EList getWidgets() { - if (this.widgets == null) { - this.widgets = new EObjectContainmentEList<>(WidgetDescription.class, this, FormPackage.GROUP_DESCRIPTION__WIDGETS); + public EList getChildren() { + if (this.children == null) { + this.children = new EObjectContainmentEList<>(FormElementDescription.class, this, FormPackage.GROUP_DESCRIPTION__CHILDREN); } - return this.widgets; + return this.children; } /** @@ -367,8 +367,7 @@ public NotificationChain basicSetBorderStyle(ContainerBorderStyle newBorderStyle @Override public EList getConditionalBorderStyles() { if (this.conditionalBorderStyles == null) { - this.conditionalBorderStyles = new EObjectContainmentEList<>(ConditionalContainerBorderStyle.class, this, - FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES); + this.conditionalBorderStyles = new EObjectContainmentEList<>(ConditionalContainerBorderStyle.class, this, FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES); } return this.conditionalBorderStyles; } @@ -383,8 +382,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, switch (featureID) { case FormPackage.GROUP_DESCRIPTION__TOOLBAR_ACTIONS: return ((InternalEList) this.getToolbarActions()).basicRemove(otherEnd, msgs); - case FormPackage.GROUP_DESCRIPTION__WIDGETS: - return ((InternalEList) this.getWidgets()).basicRemove(otherEnd, msgs); + case FormPackage.GROUP_DESCRIPTION__CHILDREN: + return ((InternalEList) this.getChildren()).basicRemove(otherEnd, msgs); case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: return this.basicSetBorderStyle(null, msgs); case FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES: @@ -411,8 +410,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return this.getSemanticCandidatesExpression(); case FormPackage.GROUP_DESCRIPTION__TOOLBAR_ACTIONS: return this.getToolbarActions(); - case FormPackage.GROUP_DESCRIPTION__WIDGETS: - return this.getWidgets(); + case FormPackage.GROUP_DESCRIPTION__CHILDREN: + return this.getChildren(); case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: return this.getBorderStyle(); case FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES: @@ -446,9 +445,9 @@ public void eSet(int featureID, Object newValue) { this.getToolbarActions().clear(); this.getToolbarActions().addAll((Collection) newValue); return; - case FormPackage.GROUP_DESCRIPTION__WIDGETS: - this.getWidgets().clear(); - this.getWidgets().addAll((Collection) newValue); + case FormPackage.GROUP_DESCRIPTION__CHILDREN: + this.getChildren().clear(); + this.getChildren().addAll((Collection) newValue); return; case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: this.setBorderStyle((ContainerBorderStyle) newValue); @@ -484,11 +483,11 @@ public void eUnset(int featureID) { case FormPackage.GROUP_DESCRIPTION__TOOLBAR_ACTIONS: this.getToolbarActions().clear(); return; - case FormPackage.GROUP_DESCRIPTION__WIDGETS: - this.getWidgets().clear(); + case FormPackage.GROUP_DESCRIPTION__CHILDREN: + this.getChildren().clear(); return; case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: - this.setBorderStyle(null); + this.setBorderStyle((ContainerBorderStyle) null); return; case FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES: this.getConditionalBorderStyles().clear(); @@ -515,8 +514,8 @@ public boolean eIsSet(int featureID) { return SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT == null ? this.semanticCandidatesExpression != null : !SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT.equals(this.semanticCandidatesExpression); case FormPackage.GROUP_DESCRIPTION__TOOLBAR_ACTIONS: return this.toolbarActions != null && !this.toolbarActions.isEmpty(); - case FormPackage.GROUP_DESCRIPTION__WIDGETS: - return this.widgets != null && !this.widgets.isEmpty(); + case FormPackage.GROUP_DESCRIPTION__CHILDREN: + return this.children != null && !this.children.isEmpty(); case FormPackage.GROUP_DESCRIPTION__BORDER_STYLE: return this.borderStyle != null; case FormPackage.GROUP_DESCRIPTION__CONDITIONAL_BORDER_STYLES: diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ListDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ListDescriptionImpl.java index aa924f6efc..d6ad8ea498 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ListDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/ListDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -132,23 +131,25 @@ public class ListDescriptionImpl extends WidgetDescriptionImpl implements ListDe protected ListDescriptionStyle style; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. + * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList conditionalStyles; + /** - * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getConditionalStyles() + * @see #getIsEnabledExpression() */ - protected EList conditionalStyles; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -478,7 +479,7 @@ public boolean eIsSet(int featureID) { case FormPackage.LIST_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.LIST_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/MultiSelectDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/MultiSelectDescriptionImpl.java index 59ca1ef2a2..51374c27ee 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/MultiSelectDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/MultiSelectDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -134,23 +133,25 @@ public class MultiSelectDescriptionImpl extends WidgetDescriptionImpl implements protected MultiSelectDescriptionStyle style; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. + * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList conditionalStyles; + /** - * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getConditionalStyles() + * @see #getIsEnabledExpression() */ - protected EList conditionalStyles; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -318,8 +319,7 @@ public void setStyle(MultiSelectDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalMultiSelectDescriptionStyle.class, this, - FormPackage.MULTI_SELECT_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalMultiSelectDescriptionStyle.class, this, FormPackage.MULTI_SELECT_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } @@ -481,7 +481,7 @@ public boolean eIsSet(int featureID) { case FormPackage.MULTI_SELECT_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.MULTI_SELECT_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/PieChartDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/PieChartDescriptionImpl.java index 360c0852e6..cca2a38228 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/PieChartDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/PieChartDescriptionImpl.java @@ -227,8 +227,7 @@ public void setStyle(PieChartDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalPieChartDescriptionStyle.class, this, - FormPackage.PIE_CHART_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalPieChartDescriptionStyle.class, this, FormPackage.PIE_CHART_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RadioDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RadioDescriptionImpl.java index 36d6bba54e..c0eff9b178 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RadioDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RadioDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -132,23 +131,25 @@ public class RadioDescriptionImpl extends WidgetDescriptionImpl implements Radio protected RadioDescriptionStyle style; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. + * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList conditionalStyles; + /** - * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getConditionalStyles() + * @see #getIsEnabledExpression() */ - protected EList conditionalStyles; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -478,7 +479,7 @@ public boolean eIsSet(int featureID) { case FormPackage.RADIO_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.RADIO_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RichTextDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RichTextDescriptionImpl.java index 52b46c3579..5387d9a82c 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RichTextDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/RichTextDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -65,23 +64,25 @@ public class RichTextDescriptionImpl extends WidgetDescriptionImpl implements Ri protected String valueExpression = VALUE_EXPRESSION_EDEFAULT; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getBody() Body}' containment reference list. + * * + * @see #getBody() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList body; + /** - * The cached value of the '{@link #getBody() Body}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getBody() + * @see #getIsEnabledExpression() */ - protected EList body; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -259,7 +260,7 @@ public boolean eIsSet(int featureID) { case FormPackage.RICH_TEXT_DESCRIPTION__BODY: return this.body != null && !this.body.isEmpty(); case FormPackage.RICH_TEXT_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/SelectDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/SelectDescriptionImpl.java index 6dd64c3d2b..ea1586e369 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/SelectDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/SelectDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -132,23 +131,25 @@ public class SelectDescriptionImpl extends WidgetDescriptionImpl implements Sele protected SelectDescriptionStyle style; /** - * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. + * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. + * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getIsEnabledExpression() */ - protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + protected EList conditionalStyles; + /** - * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. - * + * The default value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. * * @generated * @ordered - * @see #getConditionalStyles() + * @see #getIsEnabledExpression() */ - protected EList conditionalStyles; + protected static final String IS_ENABLED_EXPRESSION_EDEFAULT = null; + /** * The cached value of the '{@link #getIsEnabledExpression() Is Enabled Expression}' attribute. @@ -478,7 +479,7 @@ public boolean eIsSet(int featureID) { case FormPackage.SELECT_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.SELECT_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextAreaDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextAreaDescriptionImpl.java index e3957171a2..876037c3cb 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextAreaDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextAreaDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -73,9 +72,9 @@ public class TextAreaDescriptionImpl extends WidgetDescriptionImpl implements Te * The cached value of the '{@link #getBody() Body}' containment reference list. * * + * @see #getBody() * @generated * @ordered - * @see #getBody() */ protected EList body; @@ -83,9 +82,9 @@ public class TextAreaDescriptionImpl extends WidgetDescriptionImpl implements Te * The cached value of the '{@link #getStyle() Style}' containment reference. * + * @see #getStyle() * @generated * @ordered - * @see #getStyle() */ protected TextareaDescriptionStyle style; @@ -93,9 +92,9 @@ public class TextAreaDescriptionImpl extends WidgetDescriptionImpl implements Te * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getConditionalStyles() */ protected EList conditionalStyles; @@ -230,8 +229,7 @@ public void setStyle(TextareaDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalTextareaDescriptionStyle.class, this, - FormPackage.TEXT_AREA_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalTextareaDescriptionStyle.class, this, FormPackage.TEXT_AREA_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } @@ -373,7 +371,7 @@ public boolean eIsSet(int featureID) { case FormPackage.TEXT_AREA_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.TEXT_AREA_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextfieldDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextfieldDescriptionImpl.java index 4b29d2d1d1..aa80c260bf 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextfieldDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/TextfieldDescriptionImpl.java @@ -13,7 +13,6 @@ package org.eclipse.sirius.components.view.form.impl; import java.util.Collection; -import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; @@ -73,9 +72,9 @@ public class TextfieldDescriptionImpl extends WidgetDescriptionImpl implements T * The cached value of the '{@link #getBody() Body}' containment reference list. * * + * @see #getBody() * @generated * @ordered - * @see #getBody() */ protected EList body; @@ -83,9 +82,9 @@ public class TextfieldDescriptionImpl extends WidgetDescriptionImpl implements T * The cached value of the '{@link #getStyle() Style}' containment reference. * + * @see #getStyle() * @generated * @ordered - * @see #getStyle() */ protected TextfieldDescriptionStyle style; @@ -93,9 +92,9 @@ public class TextfieldDescriptionImpl extends WidgetDescriptionImpl implements T * The cached value of the '{@link #getConditionalStyles() Conditional Styles}' containment reference list. * * + * @see #getConditionalStyles() * @generated * @ordered - * @see #getConditionalStyles() */ protected EList conditionalStyles; @@ -230,8 +229,7 @@ public void setStyle(TextfieldDescriptionStyle newStyle) { @Override public EList getConditionalStyles() { if (this.conditionalStyles == null) { - this.conditionalStyles = new EObjectContainmentEList<>(ConditionalTextfieldDescriptionStyle.class, this, - FormPackage.TEXTFIELD_DESCRIPTION__CONDITIONAL_STYLES); + this.conditionalStyles = new EObjectContainmentEList<>(ConditionalTextfieldDescriptionStyle.class, this, FormPackage.TEXTFIELD_DESCRIPTION__CONDITIONAL_STYLES); } return this.conditionalStyles; } @@ -373,7 +371,7 @@ public boolean eIsSet(int featureID) { case FormPackage.TEXTFIELD_DESCRIPTION__CONDITIONAL_STYLES: return this.conditionalStyles != null && !this.conditionalStyles.isEmpty(); case FormPackage.TEXTFIELD_DESCRIPTION__IS_ENABLED_EXPRESSION: - return !Objects.equals(IS_ENABLED_EXPRESSION_EDEFAULT, this.isEnabledExpression); + return IS_ENABLED_EXPRESSION_EDEFAULT == null ? this.isEnabledExpression != null : !IS_ENABLED_EXPRESSION_EDEFAULT.equals(this.isEnabledExpression); } return super.eIsSet(featureID); } diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/WidgetDescriptionImpl.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/WidgetDescriptionImpl.java index e4e78aeac6..cb9dfa3e26 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/WidgetDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/impl/WidgetDescriptionImpl.java @@ -15,7 +15,6 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.WidgetDescription; @@ -35,27 +34,7 @@ * * @generated */ -public abstract class WidgetDescriptionImpl extends MinimalEObjectImpl.Container implements WidgetDescription { - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - +public abstract class WidgetDescriptionImpl extends FormElementDescriptionImpl implements WidgetDescription { /** * The default value of the '{@link #getLabelExpression() Label Expression}' attribute. @@ -115,29 +94,6 @@ protected EClass eStaticClass() { return FormPackage.Literals.WIDGET_DESCRIPTION; } - /** - * - * - * @generated - */ - @Override - public String getName() { - return this.name; - } - - /** - * - * - * @generated - */ - @Override - public void setName(String newName) { - String oldName = this.name; - this.name = newName; - if (this.eNotificationRequired()) - this.eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.WIDGET_DESCRIPTION__NAME, oldName, this.name)); - } - /** * * @@ -192,8 +148,6 @@ public void setHelpExpression(String newHelpExpression) { @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case FormPackage.WIDGET_DESCRIPTION__NAME: - return this.getName(); case FormPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: return this.getLabelExpression(); case FormPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: @@ -210,9 +164,6 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case FormPackage.WIDGET_DESCRIPTION__NAME: - this.setName((String) newValue); - return; case FormPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: this.setLabelExpression((String) newValue); return; @@ -231,9 +182,6 @@ public void eSet(int featureID, Object newValue) { @Override public void eUnset(int featureID) { switch (featureID) { - case FormPackage.WIDGET_DESCRIPTION__NAME: - this.setName(NAME_EDEFAULT); - return; case FormPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: this.setLabelExpression(LABEL_EXPRESSION_EDEFAULT); return; @@ -252,8 +200,6 @@ public void eUnset(int featureID) { @Override public boolean eIsSet(int featureID) { switch (featureID) { - case FormPackage.WIDGET_DESCRIPTION__NAME: - return NAME_EDEFAULT == null ? this.name != null : !NAME_EDEFAULT.equals(this.name); case FormPackage.WIDGET_DESCRIPTION__LABEL_EXPRESSION: return LABEL_EXPRESSION_EDEFAULT == null ? this.labelExpression != null : !LABEL_EXPRESSION_EDEFAULT.equals(this.labelExpression); case FormPackage.WIDGET_DESCRIPTION__HELP_EXPRESSION: @@ -273,9 +219,7 @@ public String toString() { return super.toString(); StringBuilder result = new StringBuilder(super.toString()); - result.append(" (name: "); - result.append(this.name); - result.append(", labelExpression: "); + result.append(" (labelExpression: "); result.append(this.labelExpression); result.append(", helpExpression: "); result.append(this.helpExpression); diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormAdapterFactory.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormAdapterFactory.java index 27263e8c16..c48eaa5e35 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormAdapterFactory.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormAdapterFactory.java @@ -41,6 +41,9 @@ import org.eclipse.sirius.components.view.form.ContainerBorderStyle; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; import org.eclipse.sirius.components.view.form.FormDescription; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; import org.eclipse.sirius.components.view.form.ImageDescription; @@ -133,6 +136,11 @@ public Adapter caseGroupDescription(GroupDescription object) { return FormAdapterFactory.this.createGroupDescriptionAdapter(); } + @Override + public Adapter caseFormElementDescription(FormElementDescription object) { + return FormAdapterFactory.this.createFormElementDescriptionAdapter(); + } + @Override public Adapter caseWidgetDescription(WidgetDescription object) { return FormAdapterFactory.this.createWidgetDescriptionAdapter(); @@ -348,6 +356,16 @@ public Adapter caseConditionalContainerBorderStyle(ConditionalContainerBorderSty return FormAdapterFactory.this.createConditionalContainerBorderStyleAdapter(); } + @Override + public Adapter caseFormElementFor(FormElementFor object) { + return FormAdapterFactory.this.createFormElementForAdapter(); + } + + @Override + public Adapter caseFormElementIf(FormElementIf object) { + return FormAdapterFactory.this.createFormElementIfAdapter(); + } + @Override public Adapter caseRepresentationDescription(RepresentationDescription object) { return FormAdapterFactory.this.createRepresentationDescriptionAdapter(); @@ -424,6 +442,20 @@ public Adapter createGroupDescriptionAdapter() { return null; } + /** + * Creates a new adapter for an object of class + * '{@link org.eclipse.sirius.components.view.form.FormElementDescription Element Description}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.form.FormElementDescription + * @generated + */ + public Adapter createFormElementDescriptionAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.form.WidgetDescription * Widget Description}'. This default implementation returns null so that we can @@ -1015,8 +1047,8 @@ public Adapter createConditionalTextfieldDescriptionStyleAdapter() { * end-user-doc --> * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.view.form.ContainerBorderStyle + * @generated */ public Adapter createContainerBorderStyleAdapter() { return null; @@ -1029,13 +1061,41 @@ public Adapter createContainerBorderStyleAdapter() { * cases; it's useful to ignore a case when inheritance will catch all the cases anyway. * * @return the new adapter. - * @generated * @see org.eclipse.sirius.components.view.form.ConditionalContainerBorderStyle + * @generated */ public Adapter createConditionalContainerBorderStyleAdapter() { return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.form.FormElementFor + * Element For}'. This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.form.FormElementFor + * @generated + */ + public Adapter createFormElementForAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.form.FormElementIf + * Element If}'. This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.form.FormElementIf + * @generated + */ + public Adapter createFormElementIfAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.RepresentationDescription * Representation Description}'. This default implementation returns null so that diff --git a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormSwitch.java b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormSwitch.java index e53ec9b12a..01c9b56625 100644 --- a/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormSwitch.java +++ b/packages/view/backend/sirius-components-view-form/src/main/java/org/eclipse/sirius/components/view/form/util/FormSwitch.java @@ -40,6 +40,9 @@ import org.eclipse.sirius.components.view.form.ContainerBorderStyle; import org.eclipse.sirius.components.view.form.FlexboxContainerDescription; import org.eclipse.sirius.components.view.form.FormDescription; +import org.eclipse.sirius.components.view.form.FormElementDescription; +import org.eclipse.sirius.components.view.form.FormElementFor; +import org.eclipse.sirius.components.view.form.FormElementIf; import org.eclipse.sirius.components.view.form.FormPackage; import org.eclipse.sirius.components.view.form.GroupDescription; import org.eclipse.sirius.components.view.form.ImageDescription; @@ -140,9 +143,18 @@ protected T doSwitch(int classifierID, EObject theEObject) { result = this.defaultCase(theEObject); return result; } + case FormPackage.FORM_ELEMENT_DESCRIPTION: { + FormElementDescription formElementDescription = (FormElementDescription) theEObject; + T result = this.caseFormElementDescription(formElementDescription); + if (result == null) + result = this.defaultCase(theEObject); + return result; + } case FormPackage.WIDGET_DESCRIPTION: { WidgetDescription widgetDescription = (WidgetDescription) theEObject; T result = this.caseWidgetDescription(widgetDescription); + if (result == null) + result = this.caseFormElementDescription(widgetDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -152,6 +164,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseBarChartDescription(barChartDescription); if (result == null) result = this.caseWidgetDescription(barChartDescription); + if (result == null) + result = this.caseFormElementDescription(barChartDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -161,6 +175,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseButtonDescription(buttonDescription); if (result == null) result = this.caseWidgetDescription(buttonDescription); + if (result == null) + result = this.caseFormElementDescription(buttonDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -170,6 +186,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseCheckboxDescription(checkboxDescription); if (result == null) result = this.caseWidgetDescription(checkboxDescription); + if (result == null) + result = this.caseFormElementDescription(checkboxDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -179,6 +197,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseFlexboxContainerDescription(flexboxContainerDescription); if (result == null) result = this.caseWidgetDescription(flexboxContainerDescription); + if (result == null) + result = this.caseFormElementDescription(flexboxContainerDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -188,6 +208,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseImageDescription(imageDescription); if (result == null) result = this.caseWidgetDescription(imageDescription); + if (result == null) + result = this.caseFormElementDescription(imageDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -197,6 +219,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseLabelDescription(labelDescription); if (result == null) result = this.caseWidgetDescription(labelDescription); + if (result == null) + result = this.caseFormElementDescription(labelDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -206,6 +230,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseLinkDescription(linkDescription); if (result == null) result = this.caseWidgetDescription(linkDescription); + if (result == null) + result = this.caseFormElementDescription(linkDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -215,6 +241,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseListDescription(listDescription); if (result == null) result = this.caseWidgetDescription(listDescription); + if (result == null) + result = this.caseFormElementDescription(listDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -224,6 +252,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseMultiSelectDescription(multiSelectDescription); if (result == null) result = this.caseWidgetDescription(multiSelectDescription); + if (result == null) + result = this.caseFormElementDescription(multiSelectDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -233,6 +263,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.casePieChartDescription(pieChartDescription); if (result == null) result = this.caseWidgetDescription(pieChartDescription); + if (result == null) + result = this.caseFormElementDescription(pieChartDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -242,6 +274,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseRadioDescription(radioDescription); if (result == null) result = this.caseWidgetDescription(radioDescription); + if (result == null) + result = this.caseFormElementDescription(radioDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -251,6 +285,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseRichTextDescription(richTextDescription); if (result == null) result = this.caseWidgetDescription(richTextDescription); + if (result == null) + result = this.caseFormElementDescription(richTextDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -260,6 +296,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseSelectDescription(selectDescription); if (result == null) result = this.caseWidgetDescription(selectDescription); + if (result == null) + result = this.caseFormElementDescription(selectDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -269,6 +307,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseTextAreaDescription(textAreaDescription); if (result == null) result = this.caseWidgetDescription(textAreaDescription); + if (result == null) + result = this.caseFormElementDescription(textAreaDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -278,6 +318,8 @@ protected T doSwitch(int classifierID, EObject theEObject) { T result = this.caseTextfieldDescription(textfieldDescription); if (result == null) result = this.caseWidgetDescription(textfieldDescription); + if (result == null) + result = this.caseFormElementDescription(textfieldDescription); if (result == null) result = this.defaultCase(theEObject); return result; @@ -615,6 +657,24 @@ protected T doSwitch(int classifierID, EObject theEObject) { result = this.defaultCase(theEObject); return result; } + case FormPackage.FORM_ELEMENT_FOR: { + FormElementFor formElementFor = (FormElementFor) theEObject; + T result = this.caseFormElementFor(formElementFor); + if (result == null) + result = this.caseFormElementDescription(formElementFor); + if (result == null) + result = this.defaultCase(theEObject); + return result; + } + case FormPackage.FORM_ELEMENT_IF: { + FormElementIf formElementIf = (FormElementIf) theEObject; + T result = this.caseFormElementIf(formElementIf); + if (result == null) + result = this.caseFormElementDescription(formElementIf); + if (result == null) + result = this.defaultCase(theEObject); + return result; + } default: return this.defaultCase(theEObject); } @@ -664,6 +724,21 @@ public T caseGroupDescription(GroupDescription object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Element Description'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element Description'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFormElementDescription(FormElementDescription object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Widget Description'. This implementation returns null; returning a non-null result will terminate the switch. This implementation returns null; returning a non-null result will terminate the switch. * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Container Border Style'. * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) @@ -1304,15 +1380,44 @@ public T caseContainerBorderStyle(ContainerBorderStyle object) { * This implementation returns null; returning a non-null result will terminate the switch. * * - * @param object the target of the switch. + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of 'Conditional Container Border Style'. - * @generated * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated */ public T caseConditionalContainerBorderStyle(ConditionalContainerBorderStyle object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Element For'. + * This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element For'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFormElementFor(FormElementFor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Element If'. + * This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Element If'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFormElementIf(FormElementIf object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Representation Description'. This implementation returns null; returning a non-null result will terminate the switch.