diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index eb6e817628..440a7e6483 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -33,6 +33,7 @@ In the _styleDescription_, the definition of a color are now a select list of al
For that, the `DiagramCreationService` will have less responsabilities.
Starting now, it will stop persisting the diagram after its creation.
It will start by improving a bit performances since diagrams were persisted twice in some use cases.
+- https://github.com/eclipse-sirius/sirius-components/issues/1915[#1915] [view] Add the page support in the view DSL.
=== Dependency update
- https://github.com/eclipse-sirius/sirius-components/issues/1936[#1936] [releng] Switch to Cypress 12.11.0
diff --git a/doc/adrs/098_add_page_description_in_view.adoc b/doc/adrs/098_add_page_description_in_view.adoc
new file mode 100644
index 0000000000..01282ba032
--- /dev/null
+++ b/doc/adrs/098_add_page_description_in_view.adoc
@@ -0,0 +1,27 @@
+= ADR-098 - Add `PageDescription` definition in the View DSL
+
+== Context
+
+In the View DSL definition (in `view.ecore`), it's only possible to organize `FormDescription` in separate groups.
+
+== Decision
+
+We will add a new level to organize groups in different pages. This new object `PageDescription` will be contained in a `FormDescription` and may contain any number of
+`GroupDescription`.
+
+=== Frontend
+
+The Material-UI `Tabs` representation will be used to display the pages of the FormDescription.
+A new drop area will be added to drop new page elements from the editor.
+To change the page order, the `Tab` will be _draggable._
+The `Tab` are Material-UI component, and it's not recommended to add a new drop area to `Tabs` between them to offer the possibility to place `Tab` at any position.
+To get around that, it will be possible to drop elements directly on the `Tab` element in order to place it before.
+
+=== Backend
+
+The new structure of the class `FormDescriptionEditor` will be just like the ecore definition i.e., the new layer `List` will be introduced in place of `List` which
+is moved in the `Page` object.
+
+== Status
+
+Accepted.
diff --git a/integration-tests/cypress/e2e/project/edit/formdescriptioneditor.cy.js b/integration-tests/cypress/e2e/project/edit/formdescriptioneditor.cy.js
index 06d91a177e..e3d910a589 100644
--- a/integration-tests/cypress/e2e/project/edit/formdescriptioneditor.cy.js
+++ b/integration-tests/cypress/e2e/project/edit/formdescriptioneditor.cy.js
@@ -20,13 +20,9 @@ describe('/projects/:projectId/edit - FormDescriptionEditor', () => {
cy.visit(`/projects/${projectId}/edit`);
});
});
- });
-
- it('try to move a toolbar action into another empty group', () => {
cy.getByTestId('ViewDocument').dblclick();
cy.getByTestId('View').dblclick();
cy.getByTestId('View-more').click();
-
// create the form description
cy.getByTestId('treeitem-contextmenu').findByTestId('new-object').click();
//make sure the data are fetched before selecting
@@ -39,10 +35,13 @@ describe('/projects/:projectId/edit - FormDescriptionEditor', () => {
cy.getByTestId('New Form Description-more').click();
cy.getByTestId('treeitem-contextmenu').findByTestId('new-representation').click();
cy.getByTestId('create-representation').click();
- // create a second group
+ });
+
+ it('try to move a toolbar action into another empty group', () => {
+ // create another group
const dataTransfer = new DataTransfer();
cy.getByTestId('FormDescriptionEditor-Group').trigger('dragstart', { dataTransfer });
- cy.getByTestId('FormDescriptionEditor-DropArea').trigger('drop', { dataTransfer });
+ cy.getByTestId('Page-DropArea').trigger('drop', { dataTransfer });
// create a toolbar action in the first group
cy.get('[data-testid^="Group-ToolbarActions-NewAction-"]').eq(0).click();
// move the toolbar action from the first group to the second one
@@ -50,37 +49,59 @@ describe('/projects/:projectId/edit - FormDescriptionEditor', () => {
cy.get('[data-testid^="Group-ToolbarActions-DropArea-"]').eq(1).trigger('drop', { dataTransfer });
});
- it('rename a form description editor', () => {
- cy.getByTestId('ViewDocument').dblclick();
- cy.getByTestId('View').dblclick();
- cy.getByTestId('View-more').click();
- // create the form description
- cy.getByTestId('treeitem-contextmenu').findByTestId('new-object').click();
- //make sure the data are fetched before selecting
- cy.getByTestId('create-object').should('be.enabled');
- cy.getByTestId('childCreationDescription').click();
- cy.get('[data-value="Form Description"]').click();
- cy.getByTestId('create-object').click();
- // create a button widget under the group of the form description editor
- cy.getByTestId('New Form Description').dblclick();
- cy.getByTestId('GroupDescription').dblclick();
- cy.getByTestId('GroupDescription-more').click();
- cy.getByTestId('treeitem-contextmenu').findByTestId('new-object').click();
- //make sure the data are fetched before selecting
- cy.getByTestId('create-object').should('be.enabled');
- cy.getByTestId('childCreationDescription').click();
- cy.get('[data-value="Widgets Button Description"]').click();
- cy.getByTestId('create-object').click();
- // create the form description editor
- cy.getByTestId('New Form Description').click();
- cy.getByTestId('New Form Description-more').click();
- cy.getByTestId('treeitem-contextmenu').findByTestId('new-representation').click();
- cy.getByTestId('create-representation').click();
- // rename the form description editor
- cy.getByTestId('FormDescriptionEditor').click();
- cy.getByTestId('FormDescriptionEditor-more').click();
- cy.getByTestId('treeitem-contextmenu').findByTestId('rename-tree-item').click();
- cy.getByTestId('name-edit').type('Renamed-FormDescriptionEditor{enter}');
- cy.getByTestId('Renamed-FormDescriptionEditor').should('exist');
+ it('try to create an empty page', () => {
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').should('have.lengthOf', 1);
+ const dataTransfer = new DataTransfer();
+ cy.getByTestId('FormDescriptionEditor-Page').trigger('dragstart', { dataTransfer });
+ cy.getByTestId('PageList-DropArea').trigger('drop', { dataTransfer });
+ cy.wait(500); // Wait for representation to refresh
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').should('have.lengthOf', 2);
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(1).click();
+ cy.get('[title="Group"]').should('exist');
+ });
+
+ it('try to rename a page', () => {
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(0).click();
+ cy.getByTestId('Label Expression').click().type('Page Rename{enter}');
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').first().should('have.text', 'Page Rename');
});
+
+ it('try to move a page', () => {
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(0).click();
+ cy.getByTestId('Label Expression').click().type('Page 1{enter}');
+ const dataTransfer = new DataTransfer();
+ cy.getByTestId('FormDescriptionEditor-Page').trigger('dragstart', { dataTransfer });
+ cy.getByTestId('PageList-DropArea').trigger('drop', { dataTransfer });
+ cy.wait(500); // Wait for representation to refresh
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').should('have.lengthOf', 2);
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(1).click();
+ cy.wait(500); // Wait for representation to refresh
+ cy.getByTestId('Label Expression').click().type('Page 2{enter}');
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(0).should('have.text', 'Page 1');
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(1).should('have.text', 'Page 2');
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(0).trigger('dragstart', { dataTransfer });
+ cy.getByTestId('PageList-DropArea').trigger('drop', { dataTransfer });
+ cy.wait(500); // Wait for representation to refresh
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(0).should('have.text', 'Page 2');
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').eq(1).should('have.text', 'Page 1');
+ });
+
+ it('try to delete a page', () => {
+ const dataTransfer = new DataTransfer();
+ cy.getByTestId('FormDescriptionEditor-Page').trigger('dragstart', { dataTransfer });
+ cy.getByTestId('PageList-DropArea').trigger('drop', { dataTransfer });
+ cy.wait(500); // Wait for representation to refresh
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').should('have.lengthOf', 2);
+ cy.get('[data-testid^="Page-"]').eq(0).click().type('{del}');
+ cy.wait(500); // Wait for representation to refresh
+ cy.get('[data-testid^="Page-"]').not('[data-testid="Page-DropArea"]').should('have.lengthOf', 1);
+ });
+
+ it('try to add group and widget to a page', () => {
+ const dataTransfer = new DataTransfer();
+ cy.getByTestId('FormDescriptionEditor-BarChart').trigger('dragstart', { dataTransfer });
+ cy.get('[data-testid^="Group-Widgets-DropArea-"]').eq(0).trigger('drop', { dataTransfer });
+ cy.getByTestId('BarChart').should('exist');
+ });
+
});
diff --git a/packages/compatibility/backend/sirius-components-compatibility-emf/src/main/java/org/eclipse/sirius/components/compatibility/emf/properties/PropertiesDefaultDescriptionProvider.java b/packages/compatibility/backend/sirius-components-compatibility-emf/src/main/java/org/eclipse/sirius/components/compatibility/emf/properties/PropertiesDefaultDescriptionProvider.java
index b1d9994525..4715638205 100644
--- a/packages/compatibility/backend/sirius-components-compatibility-emf/src/main/java/org/eclipse/sirius/components/compatibility/emf/properties/PropertiesDefaultDescriptionProvider.java
+++ b/packages/compatibility/backend/sirius-components-compatibility-emf/src/main/java/org/eclipse/sirius/components/compatibility/emf/properties/PropertiesDefaultDescriptionProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2019, 2022 Obeo.
+ * Copyright (c) 2019, 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
@@ -97,7 +97,6 @@ public FormDescription getFormDescription() {
.targetObjectIdProvider(targetObjectIdProvider)
.canCreatePredicate(variableManager -> false)
.pageDescriptions(pageDescriptions)
- .groupDescriptions(groupDescriptions)
.build();
// @formatter:on
}
diff --git a/packages/compatibility/backend/sirius-components-compatibility-emf/src/test/java/org/eclipse/sirius/components/compatibility/emf/compatibility/properties/FormRendererTests.java b/packages/compatibility/backend/sirius-components-compatibility-emf/src/test/java/org/eclipse/sirius/components/compatibility/emf/compatibility/properties/FormRendererTests.java
index 4ea2b7874e..00af8f873e 100644
--- a/packages/compatibility/backend/sirius-components-compatibility-emf/src/test/java/org/eclipse/sirius/components/compatibility/emf/compatibility/properties/FormRendererTests.java
+++ b/packages/compatibility/backend/sirius-components-compatibility-emf/src/test/java/org/eclipse/sirius/components/compatibility/emf/compatibility/properties/FormRendererTests.java
@@ -39,6 +39,7 @@
import org.eclipse.sirius.components.forms.description.FormDescription;
import org.eclipse.sirius.components.forms.description.RadioDescription;
import org.eclipse.sirius.components.forms.description.SelectDescription;
+import org.eclipse.sirius.components.forms.description.TextareaDescription;
import org.eclipse.sirius.components.forms.description.TextfieldDescription;
import org.eclipse.sirius.components.forms.renderer.FormRenderer;
import org.eclipse.sirius.components.interpreter.AQLInterpreter;
@@ -210,23 +211,28 @@ private org.eclipse.sirius.properties.GroupDescription createGroupDescription()
private void checkResult(FormDescription description) {
// test SiriusViewExtensionDescriptionConverter
assertThat(description).isNotNull();
- assertThat(description.getGroupDescriptions()).hasSize(1);
assertThat(description.getPageDescriptions()).hasSize(1);
assertThat(description.getPageDescriptions().get(0).getGroupDescriptions()).hasSize(1);
- assertThat(description.getPageDescriptions()).hasSize(1);
- assertThat(description.getPageDescriptions().get(0).getGroupDescriptions().get(0)).isEqualTo(description.getGroupDescriptions().get(0));
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream())).hasSize(6);
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(CheckboxDescription.class::isInstance)).hasSize(1);
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(RadioDescription.class::isInstance)).hasSize(1);
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(SelectDescription.class::isInstance)).hasSize(1);
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(TextfieldDescription.class::isInstance)).hasSize(1);
- assertThat(description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(TextfieldDescription.class::isInstance)).hasSize(1);
- Optional forOptional = description.getGroupDescriptions().stream().flatMap(g -> g.getControlDescriptions().stream()).filter(ForDescription.class::isInstance)
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())).hasSize(6);
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())
+ .filter(CheckboxDescription.class::isInstance)).hasSize(1);
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())
+ .filter(RadioDescription.class::isInstance)).hasSize(1);
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())
+ .filter(SelectDescription.class::isInstance)).hasSize(1);
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())
+ .filter(TextfieldDescription.class::isInstance)).hasSize(1);
+ assertThat(description.getPageDescriptions().stream().flatMap(g -> g.getGroupDescriptions().stream()).flatMap(g -> g.getControlDescriptions().stream())
+ .filter(TextareaDescription.class::isInstance)).hasSize(1);
+ Optional forOptional = description.getPageDescriptions()
+ .stream()
+ .flatMap(g -> g.getGroupDescriptions().stream())
+ .flatMap(g -> g.getControlDescriptions().stream())
+ .filter(ForDescription.class::isInstance)
.map(ForDescription.class::cast).findFirst();
assertThat(forOptional).isNotEmpty();
assertThat(forOptional.get().getIfDescriptions()).hasSize(1);
assertThat(forOptional.get().getIfDescriptions().stream().findFirst().get().getWidgetDescription()).isNotNull();
-
// Test FormRenderer
VariableManager variableManager = new VariableManager();
variableManager.put(VariableManager.SELF, List.of(EcorePackage.eINSTANCE));
diff --git a/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/forms/ViewExtensionDescriptionConverter.java b/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/forms/ViewExtensionDescriptionConverter.java
index 1e9d8757d5..d7c7c6a212 100644
--- a/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/forms/ViewExtensionDescriptionConverter.java
+++ b/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/forms/ViewExtensionDescriptionConverter.java
@@ -36,7 +36,7 @@
import org.springframework.stereotype.Service;
/**
- * This class is used to convert a Sirius {@link ViewExtensionDescription} to an Sirius Web {@link FormDescription}.
+ * This class is used to convert a Sirius {@link ViewExtensionDescription} to a Sirius Web {@link FormDescription}.
*
* @author fbarbin
*/
@@ -72,13 +72,12 @@ public FormDescription convert(ViewExtensionDescription viewExtensionDescription
PageDescriptionConverter pageDescriptionConverter = new PageDescriptionConverter(interpreter, this.identifierProvider, this.semanticCandidatesProviderFactory);
GroupDescriptionConverter groupDescriptionConverter = new GroupDescriptionConverter(interpreter, this.objectService, this.identifierProvider, this.modelOperationHandlerSwitchProvider);
- // @formatter:off
Map siriusGroup2SiriusWebGroup = new HashMap<>();
- List groupDescriptions = viewExtensionDescription.getCategories().stream()
+
+ viewExtensionDescription.getCategories().stream()
.flatMap(category -> category.getPages().stream())
.flatMap(page -> page.getGroups().stream())
- .map(groupDescription -> groupDescriptionConverter.convert(groupDescription, siriusGroup2SiriusWebGroup))
- .toList();
+ .forEach(groupDescription -> groupDescriptionConverter.convert(groupDescription, siriusGroup2SiriusWebGroup));
List pageDescriptions = viewExtensionDescription.getCategories().stream()
.flatMap(category -> category.getPages().stream())
@@ -106,8 +105,6 @@ public FormDescription convert(ViewExtensionDescription viewExtensionDescription
.canCreatePredicate(variableManager -> false)
.targetObjectIdProvider(targetObjectIdProvider)
.pageDescriptions(pageDescriptions)
- .groupDescriptions(groupDescriptions)
.build();
- // @formatter:on
}
}
diff --git a/packages/core/backend/sirius-components-core/src/main/java/org/eclipse/sirius/components/core/api/SuccessPayload.java b/packages/core/backend/sirius-components-core/src/main/java/org/eclipse/sirius/components/core/api/SuccessPayload.java
index b93d87b089..aa444c3244 100644
--- a/packages/core/backend/sirius-components-core/src/main/java/org/eclipse/sirius/components/core/api/SuccessPayload.java
+++ b/packages/core/backend/sirius-components-core/src/main/java/org/eclipse/sirius/components/core/api/SuccessPayload.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2023, 2023 Obeo.
+ * Copyright (c) 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
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorCreationService.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorCreationService.java
index 772aa6d980..6ec0448a3a 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorCreationService.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorCreationService.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -60,23 +60,19 @@ public FormDescriptionEditorCreationService(IRepresentationDescriptionSearchServ
this.representationPersistenceService = Objects.requireNonNull(representationPersistenceService);
this.objectService = Objects.requireNonNull(objectService);
- // @formatter:off
this.timer = Timer.builder(Monitoring.REPRESENTATION_EVENT_PROCESSOR_REFRESH)
.tag(Monitoring.NAME, "formdescriptioneditor")
.register(meterRegistry);
- // @formatter:on
}
@Override
public FormDescriptionEditor create(String label, Object targetObject, FormDescriptionEditorDescription formDescriptionEditorDescription, IEditingContext editingContext) {
- // @formatter:off
FormDescriptionEditor newFormDescriptionEditor = FormDescriptionEditor.newFormDescriptionEditor(UUID.randomUUID().toString())
.label(label)
.targetObjectId(this.objectService.getId(targetObject))
.descriptionId(formDescriptionEditorDescription.getId())
- .groups(List.of()) // We don't store form description editor groups, it will be re-render by the FormDescriptionEditorProcessor.
+ .pages(List.of()) // We don't store form description editor pages, it will be re-render by the FormDescriptionEditorProcessor.
.build();
- // @formatter:on
this.representationPersistenceService.save(editingContext, newFormDescriptionEditor);
@@ -87,18 +83,15 @@ public FormDescriptionEditor create(String label, Object targetObject, FormDescr
public FormDescriptionEditor refresh(IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext) {
FormDescriptionEditor previousFormDescriptionEditor = formDescriptionEditorContext.getFormDescriptionEditor();
var optionalObject = this.objectService.getObject(editingContext, previousFormDescriptionEditor.getTargetObjectId());
- // @formatter:off
var optionalFormDescriptionEditorDescription = this.representationDescriptionSearchService.findById(editingContext, previousFormDescriptionEditor.getDescriptionId())
.filter(FormDescriptionEditorDescription.class::isInstance)
.map(FormDescriptionEditorDescription.class::cast);
- // @formatter:on
if (optionalObject.isPresent() && optionalFormDescriptionEditorDescription.isPresent()) {
Object object = optionalObject.get();
FormDescriptionEditorDescription formDescriptionEditorDescription = optionalFormDescriptionEditorDescription.get();
- FormDescriptionEditor formDescriptionEditor = this.doRender(previousFormDescriptionEditor.getLabel(), object, editingContext, formDescriptionEditorDescription,
+ return this.doRender(previousFormDescriptionEditor.getLabel(), object, editingContext, formDescriptionEditorDescription,
Optional.of(formDescriptionEditorContext));
- return formDescriptionEditor;
}
return null;
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddGroupInput.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddGroupInput.java
index 0e9cc945f3..778bd3999c 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddGroupInput.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddGroupInput.java
@@ -21,5 +21,6 @@
*
* @author arichard
*/
-public record AddGroupInput(UUID id, String editingContextId, String representationId, int index) implements IFormDescriptionEditorInput {
+public record AddGroupInput(UUID id, String editingContextId, String representationId, String pageId, int index) implements IFormDescriptionEditorInput {
+
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddPageInput.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddPageInput.java
new file mode 100644
index 0000000000..55cea7b03c
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/AddPageInput.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.dto;
+
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+
+/**
+ * The input for the Form Description Editor add page mutation.
+ *
+ * @author frouene
+ */
+public record AddPageInput(UUID id, String editingContextId, String representationId, int index) implements IFormDescriptionEditorInput {
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/DeletePageInput.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/DeletePageInput.java
new file mode 100644
index 0000000000..3eded3e81e
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/DeletePageInput.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.dto;
+
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+
+/**
+ * The input for the Form Description Editor delete page mutation.
+ *
+ * @author frouene
+ */
+public record DeletePageInput(UUID id, String editingContextId, String representationId, String pageId) implements IFormDescriptionEditorInput {
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MoveGroupInput.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MoveGroupInput.java
index 933fa5f594..43bbf99fc4 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MoveGroupInput.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MoveGroupInput.java
@@ -21,5 +21,6 @@
*
* @author arichard
*/
-public record MoveGroupInput(UUID id, String editingContextId, String representationId, String groupId, int index) implements IFormDescriptionEditorInput {
+public record MoveGroupInput(UUID id, String editingContextId, String representationId, String pageId, String groupId, int index) implements IFormDescriptionEditorInput {
+
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MovePageInput.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MovePageInput.java
new file mode 100644
index 0000000000..32c701652b
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/dto/MovePageInput.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.dto;
+
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+
+/**
+ * The input for the Form Description Editor move page mutation.
+ *
+ * @author frouene
+ */
+public record MovePageInput(UUID id, String editingContextId, String representationId, String pageId, int index) implements IFormDescriptionEditorInput {
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandler.java
index 05dd94b154..c1772acb05 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandler.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandler.java
@@ -13,6 +13,7 @@
package org.eclipse.sirius.components.collaborative.formdescriptioneditors.handlers;
import java.util.Objects;
+import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
import org.eclipse.sirius.components.collaborative.api.ChangeKind;
@@ -27,7 +28,7 @@
import org.eclipse.sirius.components.core.api.IObjectService;
import org.eclipse.sirius.components.core.api.IPayload;
import org.eclipse.sirius.components.core.api.SuccessPayload;
-import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewFactory;
import org.springframework.stereotype.Service;
@@ -54,11 +55,9 @@ public AddGroupEventHandler(IObjectService objectService, ICollaborativeFormDesc
this.objectService = Objects.requireNonNull(objectService);
this.messageService = Objects.requireNonNull(messageService);
- // @formatter:off
this.counter = Counter.builder(Monitoring.EVENT_HANDLER)
.tag(Monitoring.NAME, this.getClass().getSimpleName())
.register(meterRegistry);
- // @formatter:on
}
@Override
@@ -75,9 +74,8 @@ public void handle(One payloadSink, Many changeDesc
IPayload payload = new ErrorPayload(formDescriptionEditorInput.id(), message);
ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
- if (formDescriptionEditorInput instanceof AddGroupInput) {
- int index = ((AddGroupInput) formDescriptionEditorInput).index();
- boolean addGroup = this.addGroup(editingContext, formDescriptionEditorContext, index);
+ if (formDescriptionEditorInput instanceof AddGroupInput addGroupInput) {
+ boolean addGroup = this.addGroup(editingContext, addGroupInput.pageId(), addGroupInput.index());
if (addGroup) {
payload = new SuccessPayload(formDescriptionEditorInput.id());
changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
@@ -88,17 +86,21 @@ public void handle(One payloadSink, Many changeDesc
changeDescriptionSink.tryEmitNext(changeDescription);
}
- private boolean addGroup(IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext, int index) {
- boolean success = false;
- var optionalSelf = this.objectService.getObject(editingContext, formDescriptionEditorContext.getFormDescriptionEditor().getTargetObjectId());
- if (optionalSelf.isPresent()) {
- Object container = optionalSelf.get();
- if (container instanceof FormDescription) {
- var groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
- ((FormDescription) container).getGroups().add(index, groupDescription);
- success = true;
- }
- }
- return success;
+ private boolean addGroup(IEditingContext editingContext, String pageId, int index) {
+ AtomicBoolean success = new AtomicBoolean(false);
+ this.objectService.getObject(editingContext, pageId)
+ .filter(PageDescription.class::isInstance)
+ .map(PageDescription.class::cast)
+ .ifPresent(pageDescription -> {
+ this.createNewGroupInPageDescription(pageDescription, index);
+ success.set(true);
+ });
+
+ return success.get();
+ }
+
+ private void createNewGroupInPageDescription(PageDescription pageDescription, int index) {
+ var groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(index, groupDescription);
}
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandler.java
new file mode 100644
index 0000000000..771632a3fb
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandler.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.api.Monitoring;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorEventHandler;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.AddPageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.ErrorPayload;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.springframework.stereotype.Service;
+
+import io.micrometer.core.instrument.Counter;
+import io.micrometer.core.instrument.MeterRegistry;
+import reactor.core.publisher.Sinks.Many;
+import reactor.core.publisher.Sinks.One;
+
+/**
+ * Handle the add page event on Form Description Editor.
+ *
+ * @author frouene
+ */
+@Service
+public class AddPageEventHandler implements IFormDescriptionEditorEventHandler {
+
+ private final IObjectService objectService;
+
+ private final ICollaborativeFormDescriptionEditorMessageService messageService;
+
+ private final Counter counter;
+
+ public AddPageEventHandler(IObjectService objectService, ICollaborativeFormDescriptionEditorMessageService messageService, MeterRegistry meterRegistry) {
+ this.objectService = Objects.requireNonNull(objectService);
+ this.messageService = Objects.requireNonNull(messageService);
+
+ this.counter = Counter.builder(Monitoring.EVENT_HANDLER)
+ .tag(Monitoring.NAME, this.getClass().getSimpleName())
+ .register(meterRegistry);
+ }
+
+ @Override
+ public boolean canHandle(IFormDescriptionEditorInput formDescriptionEditorInput) {
+ return formDescriptionEditorInput instanceof AddPageInput;
+ }
+
+ @Override
+ public void handle(One payloadSink, Many changeDescriptionSink, IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext,
+ IFormDescriptionEditorInput formDescriptionEditorInput) {
+ this.counter.increment();
+
+ String message = this.messageService.invalidInput(formDescriptionEditorInput.getClass().getSimpleName(), AddPageInput.class.getSimpleName());
+ IPayload payload = new ErrorPayload(formDescriptionEditorInput.id(), message);
+ ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+
+ if (formDescriptionEditorInput instanceof AddPageInput addPageInput) {
+ boolean addPage = this.addPage(editingContext, formDescriptionEditorContext, addPageInput.index());
+ if (addPage) {
+ payload = new SuccessPayload(formDescriptionEditorInput.id());
+ changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+ }
+ }
+
+ payloadSink.tryEmitValue(payload);
+ changeDescriptionSink.tryEmitNext(changeDescription);
+ }
+
+ private boolean addPage(IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext, int index) {
+ AtomicBoolean success = new AtomicBoolean(false);
+ this.objectService.getObject(editingContext, formDescriptionEditorContext.getFormDescriptionEditor().getTargetObjectId())
+ .filter(FormDescription.class::isInstance)
+ .map(FormDescription.class::cast)
+ .ifPresent(pageDescription -> {
+ this.createNewPageWithDefaultEmptyGroupInFormDescription(pageDescription, index);
+ success.set(true);
+ });
+
+ return success.get();
+ }
+
+ private void createNewPageWithDefaultEmptyGroupInFormDescription(FormDescription formDescription, int index) {
+ var pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ var groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(index, pageDescription);
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandler.java
new file mode 100644
index 0000000000..91f2383cdd
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandler.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import java.util.Objects;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.api.Monitoring;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorEventHandler;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.DeletePageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.ErrorPayload;
+import org.eclipse.sirius.components.core.api.IEditService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.springframework.stereotype.Service;
+
+import io.micrometer.core.instrument.Counter;
+import io.micrometer.core.instrument.MeterRegistry;
+import reactor.core.publisher.Sinks.Many;
+import reactor.core.publisher.Sinks.One;
+
+/**
+ * Handle the delete page event on Form Description Editor.
+ *
+ * @author frouene
+ */
+@Service
+public class DeletePageEventHandler implements IFormDescriptionEditorEventHandler {
+
+ private final IObjectService objectService;
+
+ private final IEditService editService;
+
+ private final ICollaborativeFormDescriptionEditorMessageService messageService;
+
+ private final Counter counter;
+
+ public DeletePageEventHandler(IObjectService objectService, IEditService editService, ICollaborativeFormDescriptionEditorMessageService messageService, MeterRegistry meterRegistry) {
+ this.objectService = Objects.requireNonNull(objectService);
+ this.editService = Objects.requireNonNull(editService);
+ this.messageService = Objects.requireNonNull(messageService);
+
+ this.counter = Counter.builder(Monitoring.EVENT_HANDLER)
+ .tag(Monitoring.NAME, this.getClass().getSimpleName())
+ .register(meterRegistry);
+ }
+
+ @Override
+ public boolean canHandle(IFormDescriptionEditorInput formDescriptionEditorInput) {
+ return formDescriptionEditorInput instanceof DeletePageInput;
+ }
+
+ @Override
+ public void handle(One payloadSink, Many changeDescriptionSink, IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext,
+ IFormDescriptionEditorInput formDescriptionEditorInput) {
+ this.counter.increment();
+
+ String message = this.messageService.invalidInput(formDescriptionEditorInput.getClass().getSimpleName(), DeletePageInput.class.getSimpleName());
+ IPayload payload = new ErrorPayload(formDescriptionEditorInput.id(), message);
+ ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+
+ if (formDescriptionEditorInput instanceof DeletePageInput deletePageInput) {
+ boolean deletePage = this.deletePage(editingContext, deletePageInput.pageId());
+ if (deletePage) {
+ payload = new SuccessPayload(formDescriptionEditorInput.id());
+ changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+ }
+ }
+
+ payloadSink.tryEmitValue(payload);
+ changeDescriptionSink.tryEmitNext(changeDescription);
+ }
+
+ protected boolean deletePage(IEditingContext editingContext, String pageId) {
+ var optionalSelf = this.objectService.getObject(editingContext, pageId);
+ if (optionalSelf.isPresent()) {
+ this.editService.delete(optionalSelf.get());
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandler.java
index 8658ae5995..6e71ddc621 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandler.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandler.java
@@ -13,6 +13,7 @@
package org.eclipse.sirius.components.collaborative.formdescriptioneditors.handlers;
import java.util.Objects;
+import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
import org.eclipse.sirius.components.collaborative.api.ChangeKind;
@@ -27,8 +28,8 @@
import org.eclipse.sirius.components.core.api.IObjectService;
import org.eclipse.sirius.components.core.api.IPayload;
import org.eclipse.sirius.components.core.api.SuccessPayload;
-import org.eclipse.sirius.components.view.FormDescription;
import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@@ -58,11 +59,9 @@ public MoveGroupEventHandler(IObjectService objectService, ICollaborativeFormDes
this.objectService = Objects.requireNonNull(objectService);
this.messageService = Objects.requireNonNull(messageService);
- // @formatter:off
this.counter = Counter.builder(Monitoring.EVENT_HANDLER)
.tag(Monitoring.NAME, this.getClass().getSimpleName())
.register(meterRegistry);
- // @formatter:on
}
@Override
@@ -79,10 +78,8 @@ public void handle(One payloadSink, Many changeDesc
IPayload payload = new ErrorPayload(formDescriptionEditorInput.id(), message);
ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
- if (formDescriptionEditorInput instanceof MoveGroupInput) {
- String groupId = ((MoveGroupInput) formDescriptionEditorInput).groupId();
- int index = ((MoveGroupInput) formDescriptionEditorInput).index();
- boolean moveGroup = this.moveGroup(editingContext, formDescriptionEditorContext, groupId, index);
+ if (formDescriptionEditorInput instanceof MoveGroupInput moveGroupInput) {
+ boolean moveGroup = this.moveGroup(editingContext, moveGroupInput.pageId(), moveGroupInput.groupId(), moveGroupInput.index());
if (moveGroup) {
payload = new SuccessPayload(formDescriptionEditorInput.id());
changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
@@ -93,28 +90,26 @@ public void handle(One payloadSink, Many changeDesc
changeDescriptionSink.tryEmitNext(changeDescription);
}
- private boolean moveGroup(IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext, String groupId, int index) {
- boolean success = false;
- var optionalSelf = this.objectService.getObject(editingContext, formDescriptionEditorContext.getFormDescriptionEditor().getTargetObjectId());
- if (optionalSelf.isPresent()) {
- Object container = optionalSelf.get();
- if (container instanceof FormDescription) {
- var objectToMove = this.objectService.getObject(editingContext, groupId);
- if (objectToMove.filter(GroupDescription.class::isInstance).isPresent()) {
- GroupDescription groupToMove = (GroupDescription) objectToMove.get();
- try {
- if (container.equals(groupToMove.eContainer())) {
- ((FormDescription) container).getGroups().move(index, groupToMove);
- } else {
- ((FormDescription) container).getGroups().add(index, groupToMove);
- }
- success = true;
- } catch (IndexOutOfBoundsException exception) {
- this.logger.warn(exception.getMessage(), exception);
- }
- }
- }
- }
- return success;
+ private boolean moveGroup(IEditingContext editingContext, String pageId, String groupId, int index) {
+ AtomicBoolean success = new AtomicBoolean(false);
+ this.objectService.getObject(editingContext, pageId)
+ .filter(PageDescription.class::isInstance)
+ .map(PageDescription.class::cast)
+ .ifPresent(pageDescription -> this.objectService.getObject(editingContext, groupId)
+ .filter(GroupDescription.class::isInstance)
+ .map(GroupDescription.class::cast)
+ .ifPresent(groupDescription -> {
+ try {
+ if (pageDescription.equals(groupDescription.eContainer())) {
+ pageDescription.getGroups().move(index, groupDescription);
+ } else {
+ pageDescription.getGroups().add(index, groupDescription);
+ }
+ success.set(true);
+ } catch (IndexOutOfBoundsException exception) {
+ this.logger.warn(exception.getMessage(), exception);
+ }
+ }));
+ return success.get();
}
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandler.java
new file mode 100644
index 0000000000..41fac474fb
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandler.java
@@ -0,0 +1,113 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.api.Monitoring;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorEventHandler;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.MovePageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.ErrorPayload;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import io.micrometer.core.instrument.Counter;
+import io.micrometer.core.instrument.MeterRegistry;
+import reactor.core.publisher.Sinks.Many;
+import reactor.core.publisher.Sinks.One;
+
+/**
+ * Handle the move page event on Form Description Editor.
+ *
+ * @author frouene
+ */
+@Service
+public class MovePageEventHandler implements IFormDescriptionEditorEventHandler {
+
+ private final Logger logger = LoggerFactory.getLogger(MovePageEventHandler.class);
+
+ private final IObjectService objectService;
+
+ private final ICollaborativeFormDescriptionEditorMessageService messageService;
+
+ private final Counter counter;
+
+ public MovePageEventHandler(IObjectService objectService, ICollaborativeFormDescriptionEditorMessageService messageService, MeterRegistry meterRegistry) {
+ this.objectService = Objects.requireNonNull(objectService);
+ this.messageService = Objects.requireNonNull(messageService);
+
+ this.counter = Counter.builder(Monitoring.EVENT_HANDLER)
+ .tag(Monitoring.NAME, this.getClass().getSimpleName())
+ .register(meterRegistry);
+ }
+
+ @Override
+ public boolean canHandle(IFormDescriptionEditorInput formDescriptionEditorInput) {
+ return formDescriptionEditorInput instanceof MovePageInput;
+ }
+
+ @Override
+ public void handle(One payloadSink, Many changeDescriptionSink, IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext,
+ IFormDescriptionEditorInput formDescriptionEditorInput) {
+ this.counter.increment();
+
+ String message = this.messageService.invalidInput(formDescriptionEditorInput.getClass().getSimpleName(), MovePageInput.class.getSimpleName());
+ IPayload payload = new ErrorPayload(formDescriptionEditorInput.id(), message);
+ ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+
+ if (formDescriptionEditorInput instanceof MovePageInput movePageInput) {
+ boolean movePage = this.movePage(editingContext, formDescriptionEditorContext, movePageInput.pageId(), movePageInput.index());
+ if (movePage) {
+ payload = new SuccessPayload(formDescriptionEditorInput.id());
+ changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, formDescriptionEditorInput.representationId(), formDescriptionEditorInput);
+ }
+ }
+
+ payloadSink.tryEmitValue(payload);
+ changeDescriptionSink.tryEmitNext(changeDescription);
+ }
+
+
+ private boolean movePage(IEditingContext editingContext, IFormDescriptionEditorContext formDescriptionEditorContext, String pageId, int index) {
+ AtomicBoolean success = new AtomicBoolean(false);
+ this.objectService.getObject(editingContext, formDescriptionEditorContext.getFormDescriptionEditor().getTargetObjectId())
+ .filter(FormDescription.class::isInstance)
+ .map(FormDescription.class::cast)
+ .ifPresent(formDescription -> this.objectService.getObject(editingContext, pageId)
+ .filter(PageDescription.class::isInstance)
+ .map(PageDescription.class::cast)
+ .ifPresent(pageDescription -> {
+ try {
+ formDescription.getPages().move(index, pageDescription);
+ success.set(true);
+ } catch (IndexOutOfBoundsException exception) {
+ this.logger.warn(exception.getMessage(), exception);
+ }
+ }));
+ return success.get();
+ }
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandler.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandler.java
index 0037f42a45..a41e427c2d 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandler.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandler.java
@@ -82,7 +82,8 @@ public void handle(One payloadSink, Many changeDesc
FormDescriptionEditor renamedFormDescriptionEditor = FormDescriptionEditor.newFormDescriptionEditor(formDescriptionEditorContext.getFormDescriptionEditor())
.label(newLabel)
- .groups(List.of()) // We don't store form description editor groups, it will be re-render by the FormDescriptionEditorProcessor.
+ .pages(List.of()) // We don't store form description editor pages, it will be re-render by
+ // the FormDescriptionEditorProcessor.
.build();
this.representationPersistenceService.save(editingContext, renamedFormDescriptionEditor);
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/resources/schema/formdescriptioneditor.graphqls b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/resources/schema/formdescriptioneditor.graphqls
index 44abe99dfe..c8fc1f8c3f 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/resources/schema/formdescriptioneditor.graphqls
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/main/resources/schema/formdescriptioneditor.graphqls
@@ -18,7 +18,7 @@ type FormDescriptionEditorRefreshedEventPayload {
type FormDescriptionEditor implements Representation {
id: ID!
metadata: RepresentationMetadata!
- groups: [Group!]!
+ pages: [Page!]!
}
type FormDescriptionEditorDescription implements RepresentationDescription {
@@ -36,12 +36,16 @@ extend type Mutation {
addToolbarAction(input: AddToolbarActionInput!): AddToolbarActionPayload!
deleteToolbarAction(input: DeleteToolbarActionInput!): DeleteToolbarActionPayload!
moveToolbarAction(input: MoveToolbarActionInput!): MoveToolbarActionPayload!
+ addPage(input: AddPageInput!): AddPagePayload!
+ movePage(input: MovePageInput!): MovePagePayload!
+ deletePage(input: DeletePageInput!): DeletePagePayload!
}
input AddGroupInput {
id: ID!
editingContextId: ID!
representationId: ID!
+ pageId: ID!
index: Int!
}
@@ -60,6 +64,7 @@ input MoveGroupInput {
id: ID!
editingContextId: ID!
representationId: ID!
+ pageId: String!
groupId: String!
index: Int!
}
@@ -125,3 +130,31 @@ input MoveToolbarActionInput {
}
union MoveToolbarActionPayload = SuccessPayload | ErrorPayload
+
+input AddPageInput {
+ id: ID!
+ editingContextId: ID!
+ representationId: ID!
+ index: Int!
+}
+
+union AddPagePayload = SuccessPayload | ErrorPayload
+
+input MovePageInput {
+ id: ID!
+ editingContextId: ID!
+ representationId: ID!
+ pageId: String!
+ index: Int!
+}
+
+union MovePagePayload = SuccessPayload | ErrorPayload
+
+input DeletePageInput {
+ id: ID!
+ editingContextId: ID!
+ representationId: ID!
+ pageId: String!
+}
+
+union DeletePagePayload = SuccessPayload | ErrorPayload
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorEventProcessorTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorEventProcessorTests.java
index 51fc12ca00..c943778b39 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorEventProcessorTests.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/FormDescriptionEditorEventProcessorTests.java
@@ -44,14 +44,12 @@ public class FormDescriptionEditorEventProcessorTests {
private static final String FORMDESCRIPTIONEDITOR_DESCRIPTION_ID = UUID.randomUUID().toString();
- // @formatter:off
private static final FormDescriptionEditor INITIAL_TEST_FORMDESCRIPTIONEDITOR = FormDescriptionEditor.newFormDescriptionEditor(FORMDESCRIPTIONEDITOR_ID)
.descriptionId(FORMDESCRIPTIONEDITOR_DESCRIPTION_ID)
.label(String.valueOf(0))
.targetObjectId("targetObjectId")
- .groups(List.of())
+ .pages(List.of())
.build();
- // @formatter:on
private final IFormDescriptionEditorCreationService formDescriptionEditorCreationService = new MockFormDescriptionEditorCreationService(INITIAL_TEST_FORMDESCRIPTIONEDITOR);
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/TestFormDescriptionEditorBuilder.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/TestFormDescriptionEditorBuilder.java
index b5370ad2ec..231ffd7f44 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/TestFormDescriptionEditorBuilder.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/TestFormDescriptionEditorBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -17,6 +17,7 @@
import org.eclipse.sirius.components.formdescriptioneditors.FormDescriptionEditor;
import org.eclipse.sirius.components.forms.Group;
+import org.eclipse.sirius.components.forms.Page;
/**
* Utility class used to help build form description editors for unit tests.
@@ -25,26 +26,24 @@
*/
public class TestFormDescriptionEditorBuilder {
- public static final String IMAGE_PNG = "/image.png";
-
- public static final String TOOL_IMAGE_URL = IMAGE_PNG;
-
- public static final String TOOL_LABEL = "toolLabel";
-
public FormDescriptionEditor getFormDescriptionEditor(String id) {
- // @formatter:off
Group group = Group.newGroup(UUID.randomUUID().toString())
- .label("group1")
- .widgets(List.of())
- .toolbarActions(List.of())
- .build();
+ .label("group1")
+ .widgets(List.of())
+ .toolbarActions(List.of())
+ .build();
+
+ Page page = Page.newPage(UUID.randomUUID().toString())
+ .label("page1")
+ .groups(List.of(group))
+ .toolbarActions(List.of())
+ .build();
return FormDescriptionEditor.newFormDescriptionEditor(id)
.label("formDescriptionEditorLabel")
.descriptionId(UUID.randomUUID().toString())
.targetObjectId("formDescriptionEditorTargetObjectId")
- .groups(List.of(group))
+ .pages(List.of(page))
.build();
- // @formatter:on
}
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandlerTests.java
new file mode 100644
index 0000000000..8e9c08db40
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddGroupEventHandlerTests.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.Optional;
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.FormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.TestFormDescriptionEditorBuilder;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.AddGroupInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.junit.jupiter.api.Test;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import reactor.core.publisher.Sinks;
+
+/**
+ * Tests of the add group event handler.
+ *
+ * @author frouene
+ */
+public class AddGroupEventHandlerTests {
+
+ @Test
+ public void testAddGroupAction() {
+
+ FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription);
+
+ var objectService = new IObjectService.NoOp() {
+ @Override
+ public Optional getObject(IEditingContext editingContext, String objectId) {
+ return Optional.of(pageDescription);
+ }
+ };
+ var handler = new AddGroupEventHandler(objectService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
+ var input = new AddGroupInput(UUID.randomUUID(), "editingContextId", "representationId", "pageId", 0);
+
+ assertThat(handler.canHandle(input)).isTrue();
+
+ Sinks.One payloadSink = Sinks.one();
+ Sinks.Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
+
+ handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
+
+ ChangeDescription changeDescription = changeDescriptionSink.asFlux().blockFirst();
+ assertThat(changeDescription).isNotNull();
+ assertThat(changeDescription.getKind()).isEqualTo(ChangeKind.SEMANTIC_CHANGE);
+
+ IPayload payload = payloadSink.asMono().block();
+ assertThat(payload).isInstanceOf(SuccessPayload.class);
+ assertThat(pageDescription.getGroups()).hasSize(1);
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandlerTests.java
new file mode 100644
index 0000000000..65e0523be9
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddPageEventHandlerTests.java
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.Optional;
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.FormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.TestFormDescriptionEditorBuilder;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.AddPageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.junit.jupiter.api.Test;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import reactor.core.publisher.Sinks;
+
+/**
+ * Tests of the add page event handler.
+ *
+ * @author frouene
+ */
+public class AddPageEventHandlerTests {
+
+ @Test
+ public void testAddGroupAction() {
+
+ FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription);
+
+ var objectService = new IObjectService.NoOp() {
+ @Override
+ public Optional getObject(IEditingContext editingContext, String objectId) {
+ return Optional.of(formDescription);
+ }
+ };
+ var handler = new AddPageEventHandler(objectService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
+ var input = new AddPageInput(UUID.randomUUID(), "editingContextId", "representationId", 0);
+
+ assertThat(handler.canHandle(input)).isTrue();
+
+ Sinks.One payloadSink = Sinks.one();
+ Sinks.Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
+
+ handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
+
+ ChangeDescription changeDescription = changeDescriptionSink.asFlux().blockFirst();
+ assertThat(changeDescription).isNotNull();
+ assertThat(changeDescription.getKind()).isEqualTo(ChangeKind.SEMANTIC_CHANGE);
+
+ IPayload payload = payloadSink.asMono().block();
+ assertThat(payload).isInstanceOf(SuccessPayload.class);
+ assertThat(formDescription.getPages()).hasSize(2);
+ // The new page must have an empty group initialized
+ assertThat(formDescription.getPages().get(0).getGroups()).hasSize(1);
+ }
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddToolbarActionEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddToolbarActionEventHandlerTests.java
index 1b116ea517..2aa9c010c6 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddToolbarActionEventHandlerTests.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/AddToolbarActionEventHandlerTests.java
@@ -30,6 +30,7 @@
import org.eclipse.sirius.components.core.api.SuccessPayload;
import org.eclipse.sirius.components.view.FormDescription;
import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewFactory;
import org.junit.jupiter.api.Test;
@@ -44,11 +45,14 @@
* @author arichard
*/
public class AddToolbarActionEventHandlerTests {
+
@Test
public void testAddToolbarAction() {
FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
- formDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(pageDescription);
var objectService = new IObjectService.NoOp() {
@Override
public Optional getObject(IEditingContext editingContext, String objectId) {
@@ -62,7 +66,8 @@ public Optional getObject(IEditingContext editingContext, String objectI
One payloadSink = Sinks.one();
Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
- IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString()));
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandlerTests.java
new file mode 100644
index 0000000000..7d7e598078
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeletePageEventHandlerTests.java
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.Optional;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.FormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.TestFormDescriptionEditorBuilder;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.DeletePageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.IEditService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.formdescriptioneditors.FormDescriptionEditor;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.junit.jupiter.api.Test;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import reactor.core.publisher.Sinks;
+
+/**
+ * Tests of the delete page event handler.
+ *
+ * @author frouene
+ */
+public class DeletePageEventHandlerTests {
+
+ private static final String PAGE_ID = "pageId";
+
+ @Test
+ public void testDeletePage() {
+
+ FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription);
+
+ FormDescriptionEditor formDescriptionEditor = new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString());
+
+ var objectService = new IObjectService.NoOp() {
+ @Override
+ public Optional getObject(IEditingContext editingContext, String objectId) {
+ Optional result = Optional.empty();
+ if (PAGE_ID.equals(objectId)) {
+ result = Optional.of(pageDescription);
+ }
+ return result;
+ }
+ };
+ AtomicBoolean pageDeleted = new AtomicBoolean(false);
+ IEditService.NoOp editService = new IEditService.NoOp() {
+ @Override
+ public void delete(Object object) {
+ if (object == pageDescription) {
+ pageDeleted.set(true);
+ }
+ }
+ };
+
+ var handler = new DeletePageEventHandler(objectService, editService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
+ var input = new DeletePageInput(UUID.randomUUID(), "editingContextId", "representationId", PAGE_ID);
+
+ assertThat(handler.canHandle(input)).isTrue();
+
+ Sinks.One payloadSink = Sinks.one();
+ Sinks.Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(formDescriptionEditor);
+
+ handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
+
+ ChangeDescription changeDescription = changeDescriptionSink.asFlux().blockFirst();
+ assertThat(changeDescription.getKind()).isEqualTo(ChangeKind.SEMANTIC_CHANGE);
+
+ IPayload payload = payloadSink.asMono().block();
+ assertThat(payload).isInstanceOf(SuccessPayload.class);
+ assertThat(pageDeleted).isTrue();
+
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeleteToolbarActionEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeleteToolbarActionEventHandlerTests.java
index f335568d4b..187f9dbf60 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeleteToolbarActionEventHandlerTests.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/DeleteToolbarActionEventHandlerTests.java
@@ -34,6 +34,7 @@
import org.eclipse.sirius.components.view.ButtonDescription;
import org.eclipse.sirius.components.view.FormDescription;
import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewFactory;
import org.junit.jupiter.api.Test;
@@ -48,6 +49,7 @@
* @author arichard
*/
public class DeleteToolbarActionEventHandlerTests {
+
private static final String TOOLBAR_ACTION_ID = "toolbarActionId";
@Test
@@ -55,8 +57,10 @@ public void testDeleteToolbarAction() {
FormDescriptionEditor formDescriptionEditor = new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString());
FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
- formDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(pageDescription);
ButtonDescription toolbarButton = ViewFactory.eINSTANCE.createButtonDescription();
groupDescription.getToolbarActions().add(toolbarButton);
var objectService = new IObjectService.NoOp() {
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandlerTests.java
new file mode 100644
index 0000000000..a1e84076d3
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveGroupEventHandlerTests.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.FormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.TestFormDescriptionEditorBuilder;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.MoveGroupInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.formdescriptioneditors.FormDescriptionEditor;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.junit.jupiter.api.Test;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import reactor.core.publisher.Sinks;
+
+/**
+ * Tests of the move group event handler.
+ *
+ * @author frouene
+ */
+public class MoveGroupEventHandlerTests {
+
+ @Test
+ public void testMoveGroupAction() {
+
+ FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription);
+
+ GroupDescription groupDescription1 = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(groupDescription1);
+ GroupDescription groupDescription2 = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(groupDescription2);
+ GroupDescription groupDescription3 = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(groupDescription3);
+
+ FormDescriptionEditor formDescriptionEditor = new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString());
+
+ var objectService = new IObjectService.NoOp() {
+ @Override
+ public Optional getObject(IEditingContext editingContext, String objectId) {
+ Optional result = Optional.empty();
+ if ("group1".equals(objectId)) {
+ result = Optional.of(groupDescription1);
+ } else if ("group2".equals(objectId)) {
+ result = Optional.of(groupDescription2);
+ } else if ("group3".equals(objectId)) {
+ result = Optional.of(groupDescription3);
+ } else if (formDescriptionEditor.getPages().get(0).getId().equals(objectId)) {
+ result = Optional.of(pageDescription);
+ }
+ return result;
+ }
+ };
+
+ this.invokMove(formDescriptionEditor, objectService, "group2", 0);
+ assertThat(pageDescription.getGroups()).isEqualTo(List.of(groupDescription2, groupDescription1, groupDescription3));
+ this.invokMove(formDescriptionEditor, objectService, "group1", 2);
+ assertThat(pageDescription.getGroups()).isEqualTo(List.of(groupDescription2, groupDescription3, groupDescription1));
+
+ }
+
+ private void invokMove(FormDescriptionEditor formDescriptionEditor, IObjectService.NoOp objectService, String groupId, int index) {
+ var handler = new MoveGroupEventHandler(objectService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
+ var input = new MoveGroupInput(UUID.randomUUID(), "editingContextId", formDescriptionEditor.getId(), formDescriptionEditor.getPages().get(0).getId(), groupId, index);
+
+ assertThat(handler.canHandle(input)).isTrue();
+
+ Sinks.One payloadSink = Sinks.one();
+ Sinks.Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
+
+ handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
+
+ ChangeDescription changeDescription = changeDescriptionSink.asFlux().blockFirst();
+ assertThat(changeDescription.getKind()).isEqualTo(ChangeKind.SEMANTIC_CHANGE);
+
+ IPayload payload = payloadSink.asMono().block();
+ assertThat(payload).isInstanceOf(SuccessPayload.class);
+ }
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandlerTests.java
new file mode 100644
index 0000000000..3bdbac0898
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MovePageEventHandlerTests.java
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 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.collaborative.formdescriptioneditors.handlers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.List;
+import java.util.Optional;
+import java.util.UUID;
+
+import org.eclipse.sirius.components.collaborative.api.ChangeDescription;
+import org.eclipse.sirius.components.collaborative.api.ChangeKind;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.FormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.TestFormDescriptionEditorBuilder;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorContext;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.MovePageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.messages.ICollaborativeFormDescriptionEditorMessageService;
+import org.eclipse.sirius.components.core.api.IEditingContext;
+import org.eclipse.sirius.components.core.api.IObjectService;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.core.api.SuccessPayload;
+import org.eclipse.sirius.components.formdescriptioneditors.FormDescriptionEditor;
+import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.junit.jupiter.api.Test;
+
+import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
+import reactor.core.publisher.Sinks;
+
+/**
+ * Tests of the move page event handler.
+ *
+ * @author frouene
+ */
+public class MovePageEventHandlerTests {
+
+ @Test
+ public void testMovePageAction() {
+
+ FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription1 = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription1);
+ PageDescription pageDescription2 = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription2);
+ PageDescription pageDescription3 = ViewFactory.eINSTANCE.createPageDescription();
+ formDescription.getPages().add(pageDescription3);
+
+
+ FormDescriptionEditor formDescriptionEditor = new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString());
+
+ var objectService = new IObjectService.NoOp() {
+ @Override
+ public Optional getObject(IEditingContext editingContext, String objectId) {
+ Optional result = Optional.empty();
+ if (formDescriptionEditor.getTargetObjectId().equals(objectId)) {
+ result = Optional.of(formDescription);
+ } else if ("page1".equals(objectId)) {
+ result = Optional.of(pageDescription1);
+ } else if ("page2".equals(objectId)) {
+ result = Optional.of(pageDescription2);
+ } else if ("page3".equals(objectId)) {
+ result = Optional.of(pageDescription3);
+ }
+ return result;
+ }
+ };
+
+ this.invokMove(formDescriptionEditor, objectService, "page2", 0);
+ assertThat(formDescription.getPages()).isEqualTo(List.of(pageDescription2, pageDescription1, pageDescription3));
+ this.invokMove(formDescriptionEditor, objectService, "page1", 2);
+ assertThat(formDescription.getPages()).isEqualTo(List.of(pageDescription2, pageDescription3, pageDescription1));
+
+ }
+
+ private void invokMove(FormDescriptionEditor formDescriptionEditor, IObjectService.NoOp objectService, String pageId, int index) {
+ var handler = new MovePageEventHandler(objectService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
+ var input = new MovePageInput(UUID.randomUUID(), "editingContextId", formDescriptionEditor.getId(), pageId, index);
+
+ assertThat(handler.canHandle(input)).isTrue();
+
+ Sinks.One payloadSink = Sinks.one();
+ Sinks.Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
+
+ handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
+
+ ChangeDescription changeDescription = changeDescriptionSink.asFlux().blockFirst();
+ assertThat(changeDescription.getKind()).isEqualTo(ChangeKind.SEMANTIC_CHANGE);
+
+ IPayload payload = payloadSink.asMono().block();
+ assertThat(payload).isInstanceOf(SuccessPayload.class);
+ }
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveToolbarActionEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveToolbarActionEventHandlerTests.java
index d7ba701499..0a9e254e55 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveToolbarActionEventHandlerTests.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/MoveToolbarActionEventHandlerTests.java
@@ -34,6 +34,7 @@
import org.eclipse.sirius.components.view.ButtonDescription;
import org.eclipse.sirius.components.view.FormDescription;
import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewFactory;
import org.junit.jupiter.api.Test;
@@ -48,14 +49,17 @@
* @author arichard
*/
public class MoveToolbarActionEventHandlerTests {
+
@Test
public void testMoveToolbarAction() {
FormDescriptionEditor formDescriptionEditor = new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString());
FormDescription formDescription = ViewFactory.eINSTANCE.createFormDescription();
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
- formDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(pageDescription);
ButtonDescription toolbarButton1 = ViewFactory.eINSTANCE.createButtonDescription();
ButtonDescription toolbarButton2 = ViewFactory.eINSTANCE.createButtonDescription();
ButtonDescription toolbarButton3 = ViewFactory.eINSTANCE.createButtonDescription();
@@ -75,7 +79,7 @@ public Optional getObject(IEditingContext editingContext, String objectI
result = Optional.of(toolbarButton2);
} else if ("button3".equals(objectId)) {
result = Optional.of(toolbarButton3);
- } else if (formDescriptionEditor.getGroups().get(0).getId().equals(objectId)) {
+ } else if (formDescriptionEditor.getPages().get(0).getGroups().get(0).getId().equals(objectId)) {
result = Optional.of(groupDescription);
}
return result;
@@ -90,13 +94,15 @@ public Optional getObject(IEditingContext editingContext, String objectI
private void invokMove(FormDescriptionEditor formDescriptionEditor, NoOp objectService, String toolbarActionId, int index) {
var handler = new MoveToolbarActionEventHandler(objectService, new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
- var input = new MoveToolbarActionInput(UUID.randomUUID(), "editingContextId", formDescriptionEditor.getId(), formDescriptionEditor.getGroups().get(0).getId(), toolbarActionId, index);
+ var input = new MoveToolbarActionInput(UUID.randomUUID(), "editingContextId", formDescriptionEditor.getId(), formDescriptionEditor.getPages().get(0).getGroups().get(0)
+ .getId(), toolbarActionId, index);
assertThat(handler.canHandle(input)).isTrue();
One payloadSink = Sinks.one();
Many changeDescriptionSink = Sinks.many().unicast().onBackpressureBuffer();
- IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID().toString()));
+ IFormDescriptionEditorContext formDescriptionEditorContext = new FormDescriptionEditorContext(new TestFormDescriptionEditorBuilder().getFormDescriptionEditor(UUID.randomUUID()
+ .toString()));
handler.handle(payloadSink, changeDescriptionSink, new IEditingContext.NoOp(), formDescriptionEditorContext, input);
diff --git a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandlerTests.java b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandlerTests.java
index 235dfacd66..098521d04c 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandlerTests.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-collaborative-formdescriptioneditors/src/test/java/org/eclipse/sirius/components/collaborative/formdescriptioneditors/handlers/RenameFormDescriptionEditorEventHandlerTests.java
@@ -40,6 +40,7 @@
* @author arichard
*/
public class RenameFormDescriptionEditorEventHandlerTests {
+
private static final String OLD_LABEL = "oldLabel";
private static final String NEW_LABEL = "newLabel";
@@ -51,14 +52,12 @@ public void testRenameRepresentation() {
String representationId = UUID.randomUUID().toString();
UUID targetObjectId = UUID.randomUUID();
- // @formatter:off
FormDescriptionEditor formDescriptionEditor = FormDescriptionEditor.newFormDescriptionEditor(representationId)
.label(OLD_LABEL)
.descriptionId(formDescriptionEditorDescriptionId)
.targetObjectId(targetObjectId.toString())
- .groups(List.of())
+ .pages(List.of())
.build();
- // @formatter:on
RenameFormDescriptionEditorEventHandler handler = new RenameFormDescriptionEditorEventHandler(new IRepresentationPersistenceService.NoOp(),
new ICollaborativeFormDescriptionEditorMessageService.NoOp(), new SimpleMeterRegistry());
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddPageDataFetcher.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddPageDataFetcher.java
new file mode 100644
index 0000000000..a71f2b8cee
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddPageDataFetcher.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 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.formdescriptioneditors.graphql.datafetchers.mutation;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
+
+import org.eclipse.sirius.components.annotations.spring.graphql.MutationDataFetcher;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.AddPageInput;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates;
+import org.eclipse.sirius.components.graphql.api.IEditingContextDispatcher;
+import org.eclipse.sirius.components.graphql.api.IExceptionWrapper;
+
+import graphql.schema.DataFetchingEnvironment;
+
+/**
+ * The data fetcher used to add a page from a Form Description Editor.
+ *
+ * @author frouene
+ */
+@MutationDataFetcher(type = "Mutation", field = "addPage")
+public class MutationAddPageDataFetcher implements IDataFetcherWithFieldCoordinates> {
+
+ private static final String INPUT_ARGUMENT = "input";
+
+ private final ObjectMapper objectMapper;
+
+ private final IExceptionWrapper exceptionWrapper;
+
+ private final IEditingContextDispatcher editingContextDispatcher;
+
+ public MutationAddPageDataFetcher(ObjectMapper objectMapper, IExceptionWrapper exceptionWrapper, IEditingContextDispatcher editingContextDispatcher) {
+ this.objectMapper = Objects.requireNonNull(objectMapper);
+ this.exceptionWrapper = Objects.requireNonNull(exceptionWrapper);
+ this.editingContextDispatcher = Objects.requireNonNull(editingContextDispatcher);
+ }
+
+ @Override
+ public CompletableFuture get(DataFetchingEnvironment environment) throws Exception {
+ Object argument = environment.getArgument(INPUT_ARGUMENT);
+ var input = this.objectMapper.convertValue(argument, AddPageInput.class);
+
+ return this.exceptionWrapper.wrapMono(() -> this.editingContextDispatcher.dispatchMutation(input.editingContextId(), input), input).toFuture();
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationDeletePageDataFetcher.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationDeletePageDataFetcher.java
new file mode 100644
index 0000000000..6acf264cd5
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationDeletePageDataFetcher.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 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.formdescriptioneditors.graphql.datafetchers.mutation;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
+
+import org.eclipse.sirius.components.annotations.spring.graphql.MutationDataFetcher;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.DeletePageInput;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates;
+import org.eclipse.sirius.components.graphql.api.IEditingContextDispatcher;
+import org.eclipse.sirius.components.graphql.api.IExceptionWrapper;
+
+import graphql.schema.DataFetchingEnvironment;
+
+/**
+ * The data fetcher used to delete a page from a Form Description Editor.
+ *
+ * @author frouene
+ */
+@MutationDataFetcher(type = "Mutation", field = "deletePage")
+public class MutationDeletePageDataFetcher implements IDataFetcherWithFieldCoordinates> {
+
+ private static final String INPUT_ARGUMENT = "input";
+
+ private final ObjectMapper objectMapper;
+
+ private final IExceptionWrapper exceptionWrapper;
+
+ private final IEditingContextDispatcher editingContextDispatcher;
+
+ public MutationDeletePageDataFetcher(ObjectMapper objectMapper, IExceptionWrapper exceptionWrapper, IEditingContextDispatcher editingContextDispatcher) {
+ this.objectMapper = Objects.requireNonNull(objectMapper);
+ this.exceptionWrapper = Objects.requireNonNull(exceptionWrapper);
+ this.editingContextDispatcher = Objects.requireNonNull(editingContextDispatcher);
+ }
+
+ @Override
+ public CompletableFuture get(DataFetchingEnvironment environment) throws Exception {
+ Object argument = environment.getArgument(INPUT_ARGUMENT);
+ var input = this.objectMapper.convertValue(argument, DeletePageInput.class);
+
+ return this.exceptionWrapper.wrapMono(() -> this.editingContextDispatcher.dispatchMutation(input.editingContextId(), input), input).toFuture();
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationMovePageDataFetcher.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationMovePageDataFetcher.java
new file mode 100644
index 0000000000..b239f33746
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationMovePageDataFetcher.java
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * Copyright (c) 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.formdescriptioneditors.graphql.datafetchers.mutation;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Objects;
+import java.util.concurrent.CompletableFuture;
+
+import org.eclipse.sirius.components.annotations.spring.graphql.MutationDataFetcher;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.MovePageInput;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates;
+import org.eclipse.sirius.components.graphql.api.IEditingContextDispatcher;
+import org.eclipse.sirius.components.graphql.api.IExceptionWrapper;
+
+import graphql.schema.DataFetchingEnvironment;
+
+/**
+ * The data fetcher used to move a page from a Form Description Editor.
+ *
+ * @author frouene
+ */
+@MutationDataFetcher(type = "Mutation", field = "movePage")
+public class MutationMovePageDataFetcher implements IDataFetcherWithFieldCoordinates> {
+
+ private static final String INPUT_ARGUMENT = "input";
+
+ private final ObjectMapper objectMapper;
+
+ private final IExceptionWrapper exceptionWrapper;
+
+ private final IEditingContextDispatcher editingContextDispatcher;
+
+ public MutationMovePageDataFetcher(ObjectMapper objectMapper, IExceptionWrapper exceptionWrapper, IEditingContextDispatcher editingContextDispatcher) {
+ this.objectMapper = Objects.requireNonNull(objectMapper);
+ this.exceptionWrapper = Objects.requireNonNull(exceptionWrapper);
+ this.editingContextDispatcher = Objects.requireNonNull(editingContextDispatcher);
+ }
+
+ @Override
+ public CompletableFuture get(DataFetchingEnvironment environment) throws Exception {
+ Object argument = environment.getArgument(INPUT_ARGUMENT);
+ var input = this.objectMapper.convertValue(argument, MovePageInput.class);
+
+ return this.exceptionWrapper.wrapMono(() -> this.editingContextDispatcher.dispatchMutation(input.editingContextId(), input), input).toFuture();
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/FormDescriptionEditor.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/FormDescriptionEditor.java
index ea018260d6..1e0aee8365 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/FormDescriptionEditor.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/FormDescriptionEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -17,7 +17,7 @@
import java.util.Objects;
import org.eclipse.sirius.components.annotations.Immutable;
-import org.eclipse.sirius.components.forms.Group;
+import org.eclipse.sirius.components.forms.Page;
import org.eclipse.sirius.components.representations.IRepresentation;
import org.eclipse.sirius.components.representations.ISemanticRepresentation;
@@ -43,7 +43,7 @@ public final class FormDescriptionEditor implements IRepresentation, ISemanticRe
private String descriptionId;
- private List groups;
+ private List pages;
private FormDescriptionEditor() {
// Prevent instantiation
@@ -74,8 +74,8 @@ public String getDescriptionId() {
return this.descriptionId;
}
- public List getGroups() {
- return this.groups;
+ public List getPages() {
+ return this.pages;
}
public static Builder newFormDescriptionEditor(String id) {
@@ -99,6 +99,7 @@ public String toString() {
*/
@SuppressWarnings("checkstyle:HiddenField")
public static final class Builder {
+
private String id;
private String kind = KIND;
@@ -109,7 +110,7 @@ public static final class Builder {
private String descriptionId;
- private List groups;
+ private List pages;
private Builder(String id) {
this.id = Objects.requireNonNull(id);
@@ -120,7 +121,7 @@ public Builder(FormDescriptionEditor formDescriptionEditor) {
this.label = formDescriptionEditor.label;
this.targetObjectId = formDescriptionEditor.targetObjectId;
this.descriptionId = formDescriptionEditor.descriptionId;
- this.groups = formDescriptionEditor.groups;
+ this.pages = formDescriptionEditor.pages;
}
public Builder label(String label) {
@@ -138,8 +139,8 @@ public Builder descriptionId(String descriptionId) {
return this;
}
- public Builder groups(List groups) {
- this.groups = Objects.requireNonNull(groups);
+ public Builder pages(List pages) {
+ this.pages = Objects.requireNonNull(pages);
return this;
}
@@ -150,7 +151,7 @@ public FormDescriptionEditor build() {
formDescriptionEditor.label = Objects.requireNonNull(this.label);
formDescriptionEditor.targetObjectId = Objects.requireNonNull(this.targetObjectId);
formDescriptionEditor.descriptionId = Objects.requireNonNull(this.descriptionId);
- formDescriptionEditor.groups = Objects.requireNonNull(this.groups);
+ formDescriptionEditor.pages = Objects.requireNonNull(this.pages);
return formDescriptionEditor;
}
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorComponent.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorComponent.java
index 5d75d55e0b..7a9e40f03d 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorComponent.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorComponent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -47,31 +47,28 @@ public Element render() {
var optionalPreviousFormDescriptionEditor = this.props.getOptionalPreviousFormDescriptionEditor();
String id = optionalPreviousFormDescriptionEditor.map(FormDescriptionEditor::getId).orElseGet(() -> UUID.randomUUID().toString());
- // @formatter:off
String label = optionalPreviousFormDescriptionEditor.map(FormDescriptionEditor::getLabel)
.orElseGet(() -> variableManager.get(FormDescriptionEditor.LABEL, String.class)
- .orElse("Form Description Editor"));
- // @formatter:on
+ .orElse("Form Description Editor"));
Function targetObjectIdProvider = formDescriptionEditorDescription.getTargetObjectIdProvider();
String targetObjectId = targetObjectIdProvider.apply(variableManager);
List childrenWidgets = new ArrayList<>();
- formDescription.getGroups().forEach(viewGroupDescription -> {
+ formDescription.getPages().forEach(viewPageDescription -> {
VariableManager childVariableManager = variableManager.createChild();
- childVariableManager.put(VariableManager.SELF, viewGroupDescription);
- FormDescriptionEditorGroupComponentProps fdeGroupComponentProps = new FormDescriptionEditorGroupComponentProps(childVariableManager, this.props.getFormDescriptionEditorDescription());
- childrenWidgets.add(new Element(FormDescriptionEditorGroupComponent.class, fdeGroupComponentProps));
+ childVariableManager.put(VariableManager.SELF, viewPageDescription);
+ FormDescriptionEditorPageComponentProps formDescriptionEditorPageComponentProps = new FormDescriptionEditorPageComponentProps(childVariableManager,
+ this.props.getFormDescriptionEditorDescription());
+ childrenWidgets.add(new Element(FormDescriptionEditorPageComponent.class, formDescriptionEditorPageComponentProps));
});
- // @formatter:off
FormDescriptionEditorElementProps formDescriptionEditorElementProps = FormDescriptionEditorElementProps.newFormDescriptionEditorElementProps(id)
.label(label)
.targetObjectId(targetObjectId)
.descriptionId(formDescriptionEditorDescription.getId())
.children(childrenWidgets)
.build();
- // @formatter:on
return new Element(FormDescriptionEditorElementProps.TYPE, formDescriptionEditorElementProps);
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorGroupComponent.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorGroupComponent.java
index 0194258d40..73ce1f13d0 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorGroupComponent.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorGroupComponent.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -72,13 +72,11 @@ public Element render() {
childrenWidgets.add(new Element(WidgetComponent.class, widgetComponentProps));
});
- // @formatter:off
GroupElementProps groupElementProps = GroupElementProps.newGroupElementProps(id)
.label(label)
.displayMode(this.getGroupDisplayMode(groupDescription))
.children(childrenWidgets)
.build();
- // @formatter:on
return new Element(GroupElementProps.TYPE, groupElementProps);
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponent.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponent.java
new file mode 100644
index 0000000000..58548917c1
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponent.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 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.formdescriptioneditors.components;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.sirius.components.forms.elements.PageElementProps;
+import org.eclipse.sirius.components.representations.Element;
+import org.eclipse.sirius.components.representations.IComponent;
+import org.eclipse.sirius.components.representations.VariableManager;
+import org.eclipse.sirius.components.view.PageDescription;
+
+/**
+ * The component used to render the form description editor page.
+ *
+ * @author frouene
+ */
+public class FormDescriptionEditorPageComponent implements IComponent {
+
+ private static final String AQL_PREFIX = "aql:";
+
+ private final FormDescriptionEditorPageComponentProps props;
+
+
+ public FormDescriptionEditorPageComponent(FormDescriptionEditorPageComponentProps props) {
+ this.props = props;
+ }
+
+ @Override
+ public Element render() {
+ VariableManager variableManager = this.props.variableManager();
+ var pageDescription = variableManager.get(VariableManager.SELF, PageDescription.class).get();
+ String id = this.props.formDescriptionEditorDescription().getTargetObjectIdProvider().apply(variableManager);
+ String label = this.getPageLabel(pageDescription, "Page");
+ List childrenWidgets = new ArrayList<>();
+
+ pageDescription.getGroups().forEach(viewGroupDescription -> {
+ VariableManager childVariableManager = variableManager.createChild();
+ childVariableManager.put(VariableManager.SELF, viewGroupDescription);
+ FormDescriptionEditorGroupComponentProps fdeGroupComponentProps = new FormDescriptionEditorGroupComponentProps(childVariableManager, this.props.formDescriptionEditorDescription());
+ childrenWidgets.add(new Element(FormDescriptionEditorGroupComponent.class, fdeGroupComponentProps));
+ });
+
+ PageElementProps pageElementProps = PageElementProps.newPageElementProps(id)
+ .label(label)
+ .children(childrenWidgets)
+ .build();
+
+ return new Element(PageElementProps.TYPE, pageElementProps);
+ }
+
+
+ public String getPageLabel(PageDescription pageDescription, String defaultLabel) {
+ String widgetLabel = defaultLabel;
+ String name = pageDescription.getName();
+ String labelExpression = pageDescription.getLabelExpression();
+ if (labelExpression != null && !labelExpression.isBlank() && !labelExpression.startsWith(AQL_PREFIX)) {
+ widgetLabel = labelExpression;
+ } else if (name != null && !name.isBlank()) {
+ widgetLabel = name;
+ }
+ return widgetLabel;
+ }
+
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponentProps.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponentProps.java
new file mode 100644
index 0000000000..dbb9e17be3
--- /dev/null
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/components/FormDescriptionEditorPageComponentProps.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2022, 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.formdescriptioneditors.components;
+
+import java.util.Objects;
+
+import org.eclipse.sirius.components.formdescriptioneditors.description.FormDescriptionEditorDescription;
+import org.eclipse.sirius.components.representations.IProps;
+import org.eclipse.sirius.components.representations.VariableManager;
+
+/**
+ * * The properties of the form description editor page component.
+ *
+ * @author arichard
+ */
+public record FormDescriptionEditorPageComponentProps(VariableManager variableManager, FormDescriptionEditorDescription formDescriptionEditorDescription) implements IProps {
+
+ public FormDescriptionEditorPageComponentProps(VariableManager variableManager, FormDescriptionEditorDescription formDescriptionEditorDescription) {
+ this.variableManager = Objects.requireNonNull(variableManager);
+ this.formDescriptionEditorDescription = Objects.requireNonNull(formDescriptionEditorDescription);
+ }
+}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorComponentPropsValidator.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorComponentPropsValidator.java
index 6071c5eab1..1bfaf8045e 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorComponentPropsValidator.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorComponentPropsValidator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -16,6 +16,8 @@
import org.eclipse.sirius.components.formdescriptioneditors.components.FormDescriptionEditorComponentProps;
import org.eclipse.sirius.components.formdescriptioneditors.components.FormDescriptionEditorGroupComponent;
import org.eclipse.sirius.components.formdescriptioneditors.components.FormDescriptionEditorGroupComponentProps;
+import org.eclipse.sirius.components.formdescriptioneditors.components.FormDescriptionEditorPageComponent;
+import org.eclipse.sirius.components.formdescriptioneditors.components.FormDescriptionEditorPageComponentProps;
import org.eclipse.sirius.components.forms.renderer.FormComponentPropsValidator;
import org.eclipse.sirius.components.representations.IComponentPropsValidator;
import org.eclipse.sirius.components.representations.IProps;
@@ -41,6 +43,8 @@ public boolean validateComponentProps(Class> componentType, IProps props) {
checkValidProps = props instanceof FormDescriptionEditorComponentProps;
} else if (FormDescriptionEditorGroupComponent.class.equals(componentType)) {
checkValidProps = props instanceof FormDescriptionEditorGroupComponentProps;
+ } else if (FormDescriptionEditorPageComponent.class.equals(componentType)) {
+ checkValidProps = props instanceof FormDescriptionEditorPageComponentProps;
} else {
checkValidProps = this.formComponentPropsValidator.validateComponentProps(componentType, props);
}
diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorElementFactory.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorElementFactory.java
index 3fff40bb61..17367883b6 100644
--- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorElementFactory.java
+++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/renderer/FormDescriptionEditorElementFactory.java
@@ -16,7 +16,7 @@
import org.eclipse.sirius.components.formdescriptioneditors.FormDescriptionEditor;
import org.eclipse.sirius.components.formdescriptioneditors.elements.FormDescriptionEditorElementProps;
-import org.eclipse.sirius.components.forms.Group;
+import org.eclipse.sirius.components.forms.Page;
import org.eclipse.sirius.components.forms.renderer.FormElementFactory;
import org.eclipse.sirius.components.representations.IElementFactory;
import org.eclipse.sirius.components.representations.IProps;
@@ -46,19 +46,17 @@ public Object instantiateElement(String type, IProps props, List childre
}
private FormDescriptionEditor instantiateFormDescriptionEditor(FormDescriptionEditorElementProps props, List children) {
- // @formatter:off
- List groups = children.stream()
- .filter(Group.class::isInstance)
- .map(Group.class::cast)
+ List pages = children.stream()
+ .filter(Page.class::isInstance)
+ .map(Page.class::cast)
.toList();
return FormDescriptionEditor.newFormDescriptionEditor(props.getId())
.label(props.getLabel())
.targetObjectId(props.getTargetObjectId())
.descriptionId(props.getDescriptionId())
- .groups(groups)
+ .pages(pages)
.build();
- // @formatter:on
}
}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FlexboxContainerWidget.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FlexboxContainerWidget.tsx
index e88e5dc42a..d64d120d01 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FlexboxContainerWidget.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FlexboxContainerWidget.tsx
@@ -11,7 +11,7 @@
* Obeo - initial API and implementation
*******************************************************************************/
import { useMutation } from '@apollo/client';
-import { GQLGroup, GQLToolbarAction, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
+import { GQLWidget } from '@eclipse-sirius/sirius-components-forms';
import IconButton from '@material-ui/core/IconButton';
import Snackbar from '@material-ui/core/Snackbar';
import { makeStyles, Theme } from '@material-ui/core/styles';
@@ -33,7 +33,7 @@ import {
} from './FormDescriptionEditorEventFragment.types';
import { WidgetEntry } from './WidgetEntry';
import { FlexboxContainerWidgetProps } from './WidgetEntry.types';
-import { getAllToolbarActions, isKind } from './WidgetOperations';
+import { isKind } from './WidgetOperations';
const isErrorPayload = (payload: GQLAddWidgetPayload | GQLMoveWidgetPayload): payload is GQLErrorPayload =>
payload.__typename === 'ErrorPayload';
@@ -76,6 +76,7 @@ export const FlexboxContainerWidget = ({
editingContextId,
representationId,
formDescriptionEditor,
+ page,
widget,
selection,
setSelection,
@@ -166,13 +167,9 @@ export const FlexboxContainerWidget = ({
event.preventDefault();
event.currentTarget.classList.remove(classes.dragOver);
- const id: string = event.dataTransfer.getData('text/plain');
-
- if (id === 'Group') {
- return;
- } else if (getAllToolbarActions(formDescriptionEditor).find((tba: GQLToolbarAction) => tba.id === id)) {
- return;
- } else if (formDescriptionEditor.groups.find((g: GQLGroup) => g.id === id)) {
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
+ if (type !== 'Widget') {
return;
}
@@ -213,6 +210,7 @@ export const FlexboxContainerWidget = ({
editingContextId={editingContextId}
representationId={representationId}
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={widget}
widget={childWidget}
selection={selection}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.ts
index c8e1606df6..9a79f9953b 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.ts
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.ts
@@ -33,18 +33,26 @@ export const formDescriptionEditorEventSubscription = gql`
id
formDescriptionEditor {
id
- groups {
+ pages {
id
label
- displayMode
toolbarActions {
...commonFields
...toolbarActionFields
}
- widgets {
- ...widgetFields
- ... on FlexboxContainer {
- ...flexboxContainerFields
+ groups {
+ id
+ label
+ displayMode
+ toolbarActions {
+ ...commonFields
+ ...toolbarActionFields
+ }
+ widgets {
+ ...widgetFields
+ ... on FlexboxContainer {
+ ...flexboxContainerFields
+ }
}
}
}
@@ -179,3 +187,45 @@ export const moveToolbarActionMutation = gql`
}
}
`;
+
+export const addPageMutation = gql`
+ mutation addPage($input: AddPageInput!) {
+ addPage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ id
+ }
+ ... on ErrorPayload {
+ message
+ }
+ }
+ }
+`;
+
+export const movePageMutation = gql`
+ mutation movePage($input: MovePageInput!) {
+ movePage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ id
+ }
+ ... on ErrorPayload {
+ message
+ }
+ }
+ }
+`;
+
+export const deletePageMutation = gql`
+ mutation deletePage($input: DeletePageInput!) {
+ deletePage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ id
+ }
+ ... on ErrorPayload {
+ message
+ }
+ }
+ }
+`;
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.types.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.types.ts
index 7262053681..94a5118df2 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.types.ts
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorEventFragment.types.ts
@@ -11,7 +11,7 @@
* Obeo - initial API and implementation
*******************************************************************************/
-import { GQLGroup } from '@eclipse-sirius/sirius-components-forms';
+import { GQLPage } from '@eclipse-sirius/sirius-components-forms';
export interface GQLFormDescriptionEditorEventSubscription {
formDescriptionEditorEvent: GQLFormDescriptionEditorEventPayload;
@@ -59,7 +59,7 @@ export interface GQLRepresentation {
export interface GQLFormDescriptionEditor extends GQLRepresentation {
id: string;
- groups: GQLGroup[];
+ pages: GQLPage[];
}
export interface GQLAddWidgetInput {
@@ -185,6 +185,7 @@ export interface GQLAddGroupInput {
id: string;
editingContextId: string;
representationId: string;
+ pageId: string;
index: number;
}
@@ -223,6 +224,7 @@ export interface GQLMoveGroupInput {
id: string;
editingContextId: string;
representationId: string;
+ pageId: string;
groupId: string;
index: number;
}
@@ -239,6 +241,64 @@ export interface GQLMoveGroupPayload {
__typename: string;
}
+export interface GQLAddPageInput {
+ id: string;
+ editingContextId: string;
+ representationId: string;
+ index: number;
+}
+
+export interface GQLAddPageMutationVariables {
+ input: GQLAddPageInput;
+}
+
+export interface GQLAddPageMutationData {
+ addPage: GQLAddPagePayload;
+}
+
+export interface GQLAddPagePayload {
+ __typename: string;
+}
+
+export interface GQLMovePageInput {
+ id: string;
+ editingContextId: string;
+ representationId: string;
+ pageId: string;
+ index: number;
+}
+
+export interface GQLMovePageMutationVariables {
+ input: GQLMovePageInput;
+}
+
+export interface GQLMovePageMutationData {
+ movePage: GQLMovePagePayload;
+}
+
+export interface GQLMovePagePayload {
+ __typename: string;
+}
+
+export interface GQLDeletePageInput {
+ id: string;
+ editingContextId: string;
+ representationId: string;
+ pageId: string;
+}
+
+export interface GQLDeletePageMutationVariables {
+ input: GQLDeletePageInput;
+}
+
+export interface GQLDeletePageMutationData {
+ deletePage: GQLMovePagePayload;
+}
+
+export interface GQLDeletePagePayload {
+ __typename: string;
+}
+
export interface GQLErrorPayload
extends GQLAddWidgetPayload,
GQLDeleteWidgetPayload,
@@ -248,7 +308,10 @@ export interface GQLErrorPayload
GQLMoveToolbarActionPayload,
GQLAddGroupPayload,
GQLDeleteGroupPayload,
- GQLMoveGroupPayload {
+ GQLMoveGroupPayload,
+ GQLAddPagePayload,
+ GQLMovePagePayload,
+ GQLDeletePagePayload {
message: string;
}
@@ -261,6 +324,9 @@ export interface GQLSuccessPayload
GQLMoveToolbarActionPayload,
GQLAddGroupPayload,
GQLDeleteGroupPayload,
- GQLMoveGroupPayload {
+ GQLMoveGroupPayload,
+ GQLAddPagePayload,
+ GQLMovePagePayload,
+ GQLDeletePagePayload {
id: string;
}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorRepresentation.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorRepresentation.tsx
index b6ca6d245a..59b181bb54 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorRepresentation.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/FormDescriptionEditorRepresentation.tsx
@@ -10,7 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-import { useMutation, useSubscription } from '@apollo/client';
+import { useSubscription } from '@apollo/client';
import { RepresentationComponentProps } from '@eclipse-sirius/sirius-components-core';
import Avatar from '@material-ui/core/Avatar';
import IconButton from '@material-ui/core/IconButton';
@@ -32,26 +32,14 @@ import TextFieldsIcon from '@material-ui/icons/TextFields';
import TextFormatIcon from '@material-ui/icons/TextFormat';
import ViewAgendaIcon from '@material-ui/icons/ViewAgenda';
import ViewColumnIcon from '@material-ui/icons/ViewColumn';
+import WebIcon from '@material-ui/icons/Web';
import { useMachine } from '@xstate/react';
import React, { useEffect } from 'react';
+import { formDescriptionEditorEventSubscription } from './FormDescriptionEditorEventFragment';
import {
- addGroupMutation,
- formDescriptionEditorEventSubscription,
- moveGroupMutation,
-} from './FormDescriptionEditorEventFragment';
-import {
- GQLAddGroupInput,
- GQLAddGroupMutationData,
- GQLAddGroupMutationVariables,
- GQLAddWidgetPayload,
- GQLErrorPayload,
GQLFormDescriptionEditorEventInput,
GQLFormDescriptionEditorEventSubscription,
GQLFormDescriptionEditorEventVariables,
- GQLMoveGroupInput,
- GQLMoveGroupMutationData,
- GQLMoveGroupMutationVariables,
- GQLMoveWidgetPayload,
} from './FormDescriptionEditorEventFragment.types';
import {
FormDescriptionEditorRepresentationContext,
@@ -63,12 +51,8 @@ import {
SchemaValue,
ShowToastEvent,
} from './FormDescriptionEditorRepresentationMachine';
-import { Group } from './Group';
import { Button } from './icons/Button';
-import { isKind } from './WidgetOperations';
-
-const isErrorPayload = (payload: GQLAddWidgetPayload | GQLMoveWidgetPayload): payload is GQLErrorPayload =>
- payload.__typename === 'ErrorPayload';
+import { PageList } from './PageList';
const useFormDescriptionEditorStyles = makeStyles((theme) => ({
formDescriptionEditor: {
@@ -196,52 +180,6 @@ export const FormDescriptionEditorRepresentation = ({
}
);
- const [addGroup, { loading: addGroupLoading, data: addGroupData, error: addGroupError }] = useMutation<
- GQLAddGroupMutationData,
- GQLAddGroupMutationVariables
- >(addGroupMutation);
-
- useEffect(() => {
- if (!addGroupLoading) {
- if (addGroupError) {
- const message: string = addGroupError.message;
- const showToastEvent: ShowToastEvent = { type: 'SHOW_TOAST', message };
- dispatch(showToastEvent);
- }
- if (addGroupData) {
- const { addGroup } = addGroupData;
- if (isErrorPayload(addGroup)) {
- const { message } = addGroup;
- const showToastEvent: ShowToastEvent = { type: 'SHOW_TOAST', message };
- dispatch(showToastEvent);
- }
- }
- }
- }, [addGroupLoading, addGroupData, addGroupError, dispatch]);
-
- const [moveGroup, { loading: moveGroupLoading, data: moveGroupData, error: moveGroupError }] = useMutation<
- GQLMoveGroupMutationData,
- GQLMoveGroupMutationVariables
- >(moveGroupMutation);
-
- useEffect(() => {
- if (!moveGroupLoading) {
- if (moveGroupError) {
- const message: string = moveGroupError.message;
- const showToastEvent: ShowToastEvent = { type: 'SHOW_TOAST', message };
- dispatch(showToastEvent);
- }
- if (moveGroupData) {
- const { moveGroup } = moveGroupData;
- if (isErrorPayload(moveGroup)) {
- const { message } = moveGroup;
- const showToastEvent: ShowToastEvent = { type: 'SHOW_TOAST', message };
- dispatch(showToastEvent);
- }
- }
- }
- }, [moveGroupLoading, moveGroupData, moveGroupError, dispatch]);
-
useEffect(() => {
if (error) {
const message: string = 'An error has occurred while trying to retrieve the form description editor';
@@ -260,57 +198,19 @@ export const FormDescriptionEditorRepresentation = ({
}
}, [formDescriptionEditorRepresentation, dispatch]);
- const handleDragStart: React.DragEventHandler = (event) => {
- event.dataTransfer.setData('text/plain', event.currentTarget.id);
- };
- const handleDragEnter: React.DragEventHandler = (event) => {
- event.preventDefault();
- event.currentTarget.classList.add(classes.dragOver);
+ const handleDragStartPage: React.DragEventHandler = (event) => {
+ event.dataTransfer.setData('draggedElementId', event.currentTarget.id);
+ event.dataTransfer.setData('draggedElementType', 'Page');
};
- const handleDragOver: React.DragEventHandler = (event) => {
- event.preventDefault();
- event.currentTarget.classList.add(classes.dragOver);
- };
- const handleDragLeave: React.DragEventHandler = (event) => {
- event.preventDefault();
- event.currentTarget.classList.remove(classes.dragOver);
- };
- const handleDrop: React.DragEventHandler = (event) => {
- event.preventDefault();
- event.currentTarget.classList.remove(classes.dragOver);
- const id: string = event.dataTransfer.getData('text/plain');
- let index = formDescriptionEditor.groups.length;
+ const handleDragStartGroup: React.DragEventHandler = (event) => {
+ event.dataTransfer.setData('draggedElementId', event.currentTarget.id);
+ event.dataTransfer.setData('draggedElementType', 'Group');
+ };
- if (id === 'Group') {
- const addGroupInput: GQLAddGroupInput = {
- id: crypto.randomUUID(),
- editingContextId,
- representationId,
- index,
- };
- const addGroupVariables: GQLAddGroupMutationVariables = { input: addGroupInput };
- addGroup({ variables: addGroupVariables });
- } else if (isKind(id)) {
- // forbid to drag and drop new widgets into groups area
- return;
- } else {
- if (formDescriptionEditor.groups.find((g) => g.id === id)) {
- index--;
- } else {
- // forbid to drag and drop existing widgets or toolbarActions into groups area
- return;
- }
- const moveGroupInput: GQLMoveGroupInput = {
- id: crypto.randomUUID(),
- editingContextId,
- representationId,
- groupId: id,
- index,
- };
- const moveGroupVariables: GQLMoveGroupMutationVariables = { input: moveGroupInput };
- moveGroup({ variables: moveGroupVariables });
- }
+ const handleDragStartWidget: React.DragEventHandler = (event) => {
+ event.dataTransfer.setData('draggedElementId', event.currentTarget.id);
+ event.dataTransfer.setData('draggedElementType', 'Widget');
};
let content: JSX.Element | null = null;
@@ -319,13 +219,25 @@ export const FormDescriptionEditorRepresentation = ({
content = (
+
Pages
+
+
+
+ Page
+
+
Groups
+ onDragStart={handleDragStartGroup}>
Group
@@ -337,7 +249,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-BarChart"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
BarChart
@@ -348,7 +260,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Button"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Button
@@ -359,7 +271,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Checkbox"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Checkbox
@@ -370,7 +282,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-FlexboxContainer"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Flexbox Container
@@ -381,7 +293,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Image"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Image
@@ -392,7 +304,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Label"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Label
@@ -403,7 +315,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Link"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Link
@@ -414,7 +326,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-List"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
List
@@ -425,7 +337,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-MultiSelect"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
MultiSelect
@@ -436,7 +348,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-PieChart"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
PieChart
@@ -447,7 +359,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Radio"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Radio
@@ -458,7 +370,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-RichText"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
RichText
@@ -469,7 +381,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Select"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Select
@@ -480,7 +392,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-TextArea"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Textarea
@@ -491,7 +403,7 @@ export const FormDescriptionEditorRepresentation = ({
data-testid="FormDescriptionEditor-Textfield"
draggable="true"
className={classes.widgetKind}
- onDragStart={handleDragStart}>
+ onDragStart={handleDragStartWidget}>
Textfield
@@ -500,26 +412,13 @@ export const FormDescriptionEditorRepresentation = ({
- {formDescriptionEditor.groups.map((group) => (
-
- ))}
-
- {'Drag and drop a group here'}
-
+
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.tsx
index 5fd1dad858..3b02b07d66 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.tsx
@@ -12,7 +12,7 @@
*******************************************************************************/
import { useMutation } from '@apollo/client';
import { Selection } from '@eclipse-sirius/sirius-components-core';
-import { GQLGroup, GQLToolbarAction, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
+import { GQLWidget } from '@eclipse-sirius/sirius-components-forms';
import IconButton from '@material-ui/core/IconButton';
import Snackbar from '@material-ui/core/Snackbar';
import { makeStyles, Theme, withStyles } from '@material-ui/core/styles';
@@ -54,7 +54,7 @@ import {
import { GroupProps, GroupState } from './Group.types';
import { ToolbarActions } from './ToolbarActions';
import { WidgetEntry } from './WidgetEntry';
-import { getAllToolbarActions, isKind } from './WidgetOperations';
+import { isKind } from './WidgetOperations';
const useGroupEntryStyles = makeStyles
((theme) => ({
group: {
@@ -143,6 +143,7 @@ export const Group = ({
editingContextId,
representationId,
formDescriptionEditor,
+ page,
group,
selection,
setSelection,
@@ -313,7 +314,8 @@ export const Group = ({
};
const handleDragStart: React.DragEventHandler = (event: React.DragEvent) => {
- event.dataTransfer.setData('text/plain', group.id);
+ event.dataTransfer.setData('draggedElementId', group.id);
+ event.dataTransfer.setData('draggedElementType', 'Group');
};
const handleDragEnter: React.DragEventHandler = (event: React.DragEvent) => {
event.preventDefault();
@@ -331,12 +333,15 @@ export const Group = ({
event.preventDefault();
event.currentTarget.classList.remove(classes.dragOver);
- const id: string = event.dataTransfer.getData('text/plain');
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
- if (isKind(id)) {
+ if (type !== 'Group') {
return;
- } else if (id === 'Group') {
- let newGroupIndex: number = formDescriptionEditor.groups.indexOf(group);
+ }
+
+ if (id === 'Group') {
+ let newGroupIndex: number = page.groups.indexOf(group);
if (newGroupIndex <= 0) {
newGroupIndex = 0;
}
@@ -344,16 +349,17 @@ export const Group = ({
id: crypto.randomUUID(),
editingContextId,
representationId,
+ pageId: page.id,
index: newGroupIndex,
};
const addGroupVariables: GQLAddGroupMutationVariables = { input: addGroupInput };
addGroup({ variables: addGroupVariables });
- } else if (formDescriptionEditor.groups.find((g) => g.id === id)) {
- let groupNewIndex: number = formDescriptionEditor.groups.indexOf(group);
+ } else if (page.groups.find((g) => g.id === id)) {
+ let groupNewIndex: number = page.groups.indexOf(group);
if (groupNewIndex <= 0) {
groupNewIndex = 0;
}
- const movedGroupIndex = formDescriptionEditor.groups.findIndex((g) => g.id === id);
+ const movedGroupIndex = page.groups.findIndex((g) => g.id === id);
if (movedGroupIndex > -1 && movedGroupIndex < groupNewIndex) {
groupNewIndex--;
}
@@ -361,6 +367,7 @@ export const Group = ({
id: crypto.randomUUID(),
editingContextId,
representationId,
+ pageId: page.id,
groupId: id,
index: groupNewIndex,
};
@@ -372,16 +379,16 @@ export const Group = ({
event.preventDefault();
event.currentTarget.classList.remove(classes.dragOver);
- const id: string = event.dataTransfer.getData('text/plain');
- let widgetIndex = group.widgets.length;
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
- if (id === 'Group') {
- return;
- } else if (formDescriptionEditor.groups.find((g: GQLGroup) => g.id === id)) {
+ if (type !== 'Widget') {
return;
- } else if (getAllToolbarActions(formDescriptionEditor).find((tba: GQLToolbarAction) => tba.id === id)) {
- return;
- } else if (isKind(id)) {
+ }
+
+ let widgetIndex = group.widgets.length;
+
+ if (isKind(id)) {
const addWidgetInput: GQLAddWidgetInput = {
id: crypto.randomUUID(),
editingContextId,
@@ -494,6 +501,7 @@ export const Group = ({
editingContextId={editingContextId}
representationId={representationId}
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={group}
widget={widget}
selection={selection}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.types.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.types.ts
index 5690a14dcb..2eb95c341f 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.types.ts
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Group.types.ts
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -11,13 +11,14 @@
* Obeo - initial API and implementation
*******************************************************************************/
import { Selection } from '@eclipse-sirius/sirius-components-core';
-import { GQLGroup } from '@eclipse-sirius/sirius-components-forms';
+import { GQLGroup, GQLPage } from '@eclipse-sirius/sirius-components-forms';
import { GQLFormDescriptionEditor } from './FormDescriptionEditorEventFragment.types';
export interface GroupProps {
editingContextId: string;
representationId: string;
formDescriptionEditor: GQLFormDescriptionEditor;
+ page: GQLPage;
group: GQLGroup;
selection: Selection;
setSelection: (newSelection: Selection) => void;
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.tsx
new file mode 100644
index 0000000000..f45471d170
--- /dev/null
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.tsx
@@ -0,0 +1,251 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+import { useMutation } from '@apollo/client';
+import { makeStyles } from '@material-ui/core/styles';
+import Typography from '@material-ui/core/Typography';
+import CloseIcon from '@material-ui/icons/Close';
+import IconButton from '@material-ui/core/IconButton';
+import Snackbar from '@material-ui/core/Snackbar';
+import { Group } from './Group';
+import { PageProps, PageState } from './Page.types';
+import {
+ GQLAddGroupInput,
+ GQLAddGroupMutationData,
+ GQLAddGroupMutationVariables,
+ GQLAddPagePayload,
+ GQLErrorPayload,
+ GQLMoveGroupInput,
+ GQLMoveGroupMutationData,
+ GQLMoveGroupMutationVariables,
+ GQLMovePagePayload,
+} from './FormDescriptionEditorEventFragment.types';
+import { addGroupMutation, moveGroupMutation } from './FormDescriptionEditorEventFragment';
+import React, { useEffect, useRef, useState } from 'react';
+
+const isErrorPayload = (payload: GQLAddPagePayload | GQLMovePagePayload): payload is GQLErrorPayload =>
+ payload.__typename === 'ErrorPayload';
+
+const usePageStyles = makeStyles((theme) => ({
+ page: {
+ display: 'flex',
+ flexDirection: 'column',
+ '& > *': {
+ marginBottom: theme.spacing(2),
+ },
+ overflowY: 'auto',
+ },
+ preview: {
+ width: '100%',
+ padding: '4px 8px 4px 8px',
+ overflowY: 'auto',
+ },
+ bottomDropArea: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ backgroundColor: 'whitesmoke',
+ borderRadius: '10px',
+ color: 'gray',
+ height: '60px',
+ },
+ dragOver: {
+ borderWidth: '1px',
+ borderStyle: 'dashed',
+ borderColor: theme.palette.primary.main,
+ },
+}));
+
+export const Page = ({
+ editingContextId,
+ representationId,
+ formDescriptionEditor,
+ page,
+ selection,
+ setSelection,
+}: PageProps) => {
+ const classes = usePageStyles();
+
+ const initialState: PageState = { message: null, selected: false };
+ const [state, setState] = useState(initialState);
+ const { message } = state;
+
+ const ref = useRef(null);
+
+ useEffect(() => {
+ if (ref.current && selection.entries.find((entry) => entry.id === page.id)) {
+ ref.current.focus();
+ setState((prevState) => {
+ return { ...prevState, selected: true };
+ });
+ } else {
+ setState((prevState) => {
+ return { ...prevState, selected: false };
+ });
+ }
+ }, [selection, page]);
+
+ const [addGroup, { loading: addGroupLoading, data: addGroupData, error: addGroupError }] = useMutation<
+ GQLAddGroupMutationData,
+ GQLAddGroupMutationVariables
+ >(addGroupMutation);
+
+ useEffect(() => {
+ if (!addGroupLoading) {
+ if (addGroupError) {
+ setState((prevState) => {
+ return { ...prevState, message: addGroupError.message };
+ });
+ }
+ if (addGroupData) {
+ const { addGroup } = addGroupData;
+ if (isErrorPayload(addGroup)) {
+ setState((prevState) => {
+ return { ...prevState, message: addGroup.message };
+ });
+ }
+ }
+ }
+ }, [addGroupLoading, addGroupData, addGroupError]);
+
+ const [moveGroup, { loading: moveGroupLoading, data: moveGroupData, error: moveGroupError }] = useMutation<
+ GQLMoveGroupMutationData,
+ GQLMoveGroupMutationVariables
+ >(moveGroupMutation);
+
+ useEffect(() => {
+ if (!moveGroupLoading) {
+ if (moveGroupError) {
+ setState((prevState) => {
+ return { ...prevState, message: moveGroupError.message };
+ });
+ }
+ if (moveGroupData) {
+ const { moveGroup } = moveGroupData;
+ if (isErrorPayload(moveGroup)) {
+ setState((prevState) => {
+ return { ...prevState, message: moveGroup.message };
+ });
+ }
+ }
+ }
+ }, [moveGroupLoading, moveGroupData, moveGroupError]);
+
+ const handleDragEnter: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.add(classes.dragOver);
+ };
+ const handleDragOver: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.add(classes.dragOver);
+ };
+ const handleDragLeave: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.remove(classes.dragOver);
+ };
+ const handleDrop: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.remove(classes.dragOver);
+
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
+
+ if (type !== 'Group') {
+ return;
+ }
+
+ let index = page.groups.length;
+
+ if (id === 'Group') {
+ const addGroupInput: GQLAddGroupInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ pageId: page.id,
+ representationId,
+ index,
+ };
+ const addGroupVariables: GQLAddGroupMutationVariables = { input: addGroupInput };
+ addGroup({ variables: addGroupVariables });
+ } else if (page.groups.find((g) => g.id === id)) {
+ index--;
+ const moveGroupInput: GQLMoveGroupInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ pageId: page.id,
+ groupId: id,
+ index,
+ };
+ const moveGroupVariables: GQLMoveGroupMutationVariables = { input: moveGroupInput };
+ moveGroup({ variables: moveGroupVariables });
+ }
+ };
+
+ return (
+
+
+ {page.groups.map((group) => {
+ return (
+
+ );
+ })}
+
+
+ {'Drag and drop a group here'}
+
+
+ setState((prevState) => {
+ return { ...prevState, message: null };
+ })
+ }
+ message={message}
+ action={
+
+ setState((prevState) => {
+ return { ...prevState, message: null };
+ })
+ }>
+
+
+ }
+ data-testid="error"
+ />
+
+ );
+};
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.types.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.types.ts
new file mode 100644
index 0000000000..c091d7d932
--- /dev/null
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/Page.types.ts
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+import { Selection } from '@eclipse-sirius/sirius-components-core';
+import { GQLPage } from '@eclipse-sirius/sirius-components-forms/src';
+import { GQLFormDescriptionEditor } from './FormDescriptionEditorEventFragment.types';
+
+export interface PageProps {
+ editingContextId: string;
+ representationId: string;
+ formDescriptionEditor: GQLFormDescriptionEditor;
+ page: GQLPage;
+ selection: Selection;
+ setSelection: (selection: Selection) => void;
+}
+
+export interface PageState {
+ message: string | null;
+ selected: boolean;
+}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.tsx
new file mode 100644
index 0000000000..c04b4e52d4
--- /dev/null
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.tsx
@@ -0,0 +1,406 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+import { useMutation } from '@apollo/client';
+import { Selection } from '@eclipse-sirius/sirius-components-core';
+import { makeStyles } from '@material-ui/core/styles';
+import { PageListProps, PageListState } from './PageList.types';
+import { Page } from './Page';
+import Tab from '@material-ui/core/Tab';
+import Tabs from '@material-ui/core/Tabs';
+import Snackbar from '@material-ui/core/Snackbar';
+import CloseIcon from '@material-ui/icons/Close';
+import IconButton from '@material-ui/core/IconButton';
+import Typography from '@material-ui/core/Typography';
+import React, { useEffect, useState } from 'react';
+import {
+ GQLAddPageInput,
+ GQLAddPageMutationData,
+ GQLAddPageMutationVariables,
+ GQLAddPagePayload,
+ GQLDeletePageInput,
+ GQLDeletePageMutationData,
+ GQLDeletePageMutationVariables,
+ GQLErrorPayload,
+ GQLMovePageInput,
+ GQLMovePageMutationData,
+ GQLMovePageMutationVariables,
+ GQLMovePagePayload,
+} from './FormDescriptionEditorEventFragment.types';
+import { addPageMutation, deletePageMutation, movePageMutation } from './FormDescriptionEditorEventFragment';
+
+const isErrorPayload = (payload: GQLAddPagePayload | GQLMovePagePayload): payload is GQLErrorPayload =>
+ payload.__typename === 'ErrorPayload';
+
+const usePageListStyles = makeStyles((theme) => ({
+ rightDropArea: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ backgroundColor: 'whitesmoke',
+ borderRadius: '10px',
+ color: 'gray',
+ height: '40px',
+ width: '50%',
+ },
+ dragOver: {
+ borderWidth: '1px',
+ borderStyle: 'dashed',
+ borderColor: theme.palette.primary.main,
+ },
+ pagesList: {
+ display: 'flex',
+ justifyContent: 'left',
+ },
+ tabsRoot: {
+ minHeight: theme.spacing(4),
+ borderBottomColor: theme.palette.divider,
+ borderBottomWidth: '1px',
+ borderBottomStyle: 'solid',
+ },
+ tabRoot: {
+ minHeight: theme.spacing(4),
+ textTransform: 'none',
+ },
+ tabLabel: {
+ display: 'flex',
+ flexDirection: 'row',
+ alignItems: 'center',
+ width: 'inherit',
+ },
+ tabLabelText: {
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ },
+}));
+
+const a11yProps = (id: string) => {
+ return {
+ id: `simple-tab-${id}`,
+ 'aria-controls': `simple-tabpanel-${id}`,
+ };
+};
+
+export const PageList = ({
+ editingContextId,
+ representationId,
+ formDescriptionEditor,
+ selection,
+ setSelection,
+}: PageListProps) => {
+ const classes = usePageListStyles();
+
+ const { pages } = formDescriptionEditor;
+
+ const [state, setState] = useState({ message: null, selectedPage: pages[0], pages });
+ const { message } = state;
+
+ useEffect(() => {
+ setState((prevState) => {
+ const selectedPage = pages.find((page) => page.id === state.selectedPage.id);
+ if (selectedPage) {
+ return { ...prevState, selectedPage, pages };
+ }
+ return { ...prevState, selectedPage: pages[0], pages };
+ });
+ }, [pages, state.selectedPage.id]);
+
+ const onChangeTab = (_: React.ChangeEvent<{}>, value: string) => {
+ const selectedPage = pages.find((page) => page.id === value);
+ setState((prevState) => {
+ return { ...prevState, selectedPage };
+ });
+ };
+
+ const [addPage, { loading: addPageLoading, data: addPageData, error: addPageError }] = useMutation<
+ GQLAddPageMutationData,
+ GQLAddPageMutationVariables
+ >(addPageMutation);
+
+ useEffect(() => {
+ if (!addPageLoading) {
+ if (addPageError) {
+ setState((prevState) => {
+ return { ...prevState, message: addPageError.message };
+ });
+ }
+ if (addPageData) {
+ const { addPage } = addPageData;
+ if (isErrorPayload(addPage)) {
+ setState((prevState) => {
+ return { ...prevState, message: addPage.message };
+ });
+ }
+ }
+ }
+ }, [addPageLoading, addPageData, addPageError]);
+
+ const [movePage, { loading: movePageLoading, data: movePageData, error: movePageError }] = useMutation<
+ GQLMovePageMutationData,
+ GQLMovePageMutationVariables
+ >(movePageMutation);
+
+ useEffect(() => {
+ if (!movePageLoading) {
+ if (movePageError) {
+ setState((prevState) => {
+ return { ...prevState, message: movePageError.message };
+ });
+ }
+ if (movePageData) {
+ const { movePage } = movePageData;
+ if (isErrorPayload(movePage)) {
+ setState((prevState) => {
+ return { ...prevState, message: movePage.message };
+ });
+ }
+ }
+ }
+ }, [movePageLoading, movePageData, movePageError]);
+
+ const [deletePage, { loading: deletePageLoading, data: deletePageData, error: deletePageError }] = useMutation<
+ GQLDeletePageMutationData,
+ GQLDeletePageMutationVariables
+ >(deletePageMutation);
+
+ useEffect(() => {
+ if (!deletePageLoading) {
+ if (deletePageError) {
+ setState((prevState) => {
+ return { ...prevState, message: deletePageError.message };
+ });
+ }
+ if (deletePageData) {
+ const { deletePage } = deletePageData;
+ if (isErrorPayload(deletePage)) {
+ setState((prevState) => {
+ return { ...prevState, message: deletePage.message };
+ });
+ }
+ }
+ }
+ }, [deletePageLoading, deletePageData, deletePageError]);
+
+ const handleClick: React.MouseEventHandler = (event) => {
+ const currentPage = pages.find((page) => page.id === event.currentTarget.id);
+ if (currentPage) {
+ const newSelection: Selection = {
+ entries: [
+ {
+ id: currentPage.id,
+ label: currentPage.label,
+ kind: `siriusComponents://semantic?domain=view&entity=PageDescription`,
+ },
+ ],
+ };
+ setSelection(newSelection);
+ }
+ event.stopPropagation();
+ };
+
+ const handleDelete: React.KeyboardEventHandler = (event) => {
+ event.preventDefault();
+ if (event.key === 'Delete') {
+ const deletePageInput: GQLDeletePageInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ pageId: state.selectedPage.id,
+ };
+ const deletePageVariables: GQLDeletePageMutationVariables = { input: deletePageInput };
+ deletePage({ variables: deletePageVariables });
+ event.stopPropagation();
+ }
+ };
+
+ const handleDragStart: React.DragEventHandler = (event) => {
+ event.dataTransfer.setData('draggedElementId', event.currentTarget.id);
+ event.dataTransfer.setData('draggedElementType', 'Page');
+ };
+
+ const handleDragEnter: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.add(classes.dragOver);
+ };
+ const handleDragOver: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.add(classes.dragOver);
+ };
+ const handleDragLeave: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.remove(classes.dragOver);
+ };
+ const handleDropTab: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.remove(classes.dragOver);
+
+ const draggedElementId: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
+
+ if (type !== 'Page') {
+ return;
+ }
+
+ const dropLocationId: string = event.currentTarget.id;
+ const index: number = pages.findIndex((p) => p.id === dropLocationId);
+
+ if (index < 0) {
+ //Drop location invalids
+ return;
+ }
+
+ if (draggedElementId === 'Page') {
+ const addPageInput: GQLAddPageInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ index,
+ };
+ const addPageVariables: GQLAddPageMutationVariables = { input: addPageInput };
+ addPage({ variables: addPageVariables });
+ } else if (formDescriptionEditor.pages.find((g) => g.id === draggedElementId)) {
+ const movePageInput: GQLMovePageInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ pageId: draggedElementId,
+ index,
+ };
+ const movePageVariables: GQLMovePageMutationVariables = { input: movePageInput };
+ movePage({ variables: movePageVariables });
+ }
+ };
+
+ const handleDropArea: React.DragEventHandler = (event) => {
+ event.preventDefault();
+ event.currentTarget.classList.remove(classes.dragOver);
+
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
+
+ if (type !== 'Page') {
+ return;
+ }
+
+ let index = formDescriptionEditor.pages.length;
+
+ if (id === 'Page') {
+ const addPageInput: GQLAddPageInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ index,
+ };
+ const addPageVariables: GQLAddPageMutationVariables = { input: addPageInput };
+ addPage({ variables: addPageVariables });
+ } else if (pages.find((g) => g.id === id)) {
+ index--;
+ const movePageInput: GQLMovePageInput = {
+ id: crypto.randomUUID(),
+ editingContextId,
+ representationId,
+ pageId: id,
+ index,
+ };
+ const movePageVariables: GQLMovePageMutationVariables = { input: movePageInput };
+ movePage({ variables: movePageVariables });
+ }
+ };
+
+ return (
+
+
+
+ {state.pages.map((page) => {
+ return (
+
+ {page.label}
+
+ }
+ key={page.id}
+ onClick={handleClick}
+ onKeyDown={handleDelete}
+ draggable={true}
+ onDragStart={handleDragStart}
+ onDragEnter={handleDragEnter}
+ onDragOver={handleDragOver}
+ onDragLeave={handleDragLeave}
+ onDrop={handleDropTab}
+ />
+ );
+ })}
+
+
+ {'Drag and drop a page here'}
+
+
+
+
+ setState((prevState) => {
+ return { ...prevState, message: null };
+ })
+ }
+ message={message}
+ action={
+
+ setState((prevState) => {
+ return { ...prevState, message: null };
+ })
+ }>
+
+
+ }
+ data-testid="error"
+ />
+
+ );
+};
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.types.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.types.ts
new file mode 100644
index 0000000000..f21a6d4266
--- /dev/null
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/PageList.types.ts
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+import { Selection } from '@eclipse-sirius/sirius-components-core';
+import { GQLFormDescriptionEditor } from './FormDescriptionEditorEventFragment.types';
+import { GQLPage } from '@eclipse-sirius/sirius-components-forms/src';
+
+export interface PageListProps {
+ editingContextId: string;
+ representationId: string;
+ formDescriptionEditor: GQLFormDescriptionEditor;
+ selection: Selection;
+ setSelection: (selection: Selection) => void;
+}
+
+export interface PageListState {
+ message: string | null;
+ selectedPage: GQLPage;
+ pages: GQLPage[];
+}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActionWidget.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActionWidget.tsx
index 807ce80960..83e4c4eed6 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActionWidget.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActionWidget.tsx
@@ -16,9 +16,7 @@ import {
ButtonStyleProps,
getTextDecorationLineValue,
GQLButton,
- GQLGroup,
GQLToolbarAction,
- GQLWidget,
} from '@eclipse-sirius/sirius-components-forms';
import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
@@ -38,7 +36,6 @@ import {
GQLMoveToolbarActionMutationVariables,
} from './FormDescriptionEditorEventFragment.types';
import { ToolbarActionProps, ToolbarActionState } from './ToolbarActionWidget.types';
-import { getAllWidgets, isKind } from './WidgetOperations';
const useStyles = makeStyles((theme) => ({
style: {
@@ -109,7 +106,6 @@ const isErrorPayload = (payload: GQLDeleteToolbarActionPayload): payload is GQLE
export const ToolbarActionWidget = ({
editingContextId,
representationId,
- formDescriptionEditor,
group,
toolbarAction,
selection,
@@ -261,7 +257,8 @@ export const ToolbarActionWidget = ({
}, [moveToolbarActionLoading, moveToolbarActionData, moveToolbarActionError]);
const handleDragStart: React.DragEventHandler = (event: React.DragEvent) => {
- event.dataTransfer.setData('text/plain', toolbarAction.id);
+ event.dataTransfer.setData('draggedElementId', toolbarAction.id);
+ event.dataTransfer.setData('draggedElementType', 'ToolbarActionWidget');
event.stopPropagation();
};
const handleDragEnter: React.DragEventHandler = (event: React.DragEvent) => {
@@ -283,15 +280,10 @@ export const ToolbarActionWidget = ({
};
const onDropBefore = (event: React.DragEvent, toolbarAction: GQLButton) => {
- const id: string = event.dataTransfer.getData('text/plain');
- // We only accept drop of ToolbarAction, no Widget or Group allowed
- if (isKind(id)) {
- return;
- } else if (id === 'Group') {
- return;
- } else if (getAllWidgets(formDescriptionEditor).find((w: GQLWidget) => w.id === id)) {
- return;
- } else if (formDescriptionEditor.groups.find((g: GQLGroup) => g.id === id)) {
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ // We only accept a drop of ToolbarAction
+ const type: string = event.dataTransfer.getData('draggedElementType');
+ if (type !== 'ToolbarActionWidget') {
return;
}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActions.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActions.tsx
index 365593e06e..745635558c 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActions.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/ToolbarActions.tsx
@@ -12,7 +12,7 @@
*******************************************************************************/
import { useMutation } from '@apollo/client';
-import { GQLGroup, GQLToolbarAction, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
+import { GQLToolbarAction } from '@eclipse-sirius/sirius-components-forms';
import IconButton from '@material-ui/core/IconButton';
import Snackbar from '@material-ui/core/Snackbar';
import { makeStyles, Theme } from '@material-ui/core/styles';
@@ -34,7 +34,6 @@ import {
} from './FormDescriptionEditorEventFragment.types';
import { ToolbarActionsProps } from './ToolbarActions.types';
import { ToolbarActionWidget } from './ToolbarActionWidget';
-import { getAllWidgets, isKind } from './WidgetOperations';
const useToolbarActionsStyles = makeStyles((theme: Theme) => ({
toolbar: {
@@ -147,15 +146,10 @@ export const ToolbarActions = ({
event.preventDefault();
event.currentTarget.classList.remove(classes.dragOver);
- const id: string = event.dataTransfer.getData('text/plain');
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
- if (isKind(id)) {
- return;
- } else if (id === 'Group') {
- return;
- } else if (getAllWidgets(formDescriptionEditor).find((w: GQLWidget) => w.id === id)) {
- return;
- } else if (formDescriptionEditor.groups.find((g: GQLGroup) => g.id === id)) {
+ if (type !== 'ToolbarActionWidget') {
return;
}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.tsx
index 36d0e6f074..923ff5ef43 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.tsx
@@ -28,7 +28,6 @@ import {
GQLSelect,
GQLTextarea,
GQLTextfield,
- GQLToolbarAction,
GQLWidget,
} from '@eclipse-sirius/sirius-components-forms';
import IconButton from '@material-ui/core/IconButton';
@@ -69,7 +68,7 @@ import { SelectWidget } from './SelectWidget';
import { TextAreaWidget } from './TextAreaWidget';
import { TextfieldWidget } from './TextfieldWidget';
import { WidgetEntryProps, WidgetEntryState, WidgetEntryStyleProps } from './WidgetEntry.types';
-import { getAllToolbarActions, isFlexboxContainer, isGroup, isKind } from './WidgetOperations';
+import { isFlexboxContainer, isGroup, isKind } from './WidgetOperations';
const useWidgetEntryStyles = makeStyles((theme) => ({
widget: {
@@ -122,6 +121,7 @@ export const WidgetEntry = ({
editingContextId,
representationId,
formDescriptionEditor,
+ page,
container,
widget,
selection,
@@ -232,7 +232,8 @@ export const WidgetEntry = ({
};
const handleDragStart: React.DragEventHandler = (event: React.DragEvent) => {
- event.dataTransfer.setData('text/plain', widget.id);
+ event.dataTransfer.setData('draggedElementId', widget.id);
+ event.dataTransfer.setData('draggedElementType', 'Widget');
event.stopPropagation();
};
const handleDragEnter: React.DragEventHandler = (event: React.DragEvent) => {
@@ -254,13 +255,10 @@ export const WidgetEntry = ({
};
const onDropBefore = (event: React.DragEvent, widget: GQLWidget) => {
- const id: string = event.dataTransfer.getData('text/plain');
- // We only accept drop of Widgets, no ToolbarAction or Group allowed
- if (id === 'Group') {
- return;
- } else if (getAllToolbarActions(formDescriptionEditor).find((tba: GQLToolbarAction) => tba.id === id)) {
- return;
- } else if (formDescriptionEditor.groups.find((g: GQLGroup) => g.id === id)) {
+ const id: string = event.dataTransfer.getData('draggedElementId');
+ const type: string = event.dataTransfer.getData('draggedElementType');
+
+ if (type !== 'Widget') {
return;
}
@@ -333,6 +331,7 @@ export const WidgetEntry = ({
editingContextId={editingContextId}
representationId={representationId}
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={container}
widget={widget as GQLFlexboxContainer}
selection={selection}
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.types.ts b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.types.ts
index a712493832..b59467e4cc 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.types.ts
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetEntry.types.ts
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -23,6 +23,7 @@ import {
GQLLink,
GQLList,
GQLMultiSelect,
+ GQLPage,
GQLRadio,
GQLRichText,
GQLSelect,
@@ -37,6 +38,7 @@ export interface WidgetEntryProps {
editingContextId: string;
representationId: string;
formDescriptionEditor: GQLFormDescriptionEditor;
+ page: GQLPage;
container: GQLGroup | GQLFlexboxContainer;
widget: GQLWidget;
selection: Selection;
@@ -60,6 +62,7 @@ export interface FlexboxContainerWidgetProps {
editingContextId: string;
representationId: string;
formDescriptionEditor: GQLFormDescriptionEditor;
+ page: GQLPage;
container: GQLGroup | GQLFlexboxContainer;
widget: GQLFlexboxContainer;
selection: Selection;
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetOperations.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetOperations.tsx
index 3d291804bf..e03d1a4f3a 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetOperations.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/WidgetOperations.tsx
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -10,8 +10,7 @@
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
-import { GQLFlexboxContainer, GQLGroup, GQLToolbarAction, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
-import { GQLFormDescriptionEditor } from './FormDescriptionEditorEventFragment.types';
+import { GQLGroup, GQLWidget } from '@eclipse-sirius/sirius-components-forms';
import { Kind } from './FormDescriptionEditorRepresentation.types';
export const isKind = (value: string): value is Kind => {
@@ -41,31 +40,3 @@ export const isGroup = (element: GQLWidget | GQLGroup): boolean => {
export const isFlexboxContainer = (element: GQLWidget | GQLGroup): boolean => {
return element.__typename === 'FlexboxContainer';
};
-
-export const getAllWidgets = (formDescriptionEditor: GQLFormDescriptionEditor): GQLWidget[] => {
- let allWidgets: GQLWidget[] = [];
- formDescriptionEditor.groups.forEach((group: GQLGroup) => {
- group.widgets.forEach((widget: GQLWidget) => {
- if (isFlexboxContainer(widget)) {
- allWidgets = allWidgets.concat(getAllFlexboxContainerWidgets(widget as GQLFlexboxContainer));
- }
- allWidgets.push(widget);
- });
- });
- return allWidgets;
-};
-
-const getAllFlexboxContainerWidgets = (flexboxContainer: GQLFlexboxContainer): GQLWidget[] => {
- let allWidgets: GQLWidget[] = [];
- flexboxContainer.children.forEach((widget: GQLWidget) => {
- if (isFlexboxContainer(widget)) {
- allWidgets = allWidgets.concat(getAllFlexboxContainerWidgets(widget as GQLFlexboxContainer));
- }
- allWidgets.push(widget);
- });
- return allWidgets;
-};
-
-export const getAllToolbarActions = (formDescriptionEditor: GQLFormDescriptionEditor): GQLToolbarAction[] => {
- return formDescriptionEditor.groups.flatMap((g: GQLGroup) => g.toolbarActions);
-};
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Group.test.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Group.test.tsx
index 48e16aac7f..43642bdc00 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Group.test.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Group.test.tsx
@@ -12,7 +12,7 @@
*******************************************************************************/
import { MockedProvider, MockedResponse } from '@apollo/client/testing';
import { Selection } from '@eclipse-sirius/sirius-components-core';
-import { GQLGroup } from '@eclipse-sirius/sirius-components-forms';
+import { GQLGroup, GQLPage } from '@eclipse-sirius/sirius-components-forms';
import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
import { afterEach, expect, test, vi } from 'vitest';
import { addGroupMutation, deleteGroupMutation, moveGroupMutation } from '../FormDescriptionEditorEventFragment';
@@ -49,6 +49,7 @@ const addGroupVariables: GQLAddGroupMutationVariables = {
id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
editingContextId: 'editingContextId',
representationId: 'formDescriptionEditorId',
+ pageId: 'Page1',
index: 0,
},
};
@@ -75,6 +76,7 @@ const moveGroupVariables: GQLMoveGroupMutationVariables = {
id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
editingContextId: 'editingContextId',
representationId: 'formDescriptionEditorId',
+ pageId: 'Page1',
groupId: 'Group2',
index: 0,
},
@@ -94,9 +96,16 @@ test('should drop the Group in the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'FormDescriptionEditor1',
- groups: [group],
+ pages: [page],
};
let addGroupCalled: boolean = false;
@@ -119,6 +128,7 @@ test('should drop the Group in the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
group={group}
selection={emptySelection}
setSelection={emptySetSelection}
@@ -129,7 +139,8 @@ test('should drop the Group in the drop area', async () => {
const element: HTMLElement = screen.getByTestId(`Group-DropArea-${group.id}`);
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', 'Group');
+ dataTransfer.setData('draggedElementId', 'Group');
+ dataTransfer.setData('draggedElementType', 'Group');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
@@ -150,9 +161,16 @@ test('should delete the Group from the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group],
+ pages: [page],
};
let deleteGroupCalled: boolean = false;
@@ -175,6 +193,7 @@ test('should delete the Group from the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
group={group}
selection={emptySelection}
setSelection={emptySetSelection}
@@ -214,9 +233,16 @@ test('should move the existing Group from/into the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group1, group2],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group1, group2],
+ pages: [page],
};
let moveGroupCalled: boolean = false;
@@ -239,6 +265,7 @@ test('should move the existing Group from/into the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
group={group1}
selection={emptySelection}
setSelection={emptySetSelection}
@@ -249,7 +276,8 @@ test('should move the existing Group from/into the drop area', async () => {
const element: HTMLElement = screen.getByTestId(`Group-DropArea-${group1.id}`);
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', group2.id);
+ dataTransfer.setData('draggedElementId', group2.id);
+ dataTransfer.setData('draggedElementType', 'Group');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Page.test.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Page.test.tsx
new file mode 100644
index 0000000000..29dfa1d15b
--- /dev/null
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/Page.test.tsx
@@ -0,0 +1,253 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *******************************************************************************/
+import { MockedProvider, MockedResponse } from '@apollo/client/testing';
+import { Selection } from '@eclipse-sirius/sirius-components-core';
+import { GQLPage } from '@eclipse-sirius/sirius-components-forms';
+import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
+import { afterEach, expect, test, vi } from 'vitest';
+
+import {
+ GQLAddPageMutationData,
+ GQLAddPageMutationVariables,
+ GQLDeletePageMutationData,
+ GQLDeletePageMutationVariables,
+ GQLFormDescriptionEditor,
+ GQLMovePageMutationData,
+ GQLMovePageMutationVariables,
+ GQLSuccessPayload,
+} from '../FormDescriptionEditorEventFragment.types';
+import { addPageMutation, deletePageMutation, movePageMutation } from '../FormDescriptionEditorEventFragment';
+import { DataTransfer } from './DataTransfer';
+import { PageList } from '../PageList';
+
+crypto.randomUUID = vi.fn(() => '48be95fc-3422-45d3-b1f9-d590e847e9e1');
+
+afterEach(() => cleanup());
+
+const emptySelection: Selection = {
+ entries: [],
+};
+
+const emptySetSelection = (_: Selection) => {};
+
+const successPayload: GQLSuccessPayload = {
+ __typename: 'SuccessPayload',
+ id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
+};
+
+const addPageVariables: GQLAddPageMutationVariables = {
+ input: {
+ id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
+ editingContextId: 'editingContextId',
+ representationId: 'formDescriptionEditorId',
+ index: 1,
+ },
+};
+
+const addPageSuccessData: GQLAddPageMutationData = {
+ addPage: successPayload,
+};
+
+const deletePageVariables: GQLDeletePageMutationVariables = {
+ input: {
+ id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
+ editingContextId: 'editingContextId',
+ representationId: 'formDescriptionEditorId',
+ pageId: 'Page1',
+ },
+};
+
+const deletePageSuccessData: GQLDeletePageMutationData = {
+ deletePage: successPayload,
+};
+
+const movePageVariables: GQLMovePageMutationVariables = {
+ input: {
+ id: '48be95fc-3422-45d3-b1f9-d590e847e9e1',
+ editingContextId: 'editingContextId',
+ representationId: 'formDescriptionEditorId',
+ pageId: 'Page2',
+ index: 0,
+ },
+};
+
+const movePageSuccessData: GQLMovePageMutationData = {
+ movePage: successPayload,
+};
+
+test('should drop the Page in the drop area', async () => {
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [],
+ };
+
+ const formDescriptionEditor: GQLFormDescriptionEditor = {
+ id: 'FormDescriptionEditor1',
+ pages: [page],
+ };
+
+ let addPageCalled: boolean = false;
+ const addPageSuccessMock: MockedResponse> = {
+ request: {
+ query: addPageMutation,
+ variables: addPageVariables,
+ },
+ result: () => {
+ addPageCalled = true;
+ return { data: addPageSuccessData };
+ },
+ };
+
+ const mocks: MockedResponse>[] = [addPageSuccessMock];
+
+ render(
+
+
+
+ );
+
+ const element: HTMLElement = screen.getByTestId(`PageList-DropArea`);
+
+ const dataTransfer: DataTransfer = new DataTransfer();
+ dataTransfer.setData('draggedElementId', 'Page');
+ dataTransfer.setData('draggedElementType', 'Page');
+ fireEvent.drop(element, { dataTransfer });
+
+ await act(async () => {
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ await waitFor(() => {
+ expect(addPageCalled).toBeTruthy();
+ });
+ });
+});
+
+test('should delete the Page', async () => {
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [],
+ };
+
+ const formDescriptionEditor: GQLFormDescriptionEditor = {
+ id: 'formDescriptionEditorId',
+ pages: [page],
+ };
+
+ let deletePageCalled: boolean = false;
+ const deletePageSuccessMock: MockedResponse> = {
+ request: {
+ query: deletePageMutation,
+ variables: deletePageVariables,
+ },
+ result: () => {
+ deletePageCalled = true;
+ return { data: deletePageSuccessData };
+ },
+ };
+
+ const mocks: MockedResponse>[] = [deletePageSuccessMock];
+
+ render(
+
+
+
+ );
+
+ const page1: HTMLElement = screen.getByTestId('Page-Page1');
+ expect(page1).not.toBeUndefined();
+
+ await act(async () => {
+ page1.focus();
+ fireEvent.keyDown(page1, { key: 'Delete', code: 'NumpadDecimal' });
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ await waitFor(() => {
+ expect(deletePageCalled).toBeTruthy();
+ });
+ });
+});
+
+test('should move the existing Page into the drop area', async () => {
+ const page1: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [],
+ };
+
+ const page2: GQLPage = {
+ id: 'Page2',
+ label: 'Page2',
+ toolbarActions: [],
+ groups: [],
+ };
+
+ const formDescriptionEditor: GQLFormDescriptionEditor = {
+ id: 'formDescriptionEditorId',
+ pages: [page1, page2],
+ };
+
+ let movePageCalled: boolean = false;
+ const movePageSuccessMock: MockedResponse> = {
+ request: {
+ query: movePageMutation,
+ variables: movePageVariables,
+ },
+ result: () => {
+ movePageCalled = true;
+ return { data: movePageSuccessData };
+ },
+ };
+
+ const mocks: MockedResponse>[] = [movePageSuccessMock];
+
+ render(
+
+
+
+ );
+
+ const element: HTMLElement = screen.getByTestId(`Page-${page1.id}`);
+
+ const dataTransfer: DataTransfer = new DataTransfer();
+ dataTransfer.setData('draggedElementId', page2.id);
+ dataTransfer.setData('draggedElementType', 'Page');
+ fireEvent.drop(element, { dataTransfer });
+
+ await act(async () => {
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ await waitFor(() => {
+ expect(movePageCalled).toBeTruthy();
+ });
+ });
+});
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/ToolbarActions.test.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/ToolbarActions.test.tsx
index 1ee9ad6da4..afa9bdc75e 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/ToolbarActions.test.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/ToolbarActions.test.tsx
@@ -12,7 +12,7 @@
*******************************************************************************/
import { MockedProvider, MockedResponse } from '@apollo/client/testing';
import { Selection } from '@eclipse-sirius/sirius-components-core';
-import { GQLGroup, GQLToolbarAction } from '@eclipse-sirius/sirius-components-forms';
+import { GQLGroup, GQLPage, GQLToolbarAction } from '@eclipse-sirius/sirius-components-forms';
import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
import { afterEach, expect, test, vi } from 'vitest';
import {
@@ -133,9 +133,16 @@ test('add ToolbarAction by clicking on the Add Toolbar Action button', async ()
toolbarActions: [toolbarAction],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'FormDescriptionEditor1',
- groups: [group],
+ pages: [page],
};
let addToolbarActionCalled: boolean = false;
@@ -223,9 +230,16 @@ test('delete the ToolbarAction from the ToolbarActions', async () => {
toolbarActions: [toolbarAction1, toolbarAction2],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'FormDescriptionEditor1',
- groups: [group],
+ pages: [page],
};
let deleteToolbarActionCalled: boolean = false;
@@ -315,9 +329,16 @@ test('move the existing ToolbarAction from/into the drop area', async () => {
toolbarActions: [toolbarAction1, toolbarAction2],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'FormDescriptionEditor1',
- groups: [group],
+ pages: [page],
};
let moveToolbarActionCalled: boolean = false;
@@ -350,7 +371,8 @@ test('move the existing ToolbarAction from/into the drop area', async () => {
const element: HTMLElement = screen.getByTestId('ToolbarAction-DropArea-ToolbarAction1');
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', 'ToolbarAction2');
+ dataTransfer.setData('draggedElementId', 'ToolbarAction2');
+ dataTransfer.setData('draggedElementType', 'ToolbarActionWidget');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
@@ -408,9 +430,16 @@ test('move the existing ToolbarAction from/into the drop area located at the end
toolbarActions: [toolbarAction1, toolbarAction2],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'FormDescriptionEditor1',
- groups: [group],
+ pages: [page],
};
let moveToolbarActionAtTheEndCalled: boolean = false;
@@ -443,7 +472,8 @@ test('move the existing ToolbarAction from/into the drop area located at the end
const element: HTMLElement = screen.getByTestId(`Group-ToolbarActions-DropArea-${group.id}`);
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', 'ToolbarAction2');
+ dataTransfer.setData('draggedElementId', 'ToolbarAction2');
+ dataTransfer.setData('draggedElementType', 'ToolbarActionWidget');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
diff --git a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/WidgetEntry.test.tsx b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/WidgetEntry.test.tsx
index 569baf0644..eb72f48f44 100644
--- a/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/WidgetEntry.test.tsx
+++ b/packages/formdescriptioneditors/frontend/sirius-components-formdescriptioneditors/src/__tests__/WidgetEntry.test.tsx
@@ -12,7 +12,7 @@
*******************************************************************************/
import { MockedProvider, MockedResponse } from '@apollo/client/testing';
import { Selection } from '@eclipse-sirius/sirius-components-core';
-import { GQLChartWidget, GQLGroup, GQLPieChart, GQLTextfield } from '@eclipse-sirius/sirius-components-forms';
+import { GQLChartWidget, GQLGroup, GQLPage, GQLPieChart, GQLTextfield } from '@eclipse-sirius/sirius-components-forms';
import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react';
import { afterEach, expect, test, vi } from 'vitest';
import { addWidgetMutation, deleteWidgetMutation, moveWidgetMutation } from '../FormDescriptionEditorEventFragment';
@@ -118,9 +118,16 @@ test('should drop the Textfield in the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group],
+ pages: [page],
};
let addWidgetCalled: boolean = false;
@@ -143,6 +150,7 @@ test('should drop the Textfield in the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={group}
flexDirection={'row'}
flexGrow={0}
@@ -156,7 +164,8 @@ test('should drop the Textfield in the drop area', async () => {
const element: HTMLElement = screen.getByTestId(`WidgetEntry-DropArea-${textfieldWidget.id}`);
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', 'Textfield');
+ dataTransfer.setData('draggedElementId', 'Textfield');
+ dataTransfer.setData('draggedElementType', 'Widget');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
@@ -196,9 +205,16 @@ test('should delete the Textfield from the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group],
+ pages: [page],
};
let deleteWidgetCalled: boolean = false;
@@ -221,6 +237,7 @@ test('should delete the Textfield from the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={group}
flexDirection={'row'}
flexGrow={0}
@@ -283,9 +300,16 @@ test('should delete the PieChart from the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group],
+ pages: [page],
};
let deleteWidgetCalled: boolean = false;
@@ -308,6 +332,7 @@ test('should delete the PieChart from the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={group}
flexDirection={'row'}
flexGrow={0}
@@ -359,9 +384,16 @@ test('should move the existing Textfield from/into the drop area', async () => {
toolbarActions: [],
};
+ const page: GQLPage = {
+ id: 'Page1',
+ label: 'Page1',
+ toolbarActions: [],
+ groups: [group],
+ };
+
const formDescriptionEditor: GQLFormDescriptionEditor = {
id: 'formDescriptionEditorId',
- groups: [group],
+ pages: [page],
};
let moveWidgetCalled: boolean = false;
@@ -384,6 +416,7 @@ test('should move the existing Textfield from/into the drop area', async () => {
editingContextId="editingContextId"
representationId="formDescriptionEditorId"
formDescriptionEditor={formDescriptionEditor}
+ page={page}
container={group}
flexDirection={'row'}
flexGrow={0}
@@ -397,7 +430,8 @@ test('should move the existing Textfield from/into the drop area', async () => {
const element: HTMLElement = screen.getByTestId(`WidgetEntry-DropArea-${textfieldWidget.id}`);
const dataTransfer: DataTransfer = new DataTransfer();
- dataTransfer.setData('text/plain', 'Textfield2');
+ dataTransfer.setData('draggedElementId', 'Textfield2');
+ dataTransfer.setData('draggedElementType', 'Widget');
fireEvent.drop(element, { dataTransfer });
await act(async () => {
diff --git a/packages/forms/backend/sirius-components-collaborative-forms/src/main/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregator.java b/packages/forms/backend/sirius-components-collaborative-forms/src/main/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregator.java
index 5bce202afb..5615096d15 100644
--- a/packages/forms/backend/sirius-components-collaborative-forms/src/main/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregator.java
+++ b/packages/forms/backend/sirius-components-collaborative-forms/src/main/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregator.java
@@ -15,11 +15,9 @@
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
-import java.util.stream.Collectors;
import org.eclipse.sirius.components.core.api.IObjectService;
import org.eclipse.sirius.components.forms.description.FormDescription;
-import org.eclipse.sirius.components.forms.description.GroupDescription;
import org.eclipse.sirius.components.forms.description.PageDescription;
import org.eclipse.sirius.components.representations.GetOrCreateRandomIdProvider;
import org.eclipse.sirius.components.representations.VariableManager;
@@ -36,31 +34,22 @@ public Optional aggregate(List formDescription
VariableManager pageVariableManager = new VariableManager();
pageVariableManager.put(VariableManager.SELF, objects);
- // @formatter:off
List pageDescriptions = formDescriptions.stream()
.flatMap(formDescription -> formDescription.getPageDescriptions().stream())
.filter(pageDescription -> pageDescription.getCanCreatePredicate().test(pageVariableManager))
.toList();
- // @formatter:on
if (pageDescriptions.isEmpty()) {
return Optional.empty();
}
- // @formatter:off
- List groupDescriptions = pageDescriptions.stream()
- .flatMap(pageDescription -> pageDescription.getGroupDescriptions().stream())
- .collect(Collectors.toUnmodifiableList());
-
Function labelProvider = variableManager -> variableManager.get(VariableManager.SELF, Object.class)
.filter(self -> self instanceof List>)
.map(self -> (List>) self)
.flatMap(self -> self.stream().findFirst())
.map(objectService::getFullLabel)
.orElse("Properties");
- // @formatter:on
- // @formatter:off
Function targetObjectIdProvider = variableManager -> variableManager.get(VariableManager.SELF, Object.class)
.filter(self -> self instanceof List>)
.map(self -> (List>) self)
@@ -75,8 +64,6 @@ public Optional aggregate(List formDescription
.targetObjectIdProvider(targetObjectIdProvider)
.canCreatePredicate(variableManager -> false)
.pageDescriptions(pageDescriptions)
- .groupDescriptions(groupDescriptions)
.build());
- // @formatter:on
}
}
diff --git a/packages/forms/backend/sirius-components-collaborative-forms/src/main/resources/schema/form.graphqls b/packages/forms/backend/sirius-components-collaborative-forms/src/main/resources/schema/form.graphqls
index 9a808685c7..1b43e27809 100644
--- a/packages/forms/backend/sirius-components-collaborative-forms/src/main/resources/schema/form.graphqls
+++ b/packages/forms/backend/sirius-components-collaborative-forms/src/main/resources/schema/form.graphqls
@@ -54,6 +54,7 @@ type Form implements Representation {
type Page {
id: ID!
label: String!
+ toolbarActions: [ToolbarAction!]!
groups: [Group!]!
}
diff --git a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregatorTests.java b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregatorTests.java
index e0275083ad..334128ad89 100644
--- a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregatorTests.java
+++ b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormDescriptionAggregatorTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -51,7 +51,6 @@ public void testAggregatorWithMatchingPages() {
assertThat(optional).isPresent();
assertThat(optional.get().getPageDescriptions()).hasSize(3);
- assertThat(optional.get().getGroupDescriptions()).hasSize(3);
}
@Test
@@ -73,7 +72,6 @@ public void testAggregatorWithNoMatchingPages() {
private FormDescription createForm(Object object, int numberOfPages, int numberOfCanCreate) {
List pageDescriptions = new ArrayList<>();
- List groupDescriptions = new ArrayList<>();
int initialCount = numberOfCanCreate;
for (int i = 0; i < numberOfPages; i++) {
@@ -81,14 +79,12 @@ private FormDescription createForm(Object object, int numberOfPages, int numberO
GroupDescription groupDescription = this.createGroup();
PageDescription pageDescription = this.createPage(object, groupDescription, canCreate);
pageDescriptions.add(pageDescription);
- groupDescriptions.add(groupDescription);
}
// @formatter:off
return FormDescription.newFormDescription(UUID.randomUUID().toString())
.targetObjectIdProvider(targetObjectIdProvider -> "targetObjectId")
.canCreatePredicate(variableManager -> true)
- .groupDescriptions(groupDescriptions)
.pageDescriptions(pageDescriptions)
.idProvider(variableManager -> UUID.randomUUID().toString())
.labelProvider(variableManager -> LABEL)
diff --git a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormEventProcessorTests.java b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormEventProcessorTests.java
index 781a5140b1..19bb59da63 100644
--- a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormEventProcessorTests.java
+++ b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/FormEventProcessorTests.java
@@ -48,7 +48,6 @@ private FormDescription getFormDescription() {
.idProvider(variableManager -> UUID.randomUUID().toString())
.label("formLabel")
.labelProvider(variableManager -> "label")
- .groupDescriptions(List.of())
.pageDescriptions(List.of())
.build();
// @formatter:on
diff --git a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/handlers/CreateFormEventHandlerTests.java b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/handlers/CreateFormEventHandlerTests.java
index 4e7779d995..5375cb6c02 100644
--- a/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/handlers/CreateFormEventHandlerTests.java
+++ b/packages/forms/backend/sirius-components-collaborative-forms/src/test/java/org/eclipse/sirius/components/collaborative/forms/handlers/CreateFormEventHandlerTests.java
@@ -45,6 +45,7 @@
* @author sbegaudeau
*/
public class CreateFormEventHandlerTests {
+
@Test
public void testFormCreation() {
// @formatter:off
@@ -52,7 +53,6 @@ public void testFormCreation() {
.label("label")
.canCreatePredicate(variableManager -> true)
.pageDescriptions(List.of())
- .groupDescriptions(List.of())
.idProvider(variableManager -> "id")
.labelProvider(variableManager -> "label")
.targetObjectIdProvider(variableManager -> "targetObjectId")
diff --git a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/Page.java b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/Page.java
index b4e9a8c90d..692774b618 100644
--- a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/Page.java
+++ b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/Page.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2019, 2022 Obeo.
+ * Copyright (c) 2019, 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
@@ -25,10 +25,13 @@
*/
@Immutable
public final class Page {
+
private String id;
private String label;
+ private List toolbarActions;
+
private List groups;
private Page() {
@@ -43,6 +46,10 @@ public String getLabel() {
return this.label;
}
+ public List getToolbarActions() {
+ return this.toolbarActions;
+ }
+
public List getGroups() {
return this.groups;
}
@@ -64,10 +71,13 @@ public String toString() {
*/
@SuppressWarnings("checkstyle:HiddenField")
public static final class Builder {
+
private String id;
private String label;
+ private List toolbarActions = List.of();
+
private List groups;
private Builder(String id) {
@@ -79,6 +89,11 @@ public Builder label(String label) {
return this;
}
+ public Builder toolbarActions(List toolbarActions) {
+ this.toolbarActions = Objects.requireNonNull(toolbarActions);
+ return this;
+ }
+
public Builder groups(List groups) {
this.groups = Objects.requireNonNull(groups);
return this;
@@ -88,6 +103,7 @@ public Page build() {
Page page = new Page();
page.id = Objects.requireNonNull(this.id);
page.label = Objects.requireNonNull(this.label);
+ page.toolbarActions = Objects.requireNonNull(this.toolbarActions);
page.groups = Objects.requireNonNull(this.groups);
return page;
}
diff --git a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/description/FormDescription.java b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/description/FormDescription.java
index ee0e484aa9..28532f57de 100644
--- a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/description/FormDescription.java
+++ b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/description/FormDescription.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2019, 2022 Obeo.
+ * Copyright (c) 2019, 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
@@ -32,6 +32,7 @@
@PublicApi
@Immutable
public final class FormDescription implements IRepresentationDescription {
+
private String id;
private String label;
@@ -46,8 +47,6 @@ public final class FormDescription implements IRepresentationDescription {
private List pageDescriptions;
- private List groupDescriptions;
-
private FormDescription() {
// Prevent instantiation
}
@@ -83,10 +82,6 @@ public List getPageDescriptions() {
return this.pageDescriptions;
}
- public List getGroupDescriptions() {
- return this.groupDescriptions;
- }
-
public static Builder newFormDescription(String id) {
return new Builder(id);
}
@@ -104,6 +99,7 @@ public String toString() {
*/
@SuppressWarnings("checkstyle:HiddenField")
public static final class Builder {
+
private String id;
private String label;
@@ -118,8 +114,6 @@ public static final class Builder {
private List pageDescriptions;
- private List groupDescriptions;
-
private Builder(String id) {
this.id = Objects.requireNonNull(id);
}
@@ -154,11 +148,6 @@ public Builder pageDescriptions(List pageDescriptions) {
return this;
}
- public Builder groupDescriptions(List groupDescriptions) {
- this.groupDescriptions = Objects.requireNonNull(groupDescriptions);
- return this;
- }
-
public FormDescription build() {
FormDescription formDescription = new FormDescription();
formDescription.id = Objects.requireNonNull(this.id);
@@ -168,7 +157,6 @@ public FormDescription build() {
formDescription.labelProvider = Objects.requireNonNull(this.labelProvider);
formDescription.targetObjectIdProvider = Objects.requireNonNull(this.targetObjectIdProvider);
formDescription.pageDescriptions = Objects.requireNonNull(this.pageDescriptions);
- formDescription.groupDescriptions = Objects.requireNonNull(this.groupDescriptions);
return formDescription;
}
}
diff --git a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/renderer/FormElementFactory.java b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/renderer/FormElementFactory.java
index 42b49a078b..b8dd4d1367 100644
--- a/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/renderer/FormElementFactory.java
+++ b/packages/forms/backend/sirius-components-forms/src/main/java/org/eclipse/sirius/components/forms/renderer/FormElementFactory.java
@@ -199,7 +199,11 @@ private Form instantiateForm(FormElementProps props, List children) {
}
private Page instantiatePage(PageElementProps props, List children) {
- // @formatter:off
+ List toolbarActions = children.stream()
+ .filter(ToolbarAction.class::isInstance)
+ .map(ToolbarAction.class::cast)
+ .toList();
+
List groups = children.stream()
.filter(Group.class::isInstance)
.map(Group.class::cast)
@@ -207,9 +211,9 @@ private Page instantiatePage(PageElementProps props, List children) {
return Page.newPage(props.getId())
.label(props.getLabel())
+ .toolbarActions(toolbarActions)
.groups(groups)
.build();
- //@formatter:on
}
private Group instantiateGroup(GroupElementProps props, List children) {
diff --git a/packages/forms/backend/sirius-components-forms/src/test/java/org/eclipse/sirius/components/forms/render/RenderTextfieldTest.java b/packages/forms/backend/sirius-components-forms/src/test/java/org/eclipse/sirius/components/forms/render/RenderTextfieldTest.java
index 1b9758079e..d2a87f9dde 100644
--- a/packages/forms/backend/sirius-components-forms/src/test/java/org/eclipse/sirius/components/forms/render/RenderTextfieldTest.java
+++ b/packages/forms/backend/sirius-components-forms/src/test/java/org/eclipse/sirius/components/forms/render/RenderTextfieldTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -148,7 +148,6 @@ private FormDescription createSingleWidgetForm(TextfieldDescription textDescript
.idProvider(this.constantProvider("formId"))
.labelProvider(this.constantProvider("formLabel"))
.canCreatePredicate(variableManager -> true)
- .groupDescriptions(List.of(groupDescription))
.pageDescriptions(List.of(pageDescription))
.targetObjectIdProvider(this.constantProvider("selfId"))
.build();
diff --git a/packages/forms/frontend/sirius-components-forms/src/form/FormEventFragments.types.ts b/packages/forms/frontend/sirius-components-forms/src/form/FormEventFragments.types.ts
index 8a3189f1c6..b5e0bac34e 100644
--- a/packages/forms/frontend/sirius-components-forms/src/form/FormEventFragments.types.ts
+++ b/packages/forms/frontend/sirius-components-forms/src/form/FormEventFragments.types.ts
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2021, 2022 Obeo.
+ * 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
@@ -101,6 +101,7 @@ export interface GQLForm {
export interface GQLPage {
id: string;
label: string;
+ toolbarActions: GQLToolbarAction[];
groups: GQLGroup[];
}
diff --git a/packages/sirius-web/backend/sirius-web-graphql/src/main/java/org/eclipse/sirius/web/graphql/datafetchers/representation/RepresentationMetadataDescriptionDataFetcher.java b/packages/sirius-web/backend/sirius-web-graphql/src/main/java/org/eclipse/sirius/web/graphql/datafetchers/representation/RepresentationMetadataDescriptionDataFetcher.java
index 0b4cc9b95e..d1051fe8d3 100644
--- a/packages/sirius-web/backend/sirius-web-graphql/src/main/java/org/eclipse/sirius/web/graphql/datafetchers/representation/RepresentationMetadataDescriptionDataFetcher.java
+++ b/packages/sirius-web/backend/sirius-web-graphql/src/main/java/org/eclipse/sirius/web/graphql/datafetchers/representation/RepresentationMetadataDescriptionDataFetcher.java
@@ -49,7 +49,6 @@ public class RepresentationMetadataDescriptionDataFetcher implements IDataFetche
.labelProvider(variableManager -> PropertiesEventProcessorFactory.DETAILS_VIEW_ID)
.targetObjectIdProvider(variableManager -> PropertiesEventProcessorFactory.DETAILS_VIEW_ID)
.canCreatePredicate(variableManager -> true)
- .groupDescriptions(List.of())
.pageDescriptions(List.of())
.build();
// @formatter:on
@@ -62,7 +61,7 @@ public RepresentationMetadataDescriptionDataFetcher(IEditingContextEventProcesso
@Override
public CompletableFuture get(DataFetchingEnvironment environment) throws Exception {
- CompletableFuture result = Mono. empty().toFuture();
+ CompletableFuture result = Mono.empty().toFuture();
RepresentationMetadata representationMetadata = environment.getSource();
if (Objects.equals(PropertiesEventProcessorFactory.DETAILS_VIEW_ID, representationMetadata.getDescriptionId())) {
diff --git a/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/configuration/StereotypeDescriptionRegistryConfigurer.java b/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/configuration/StereotypeDescriptionRegistryConfigurer.java
index 8851b1c9b4..6e56f151f9 100644
--- a/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/configuration/StereotypeDescriptionRegistryConfigurer.java
+++ b/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/configuration/StereotypeDescriptionRegistryConfigurer.java
@@ -13,8 +13,10 @@
package org.eclipse.sirius.web.sample.configuration;
import fr.obeo.dsl.designer.sample.flow.FlowFactory;
+
import java.util.List;
import java.util.UUID;
+
import org.eclipse.sirius.components.core.configuration.IStereotypeDescriptionRegistry;
import org.eclipse.sirius.components.core.configuration.IStereotypeDescriptionRegistryConfigurer;
import org.eclipse.sirius.components.core.configuration.StereotypeDescription;
@@ -55,6 +57,10 @@ public class StereotypeDescriptionRegistryConfigurer implements IStereotypeDescr
public static final String BIG_GUY_FLOW_LABEL = "Big Guy Flow (17k elements)";
+ public static final UUID EMPTY_VIEW_ID = UUID.nameUUIDFromBytes("empty_view".getBytes());
+
+ public static final String EMPTY_VIEW_LABEL = "View";
+
private static final UUID EMPTY_DOMAIN_ID = UUID.nameUUIDFromBytes("empty_domain".getBytes());
private static final String EMPTY_DOMAIN_LABEL = "Domain";
@@ -63,10 +69,6 @@ public class StereotypeDescriptionRegistryConfigurer implements IStereotypeDescr
private static final String PAPAYA_DOMAIN_LABEL = "Papaya Domain";
- private static final UUID EMPTY_VIEW_ID = UUID.nameUUIDFromBytes("empty_view".getBytes());
-
- private static final String EMPTY_VIEW_LABEL = "View";
-
private static final UUID PAPAYA_VIEW_ID = UUID.nameUUIDFromBytes("papaya_view".getBytes());
private static final String PAPAYA_VIEW_LABEL = "Papaya View";
diff --git a/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/papaya/view/overviewform/OverviewFormProvider.java b/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/papaya/view/overviewform/OverviewFormProvider.java
index f9b91e0f15..ac7df977c0 100644
--- a/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/papaya/view/overviewform/OverviewFormProvider.java
+++ b/packages/sirius-web/backend/sirius-web-sample-application/src/main/java/org/eclipse/sirius/web/sample/papaya/view/overviewform/OverviewFormProvider.java
@@ -29,12 +29,17 @@ public RepresentationDescription create(IColorProvider colorProvider) {
formDescription.setDomainType("papaya_core::Root");
formDescription.setName("Overview Form");
+ var pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ pageDescription.setName("Page");
+ pageDescription.setSemanticCandidatesExpression("aql:self");
+
var groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
groupDescription.setName("Group");
groupDescription.setSemanticCandidatesExpression("aql:self");
groupDescription.setLabelExpression("Root");
- formDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(pageDescription);
return formDescription;
}
diff --git a/packages/sirius-web/backend/sirius-web-sample-application/src/test/java/org/eclipse/sirius/web/sample/tests/integration/formdescritpioneditors/FormDescriptionEditorPageIntegrationTests.java b/packages/sirius-web/backend/sirius-web-sample-application/src/test/java/org/eclipse/sirius/web/sample/tests/integration/formdescritpioneditors/FormDescriptionEditorPageIntegrationTests.java
new file mode 100644
index 0000000000..627134f638
--- /dev/null
+++ b/packages/sirius-web/backend/sirius-web-sample-application/src/test/java/org/eclipse/sirius/web/sample/tests/integration/formdescritpioneditors/FormDescriptionEditorPageIntegrationTests.java
@@ -0,0 +1,470 @@
+/*******************************************************************************
+ * Copyright (c) 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.web.sample.tests.integration.formdescritpioneditors;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jayway.jsonpath.JsonPath;
+
+import java.time.Duration;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Predicate;
+
+import org.eclipse.sirius.components.collaborative.dto.CreateChildInput;
+import org.eclipse.sirius.components.collaborative.dto.CreateRepresentationInput;
+import org.eclipse.sirius.components.collaborative.dto.CreateRootObjectInput;
+import org.eclipse.sirius.components.collaborative.editingcontext.EditingContextEventProcessorRegistry;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.FormDescriptionEditorConfiguration;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.api.IFormDescriptionEditorEventProcessor;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.AddPageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.DeletePageInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.FormDescriptionEditorEventInput;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.FormDescriptionEditorRefreshedEventPayload;
+import org.eclipse.sirius.components.collaborative.formdescriptioneditors.dto.MovePageInput;
+import org.eclipse.sirius.components.core.api.IPayload;
+import org.eclipse.sirius.components.forms.Page;
+import org.eclipse.sirius.components.graphql.api.IEventProcessorSubscriptionProvider;
+import org.eclipse.sirius.web.persistence.repositories.IProjectRepository;
+import org.eclipse.sirius.web.sample.configuration.StereotypeDescriptionRegistryConfigurer;
+import org.eclipse.sirius.web.sample.configuration.StudioProjectTemplatesProvider;
+import org.eclipse.sirius.web.sample.tests.integration.AbstractIntegrationTests;
+import org.eclipse.sirius.web.services.api.document.CreateDocumentInput;
+import org.eclipse.sirius.web.services.api.projects.CreateProjectFromTemplateInput;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import graphql.ExecutionInput;
+import graphql.GraphQL;
+import reactor.test.StepVerifier;
+
+/**
+ * Integration tests of the page concept in form description editor.
+ *
+ * @author frouene
+ */
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+@SuppressWarnings("checkstyle:MultipleStringLiterals")
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+public class FormDescriptionEditorPageIntegrationTests extends AbstractIntegrationTests {
+
+ @Autowired
+ private GraphQL graphQL;
+
+ @Autowired
+ private ObjectMapper objectMapper;
+
+ @Autowired
+ private IProjectRepository projectRepository;
+
+ @Autowired
+ private EditingContextEventProcessorRegistry editingContextEventProcessorRegistry;
+
+ @Autowired
+ private IEventProcessorSubscriptionProvider eventProcessorSubscriptionProvider;
+
+ private UUID projectId;
+
+ private UUID rootObjectId;
+
+ private UUID formDescriptionObjectId;
+
+ private UUID representationId;
+
+ @BeforeEach
+ public void setup() {
+ this.createProject();
+ this.createProjectContent();
+ this.createFormDescriptor();
+ this.createFormDescriptionEditor();
+ }
+
+ @AfterEach
+ public void teardown() {
+ this.editingContextEventProcessorRegistry.dispose();
+ this.projectRepository.deleteAll();
+ }
+
+
+ private void createProject() {
+ var query = """
+ mutation createProjectFromTemplate($input: CreateProjectFromTemplateInput!) {
+ createProjectFromTemplate(input: $input) {
+ __typename
+ ... on CreateProjectFromTemplateSuccessPayload {
+ project {
+ id
+ }
+ }
+ }
+ }
+ """;
+
+ var input = new CreateProjectFromTemplateInput(UUID.randomUUID(), StudioProjectTemplatesProvider.STUDIO_TEMPLATE_ID);
+
+ var executionInput = ExecutionInput.newExecutionInput()
+ .query(query)
+ .variables(Map.of("input", this.objectMapper.convertValue(input, new TypeReference>() {
+ })))
+ .build();
+ var executionResult = this.graphQL.execute(executionInput);
+ assertThat(executionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(executionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.createProjectFromTemplate.__typename");
+ assertThat(responseTypeName).isEqualTo("CreateProjectFromTemplateSuccessPayload");
+
+ String rawProjectId = JsonPath.read(jsonResult, "$.data.createProjectFromTemplate.project.id");
+ this.projectId = UUID.fromString(rawProjectId);
+ } catch (JsonProcessingException exception) {
+ fail(exception.getMessage());
+ }
+
+ assertThat(this.projectRepository.existsById(this.projectId)).isTrue();
+ }
+
+ private void createProjectContent() {
+ var createDocumentQuery = """
+ mutation createDocument($input: CreateDocumentInput!) {
+ createDocument(input: $input) {
+ __typename
+ ... on CreateDocumentSuccessPayload {
+ document {
+ id
+ }
+ }
+ }
+ }
+ """;
+
+ assertThat(this.projectRepository.existsById(this.projectId)).isTrue();
+
+ var createDocumentInput = new CreateDocumentInput(UUID.randomUUID(), this.projectId.toString(), StereotypeDescriptionRegistryConfigurer.EMPTY_VIEW_LABEL, StereotypeDescriptionRegistryConfigurer.EMPTY_VIEW_ID);
+
+ var createDocumentExecutionInput = ExecutionInput.newExecutionInput()
+ .query(createDocumentQuery)
+ .variables(Map.of("input", this.objectMapper.convertValue(createDocumentInput, new TypeReference>() {
+ })))
+ .build();
+ var createDocumentExecutionResult = this.graphQL.execute(createDocumentExecutionInput);
+ assertThat(createDocumentExecutionResult.getErrors()).isEmpty();
+
+ UUID documentId = null;
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(createDocumentExecutionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.createDocument.__typename");
+ assertThat(responseTypeName).isEqualTo("CreateDocumentSuccessPayload");
+
+ String rawDocumentId = JsonPath.read(jsonResult, "$.data.createDocument.document.id");
+ documentId = UUID.fromString(rawDocumentId);
+ } catch (JsonProcessingException | IllegalArgumentException exception) {
+ fail(exception.getMessage());
+ }
+
+ var createRootObjectQuery = """
+ mutation createRootObject($input: CreateRootObjectInput!) {
+ createRootObject(input: $input) {
+ __typename
+ ... on CreateRootObjectSuccessPayload {
+ object {
+ id
+ }
+ }
+ ... on ErrorPayload {
+ message
+ }
+ }
+ }
+ """;
+
+ var createRootObjectInput = new CreateRootObjectInput(UUID.randomUUID(), this.projectId.toString(), documentId, "http://www.eclipse.org/sirius-web/view", "View");
+
+ var createRootObjectExecutionInput = ExecutionInput.newExecutionInput()
+ .query(createRootObjectQuery)
+ .variables(Map.of("input", this.objectMapper.convertValue(createRootObjectInput, new TypeReference>() {
+ })))
+ .build();
+ var createRootObjectExecutionResult = this.graphQL.execute(createRootObjectExecutionInput);
+ assertThat(createRootObjectExecutionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(createRootObjectExecutionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.createRootObject.__typename");
+ assertThat(responseTypeName).isEqualTo("CreateRootObjectSuccessPayload");
+
+ String rawObjectId = JsonPath.read(jsonResult, "$.data.createRootObject.object.id");
+ this.rootObjectId = UUID.fromString(rawObjectId);
+ } catch (JsonProcessingException exception) {
+ fail(exception.getMessage());
+ }
+
+ }
+
+ private void createFormDescriptor() {
+ var createChildQuery = """
+ mutation createChild($input: CreateChildInput!) {
+ createChild(input: $input) {
+ __typename
+ ... on CreateChildSuccessPayload {
+ object {
+ id
+ }
+ }
+ ... on ErrorPayload { message __typename }
+ }
+ }
+ """;
+
+ var createChildInput = new CreateChildInput(UUID.randomUUID(), this.projectId.toString(), rootObjectId.toString(), "Form Description");
+
+ var createChildExecutionInput = ExecutionInput.newExecutionInput()
+ .query(createChildQuery)
+ .variables(Map.of("input", this.objectMapper.convertValue(createChildInput, new TypeReference>() {
+ })))
+ .build();
+ var createChildExecutionResult = this.graphQL.execute(createChildExecutionInput);
+ assertThat(createChildExecutionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(createChildExecutionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.createChild.__typename");
+ assertThat(responseTypeName).isEqualTo("CreateChildSuccessPayload");
+
+ String rawObjectId = JsonPath.read(jsonResult, "$.data.createChild.object.id");
+ this.formDescriptionObjectId = UUID.fromString(rawObjectId);
+ } catch (JsonProcessingException exception) {
+ fail(exception.getMessage());
+ }
+ }
+
+ private void createFormDescriptionEditor() {
+ var getRepresentationDescriptionsQuery = """
+ query getRepresentationDescriptions($editingContextId: ID!, $objectId: ID!) {
+ viewer {
+ editingContext(editingContextId: $editingContextId) {
+ representationDescriptions(objectId: $objectId) {
+ edges {
+ node {
+ id
+ }
+ }
+ }
+ }
+ }
+ }
+ """;
+
+ var getRepresentationDescriptionsExecutionInput = ExecutionInput.newExecutionInput()
+ .query(getRepresentationDescriptionsQuery)
+ .variables(Map.of("editingContextId", this.projectId.toString(), "objectId", this.formDescriptionObjectId.toString()))
+ .build();
+ var getRepresentationDescriptionsExecutionResult = this.graphQL.execute(getRepresentationDescriptionsExecutionInput);
+ assertThat(getRepresentationDescriptionsExecutionResult.getErrors()).isEmpty();
+
+ String representationDescriptionId = null;
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(getRepresentationDescriptionsExecutionResult.toSpecification());
+ representationDescriptionId = JsonPath.read(jsonResult, "$.data.viewer.editingContext.representationDescriptions.edges[0].node.id");
+ } catch (JsonProcessingException exception) {
+ fail(exception.getMessage());
+ }
+
+ var query = """
+ mutation createRepresentation($input: CreateRepresentationInput!) {
+ createRepresentation(input: $input) {
+ __typename
+ ... on CreateRepresentationSuccessPayload {
+ representation {
+ id
+ }
+ }
+ }
+ }
+ """;
+
+ var input = new CreateRepresentationInput(UUID.randomUUID(), this.projectId.toString(), representationDescriptionId, this.formDescriptionObjectId.toString(),
+ "FormDescriptionEditor");
+ var executionInput = ExecutionInput.newExecutionInput()
+ .query(query)
+ .variables(Map.of("input", this.objectMapper.convertValue(input, new TypeReference>() {
+ })))
+ .build();
+ var executionResult = this.graphQL.execute(executionInput);
+ assertThat(executionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(executionResult.toSpecification());
+ String rawRepresentationId = JsonPath.read(jsonResult, "$.data.createRepresentation.representation.id");
+ this.representationId = UUID.fromString(rawRepresentationId);
+ } catch (JsonProcessingException | IllegalArgumentException exception) {
+ fail(exception.getMessage());
+ }
+ }
+
+ @Test
+ public void testPageMutations() {
+ var configuration = new FormDescriptionEditorConfiguration(this.representationId.toString());
+ var input = new FormDescriptionEditorEventInput(UUID.randomUUID(), this.projectId.toString(), this.representationId.toString());
+ var payloadFlux = this.eventProcessorSubscriptionProvider.getSubscription(this.projectId.toString(), IFormDescriptionEditorEventProcessor.class, configuration, input);
+ AtomicReference defaultPageId = new AtomicReference<>();
+ AtomicReference newPageId = new AtomicReference<>();
+
+ Predicate isInitiatedWithOnePageFormDescriptionEditorRefreshedEventPayload = payload -> {
+ if (payload instanceof FormDescriptionEditorRefreshedEventPayload formDescriptionEditorRefreshedEventPayload) {
+ var formDescriptionEditor = formDescriptionEditorRefreshedEventPayload.formDescriptionEditor();
+ defaultPageId.set(formDescriptionEditor.getPages().get(0).getId());
+ return formDescriptionEditor.getPages().size() == 1;
+ }
+ return false;
+ };
+
+ Predicate afterAddPageFormDescriptionEditorRefreshedEventPayload = payload -> {
+ if (payload instanceof FormDescriptionEditorRefreshedEventPayload formDescriptionEditorRefreshedEventPayload) {
+ var formDescriptionEditor = formDescriptionEditorRefreshedEventPayload.formDescriptionEditor();
+ newPageId.set(formDescriptionEditor.getPages().get(1).getId());
+ return formDescriptionEditor.getPages().size() == 2 && formDescriptionEditor.getPages().stream().map(Page::getId).toList().indexOf(defaultPageId.get()) == 0;
+ }
+ return false;
+ };
+
+ Predicate afterMovePageFormDescriptionEditorRefreshedEventPayload = payload -> {
+ if (payload instanceof FormDescriptionEditorRefreshedEventPayload formDescriptionEditorRefreshedEventPayload) {
+ var formDescriptionEditor = formDescriptionEditorRefreshedEventPayload.formDescriptionEditor();
+ return formDescriptionEditor.getPages().size() == 2 && formDescriptionEditor.getPages().stream().map(Page::getId).toList().indexOf(newPageId.get()) == 0;
+ }
+ return false;
+ };
+
+ Predicate afterDeletePageFormDescriptionEditorRefreshedEventPayload = payload -> {
+ if (payload instanceof FormDescriptionEditorRefreshedEventPayload formDescriptionEditorRefreshedEventPayload) {
+ var formDescriptionEditor = formDescriptionEditorRefreshedEventPayload.formDescriptionEditor();
+ return formDescriptionEditor.getPages().size() == 1 && !formDescriptionEditor.getPages().stream().map(Page::getId).toList().contains(newPageId.get());
+ }
+ return false;
+ };
+
+
+ StepVerifier.create(payloadFlux)
+ .expectNextMatches(isInitiatedWithOnePageFormDescriptionEditorRefreshedEventPayload)
+ .then(this::addPageMutation)
+ .expectNextMatches(afterAddPageFormDescriptionEditorRefreshedEventPayload)
+ .then(() -> movePageMutation(newPageId.get()))
+ .expectNextMatches(afterMovePageFormDescriptionEditorRefreshedEventPayload)
+ .then(() -> deletePageMutation(newPageId.get()))
+ .expectNextMatches(afterDeletePageFormDescriptionEditorRefreshedEventPayload)
+ .thenCancel()
+ .verify(Duration.ofSeconds(10));
+
+ }
+
+ private void addPageMutation() {
+ var query = """
+ mutation addPage($input: AddPageInput!) {
+ addPage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ __typename
+ }
+ }
+ }
+ """;
+
+ var input = new AddPageInput(UUID.randomUUID(), this.projectId.toString(), this.representationId.toString(), 1);
+ var executionInput = ExecutionInput.newExecutionInput()
+ .query(query)
+ .variables(Map.of("input", this.objectMapper.convertValue(input, new TypeReference>() {
+ })))
+ .build();
+ var executionResult = this.graphQL.execute(executionInput);
+ assertThat(executionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(executionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.addPage.__typename");
+ assertThat(responseTypeName).isEqualTo("SuccessPayload");
+ } catch (JsonProcessingException | IllegalArgumentException exception) {
+ fail(exception.getMessage());
+ }
+
+ }
+
+ private void movePageMutation(String pageId) {
+ var query = """
+ mutation movePage($input: MovePageInput!) {
+ movePage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ __typename
+ }
+ }
+ }
+ """;
+
+ var input = new MovePageInput(UUID.randomUUID(), this.projectId.toString(), this.representationId.toString(), pageId, 0);
+ var executionInput = ExecutionInput.newExecutionInput()
+ .query(query)
+ .variables(Map.of("input", this.objectMapper.convertValue(input, new TypeReference>() {
+ })))
+ .build();
+ var executionResult = this.graphQL.execute(executionInput);
+ assertThat(executionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(executionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.movePage.__typename");
+ assertThat(responseTypeName).isEqualTo("SuccessPayload");
+ } catch (JsonProcessingException | IllegalArgumentException exception) {
+ fail(exception.getMessage());
+ }
+ }
+
+ private void deletePageMutation(String pageId) {
+ var query = """
+ mutation deletePage($input: DeletePageInput!) {
+ deletePage(input: $input) {
+ __typename
+ ... on SuccessPayload {
+ __typename
+ }
+ }
+ }
+ """;
+
+ var input = new DeletePageInput(UUID.randomUUID(), this.projectId.toString(), this.representationId.toString(), pageId);
+ var executionInput = ExecutionInput.newExecutionInput()
+ .query(query)
+ .variables(Map.of("input", this.objectMapper.convertValue(input, new TypeReference>() {
+ })))
+ .build();
+ var executionResult = this.graphQL.execute(executionInput);
+ assertThat(executionResult.getErrors()).isEmpty();
+
+ try {
+ var jsonResult = this.objectMapper.writeValueAsString(executionResult.toSpecification());
+ String responseTypeName = JsonPath.read(jsonResult, "$.data.deletePage.__typename");
+ assertThat(responseTypeName).isEqualTo("SuccessPayload");
+ } catch (JsonProcessingException | IllegalArgumentException exception) {
+ fail(exception.getMessage());
+ }
+ }
+}
diff --git a/packages/sirius-web/backend/sirius-web-sample-application/src/test/resources/ViewCompletionFixture.xmi b/packages/sirius-web/backend/sirius-web-sample-application/src/test/resources/ViewCompletionFixture.xmi
index 143d38e571..49e5b13101 100644
--- a/packages/sirius-web/backend/sirius-web-sample-application/src/test/resources/ViewCompletionFixture.xmi
+++ b/packages/sirius-web/backend/sirius-web-sample-application/src/test/resources/ViewCompletionFixture.xmi
@@ -37,51 +37,53 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/relatedelements/DefaultRelatedElementsDescriptionProvider.java b/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/relatedelements/DefaultRelatedElementsDescriptionProvider.java
index 41853667ea..be50fb40e5 100644
--- a/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/relatedelements/DefaultRelatedElementsDescriptionProvider.java
+++ b/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/relatedelements/DefaultRelatedElementsDescriptionProvider.java
@@ -75,7 +75,6 @@ public FormDescription getFormDescription() {
.targetObjectIdProvider(targetObjectIdProvider)
.canCreatePredicate(variableManager -> false)
.pageDescriptions(List.of(this.getPageDescription(groupDescriptions)))
- .groupDescriptions(groupDescriptions)
.build();
// @formatter:on
}
diff --git a/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/representations/RepresentationsDescriptionProvider.java b/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/representations/RepresentationsDescriptionProvider.java
index aaf86c57e7..3d619205dc 100644
--- a/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/representations/RepresentationsDescriptionProvider.java
+++ b/packages/sirius-web/backend/sirius-web-services/src/main/java/org/eclipse/sirius/web/services/representations/RepresentationsDescriptionProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2021, 2022 Obeo.
+ * 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
@@ -102,7 +102,6 @@ public FormDescription getRepresentationsDescription() {
.targetObjectIdProvider(targetObjectIdProvider)
.canCreatePredicate(variableManager -> false)
.pageDescriptions(pageDescriptions)
- .groupDescriptions(groupDescriptions)
.build();
// @formatter:on
}
diff --git a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/FormDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/FormDescriptionItemProvider.java
index 2f425022d3..47c0557698 100644
--- a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/FormDescriptionItemProvider.java
+++ b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/FormDescriptionItemProvider.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.provider;
import java.util.Collection;
@@ -21,6 +21,8 @@
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.sirius.components.view.FormDescription;
+import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewFactory;
import org.eclipse.sirius.components.view.ViewPackage;
@@ -66,7 +68,7 @@ public List getPropertyDescriptors(Object object) {
public Collection extends EStructuralFeature> getChildrenFeatures(Object object) {
if (this.childrenFeatures == null) {
super.getChildrenFeatures(object);
- this.childrenFeatures.add(ViewPackage.Literals.FORM_DESCRIPTION__GROUPS);
+ this.childrenFeatures.add(ViewPackage.Literals.FORM_DESCRIPTION__PAGES);
}
return this.childrenFeatures;
}
@@ -127,7 +129,7 @@ public void notifyChanged(Notification notification) {
this.updateChildren(notification);
switch (notification.getFeatureID(FormDescription.class)) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -138,12 +140,15 @@ 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.
*
- * @generated
+ * @generated NOT
*/
@Override
protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.FORM_DESCRIPTION__GROUPS, ViewFactory.eINSTANCE.createGroupDescription()));
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
+ pageDescription.getGroups().add(groupDescription);
+ newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.FORM_DESCRIPTION__PAGES, pageDescription));
}
}
diff --git a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/PageDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/PageDescriptionItemProvider.java
new file mode 100644
index 0000000000..8c777ca344
--- /dev/null
+++ b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/PageDescriptionItemProvider.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * 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.provider;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.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.PageDescription;
+import org.eclipse.sirius.components.view.ViewFactory;
+import org.eclipse.sirius.components.view.ViewPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.sirius.components.view.PageDescription} object.
+ *
+ * @generated
+ */
+public class PageDescriptionItemProvider extends ItemProviderAdapter
+ implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
+
+ /**
+ * This constructs an instance from a factory and a notifier.
+ *
+ * @generated
+ */
+ public PageDescriptionItemProvider(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);
+ this.addLabelExpressionPropertyDescriptor(object);
+ this.addSemanticCandidatesExpressionPropertyDescriptor(object);
+ this.addPreconditionExpressionPropertyDescriptor(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_PageDescription_name_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_PageDescription_name_feature", "_UI_PageDescription_type"),
+ ViewPackage.Literals.PAGE_DESCRIPTION__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Label Expression feature.
+ *
+ * @generated
+ */
+ protected void addLabelExpressionPropertyDescriptor(Object object) {
+ this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(),
+ this.getString("_UI_PageDescription_labelExpression_feature"),
+ this.getString("_UI_PropertyDescriptor_description", "_UI_PageDescription_labelExpression_feature", "_UI_PageDescription_type"),
+ ViewPackage.Literals.PAGE_DESCRIPTION__LABEL_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Semantic Candidates Expression feature.
+ *
+ * @generated
+ */
+ protected void addSemanticCandidatesExpressionPropertyDescriptor(Object object) {
+ this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(),
+ this.getString("_UI_PageDescription_semanticCandidatesExpression_feature"),
+ this.getString("_UI_PropertyDescriptor_description", "_UI_PageDescription_semanticCandidatesExpression_feature", "_UI_PageDescription_type"),
+ ViewPackage.Literals.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
+ }
+
+ /**
+ * This adds a property descriptor for the Precondition Expression feature.
+ *
+ * @generated
+ */
+ protected void addPreconditionExpressionPropertyDescriptor(Object object) {
+ this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(),
+ this.getString("_UI_PageDescription_preconditionExpression_feature"),
+ this.getString("_UI_PropertyDescriptor_description", "_UI_PageDescription_preconditionExpression_feature", "_UI_PageDescription_type"),
+ ViewPackage.Literals.PAGE_DESCRIPTION__PRECONDITION_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 extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (this.childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ this.childrenFeatures.add(ViewPackage.Literals.PAGE_DESCRIPTION__GROUPS);
+ }
+ 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 PageDescription.gif.
+ *
+ * @generated NOT
+ */
+ @Override
+ public Object getImage(Object object) {
+ return this.overlayImage(object, this.getResourceLocator().getImage("full/obj16/PageDescription.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 = ((PageDescription) object).getName();
+ return label == null || label.length() == 0 ? this.getString("_UI_PageDescription_type") : this.getString("_UI_PageDescription_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(PageDescription.class)) {
+ case ViewPackage.PAGE_DESCRIPTION__NAME:
+ case ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION:
+ case ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION:
+ case ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION:
+ this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ 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(ViewPackage.Literals.PAGE_DESCRIPTION__GROUPS, ViewFactory.eINSTANCE.createGroupDescription()));
+ }
+
+ /**
+ * 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-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProvider.java b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProvider.java
index 53a3b7b4b3..9cc88936a8 100644
--- a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProvider.java
+++ b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProvider.java
@@ -32,6 +32,7 @@
import org.eclipse.sirius.components.view.DiagramDescription;
import org.eclipse.sirius.components.view.FormDescription;
import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.View;
import org.eclipse.sirius.components.view.ViewFactory;
import org.eclipse.sirius.components.view.ViewPackage;
@@ -164,8 +165,10 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors
FormDescription newFormDescription = ViewFactory.eINSTANCE.createFormDescription();
newFormDescription.setName("New Form Description");
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
+ newFormDescription.getPages().add(pageDescription);
GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
- newFormDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
newChildDescriptors.add(this.createChildParameter(ViewPackage.Literals.VIEW__DESCRIPTIONS, newFormDescription));
ColorPalette newColorPalette = ViewFactory.eINSTANCE.createColorPalette();
diff --git a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProviderAdapterFactory.java b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProviderAdapterFactory.java
index 230d531640..208f21d495 100644
--- a/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProviderAdapterFactory.java
+++ b/packages/view/backend/sirius-components-view-edit/src/main/java/org/eclipse/sirius/components/view/provider/ViewItemProviderAdapterFactory.java
@@ -764,6 +764,29 @@ public Adapter createFormDescriptionAdapter() {
return this.formDescriptionItemProvider;
}
+ /**
+ * This keeps track of the one adapter used for all {@link org.eclipse.sirius.components.view.PageDescription}
+ * instances.
+ *
+ * @generated
+ */
+ protected PageDescriptionItemProvider pageDescriptionItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.sirius.components.view.PageDescription}.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Adapter createPageDescriptionAdapter() {
+ if (this.pageDescriptionItemProvider == null) {
+ this.pageDescriptionItemProvider = new PageDescriptionItemProvider(this);
+ }
+
+ return this.pageDescriptionItemProvider;
+ }
+
/**
* This keeps track of the one adapter used for all {@link org.eclipse.sirius.components.view.GroupDescription}
* instances.
@@ -1962,6 +1985,8 @@ public void dispose() {
this.conditionalEdgeStyleItemProvider.dispose();
if (this.formDescriptionItemProvider != null)
this.formDescriptionItemProvider.dispose();
+ if (this.pageDescriptionItemProvider != null)
+ this.pageDescriptionItemProvider.dispose();
if (this.groupDescriptionItemProvider != null)
this.groupDescriptionItemProvider.dispose();
if (this.textfieldDescriptionItemProvider != null)
diff --git a/packages/view/backend/sirius-components-view-edit/src/main/resources/icons/full/obj16/PageDescription.svg b/packages/view/backend/sirius-components-view-edit/src/main/resources/icons/full/obj16/PageDescription.svg
new file mode 100644
index 0000000000..beb16d2967
--- /dev/null
+++ b/packages/view/backend/sirius-components-view-edit/src/main/resources/icons/full/obj16/PageDescription.svg
@@ -0,0 +1 @@
+
diff --git a/packages/view/backend/sirius-components-view-edit/src/main/resources/plugin.properties b/packages/view/backend/sirius-components-view-edit/src/main/resources/plugin.properties
index 3106130b8d..3dd5d4539d 100644
--- a/packages/view/backend/sirius-components-view-edit/src/main/resources/plugin.properties
+++ b/packages/view/backend/sirius-components-view-edit/src/main/resources/plugin.properties
@@ -1,13 +1,15 @@
+################################################################################
# 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
+# Obeo - initial API and implementation
+#################################################################################
pluginName = View Edit Support
providerName = www.example.org
@@ -61,8 +63,9 @@ _UI_DeleteView_type = Delete View
_UI_Conditional_type = Conditional
_UI_ConditionalNodeStyle_type = Conditional Node Style
_UI_ConditionalEdgeStyle_type = Conditional Edge Style
-_UI_FormDescription_type = Form Description
-_UI_GroupDescription_type = Group Description
+_UI_FormDescription_type=Form Description
+_UI_PageDescription_type=Page Description
+_UI_GroupDescription_type=Group Description
_UI_WidgetDescription_type = Widget Description
_UI_TextfieldDescription_type = Textfield Description
_UI_CheckboxDescription_type = Checkbox Description
@@ -188,27 +191,32 @@ _UI_CreateInstance_referenceName_feature = Reference Name
_UI_CreateInstance_variableName_feature = Variable Name
_UI_SetValue_featureName_feature = Feature Name
_UI_SetValue_valueExpression_feature = Value Expression
-_UI_UnsetValue_featureName_feature = Feature Name
-_UI_UnsetValue_elementExpression_feature = Element Expression
-_UI_CreateView_parentViewExpression_feature = Parent View Expression
-_UI_CreateView_elementDescription_feature = Element Description
-_UI_CreateView_semanticElementExpression_feature = Semantic Element Expression
-_UI_CreateView_variableName_feature = Variable Name
-_UI_CreateView_containmentKind_feature = Containment Kind
-_UI_DeleteView_viewExpression_feature = View Expression
-_UI_Conditional_condition_feature = Condition
-_UI_ConditionalNodeStyle_style_feature = Style
-_UI_FormDescription_groups_feature = Groups
-_UI_GroupDescription_name_feature = Name
-_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_WidgetDescription_name_feature = Name
-_UI_WidgetDescription_labelExpression_feature = Label Expression
-_UI_TextfieldDescription_valueExpression_feature = Value Expression
-_UI_TextfieldDescription_body_feature = Body
+_UI_UnsetValue_featureName_feature=Feature Name
+_UI_UnsetValue_elementExpression_feature=Element Expression
+_UI_CreateView_parentViewExpression_feature=Parent View Expression
+_UI_CreateView_elementDescription_feature=Element Description
+_UI_CreateView_semanticElementExpression_feature=Semantic Element Expression
+_UI_CreateView_variableName_feature=Variable Name
+_UI_CreateView_containmentKind_feature=Containment Kind
+_UI_DeleteView_viewExpression_feature=View Expression
+_UI_Conditional_condition_feature=Condition
+_UI_ConditionalNodeStyle_style_feature=Style
+_UI_FormDescription_pages_feature=Pages
+_UI_PageDescription_name_feature=Name
+_UI_PageDescription_labelExpression_feature=Label Expression
+_UI_PageDescription_semanticCandidatesExpression_feature=Semantic Candidates Expression
+_UI_PageDescription_preconditionExpression_feature=Precondition Expression
+_UI_PageDescription_groups_feature=Groups
+_UI_GroupDescription_name_feature=Name
+_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_WidgetDescription_name_feature=Name
+_UI_WidgetDescription_labelExpression_feature=Label Expression
+_UI_TextfieldDescription_valueExpression_feature=Value Expression
+_UI_TextfieldDescription_body_feature=Body
_UI_TextfieldDescription_style_feature = Style
_UI_TextfieldDescription_conditionalStyles_feature = Conditional Styles
_UI_CheckboxDescription_valueExpression_feature = Value Expression
diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/ViewPropertiesDescriptionRegistryConfigurer.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/ViewPropertiesDescriptionRegistryConfigurer.java
index 052d775e1f..9a3e4657b7 100644
--- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/ViewPropertiesDescriptionRegistryConfigurer.java
+++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/ViewPropertiesDescriptionRegistryConfigurer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2022 Obeo.
+ * Copyright (c) 2022, 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
@@ -133,7 +133,6 @@ private FormDescription getFormDescription() {
.targetObjectIdProvider(targetObjectIdProvider)
.canCreatePredicate(variableManager -> false)
.pageDescriptions(pageDescriptions)
- .groupDescriptions(groupDescriptions)
.build();
// @formatter:on
}
diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/NodeStylePropertiesConfigurer.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/NodeStylePropertiesConfigurer.java
index 8dfbb39262..050c8bde67 100644
--- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/NodeStylePropertiesConfigurer.java
+++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/NodeStylePropertiesConfigurer.java
@@ -131,7 +131,6 @@ private FormDescription getImageNodeStyleProperties() {
.idProvider(new GetOrCreateRandomIdProvider())
.targetObjectIdProvider(this.getTargetObjectIdProvider())
.pageDescriptions(List.of(this.createSimplePageDescription(groupDescription, canCreatePagePredicate)))
- .groupDescriptions(List.of(groupDescription))
.build();
// @formatter:on
}
@@ -163,7 +162,6 @@ private FormDescription getIconLabelNodeStyleProperties() {
.idProvider(new GetOrCreateRandomIdProvider())
.targetObjectIdProvider(this.getTargetObjectIdProvider())
.pageDescriptions(List.of(this.createSimplePageDescription(groupDescription, canCreatePagePredicate)))
- .groupDescriptions(List.of(groupDescription))
.build();
// @formatter:on
}
@@ -200,7 +198,6 @@ private FormDescription getRectangularNodeStyleProperties() {
.idProvider(new GetOrCreateRandomIdProvider())
.targetObjectIdProvider(this.getTargetObjectIdProvider())
.pageDescriptions(List.of(this.createSimplePageDescription(groupDescription, canCreatePagePredicate)))
- .groupDescriptions(List.of(groupDescription))
.build();
// @formatter:on
}
diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/form/ViewFormDescriptionConverter.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/form/ViewFormDescriptionConverter.java
index b01cfeb247..063d9a5236 100644
--- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/form/ViewFormDescriptionConverter.java
+++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/form/ViewFormDescriptionConverter.java
@@ -53,6 +53,8 @@ public class ViewFormDescriptionConverter implements IRepresentationDescriptionC
private static final String DEFAULT_GROUP_LABEL = "";
+ private static final String DEFAULT_PAGE_LABEL = "";
+
private final IObjectService objectService;
private final IEditService editService;
@@ -73,54 +75,50 @@ public boolean canConvert(RepresentationDescription representationDescription) {
public IRepresentationDescription convert(RepresentationDescription representationDescription, List allRepresentationDescriptions, AQLInterpreter interpreter) {
org.eclipse.sirius.components.view.FormDescription viewFormDescription = (org.eclipse.sirius.components.view.FormDescription) representationDescription;
ViewFormDescriptionConverterSwitch dispatcher = new ViewFormDescriptionConverterSwitch(interpreter, this.editService, this.objectService);
- // @formatter:off
- Function> semanticElementsProvider = variableManager -> variableManager.get(VariableManager.SELF, Object.class).stream().toList();
- List groupDescriptions = viewFormDescription.getGroups().stream()
- .map(g -> this.instantiateGroup(g, dispatcher, interpreter))
- .filter(GroupDescription.class::isInstance)
- .map(GroupDescription.class::cast)
+ List pageDescriptions = viewFormDescription.getPages()
+ .stream()
+ .map(p -> this.instantiatePage(p, dispatcher, interpreter))
.toList();
- String descriptionId = this.formIdProvider.getId(viewFormDescription);
- PageDescription pageDescription = PageDescription.newPageDescription(descriptionId + "_page")
- .idProvider(new GetOrCreateRandomIdProvider())
- .labelProvider(variableManager -> this.computeFormLabel(viewFormDescription, variableManager, interpreter))
- .semanticElementsProvider(semanticElementsProvider)
- .canCreatePredicate(variableManager -> true)
- .groupDescriptions(groupDescriptions)
- .build();
-
- // @formatter:on
- List pageDescriptions = List.of(pageDescription);
-
- // @formatter:off
- Function targetObjectIdProvider = variableManager -> {
- return this.self(variableManager)
- .filter(self -> self instanceof List>)
- .map(self -> (List>) self)
- .flatMap(self -> self.stream().findFirst())
- .map(this.objectService::getId)
- .orElse(null);
- };
+ Function targetObjectIdProvider = variableManager -> this.self(variableManager)
+ .filter(self -> self instanceof List>)
+ .map(self -> (List>) self)
+ .flatMap(self -> self.stream().findFirst())
+ .map(this.objectService::getId)
+ .orElse(null);
- return FormDescription.newFormDescription(descriptionId)
+ return FormDescription.newFormDescription(this.formIdProvider.getId(viewFormDescription))
.label(Optional.ofNullable(viewFormDescription.getName()).orElse(DEFAULT_FORM_LABEL))
.idProvider(new GetOrCreateRandomIdProvider())
.labelProvider(variableManager -> this.computeFormLabel(viewFormDescription, variableManager, interpreter))
- .canCreatePredicate(variableManager -> this.canCreatForm(viewFormDescription, variableManager, interpreter))
+ .canCreatePredicate(variableManager -> this.canCreateForm(viewFormDescription, variableManager, interpreter))
.targetObjectIdProvider(targetObjectIdProvider)
.pageDescriptions(pageDescriptions)
+ .build();
+ }
+
+ private PageDescription instantiatePage(org.eclipse.sirius.components.view.PageDescription viewPageDescription, ViewFormDescriptionConverterSwitch dispatcher,
+ AQLInterpreter interpreter) {
+
+ List groupDescriptions = viewPageDescription.getGroups().stream()
+ .map(g -> this.instantiateGroup(g, dispatcher, interpreter))
+ .toList();
+
+ String descriptionId = this.getDescriptionId(viewPageDescription);
+ return PageDescription.newPageDescription(descriptionId)
+ .idProvider(getIdProvider(descriptionId))
+ .labelProvider(variableManager -> this.computePageLabel(viewPageDescription, variableManager, interpreter))
+ .semanticElementsProvider(variableManager -> this.getSemanticElementsProvider(viewPageDescription, variableManager, interpreter))
+ .canCreatePredicate(variableManager -> this.canCreatePage(viewPageDescription, variableManager, interpreter))
.groupDescriptions(groupDescriptions)
.build();
- // @formatter:on
}
private GroupDescription instantiateGroup(org.eclipse.sirius.components.view.GroupDescription viewGroupDescription, ViewFormDescriptionConverterSwitch dispatcher, AQLInterpreter interpreter) {
- // @formatter:off
List controlDescriptions = viewGroupDescription.getWidgets().stream()
.map(dispatcher::doSwitch)
- .filter(AbstractControlDescription.class::isInstance)
+ .filter(Objects::nonNull)
.map(AbstractControlDescription.class::cast)
.toList();
@@ -133,60 +131,68 @@ private GroupDescription instantiateGroup(org.eclipse.sirius.components.view.Gro
String descriptionId = this.getDescriptionId(viewGroupDescription);
return GroupDescription.newGroupDescription(descriptionId)
- .idProvider(variableManager -> {
- String selfId = variableManager.get(VariableManager.SELF, Object.class).map(this.objectService::getId).orElse("");
- return UUID.nameUUIDFromBytes((selfId + descriptionId).getBytes()).toString();
- })
+ .idProvider(getIdProvider(descriptionId))
.labelProvider(variableManager -> this.computeGroupLabel(viewGroupDescription, variableManager, interpreter))
- .semanticElementsProvider(this.getSemanticElementsProvider(viewGroupDescription, interpreter))
+ .semanticElementsProvider(variableManager -> this.getSemanticElementsProvider(viewGroupDescription, variableManager, interpreter))
.controlDescriptions(controlDescriptions)
.toolbarActionDescriptions(toolbarActionDescriptions)
.displayModeProvider(variableManager -> this.getGroupDisplayMode(viewGroupDescription))
.build();
- // @formatter:on
+ }
+
+ private Function getIdProvider(String descriptionId) {
+ return variableManager -> {
+ String selfId = variableManager.get(VariableManager.SELF, Object.class).map(this.objectService::getId).orElse("");
+ return UUID.nameUUIDFromBytes((selfId + descriptionId).getBytes()).toString();
+ };
}
private String computeFormLabel(org.eclipse.sirius.components.view.FormDescription viewFormDescription, VariableManager variableManager, AQLInterpreter interpreter) {
- String title = this.evaluateString(interpreter, variableManager, viewFormDescription.getTitleExpression());
- if (title == null || title.isBlank()) {
- return DEFAULT_FORM_LABEL;
- } else {
- return title;
- }
+ return this.evaluateString(interpreter, variableManager, viewFormDescription.getTitleExpression()).orElse(DEFAULT_FORM_LABEL);
+ }
+
+ private String computePageLabel(org.eclipse.sirius.components.view.PageDescription viewPageDescription, VariableManager variableManager, AQLInterpreter interpreter) {
+ return this.evaluateString(interpreter, variableManager, viewPageDescription.getLabelExpression()).orElse(DEFAULT_PAGE_LABEL);
}
private String computeGroupLabel(org.eclipse.sirius.components.view.GroupDescription viewGroupDescription, VariableManager variableManager, AQLInterpreter interpreter) {
- String label = this.evaluateString(interpreter, variableManager, viewGroupDescription.getLabelExpression());
- if (label == null || label.isBlank()) {
- return DEFAULT_GROUP_LABEL;
- } else {
- return label;
- }
+ return this.evaluateString(interpreter, variableManager, viewGroupDescription.getLabelExpression()).orElse(DEFAULT_GROUP_LABEL);
}
- private Function> getSemanticElementsProvider(org.eclipse.sirius.components.view.GroupDescription viewGroupDescription, AQLInterpreter interpreter) {
- return variableManager -> {
- Result result = interpreter.evaluateExpression(variableManager.getVariables(), viewGroupDescription.getSemanticCandidatesExpression());
- List candidates = result.asObjects().orElse(List.of());
- // @formatter:off
- return candidates.stream()
- .filter(EObject.class::isInstance)
- .map(EObject.class::cast)
- .toList();
- // @formatter:on
- };
+ private List> getSemanticElementsProvider(org.eclipse.sirius.components.view.GroupDescription viewGroupDescription, VariableManager variableManager, AQLInterpreter interpreter) {
+ Result result = interpreter.evaluateExpression(variableManager.getVariables(), viewGroupDescription.getSemanticCandidatesExpression());
+ List candidates = result.asObjects().orElse(List.of());
+ return candidates.stream()
+ .filter(EObject.class::isInstance)
+ .map(EObject.class::cast)
+ .toList();
+ }
+
+ private List> getSemanticElementsProvider(org.eclipse.sirius.components.view.PageDescription viewPageDescription, VariableManager variableManager, AQLInterpreter interpreter) {
+ Result result = interpreter.evaluateExpression(variableManager.getVariables(), viewPageDescription.getSemanticCandidatesExpression());
+ List candidates = result.asObjects().orElse(List.of());
+ return candidates.stream()
+ .filter(EObject.class::isInstance)
+ .map(EObject.class::cast)
+ .toList();
+ }
+
+ private Optional evaluateString(AQLInterpreter interpreter, VariableManager variableManager, String expression) {
+ return interpreter.evaluateExpression(variableManager.getVariables(), expression).asString();
}
- private String evaluateString(AQLInterpreter interpreter, VariableManager variableManager, String expression) {
- return interpreter.evaluateExpression(variableManager.getVariables(), expression).asString().orElse("");
+ private boolean canCreatePage(org.eclipse.sirius.components.view.PageDescription viewPageDescription, VariableManager variableManager, AQLInterpreter interpreter) {
+ String preconditionExpression = viewPageDescription.getPreconditionExpression();
+ if (preconditionExpression == null || preconditionExpression.isBlank()) {
+ return true;
+ }
+ return interpreter.evaluateExpression(variableManager.getVariables(), preconditionExpression).asBoolean().orElse(false);
}
- private boolean canCreatForm(org.eclipse.sirius.components.view.FormDescription viewFormDescription, VariableManager variableManager, AQLInterpreter interpreter) {
+ private boolean canCreateForm(org.eclipse.sirius.components.view.FormDescription viewFormDescription, VariableManager variableManager, AQLInterpreter interpreter) {
boolean result = false;
- // @formatter:off
Optional optionalEClass = variableManager.get(IRepresentationDescription.CLASS, EClass.class)
.filter(new DomainClassPredicate(viewFormDescription.getDomainType()));
- // @formatter:on
if (optionalEClass.isPresent()) {
String preconditionExpression = viewFormDescription.getPreconditionExpression();
if (preconditionExpression != null && !preconditionExpression.isBlank()) {
diff --git a/packages/view/backend/sirius-components-view-emf/src/test/java/org/eclipse/sirius/components/view/emf/view/DynamicFormsTests.java b/packages/view/backend/sirius-components-view-emf/src/test/java/org/eclipse/sirius/components/view/emf/view/DynamicFormsTests.java
index c78801258a..21657f7144 100644
--- a/packages/view/backend/sirius-components-view-emf/src/test/java/org/eclipse/sirius/components/view/emf/view/DynamicFormsTests.java
+++ b/packages/view/backend/sirius-components-view-emf/src/test/java/org/eclipse/sirius/components/view/emf/view/DynamicFormsTests.java
@@ -99,6 +99,7 @@
import org.eclipse.sirius.components.view.ListDescriptionStyle;
import org.eclipse.sirius.components.view.MultiSelectDescription;
import org.eclipse.sirius.components.view.MultiSelectDescriptionStyle;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.PieChartDescription;
import org.eclipse.sirius.components.view.PieChartDescriptionStyle;
import org.eclipse.sirius.components.view.RadioDescription;
@@ -605,9 +606,11 @@ private FormDescription createClassFormDescription(boolean withStyle, boolean wi
formDescription.setName("Simple Ecore Form");
formDescription.setTitleExpression("aql:self.name");
formDescription.setDomainType("ecore::EClass");
+ PageDescription pageDescription = ViewFactory.eINSTANCE.createPageDescription();
GroupDescription groupDescription = ViewFactory.eINSTANCE.createGroupDescription();
groupDescription.setLabelExpression("aql:self.name");
- formDescription.getGroups().add(groupDescription);
+ pageDescription.getGroups().add(groupDescription);
+ formDescription.getPages().add(pageDescription);
TextfieldDescription textfieldDescription = this.createTextfield(withStyle, withConditionalStyle);
groupDescription.getWidgets().add(textfieldDescription);
TextAreaDescription textAreaDescription = this.createTextArea(withStyle, withConditionalStyle);
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/FormDescription.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/FormDescription.java
index dd1664f70b..a72df5c095 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/FormDescription.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/FormDescription.java
@@ -1,5 +1,5 @@
-/**
- * Copyright (c) 2021, 2022 Obeo.
+/*******************************************************************************
+ * 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
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view;
import org.eclipse.emf.common.util.EList;
@@ -22,23 +22,24 @@
* The following features are supported:
*
*
- * {@link org.eclipse.sirius.components.view.FormDescription#getWidgets Widgets }
+ * {@link org.eclipse.sirius.components.view.FormDescription#getPages Pages }
*
*
- * @see org.eclipse.sirius.components.view.ViewPackage#getFormDescription()
* @model
* @generated
+ * @see org.eclipse.sirius.components.view.ViewPackage#getFormDescription()
*/
public interface FormDescription extends RepresentationDescription {
+
/**
- * Returns the value of the 'Groups ' containment reference list. The list contents are of type
- * {@link org.eclipse.sirius.components.view.GroupDescription}.
+ * Returns the value of the 'Pages ' containment reference list. The list contents are of type
+ * {@link org.eclipse.sirius.components.view.PageDescription}.
*
- * @return the value of the 'Groups ' containment reference list.
- * @see org.eclipse.sirius.components.view.ViewPackage#getFormDescription_Groups()
+ * @return the value of the 'Pages ' containment reference list.
* @model containment="true"
* @generated
+ * @see org.eclipse.sirius.components.view.ViewPackage#getFormDescription_Pages()
*/
- EList getGroups();
+ EList getPages();
} // FormDescription
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/PageDescription.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/PageDescription.java
new file mode 100644
index 0000000000..d3f73ab0b6
--- /dev/null
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/PageDescription.java
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * A representation of the model object 'Page Description '.
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * {@link org.eclipse.sirius.components.view.PageDescription#getName Name }
+ * {@link org.eclipse.sirius.components.view.PageDescription#getLabelExpression Label Expression }
+ * {@link org.eclipse.sirius.components.view.PageDescription#getSemanticCandidatesExpression Semantic Candidates
+ * Expression }
+ * {@link org.eclipse.sirius.components.view.PageDescription#getPreconditionExpression Precondition
+ * Expression }
+ * {@link org.eclipse.sirius.components.view.PageDescription#getGroups Groups }
+ *
+ *
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription()
+ * @model
+ * @generated
+ */
+public interface PageDescription extends EObject {
+
+ /**
+ * Returns the value of the 'Name ' attribute.
+ *
+ * @return the value of the 'Name ' attribute.
+ * @model dataType="org.eclipse.sirius.components.view.Identifier"
+ * @generated
+ * @see #setName(String)
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription_Name()
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.components.view.PageDescription#getName Name }'
+ * attribute.
+ *
+ * @param value the new value of the 'Name ' attribute.
+ * @generated
+ * @see #getName()
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the 'Label Expression ' attribute.
+ *
+ * @return the value of the 'Label Expression ' attribute.
+ * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression"
+ * @generated
+ * @see #setLabelExpression(String)
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription_LabelExpression()
+ */
+ String getLabelExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.components.view.PageDescription#getLabelExpression Label
+ * Expression }' attribute.
+ *
+ * @param value the new value of the 'Label Expression ' attribute.
+ * @generated
+ * @see #getLabelExpression()
+ */
+ void setLabelExpression(String value);
+
+ /**
+ * Returns the value of the 'Semantic Candidates Expression ' attribute. The default value is
+ * "aql:self"
.
+ *
+ * @return the value of the 'Semantic Candidates Expression ' attribute.
+ * @see #setSemanticCandidatesExpression(String)
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription_SemanticCandidatesExpression()
+ * @model default="aql:self" dataType="org.eclipse.sirius.components.view.InterpretedExpression"
+ * @generated
+ */
+ String getSemanticCandidatesExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.components.view.PageDescription#getSemanticCandidatesExpression
+ * Semantic Candidates Expression }' attribute.
+ *
+ * @param value
+ * the new value of the 'Semantic Candidates Expression ' attribute.
+ * @see #getSemanticCandidatesExpression()
+ * @generated
+ */
+ void setSemanticCandidatesExpression(String value);
+
+ /**
+ * Returns the value of the 'Precondition Expression ' attribute. The default value is
+ * ""
.
+ *
+ * @return the value of the 'Precondition Expression ' attribute.
+ * @see #setPreconditionExpression(String)
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription_PreconditionExpression()
+ * @model default="" dataType="org.eclipse.sirius.components.view.InterpretedExpression"
+ * @generated
+ */
+ String getPreconditionExpression();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.sirius.components.view.PageDescription#getPreconditionExpression
+ * Precondition Expression }' attribute.
+ *
+ * @param value
+ * the new value of the 'Precondition Expression ' attribute.
+ * @see #getPreconditionExpression()
+ * @generated
+ */
+ void setPreconditionExpression(String value);
+
+ /**
+ * Returns the value of the 'Groups ' containment reference list. The list contents are of type
+ * {@link org.eclipse.sirius.components.view.GroupDescription}.
+ *
+ * @return the value of the 'Groups ' containment reference list.
+ * @see org.eclipse.sirius.components.view.ViewPackage#getPageDescription_Groups()
+ * @model containment="true"
+ * @generated
+ */
+ EList getGroups();
+
+} // PageDescription
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewFactory.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewFactory.java
index a433e87196..ad4b16ca7e 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewFactory.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewFactory.java
@@ -268,6 +268,14 @@ public interface ViewFactory extends EFactory {
*/
FormDescription createFormDescription();
+ /**
+ * Returns a new object of class 'Page Description '.
+ *
+ * @return a new object of class 'Page Description '.
+ * @generated
+ */
+ PageDescription createPageDescription();
+
/**
* Returns a new object of class 'Group Description '.
*
@@ -332,6 +340,47 @@ public interface ViewFactory extends EFactory {
*/
RadioDescription createRadioDescription();
+ /**
+ * Returns a new object of class 'Bar Chart Description '.
+ *
+ * @return a new object of class 'Bar Chart Description '.
+ * @generated
+ */
+ BarChartDescription createBarChartDescription();
+
+ /**
+ * Returns a new object of class 'Pie Chart Description '.
+ *
+ * @return a new object of class 'Pie Chart Description '.
+ * @generated
+ */
+ PieChartDescription createPieChartDescription();
+
+ /**
+ * Returns a new object of class 'Flexbox Container Description '.
+ *
+ * @return a new object of class 'Flexbox Container Description '.
+ * @generated
+ */
+ FlexboxContainerDescription createFlexboxContainerDescription();
+
+ /**
+ * Returns a new object of class 'Button Description '.
+ *
+ * @return a new object of class 'Button Description '.
+ * @generated
+ */
+ ButtonDescription createButtonDescription();
+
+ /**
+ * Returns a new object of class 'Image Description '.
+ *
+ * @return a new object of class 'Image Description '.
+ * @generated
+ */
+ ImageDescription createImageDescription();
+
/**
* Returns a new object of class 'Textfield Description Style '.
@@ -590,47 +639,6 @@ public interface ViewFactory extends EFactory {
*/
EdgePalette createEdgePalette();
- /**
- * Returns a new object of class 'Bar Chart Description '.
- *
- * @return a new object of class 'Bar Chart Description '.
- * @generated
- */
- BarChartDescription createBarChartDescription();
-
- /**
- * Returns a new object of class 'Pie Chart Description '.
- *
- * @return a new object of class 'Pie Chart Description '.
- * @generated
- */
- PieChartDescription createPieChartDescription();
-
- /**
- * Returns a new object of class 'Flexbox Container Description '.
- *
- * @return a new object of class 'Flexbox Container Description '.
- * @generated
- */
- FlexboxContainerDescription createFlexboxContainerDescription();
-
- /**
- * Returns a new object of class 'Button Description '.
- *
- * @return a new object of class 'Button Description '.
- * @generated
- */
- ButtonDescription createButtonDescription();
-
- /**
- * Returns a new object of class 'Image Description '.
- *
- * @return a new object of class 'Image Description '.
- * @generated
- */
- ImageDescription createImageDescription();
-
/**
* Returns the package supported by this factory.
*
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewPackage.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewPackage.java
index 95bd7dc3a8..46100f1d63 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewPackage.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/ViewPackage.java
@@ -602,8 +602,8 @@ public interface ViewPackage extends EPackage {
int NODE_DESCRIPTION__REUSED_CHILD_NODE_DESCRIPTIONS = DIAGRAM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 7;
/**
- * The feature id for the 'Reused Border Node Descriptions ' containment reference list.
+ * The feature id for the 'Reused Border Node Descriptions ' reference list.
+ *
*
* @generated
* @ordered
@@ -1773,8 +1773,8 @@ public interface ViewPackage extends EPackage {
int TOOL__NAME = 0;
/**
- * The feature id for the 'Body ' containment reference.
+ * The feature id for the 'Body ' containment reference list.
*
* @generated
* @ordered
@@ -1816,8 +1816,8 @@ public interface ViewPackage extends EPackage {
int LABEL_EDIT_TOOL__NAME = TOOL__NAME;
/**
- * The feature id for the 'Body ' containment reference.
+ * The feature id for the 'Body ' containment reference list.
*
* @generated
* @ordered
@@ -1843,34 +1843,7 @@ public interface ViewPackage extends EPackage {
int LABEL_EDIT_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 1;
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.DiagramDescription#isAutoLayout Auto Layout }'.
- *
- * @return the meta object for the attribute 'Auto Layout '.
- * @see org.eclipse.sirius.components.view.DiagramDescription#isAutoLayout()
- * @see #getDiagramDescription()
- * @generated
- */
- EAttribute getDiagramDescription_AutoLayout();
-
- /**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.DiagramDescription#getPalette Palette }'.
- *
- * @return the meta object for the containment reference 'Palette '.
- * @see org.eclipse.sirius.components.view.DiagramDescription#getPalette()
- * @see #getDiagramDescription()
- * @generated
- */
- EReference getDiagramDescription_Palette();
-
- /**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.DiagramDescription#getNodeDescriptions Node Descriptions }'.
- * >>>>>>> 025361a0 ([512] View DSL: Add support for layout mode
- * configuration)
+ * The number of operations of the 'Label Edit Tool ' class.
*
* @generated
* @ordered
@@ -1896,8 +1869,8 @@ public interface ViewPackage extends EPackage {
int DELETE_TOOL__NAME = TOOL__NAME;
/**
- * The feature id for the 'Body ' containment reference.
+ * The feature id for the 'Body ' containment reference list.
*
* @generated
* @ordered
@@ -1940,8 +1913,8 @@ public interface ViewPackage extends EPackage {
int NODE_TOOL__NAME = TOOL__NAME;
/**
- * The feature id for the 'Body ' containment reference.
+ * The feature id for the 'Body ' containment reference list.
*
* @generated
* @ordered
@@ -1984,8 +1957,8 @@ public interface ViewPackage extends EPackage {
int EDGE_TOOL__NAME = TOOL__NAME;
/**
- * The feature id for the 'Body ' containment reference.
+ * The feature id for the 'Body ' containment reference list.
*
* @generated
* @ordered
@@ -2854,13 +2827,13 @@ public interface ViewPackage extends EPackage {
int FORM_DESCRIPTION__TITLE_EXPRESSION = REPRESENTATION_DESCRIPTION__TITLE_EXPRESSION;
/**
- * The feature id for the 'Groups ' containment reference list.
*
* @generated
* @ordered
*/
- int FORM_DESCRIPTION__GROUPS = REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 0;
+ int FORM_DESCRIPTION__PAGES = REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 0;
/**
* The number of structural features of the 'Form Description ' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.PageDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPageDescription()
+ * @generated
+ */
+ int PAGE_DESCRIPTION = 41;
+
+ /**
+ * The feature id for the 'Name ' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION__NAME = 0;
+
+ /**
+ * The feature id for the 'Label Expression ' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION__LABEL_EXPRESSION = 1;
+
+ /**
+ * The feature id for the 'Semantic Candidates Expression ' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION = 2;
+
+ /**
+ * The feature id for the 'Precondition Expression ' attribute.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION__PRECONDITION_EXPRESSION = 3;
+
+ /**
+ * The feature id for the 'Groups ' containment reference list.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION__GROUPS = 4;
+
+ /**
+ * The number of structural features of the 'Page Description ' class.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION_FEATURE_COUNT = 5;
+
+ /**
+ * The number of operations of the 'Page Description ' class.
+ *
+ * @generated
+ * @ordered
+ */
+ int PAGE_DESCRIPTION_OPERATION_COUNT = 0;
+
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.impl.GroupDescriptionImpl Group
* Description }' class.
@@ -2887,7 +2931,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getGroupDescription()
* @generated
*/
- int GROUP_DESCRIPTION = 41;
+ int GROUP_DESCRIPTION = 42;
/**
* The feature id for the 'Name ' attribute.
@@ -2966,7 +3010,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getWidgetDescription()
* @generated
*/
- int WIDGET_DESCRIPTION = 42;
+ int WIDGET_DESCRIPTION = 43;
/**
* The feature id for the 'Name ' attribute.
@@ -3011,7 +3055,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextfieldDescription()
* @generated
*/
- int TEXTFIELD_DESCRIPTION = 43;
+ int TEXTFIELD_DESCRIPTION = 44;
/**
* The feature id for the 'Name ' attribute.
@@ -3092,7 +3136,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getCheckboxDescription()
* @generated
*/
- int CHECKBOX_DESCRIPTION = 44;
+ int CHECKBOX_DESCRIPTION = 45;
/**
* The feature id for the 'Name ' attribute.
@@ -3173,7 +3217,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getSelectDescription()
* @generated
*/
- int SELECT_DESCRIPTION = 45;
+ int SELECT_DESCRIPTION = 46;
/**
* The feature id for the 'Name ' attribute.
@@ -3272,7 +3316,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getMultiSelectDescription()
* @generated
*/
- int MULTI_SELECT_DESCRIPTION = 46;
+ int MULTI_SELECT_DESCRIPTION = 47;
/**
* The feature id for the 'Name ' attribute.
@@ -3371,7 +3415,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextAreaDescription()
* @generated
*/
- int TEXT_AREA_DESCRIPTION = 47;
+ int TEXT_AREA_DESCRIPTION = 48;
/**
* The feature id for the 'Name ' attribute.
@@ -3452,7 +3496,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRichTextDescription()
* @generated
*/
- int RICH_TEXT_DESCRIPTION = 48;
+ int RICH_TEXT_DESCRIPTION = 49;
/**
* The feature id for the 'Name ' attribute.
@@ -3515,7 +3559,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRadioDescription()
* @generated
*/
- int RADIO_DESCRIPTION = 49;
+ int RADIO_DESCRIPTION = 50;
/**
* The feature id for the 'Name ' attribute.
@@ -3605,140 +3649,6 @@ public interface ViewPackage extends EPackage {
*/
int RADIO_DESCRIPTION_OPERATION_COUNT = WIDGET_DESCRIPTION_OPERATION_COUNT + 0;
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.WidgetDescriptionStyleImpl Widget
- * Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.WidgetDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getWidgetDescriptionStyle()
- * @generated
- */
- int WIDGET_DESCRIPTION_STYLE = 55;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.TextfieldDescriptionStyleImpl
- * Textfield Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.TextfieldDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextfieldDescriptionStyle()
- * @generated
- */
- int TEXTFIELD_DESCRIPTION_STYLE = 56;
-
- /**
- * The meta object id for the
- * '{@link org.eclipse.sirius.components.view.impl.ConditionalTextfieldDescriptionStyleImpl Conditional
- * Textfield Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalTextfieldDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalTextfieldDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE = 57;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.CheckboxDescriptionStyleImpl
- * Checkbox Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.CheckboxDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getCheckboxDescriptionStyle()
- * @generated
- */
- int CHECKBOX_DESCRIPTION_STYLE = 58;
-
- /**
- * The meta object id for the
- * '{@link org.eclipse.sirius.components.view.impl.ConditionalCheckboxDescriptionStyleImpl Conditional Checkbox
- * Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalCheckboxDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalCheckboxDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE = 59;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.SelectDescriptionStyleImpl Select
- * Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.SelectDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getSelectDescriptionStyle()
- * @generated
- */
- int SELECT_DESCRIPTION_STYLE = 60;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.ConditionalSelectDescriptionStyleImpl
- * Conditional Select Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalSelectDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalSelectDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_SELECT_DESCRIPTION_STYLE = 61;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.MultiSelectDescriptionStyleImpl
- * Multi Select Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.MultiSelectDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getMultiSelectDescriptionStyle()
- * @generated
- */
- int MULTI_SELECT_DESCRIPTION_STYLE = 62;
-
- /**
- * The meta object id for the
- * '{@link org.eclipse.sirius.components.view.impl.ConditionalMultiSelectDescriptionStyleImpl Conditional Multi
- * Select Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalMultiSelectDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalMultiSelectDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE = 63;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.TextareaDescriptionStyleImpl
- * Textarea Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.TextareaDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextareaDescriptionStyle()
- * @generated
- */
- int TEXTAREA_DESCRIPTION_STYLE = 64;
-
- /**
- * The meta object id for the
- * '{@link org.eclipse.sirius.components.view.impl.ConditionalTextareaDescriptionStyleImpl Conditional Textarea
- * Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalTextareaDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalTextareaDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE = 65;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.RadioDescriptionStyleImpl Radio
- * Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.RadioDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRadioDescriptionStyle()
- * @generated
- */
- int RADIO_DESCRIPTION_STYLE = 66;
-
- /**
- * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.ConditionalRadioDescriptionStyleImpl
- * Conditional Radio Description Style }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ConditionalRadioDescriptionStyleImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalRadioDescriptionStyle()
- * @generated
- */
- int CONDITIONAL_RADIO_DESCRIPTION_STYLE = 67;
-
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.impl.BarChartDescriptionImpl Bar Chart
* Description }' class.
@@ -3747,7 +3657,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getBarChartDescription()
* @generated
*/
- int BAR_CHART_DESCRIPTION = 50;
+ int BAR_CHART_DESCRIPTION = 51;
/**
* The feature id for the 'Name ' attribute.
@@ -3852,7 +3762,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPieChartDescription()
* @generated
*/
- int PIE_CHART_DESCRIPTION = 51;
+ int PIE_CHART_DESCRIPTION = 52;
/**
* The feature id for the 'Name ' attribute.
@@ -3932,7 +3842,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getFlexboxContainerDescription()
* @generated
*/
- int FLEXBOX_CONTAINER_DESCRIPTION = 52;
+ int FLEXBOX_CONTAINER_DESCRIPTION = 53;
/**
* The feature id for the 'Name ' attribute.
@@ -3994,7 +3904,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getButtonDescription()
* @generated
*/
- int BUTTON_DESCRIPTION = 53;
+ int BUTTON_DESCRIPTION = 54;
/**
* The feature id for the 'Name ' attribute.
@@ -4084,7 +3994,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getImageDescription()
* @generated
*/
- int IMAGE_DESCRIPTION = 54;
+ int IMAGE_DESCRIPTION = 55;
/**
* The feature id for the 'Name ' attribute.
@@ -4137,6 +4047,16 @@ public interface ViewPackage extends EPackage {
*/
int IMAGE_DESCRIPTION_OPERATION_COUNT = WIDGET_DESCRIPTION_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.WidgetDescriptionStyleImpl Widget
+ * Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.WidgetDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getWidgetDescriptionStyle()
+ * @generated
+ */
+ int WIDGET_DESCRIPTION_STYLE = 56;
+
/**
* The number of structural features of the 'Widget Description Style ' class.
@@ -4155,6 +4075,16 @@ public interface ViewPackage extends EPackage {
*/
int WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT = 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.TextfieldDescriptionStyleImpl
+ * Textfield Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.TextfieldDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextfieldDescriptionStyle()
+ * @generated
+ */
+ int TEXTFIELD_DESCRIPTION_STYLE = 57;
+
/**
* The feature id for the 'Font Size ' attribute.
*
@@ -4196,7 +4126,7 @@ public interface ViewPackage extends EPackage {
int TEXTFIELD_DESCRIPTION_STYLE__STRIKE_THROUGH = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4205,7 +4135,7 @@ public interface ViewPackage extends EPackage {
int TEXTFIELD_DESCRIPTION_STYLE__BACKGROUND_COLOR = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4231,6 +4161,17 @@ public interface ViewPackage extends EPackage {
*/
int TEXTFIELD_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the
+ * '{@link org.eclipse.sirius.components.view.impl.ConditionalTextfieldDescriptionStyleImpl Conditional
+ * Textfield Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalTextfieldDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalTextfieldDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE = 58;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -4280,7 +4221,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE__STRIKE_THROUGH = CONDITIONAL_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4289,7 +4230,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE__BACKGROUND_COLOR = CONDITIONAL_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4316,7 +4257,17 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_TEXTFIELD_DESCRIPTION_STYLE_OPERATION_COUNT = CONDITIONAL_OPERATION_COUNT + 0;
/**
- * The feature id for the 'Color ' reference.
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.CheckboxDescriptionStyleImpl
+ * Checkbox Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.CheckboxDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getCheckboxDescriptionStyle()
+ * @generated
+ */
+ int CHECKBOX_DESCRIPTION_STYLE = 59;
+
+ /**
+ * The feature id for the 'Color ' reference.
*
* @generated
* @ordered
@@ -4341,6 +4292,17 @@ public interface ViewPackage extends EPackage {
*/
int CHECKBOX_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the
+ * '{@link org.eclipse.sirius.components.view.impl.ConditionalCheckboxDescriptionStyleImpl Conditional Checkbox
+ * Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalCheckboxDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalCheckboxDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE = 60;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -4375,6 +4337,16 @@ public interface ViewPackage extends EPackage {
*/
int CONDITIONAL_CHECKBOX_DESCRIPTION_STYLE_OPERATION_COUNT = CONDITIONAL_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.SelectDescriptionStyleImpl Select
+ * Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.SelectDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getSelectDescriptionStyle()
+ * @generated
+ */
+ int SELECT_DESCRIPTION_STYLE = 61;
+
/**
* The feature id for the 'Font Size ' attribute.
*
@@ -4416,7 +4388,7 @@ public interface ViewPackage extends EPackage {
int SELECT_DESCRIPTION_STYLE__STRIKE_THROUGH = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4425,7 +4397,7 @@ public interface ViewPackage extends EPackage {
int SELECT_DESCRIPTION_STYLE__BACKGROUND_COLOR = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4451,6 +4423,16 @@ public interface ViewPackage extends EPackage {
*/
int SELECT_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.ConditionalSelectDescriptionStyleImpl
+ * Conditional Select Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalSelectDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalSelectDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_SELECT_DESCRIPTION_STYLE = 62;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -4500,7 +4482,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_SELECT_DESCRIPTION_STYLE__STRIKE_THROUGH = CONDITIONAL_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4509,7 +4491,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_SELECT_DESCRIPTION_STYLE__BACKGROUND_COLOR = CONDITIONAL_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4535,6 +4517,16 @@ public interface ViewPackage extends EPackage {
*/
int CONDITIONAL_SELECT_DESCRIPTION_STYLE_OPERATION_COUNT = CONDITIONAL_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.MultiSelectDescriptionStyleImpl
+ * Multi Select Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.MultiSelectDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getMultiSelectDescriptionStyle()
+ * @generated
+ */
+ int MULTI_SELECT_DESCRIPTION_STYLE = 63;
+
/**
* The feature id for the 'Font Size ' attribute.
*
@@ -4576,7 +4568,7 @@ public interface ViewPackage extends EPackage {
int MULTI_SELECT_DESCRIPTION_STYLE__STRIKE_THROUGH = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4585,7 +4577,7 @@ public interface ViewPackage extends EPackage {
int MULTI_SELECT_DESCRIPTION_STYLE__BACKGROUND_COLOR = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4611,6 +4603,17 @@ public interface ViewPackage extends EPackage {
*/
int MULTI_SELECT_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the
+ * '{@link org.eclipse.sirius.components.view.impl.ConditionalMultiSelectDescriptionStyleImpl Conditional Multi
+ * Select Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalMultiSelectDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalMultiSelectDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE = 64;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -4660,7 +4663,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE__STRIKE_THROUGH = CONDITIONAL_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4669,7 +4672,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE__BACKGROUND_COLOR = CONDITIONAL_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4695,6 +4698,16 @@ public interface ViewPackage extends EPackage {
*/
int CONDITIONAL_MULTI_SELECT_DESCRIPTION_STYLE_OPERATION_COUNT = CONDITIONAL_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.TextareaDescriptionStyleImpl
+ * Textarea Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.TextareaDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getTextareaDescriptionStyle()
+ * @generated
+ */
+ int TEXTAREA_DESCRIPTION_STYLE = 65;
+
/**
* The feature id for the 'Font Size ' attribute.
*
@@ -4736,7 +4749,7 @@ public interface ViewPackage extends EPackage {
int TEXTAREA_DESCRIPTION_STYLE__STRIKE_THROUGH = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4745,7 +4758,7 @@ public interface ViewPackage extends EPackage {
int TEXTAREA_DESCRIPTION_STYLE__BACKGROUND_COLOR = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4771,6 +4784,17 @@ public interface ViewPackage extends EPackage {
*/
int TEXTAREA_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the
+ * '{@link org.eclipse.sirius.components.view.impl.ConditionalTextareaDescriptionStyleImpl Conditional Textarea
+ * Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalTextareaDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalTextareaDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE = 66;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -4820,7 +4844,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE__STRIKE_THROUGH = CONDITIONAL_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -4829,7 +4853,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE__BACKGROUND_COLOR = CONDITIONAL_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -4855,6 +4879,16 @@ public interface ViewPackage extends EPackage {
*/
int CONDITIONAL_TEXTAREA_DESCRIPTION_STYLE_OPERATION_COUNT = CONDITIONAL_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.RadioDescriptionStyleImpl Radio
+ * Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.RadioDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRadioDescriptionStyle()
+ * @generated
+ */
+ int RADIO_DESCRIPTION_STYLE = 67;
+
/**
* The feature id for the 'Font Size ' attribute.
*
@@ -4921,6 +4955,16 @@ public interface ViewPackage extends EPackage {
*/
int RADIO_DESCRIPTION_STYLE_OPERATION_COUNT = WIDGET_DESCRIPTION_STYLE_OPERATION_COUNT + 0;
+ /**
+ * The meta object id for the '{@link org.eclipse.sirius.components.view.impl.ConditionalRadioDescriptionStyleImpl
+ * Conditional Radio Description Style }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ConditionalRadioDescriptionStyleImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalRadioDescriptionStyle()
+ * @generated
+ */
+ int CONDITIONAL_RADIO_DESCRIPTION_STYLE = 68;
+
/**
* The feature id for the 'Condition ' attribute.
*
@@ -5003,7 +5047,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getButtonDescriptionStyle()
* @generated
*/
- int BUTTON_DESCRIPTION_STYLE = 68;
+ int BUTTON_DESCRIPTION_STYLE = 69;
/**
* The feature id for the 'Font Size ' attribute.
@@ -5046,7 +5090,7 @@ public interface ViewPackage extends EPackage {
int BUTTON_DESCRIPTION_STYLE__STRIKE_THROUGH = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -5055,7 +5099,7 @@ public interface ViewPackage extends EPackage {
int BUTTON_DESCRIPTION_STYLE__BACKGROUND_COLOR = WIDGET_DESCRIPTION_STYLE_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -5089,7 +5133,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalButtonDescriptionStyle()
* @generated
*/
- int CONDITIONAL_BUTTON_DESCRIPTION_STYLE = 69;
+ int CONDITIONAL_BUTTON_DESCRIPTION_STYLE = 70;
/**
* The feature id for the 'Condition ' attribute.
@@ -5140,7 +5184,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_BUTTON_DESCRIPTION_STYLE__STRIKE_THROUGH = CONDITIONAL_FEATURE_COUNT + 4;
/**
- * The feature id for the 'Background Color ' attribute.
*
* @generated
@@ -5149,7 +5193,7 @@ public interface ViewPackage extends EPackage {
int CONDITIONAL_BUTTON_DESCRIPTION_STYLE__BACKGROUND_COLOR = CONDITIONAL_FEATURE_COUNT + 5;
/**
- * The feature id for the 'Foreground Color ' attribute.
*
* @generated
@@ -5183,7 +5227,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getBarChartDescriptionStyle()
* @generated
*/
- int BAR_CHART_DESCRIPTION_STYLE = 70;
+ int BAR_CHART_DESCRIPTION_STYLE = 71;
/**
* The feature id for the 'Font Size ' attribute.
@@ -5260,7 +5304,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalBarChartDescriptionStyle()
* @generated
*/
- int CONDITIONAL_BAR_CHART_DESCRIPTION_STYLE = 71;
+ int CONDITIONAL_BAR_CHART_DESCRIPTION_STYLE = 72;
/**
* The feature id for the 'Condition ' attribute.
@@ -5344,7 +5388,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPieChartDescriptionStyle()
* @generated
*/
- int PIE_CHART_DESCRIPTION_STYLE = 72;
+ int PIE_CHART_DESCRIPTION_STYLE = 73;
/**
* The feature id for the 'Font Size ' attribute.
@@ -5437,7 +5481,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalPieChartDescriptionStyle()
* @generated
*/
- int CONDITIONAL_PIE_CHART_DESCRIPTION_STYLE = 73;
+ int CONDITIONAL_PIE_CHART_DESCRIPTION_STYLE = 74;
/**
* The feature id for the 'Condition ' attribute.
@@ -5537,7 +5581,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLabelDescription()
* @generated
*/
- int LABEL_DESCRIPTION = 74;
+ int LABEL_DESCRIPTION = 75;
/**
* The feature id for the 'Name ' attribute.
@@ -5608,7 +5652,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLabelDescriptionStyle()
* @generated
*/
- int LABEL_DESCRIPTION_STYLE = 75;
+ int LABEL_DESCRIPTION_STYLE = 76;
/**
* The feature id for the 'Font Size ' attribute.
@@ -5684,7 +5728,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalLabelDescriptionStyle()
* @generated
*/
- int CONDITIONAL_LABEL_DESCRIPTION_STYLE = 76;
+ int CONDITIONAL_LABEL_DESCRIPTION_STYLE = 77;
/**
* The feature id for the 'Condition ' attribute.
@@ -5768,7 +5812,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLinkDescription()
* @generated
*/
- int LINK_DESCRIPTION = 77;
+ int LINK_DESCRIPTION = 78;
/**
* The feature id for the 'Name ' attribute.
@@ -5839,7 +5883,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLinkDescriptionStyle()
* @generated
*/
- int LINK_DESCRIPTION_STYLE = 78;
+ int LINK_DESCRIPTION_STYLE = 79;
/**
* The feature id for the 'Font Size ' attribute.
@@ -5915,7 +5959,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalLinkDescriptionStyle()
* @generated
*/
- int CONDITIONAL_LINK_DESCRIPTION_STYLE = 79;
+ int CONDITIONAL_LINK_DESCRIPTION_STYLE = 80;
/**
* The feature id for the 'Condition ' attribute.
@@ -5999,7 +6043,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getListDescription()
* @generated
*/
- int LIST_DESCRIPTION = 80;
+ int LIST_DESCRIPTION = 81;
/**
* The feature id for the 'Name ' attribute.
@@ -6097,7 +6141,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getListDescriptionStyle()
* @generated
*/
- int LIST_DESCRIPTION_STYLE = 81;
+ int LIST_DESCRIPTION_STYLE = 82;
/**
* The feature id for the 'Font Size ' attribute.
@@ -6173,7 +6217,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getConditionalListDescriptionStyle()
* @generated
*/
- int CONDITIONAL_LIST_DESCRIPTION_STYLE = 82;
+ int CONDITIONAL_LIST_DESCRIPTION_STYLE = 83;
/**
* The feature id for the 'Condition ' attribute.
@@ -6257,7 +6301,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getDiagramPalette()
* @generated
*/
- int DIAGRAM_PALETTE = 83;
+ int DIAGRAM_PALETTE = 84;
/**
* The feature id for the 'Drop Tool ' containment reference.
*
+ * @generated
* @see org.eclipse.sirius.components.view.LineStyle
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLineStyle()
- * @generated
*/
- int LINE_STYLE = 88;
+ int LINE_STYLE = 89;
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.NodeContainmentKind Node Containment
@@ -6476,7 +6520,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getNodeContainmentKind()
* @generated
*/
- int NODE_CONTAINMENT_KIND = 89;
+ int NODE_CONTAINMENT_KIND = 90;
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.SynchronizationPolicy Synchronization
@@ -6486,7 +6530,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getSynchronizationPolicy()
* @generated
*/
- int SYNCHRONIZATION_POLICY = 90;
+ int SYNCHRONIZATION_POLICY = 91;
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.GroupDisplayMode Group Display
@@ -6496,7 +6540,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getGroupDisplayMode()
* @generated
*/
- int GROUP_DISPLAY_MODE = 91;
+ int GROUP_DISPLAY_MODE = 92;
/**
* The meta object id for the '{@link org.eclipse.sirius.components.view.FlexDirection Flex Direction }'
@@ -6506,7 +6550,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getFlexDirection()
* @generated
*/
- int FLEX_DIRECTION = 92;
+ int FLEX_DIRECTION = 93;
/**
* The meta object id for the 'Identifier ' data type.
@@ -6515,17 +6559,17 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getIdentifier()
* @generated
*/
- int IDENTIFIER = 93;
+ int IDENTIFIER = 94;
/**
* The meta object id for the 'Interpreted Expression ' data type.
*
+ * @generated
* @see java.lang.String
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getInterpretedExpression()
- * @generated
*/
- int INTERPRETED_EXPRESSION = 94;
+ int INTERPRETED_EXPRESSION = 95;
/**
* The meta object id for the 'Domain Type ' data type.
@@ -6534,7 +6578,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getDomainType()
* @generated
*/
- int DOMAIN_TYPE = 95;
+ int DOMAIN_TYPE = 96;
/**
* The meta object id for the 'Color ' data type.
@@ -6543,7 +6587,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getColor()
* @generated
*/
- int COLOR = 96;
+ int COLOR = 97;
/**
* The meta object id for the 'Length ' data type.
@@ -6551,7 +6595,7 @@ public interface ViewPackage extends EPackage {
* @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getLength()
* @generated
*/
- int LENGTH = 97;
+ int LENGTH = 98;
/**
* Returns the meta object for class '{@link org.eclipse.sirius.components.view.View View }'.
+ *
+ * @return the meta object for the attribute 'Auto Layout '.
+ * @generated
+ * @see org.eclipse.sirius.components.view.DiagramDescription#isAutoLayout()
+ * @see #getDiagramDescription()
+ */
+ EAttribute getDiagramDescription_AutoLayout();
+
+ /**
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.DiagramDescription#getPalette Palette }'.
+ *
+ * @return the meta object for the containment reference 'Palette '.
+ * @see org.eclipse.sirius.components.view.DiagramDescription#getPalette()
+ * @see #getDiagramDescription()
+ * @generated
+ */
+ EReference getDiagramDescription_Palette();
+
/**
* Returns the meta object for the containment reference list
* '{@link org.eclipse.sirius.components.view.DiagramDescription#getNodeDescriptions Node Descriptions }'.
@@ -6802,15 +6870,15 @@ public interface ViewPackage extends EPackage {
/**
* Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.DiagramElementDescription#getLabelExpression Label
+ * '{@link org.eclipse.sirius.components.view.DiagramElementDescription#getPreconditionExpression Precondition
* Expression }'.
*
- * @return the meta object for the attribute 'Label Expression '.
- * @see org.eclipse.sirius.components.view.DiagramElementDescription#getLabelExpression()
+ * @return the meta object for the attribute 'Precondition Expression '.
+ * @see org.eclipse.sirius.components.view.DiagramElementDescription#getPreconditionExpression()
* @see #getDiagramElementDescription()
* @generated
*/
- EAttribute getDiagramElementDescription_LabelExpression();
+ EAttribute getDiagramElementDescription_PreconditionExpression();
/**
* Returns the meta object for the attribute
@@ -6826,15 +6894,15 @@ public interface ViewPackage extends EPackage {
/**
* Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.DiagramElementDescription#getPreconditionExpression Precondition
+ * '{@link org.eclipse.sirius.components.view.DiagramElementDescription#getLabelExpression Label
* Expression }'.
*
- * @return the meta object for the attribute 'Precondition Expression '.
- * @see org.eclipse.sirius.components.view.DiagramElementDescription#getPreconditionExpression()
+ * @return the meta object for the attribute 'Label Expression '.
+ * @see org.eclipse.sirius.components.view.DiagramElementDescription#getLabelExpression()
* @see #getDiagramElementDescription()
* @generated
*/
- EAttribute getDiagramElementDescription_PreconditionExpression();
+ EAttribute getDiagramElementDescription_LabelExpression();
/**
* Returns the meta object for class '{@link org.eclipse.sirius.components.view.NodeDescription Node
@@ -6847,52 +6915,40 @@ public interface ViewPackage extends EPackage {
EClass getNodeDescription();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getChildrenDescriptions Children
- * Descriptions }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#isCollapsible Collapsible }'.
*
- * @return the meta object for the containment reference list 'Children Descriptions '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getChildrenDescriptions()
- * @see #getNodeDescription()
+ * @return the meta object for the attribute 'Collapsible '.
* @generated
- */
- EReference getNodeDescription_ChildrenDescriptions();
-
- /**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getBorderNodesDescriptions Border Nodes
- * Descriptions }'.
- *
- * @return the meta object for the containment reference list 'Border Nodes Descriptions '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getBorderNodesDescriptions()
+ * @see org.eclipse.sirius.components.view.NodeDescription#isCollapsible()
* @see #getNodeDescription()
- * @generated
*/
- EReference getNodeDescription_BorderNodesDescriptions();
+ EAttribute getNodeDescription_Collapsible();
/**
- * Returns the meta object for the reference list
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getReusedChildNodeDescriptions Reused Child Node
- * Descriptions }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getPalette Palette }'.
+ *
*
- * @return the meta object for the reference list 'Reused Child Node Descriptions '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getReusedChildNodeDescriptions()
+ * @return the meta object for the containment reference 'Palette '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getPalette()
* @see #getNodeDescription()
* @generated
*/
- EReference getNodeDescription_ReusedChildNodeDescriptions();
+ EReference getNodeDescription_Palette();
/**
- * Returns the meta object for the reference list
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getReusedBorderNodeDescriptions Reused Border Node
- * Descriptions }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getChildrenLayoutStrategy Children Layout
+ * Strategy }'.
*
- * @return the meta object for the reference list 'Reused Border Node Descriptions '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getReusedBorderNodeDescriptions()
+ * @return the meta object for the containment reference 'Children Layout Strategy '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getChildrenLayoutStrategy()
* @see #getNodeDescription()
* @generated
*/
- EReference getNodeDescription_ReusedBorderNodeDescriptions();
+ EReference getNodeDescription_ChildrenLayoutStrategy();
/**
* Returns the meta object for the containment reference
@@ -6907,64 +6963,76 @@ public interface ViewPackage extends EPackage {
EReference getNodeDescription_Style();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.NodeDescription#isUserResizable User Resizable }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getConditionalStyles Conditional Styles }'.
+ *
*
- * @return the meta object for the attribute 'User Resizable '.
- * @see org.eclipse.sirius.components.view.NodeDescription#isUserResizable()
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getConditionalStyles()
* @see #getNodeDescription()
* @generated
*/
- EAttribute getNodeDescription_UserResizable();
+ EReference getNodeDescription_ConditionalStyles();
/**
* Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getConditionalStyles Conditional Styles }'.
- *
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getChildrenDescriptions Children
+ * Descriptions }'.
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getConditionalStyles()
+ * @return the meta object for the containment reference list 'Children Descriptions '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getChildrenDescriptions()
* @see #getNodeDescription()
* @generated
*/
- EReference getNodeDescription_ConditionalStyles();
+ EReference getNodeDescription_ChildrenDescriptions();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getChildrenLayoutStrategy Children Layout
- * Strategy }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getBorderNodesDescriptions Border Nodes
+ * Descriptions }'.
*
- * @return the meta object for the containment reference 'Children Layout Strategy '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getChildrenLayoutStrategy()
+ * @return the meta object for the containment reference list 'Border Nodes Descriptions '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getBorderNodesDescriptions()
* @see #getNodeDescription()
* @generated
*/
- EReference getNodeDescription_ChildrenLayoutStrategy();
+ EReference getNodeDescription_BorderNodesDescriptions();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.NodeDescription#isCollapsible Collapsible }'.
+ * Returns the meta object for the reference list
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getReusedChildNodeDescriptions Reused Child Node
+ * Descriptions }'.
*
- * @return the meta object for the attribute 'Collapsible '.
- * @see org.eclipse.sirius.components.view.NodeDescription#isCollapsible()
+ * @return the meta object for the reference list 'Reused Child Node Descriptions '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getReusedChildNodeDescriptions()
* @see #getNodeDescription()
* @generated
*/
- EAttribute getNodeDescription_Collapsible();
+ EReference getNodeDescription_ReusedChildNodeDescriptions();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.NodeDescription#getPalette Palette }'.
- *
+ * Returns the meta object for the reference list
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#getReusedBorderNodeDescriptions Reused Border Node
+ * Descriptions }'.
*
- * @return the meta object for the containment reference 'Palette '.
- * @see org.eclipse.sirius.components.view.NodeDescription#getPalette()
+ * @return the meta object for the reference list 'Reused Border Node Descriptions '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#getReusedBorderNodeDescriptions()
* @see #getNodeDescription()
* @generated
*/
- EReference getNodeDescription_Palette();
+ EReference getNodeDescription_ReusedBorderNodeDescriptions();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.NodeDescription#isUserResizable User Resizable }'.
+ *
+ * @return the meta object for the attribute 'User Resizable '.
+ * @see org.eclipse.sirius.components.view.NodeDescription#isUserResizable()
+ * @see #getNodeDescription()
+ * @generated
+ */
+ EAttribute getNodeDescription_UserResizable();
/**
* Returns the meta object for class '{@link org.eclipse.sirius.components.view.EdgeDescription Edge
@@ -7248,14 +7316,14 @@ public interface ViewPackage extends EPackage {
EClass getNodeStyleDescription();
/**
- * Returns the meta object for the attribute
+ * Returns the meta object for the reference
* '{@link org.eclipse.sirius.components.view.NodeStyleDescription#getLabelColor Label Color }'.
*
- * @return the meta object for the attribute 'Label Color '.
+ * @return the meta object for the reference 'Label Color '.
+ * @generated
* @see org.eclipse.sirius.components.view.NodeStyleDescription#getLabelColor()
* @see #getNodeStyleDescription()
- * @generated
*/
EReference getNodeStyleDescription_LabelColor();
@@ -7901,15 +7969,84 @@ public interface ViewPackage extends EPackage {
/**
* Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.FormDescription#getGroups Groups }'.
+ * '{@link org.eclipse.sirius.components.view.FormDescription#getPages Pages }'.
*
*
- * @return the meta object for the containment reference list 'Groups '.
- * @see org.eclipse.sirius.components.view.FormDescription#getGroups()
+ * @return the meta object for the containment reference list 'Pages '.
+ * @see org.eclipse.sirius.components.view.FormDescription#getPages()
* @see #getFormDescription()
* @generated
*/
- EReference getFormDescription_Groups();
+ EReference getFormDescription_Pages();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.PageDescription Page
+ * Description }'.
+ *
+ * @return the meta object for class 'Page Description '.
+ * @see org.eclipse.sirius.components.view.PageDescription
+ * @generated
+ */
+ EClass getPageDescription();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.components.view.PageDescription#getName
+ * Name }'.
+ *
+ * @return the meta object for the attribute 'Name '.
+ * @see org.eclipse.sirius.components.view.PageDescription#getName()
+ * @see #getPageDescription()
+ * @generated
+ */
+ EAttribute getPageDescription_Name();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PageDescription#getLabelExpression Label Expression }'.
+ *
+ * @return the meta object for the attribute 'Label Expression '.
+ * @see org.eclipse.sirius.components.view.PageDescription#getLabelExpression()
+ * @see #getPageDescription()
+ * @generated
+ */
+ EAttribute getPageDescription_LabelExpression();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PageDescription#getSemanticCandidatesExpression Semantic
+ * Candidates Expression }'.
+ *
+ * @return the meta object for the attribute 'Semantic Candidates Expression '.
+ * @see org.eclipse.sirius.components.view.PageDescription#getSemanticCandidatesExpression()
+ * @see #getPageDescription()
+ * @generated
+ */
+ EAttribute getPageDescription_SemanticCandidatesExpression();
+
+ /**
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PageDescription#getPreconditionExpression Precondition
+ * Expression }'.
+ *
+ * @return the meta object for the attribute 'Precondition Expression '.
+ * @see org.eclipse.sirius.components.view.PageDescription#getPreconditionExpression()
+ * @see #getPageDescription()
+ * @generated
+ */
+ EAttribute getPageDescription_PreconditionExpression();
+
+ /**
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.PageDescription#getGroups Groups }'.
+ *
+ *
+ * @return the meta object for the containment reference list 'Groups '.
+ * @see org.eclipse.sirius.components.view.PageDescription#getGroups()
+ * @see #getPageDescription()
+ * @generated
+ */
+ EReference getPageDescription_Groups();
/**
* Returns the meta object for class '{@link org.eclipse.sirius.components.view.GroupDescription Group
@@ -8480,1130 +8617,1130 @@ public interface ViewPackage extends EPackage {
EReference getRadioDescription_ConditionalStyles();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.WidgetDescriptionStyle Widget
- * Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.BarChartDescription Bar Chart
+ * Description }'.
*
- * @return the meta object for class 'Widget Description Style '.
- * @see org.eclipse.sirius.components.view.WidgetDescriptionStyle
+ * @return the meta object for class 'Bar Chart Description '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription
* @generated
*/
- EClass getWidgetDescriptionStyle();
+ EClass getBarChartDescription();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle
- * Textfield Description Style }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getValuesExpression Values Expression }'.
+ *
*
- * @return the meta object for class 'Textfield Description Style '.
- * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle
+ * @return the meta object for the attribute 'Values Expression '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getValuesExpression()
+ * @see #getBarChartDescription()
* @generated
*/
- EClass getTextfieldDescriptionStyle();
+ EAttribute getBarChartDescription_ValuesExpression();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getBackgroundColor Background
- * Color }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getKeysExpression Keys Expression }'.
*
- * @return the meta object for the reference 'Background Color '.
- * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getBackgroundColor()
- * @see #getTextfieldDescriptionStyle()
+ * @return the meta object for the attribute 'Keys Expression '.
* @generated
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getKeysExpression()
+ * @see #getBarChartDescription()
*/
- EReference getTextfieldDescriptionStyle_BackgroundColor();
+ EAttribute getBarChartDescription_KeysExpression();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getForegroundColor Foreground
- * Color }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getYAxisLabelExpression YAxis Label
+ * Expression }'.
*
- * @return the meta object for the reference 'Foreground Color '.
- * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getForegroundColor()
- * @see #getTextfieldDescriptionStyle()
+ * @return the meta object for the attribute 'YAxis Label Expression '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getYAxisLabelExpression()
+ * @see #getBarChartDescription()
* @generated
*/
- EReference getTextfieldDescriptionStyle_ForegroundColor();
+ EAttribute getBarChartDescription_YAxisLabelExpression();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalTextfieldDescriptionStyle
- * Conditional Textfield Description Style }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getStyle Style }'.
+ *
*
- * @return the meta object for class 'Conditional Textfield Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalTextfieldDescriptionStyle
+ * @return the meta object for the containment reference 'Style '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getStyle()
+ * @see #getBarChartDescription()
* @generated
*/
- EClass getConditionalTextfieldDescriptionStyle();
+ EReference getBarChartDescription_Style();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.CheckboxDescriptionStyle
- * Checkbox Description Style }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getConditionalStyles Conditional
+ * Styles }'.
*
- * @return the meta object for class 'Checkbox Description Style '.
- * @see org.eclipse.sirius.components.view.CheckboxDescriptionStyle
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getConditionalStyles()
+ * @see #getBarChartDescription()
* @generated
*/
- EClass getCheckboxDescriptionStyle();
+ EReference getBarChartDescription_ConditionalStyles();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.CheckboxDescriptionStyle#getColor Color }'.
+ * Returns the meta object for the attribute '{@link org.eclipse.sirius.components.view.BarChartDescription#getWidth
+ * Width }'.
*
- * @return the meta object for the attribute 'Color '.
- * @see org.eclipse.sirius.components.view.CheckboxDescriptionStyle#getColor()
- * @see #getCheckboxDescriptionStyle()
+ * @return the meta object for the attribute 'Width '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getWidth()
+ * @see #getBarChartDescription()
* @generated
*/
- EReference getCheckboxDescriptionStyle_Color();
+ EAttribute getBarChartDescription_Width();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalCheckboxDescriptionStyle
- * Conditional Checkbox Description Style }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.BarChartDescription#getHeight Height }'.
*
- * @return the meta object for class 'Conditional Checkbox Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalCheckboxDescriptionStyle
+ * @return the meta object for the attribute 'Height '.
+ * @see org.eclipse.sirius.components.view.BarChartDescription#getHeight()
+ * @see #getBarChartDescription()
* @generated
*/
- EClass getConditionalCheckboxDescriptionStyle();
+ EAttribute getBarChartDescription_Height();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle Select
- * Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.PieChartDescription Pie Chart
+ * Description }'.
*
- * @return the meta object for class 'Select Description Style '.
- * @see org.eclipse.sirius.components.view.SelectDescriptionStyle
+ * @return the meta object for class 'Pie Chart Description '.
+ * @see org.eclipse.sirius.components.view.PieChartDescription
* @generated
*/
- EClass getSelectDescriptionStyle();
+ EClass getPieChartDescription();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle#getBackgroundColor Background Color }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PieChartDescription#getValuesExpression Values Expression }'.
*
*
- * @return the meta object for the reference 'Background Color '.
- * @see org.eclipse.sirius.components.view.SelectDescriptionStyle#getBackgroundColor()
- * @see #getSelectDescriptionStyle()
+ * @return the meta object for the attribute 'Values Expression '.
+ * @see org.eclipse.sirius.components.view.PieChartDescription#getValuesExpression()
+ * @see #getPieChartDescription()
* @generated
*/
- EReference getSelectDescriptionStyle_BackgroundColor();
+ EAttribute getPieChartDescription_ValuesExpression();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle#getForegroundColor Foreground Color }'.
- *
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PieChartDescription#getKeysExpression Keys Expression }'.
*
- * @return the meta object for the reference 'Foreground Color '.
- * @see org.eclipse.sirius.components.view.SelectDescriptionStyle#getForegroundColor()
- * @see #getSelectDescriptionStyle()
+ * @return the meta object for the attribute 'Keys Expression '.
* @generated
+ * @see org.eclipse.sirius.components.view.PieChartDescription#getKeysExpression()
+ * @see #getPieChartDescription()
*/
- EReference getSelectDescriptionStyle_ForegroundColor();
+ EAttribute getPieChartDescription_KeysExpression();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalSelectDescriptionStyle
- * Conditional Select Description Style }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.PieChartDescription#getStyle Style }'.
+ *
*
- * @return the meta object for class 'Conditional Select Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalSelectDescriptionStyle
+ * @return the meta object for the containment reference 'Style '.
+ * @see org.eclipse.sirius.components.view.PieChartDescription#getStyle()
+ * @see #getPieChartDescription()
* @generated
*/
- EClass getConditionalSelectDescriptionStyle();
+ EReference getPieChartDescription_Style();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle
- * Multi Select Description Style }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.PieChartDescription#getConditionalStyles Conditional
+ * Styles }'.
*
- * @return the meta object for class 'Multi Select Description Style '.
- * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.PieChartDescription#getConditionalStyles()
+ * @see #getPieChartDescription()
* @generated
*/
- EClass getMultiSelectDescriptionStyle();
+ EReference getPieChartDescription_ConditionalStyles();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getBackgroundColor Background
- * Color }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription
+ * Flexbox Container Description }'.
*
- * @return the meta object for the reference 'Background Color '.
- * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getBackgroundColor()
- * @see #getMultiSelectDescriptionStyle()
+ * @return the meta object for class 'Flexbox Container Description '.
+ * @see org.eclipse.sirius.components.view.FlexboxContainerDescription
* @generated
*/
- EReference getMultiSelectDescriptionStyle_BackgroundColor();
+ EClass getFlexboxContainerDescription();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getForegroundColor Foreground
- * Color }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription#getChildren Children }'.
*
- * @return the meta object for the reference 'Foreground Color '.
- * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getForegroundColor()
- * @see #getMultiSelectDescriptionStyle()
+ * @return the meta object for the containment reference list 'Children '.
* @generated
+ * @see org.eclipse.sirius.components.view.FlexboxContainerDescription#getChildren()
+ * @see #getFlexboxContainerDescription()
*/
- EReference getMultiSelectDescriptionStyle_ForegroundColor();
+ EReference getFlexboxContainerDescription_Children();
/**
- * Returns the meta object for class
- * '{@link org.eclipse.sirius.components.view.ConditionalMultiSelectDescriptionStyle Conditional Multi Select
- * Description Style }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription#getFlexDirection Flex
+ * Direction }'.
*
- * @return the meta object for class 'Conditional Multi Select Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalMultiSelectDescriptionStyle
+ * @return the meta object for the attribute 'Flex Direction '.
+ * @see org.eclipse.sirius.components.view.FlexboxContainerDescription#getFlexDirection()
+ * @see #getFlexboxContainerDescription()
* @generated
*/
- EClass getConditionalMultiSelectDescriptionStyle();
+ EAttribute getFlexboxContainerDescription_FlexDirection();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle
- * Textarea Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ButtonDescription Button
+ * Description }'.
*
- * @return the meta object for class 'Textarea Description Style '.
- * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle
+ * @return the meta object for class 'Button Description '.
+ * @see org.eclipse.sirius.components.view.ButtonDescription
* @generated
*/
- EClass getTextareaDescriptionStyle();
+ EClass getButtonDescription();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle#getBackgroundColor Background
- * Color }'.
- *
- * @return the meta object for the reference 'Background Color '.
- * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle#getBackgroundColor()
- * @see #getTextareaDescriptionStyle()
- * @generated
- */
- EReference getTextareaDescriptionStyle_BackgroundColor();
-
- /**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle#getForegroundColor Foreground
- * Color }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.ButtonDescription#getButtonLabelExpression Button Label
+ * Expression }'.
*
- * @return the meta object for the reference 'Foreground Color '.
- * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle#getForegroundColor()
- * @see #getTextareaDescriptionStyle()
+ * @return the meta object for the attribute 'Button Label Expression '.
+ * @see org.eclipse.sirius.components.view.ButtonDescription#getButtonLabelExpression()
+ * @see #getButtonDescription()
* @generated
*/
- EReference getTextareaDescriptionStyle_ForegroundColor();
+ EAttribute getButtonDescription_ButtonLabelExpression();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalTextareaDescriptionStyle
- * Conditional Textarea Description Style }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.ButtonDescription#getBody Body }'.
+ *
*
- * @return the meta object for class 'Conditional Textarea Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalTextareaDescriptionStyle
+ * @return the meta object for the containment reference list 'Body '.
+ * @see org.eclipse.sirius.components.view.ButtonDescription#getBody()
+ * @see #getButtonDescription()
* @generated
*/
- EClass getConditionalTextareaDescriptionStyle();
+ EReference getButtonDescription_Body();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.RadioDescriptionStyle Radio
- * Description Style }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.ButtonDescription#getImageExpression Image Expression }'.
*
- * @return the meta object for class 'Radio Description Style '.
- * @see org.eclipse.sirius.components.view.RadioDescriptionStyle
+ * @return the meta object for the attribute 'Image Expression '.
* @generated
+ * @see org.eclipse.sirius.components.view.ButtonDescription#getImageExpression()
+ * @see #getButtonDescription()
*/
- EClass getRadioDescriptionStyle();
+ EAttribute getButtonDescription_ImageExpression();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.RadioDescriptionStyle#getColor Color }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.ButtonDescription#getStyle Style }'.
+ *
*
- * @return the meta object for the reference 'Color '.
- * @see org.eclipse.sirius.components.view.RadioDescriptionStyle#getColor()
- * @see #getRadioDescriptionStyle()
+ * @return the meta object for the containment reference 'Style '.
+ * @see org.eclipse.sirius.components.view.ButtonDescription#getStyle()
+ * @see #getButtonDescription()
* @generated
*/
- EReference getRadioDescriptionStyle_Color();
+ EReference getButtonDescription_Style();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalRadioDescriptionStyle
- * Conditional Radio Description Style }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.ButtonDescription#getConditionalStyles Conditional Styles }'.
+ *
*
- * @return the meta object for class 'Conditional Radio Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalRadioDescriptionStyle
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.ButtonDescription#getConditionalStyles()
+ * @see #getButtonDescription()
* @generated
*/
- EClass getConditionalRadioDescriptionStyle();
+ EReference getButtonDescription_ConditionalStyles();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle Button
- * Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ImageDescription Image
+ * Description }'.
*
- * @return the meta object for class 'Button Description Style '.
- * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle
+ * @return the meta object for class 'Image Description '.
+ * @see org.eclipse.sirius.components.view.ImageDescription
* @generated
*/
- EClass getButtonDescriptionStyle();
+ EClass getImageDescription();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle#getBackgroundColor Background Color }'.
- *
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.ImageDescription#getUrlExpression Url Expression }'.
*
- * @return the meta object for the reference 'Background Color '.
- * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle#getBackgroundColor()
- * @see #getButtonDescriptionStyle()
+ * @return the meta object for the attribute 'Url Expression '.
* @generated
+ * @see org.eclipse.sirius.components.view.ImageDescription#getUrlExpression()
+ * @see #getImageDescription()
*/
- EReference getButtonDescriptionStyle_BackgroundColor();
+ EAttribute getImageDescription_UrlExpression();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle#getForegroundColor Foreground Color }'.
- *
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.ImageDescription#getMaxWidthExpression Max Width
+ * Expression }'.
*
- * @return the meta object for the reference 'Foreground Color '.
- * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle#getForegroundColor()
- * @see #getButtonDescriptionStyle()
+ * @return the meta object for the attribute 'Max Width Expression '.
+ * @see org.eclipse.sirius.components.view.ImageDescription#getMaxWidthExpression()
+ * @see #getImageDescription()
* @generated
*/
- EReference getButtonDescriptionStyle_ForegroundColor();
+ EAttribute getImageDescription_MaxWidthExpression();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalButtonDescriptionStyle
- * Conditional Button Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.WidgetDescriptionStyle Widget
+ * Description Style }'.
*
- * @return the meta object for class 'Conditional Button Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalButtonDescriptionStyle
+ * @return the meta object for class 'Widget Description Style '.
+ * @see org.eclipse.sirius.components.view.WidgetDescriptionStyle
* @generated
*/
- EClass getConditionalButtonDescriptionStyle();
+ EClass getWidgetDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.BarChartDescriptionStyle Bar
- * Chart Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle
+ * Textfield Description Style }'.
*
- * @return the meta object for class 'Bar Chart Description Style '.
- * @see org.eclipse.sirius.components.view.BarChartDescriptionStyle
+ * @return the meta object for class 'Textfield Description Style '.
+ * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle
* @generated
*/
- EClass getBarChartDescriptionStyle();
+ EClass getTextfieldDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.BarChartDescriptionStyle#getBarsColor Bars Color }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getBackgroundColor Background
+ * Color }'.
*
- * @return the meta object for the attribute 'Bars Color '.
- * @see org.eclipse.sirius.components.view.BarChartDescriptionStyle#getBarsColor()
- * @see #getBarChartDescriptionStyle()
+ * @return the meta object for the reference 'Background Color '.
+ * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getBackgroundColor()
+ * @see #getTextfieldDescriptionStyle()
* @generated
*/
- EAttribute getBarChartDescriptionStyle_BarsColor();
+ EReference getTextfieldDescriptionStyle_BackgroundColor();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalBarChartDescriptionStyle
- * Conditional Bar Chart Description Style }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getForegroundColor Foreground
+ * Color }'.
*
- * @return the meta object for class 'Conditional Bar Chart Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalBarChartDescriptionStyle
+ * @return the meta object for the reference 'Foreground Color '.
+ * @see org.eclipse.sirius.components.view.TextfieldDescriptionStyle#getForegroundColor()
+ * @see #getTextfieldDescriptionStyle()
* @generated
*/
- EClass getConditionalBarChartDescriptionStyle();
+ EReference getTextfieldDescriptionStyle_ForegroundColor();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle Pie
- * Chart Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalTextfieldDescriptionStyle
+ * Conditional Textfield Description Style }'.
*
- * @return the meta object for class 'Pie Chart Description Style '.
- * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle
+ * @return the meta object for class 'Conditional Textfield Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalTextfieldDescriptionStyle
* @generated
*/
- EClass getPieChartDescriptionStyle();
+ EClass getConditionalTextfieldDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getColors Colors }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.CheckboxDescriptionStyle
+ * Checkbox Description Style }'.
*
- * @return the meta object for the attribute 'Colors '.
- * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getColors()
- * @see #getPieChartDescriptionStyle()
+ * @return the meta object for class 'Checkbox Description Style '.
+ * @see org.eclipse.sirius.components.view.CheckboxDescriptionStyle
* @generated
*/
- EAttribute getPieChartDescriptionStyle_Colors();
+ EClass getCheckboxDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeWidth Stroke Width }'.
*
- * @return the meta object for the attribute 'Stroke Width '.
- * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeWidth()
- * @see #getPieChartDescriptionStyle()
+ * @return the meta object for the reference 'Color '.
* @generated
+ * @see org.eclipse.sirius.components.view.CheckboxDescriptionStyle#getColor()
+ * @see #getCheckboxDescriptionStyle()
*/
- EAttribute getPieChartDescriptionStyle_StrokeWidth();
+ EReference getCheckboxDescriptionStyle_Color();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeColor Stroke Color }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalCheckboxDescriptionStyle
+ * Conditional Checkbox Description Style }'.
*
- * @return the meta object for the attribute 'Stroke Color '.
- * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeColor()
- * @see #getPieChartDescriptionStyle()
+ * @return the meta object for class 'Conditional Checkbox Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalCheckboxDescriptionStyle
* @generated
*/
- EReference getPieChartDescriptionStyle_StrokeColor();
+ EClass getConditionalCheckboxDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalPieChartDescriptionStyle
- * Conditional Pie Chart Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle Select
+ * Description Style }'.
*
- * @return the meta object for class 'Conditional Pie Chart Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalPieChartDescriptionStyle
+ * @return the meta object for class 'Select Description Style '.
+ * @see org.eclipse.sirius.components.view.SelectDescriptionStyle
* @generated
*/
- EClass getConditionalPieChartDescriptionStyle();
+ EClass getSelectDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LabelDescription Label
- * Description }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle#getBackgroundColor Background Color }'.
+ *
*
- * @return the meta object for class 'Label Description '.
- * @see org.eclipse.sirius.components.view.LabelDescription
+ * @return the meta object for the reference 'Background Color '.
+ * @see org.eclipse.sirius.components.view.SelectDescriptionStyle#getBackgroundColor()
+ * @see #getSelectDescriptionStyle()
* @generated
*/
- EClass getLabelDescription();
+ EReference getSelectDescriptionStyle_BackgroundColor();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.LabelDescription#getValueExpression Value Expression }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.SelectDescriptionStyle#getForegroundColor Foreground Color }'.
+ *
*
- * @return the meta object for the attribute 'Value Expression '.
- * @see org.eclipse.sirius.components.view.LabelDescription#getValueExpression()
- * @see #getLabelDescription()
+ * @return the meta object for the reference 'Foreground Color '.
+ * @see org.eclipse.sirius.components.view.SelectDescriptionStyle#getForegroundColor()
+ * @see #getSelectDescriptionStyle()
* @generated
*/
- EAttribute getLabelDescription_ValueExpression();
+ EReference getSelectDescriptionStyle_ForegroundColor();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.LabelDescription#getStyle Style }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalSelectDescriptionStyle
+ * Conditional Select Description Style }'.
*
- * @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.LabelDescription#getStyle()
- * @see #getLabelDescription()
+ * @return the meta object for class 'Conditional Select Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalSelectDescriptionStyle
* @generated
*/
- EReference getLabelDescription_Style();
+ EClass getConditionalSelectDescriptionStyle();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.LabelDescription#getConditionalStyles Conditional Styles }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle
+ * Multi Select Description Style }'.
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.LabelDescription#getConditionalStyles()
- * @see #getLabelDescription()
+ * @return the meta object for class 'Multi Select Description Style '.
+ * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle
* @generated
*/
- EReference getLabelDescription_ConditionalStyles();
+ EClass getMultiSelectDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LabelDescriptionStyle Label
- * Description Style }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getBackgroundColor Background
+ * Color }'.
*
- * @return the meta object for class 'Label Description Style '.
- * @see org.eclipse.sirius.components.view.LabelDescriptionStyle
+ * @return the meta object for the reference 'Background Color '.
+ * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getBackgroundColor()
+ * @see #getMultiSelectDescriptionStyle()
* @generated
*/
- EClass getLabelDescriptionStyle();
+ EReference getMultiSelectDescriptionStyle_BackgroundColor();
/**
* Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.LabelDescriptionStyle#getColor Color }'.
+ * '{@link org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getForegroundColor Foreground
+ * Color }'.
*
- * @return the meta object for the reference 'Color '.
- * @see org.eclipse.sirius.components.view.LabelDescriptionStyle#getColor()
- * @see #getLabelDescriptionStyle()
+ * @return the meta object for the reference 'Foreground Color '.
+ * @see org.eclipse.sirius.components.view.MultiSelectDescriptionStyle#getForegroundColor()
+ * @see #getMultiSelectDescriptionStyle()
* @generated
*/
- EReference getLabelDescriptionStyle_Color();
+ EReference getMultiSelectDescriptionStyle_ForegroundColor();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalLabelDescriptionStyle
- * Conditional Label Description Style }'.
+ * Returns the meta object for class
+ * '{@link org.eclipse.sirius.components.view.ConditionalMultiSelectDescriptionStyle Conditional Multi Select
+ * Description Style }'.
*
- * @return the meta object for class 'Conditional Label Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalLabelDescriptionStyle
+ * @return the meta object for class 'Conditional Multi Select Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalMultiSelectDescriptionStyle
* @generated
*/
- EClass getConditionalLabelDescriptionStyle();
+ EClass getConditionalMultiSelectDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LinkDescription Link
- * Description }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle
+ * Textarea Description Style }'.
*
- * @return the meta object for class 'Link Description '.
- * @see org.eclipse.sirius.components.view.LinkDescription
+ * @return the meta object for class 'Textarea Description Style '.
+ * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle
* @generated
*/
- EClass getLinkDescription();
+ EClass getTextareaDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.LinkDescription#getValueExpression Value Expression }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle#getBackgroundColor Background
+ * Color }'.
*
- * @return the meta object for the attribute 'Value Expression '.
- * @see org.eclipse.sirius.components.view.LinkDescription#getValueExpression()
- * @see #getLinkDescription()
+ * @return the meta object for the reference 'Background Color '.
+ * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle#getBackgroundColor()
+ * @see #getTextareaDescriptionStyle()
* @generated
*/
- EAttribute getLinkDescription_ValueExpression();
+ EReference getTextareaDescriptionStyle_BackgroundColor();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.LinkDescription#getStyle Style }'.
- *
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.TextareaDescriptionStyle#getForegroundColor Foreground
+ * Color }'.
*
- * @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.LinkDescription#getStyle()
- * @see #getLinkDescription()
+ * @return the meta object for the reference 'Foreground Color '.
+ * @see org.eclipse.sirius.components.view.TextareaDescriptionStyle#getForegroundColor()
+ * @see #getTextareaDescriptionStyle()
* @generated
*/
- EReference getLinkDescription_Style();
+ EReference getTextareaDescriptionStyle_ForegroundColor();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.LinkDescription#getConditionalStyles Conditional Styles }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalTextareaDescriptionStyle
+ * Conditional Textarea Description Style }'.
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.LinkDescription#getConditionalStyles()
- * @see #getLinkDescription()
+ * @return the meta object for class 'Conditional Textarea Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalTextareaDescriptionStyle
* @generated
*/
- EReference getLinkDescription_ConditionalStyles();
+ EClass getConditionalTextareaDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LinkDescriptionStyle Link
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.RadioDescriptionStyle Radio
* Description Style }'.
*
- * @return the meta object for class 'Link Description Style '.
- * @see org.eclipse.sirius.components.view.LinkDescriptionStyle
+ * @return the meta object for class 'Radio Description Style '.
+ * @see org.eclipse.sirius.components.view.RadioDescriptionStyle
* @generated
*/
- EClass getLinkDescriptionStyle();
+ EClass getRadioDescriptionStyle();
/**
* Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.LinkDescriptionStyle#getColor Color }'.
*
* @return the meta object for the reference 'Color '.
- * @see org.eclipse.sirius.components.view.LinkDescriptionStyle#getColor()
- * @see #getLinkDescriptionStyle()
+ * @see org.eclipse.sirius.components.view.RadioDescriptionStyle#getColor()
+ * @see #getRadioDescriptionStyle()
* @generated
*/
- EReference getLinkDescriptionStyle_Color();
+ EReference getRadioDescriptionStyle_Color();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalLinkDescriptionStyle
- * Conditional Link Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalRadioDescriptionStyle
+ * Conditional Radio Description Style }'.
*
- * @return the meta object for class 'Conditional Link Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalLinkDescriptionStyle
+ * @return the meta object for class 'Conditional Radio Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalRadioDescriptionStyle
* @generated
*/
- EClass getConditionalLinkDescriptionStyle();
+ EClass getConditionalRadioDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ListDescription List
- * Description }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle Button
+ * Description Style }'.
*
- * @return the meta object for class 'List Description '.
- * @see org.eclipse.sirius.components.view.ListDescription
+ * @return the meta object for class 'Button Description Style '.
+ * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle
* @generated
*/
- EClass getListDescription();
+ EClass getButtonDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ListDescription#getValueExpression Value Expression }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle#getBackgroundColor Background Color }'.
+ *
*
- * @return the meta object for the attribute 'Value Expression '.
- * @see org.eclipse.sirius.components.view.ListDescription#getValueExpression()
- * @see #getListDescription()
+ * @return the meta object for the reference 'Background Color '.
+ * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle#getBackgroundColor()
+ * @see #getButtonDescriptionStyle()
* @generated
*/
- EAttribute getListDescription_ValueExpression();
+ EReference getButtonDescriptionStyle_BackgroundColor();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ListDescription#getDisplayExpression Display Expression }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.ButtonDescriptionStyle#getForegroundColor Foreground Color }'.
*
*
- * @return the meta object for the attribute 'Display Expression '.
- * @see org.eclipse.sirius.components.view.ListDescription#getDisplayExpression()
- * @see #getListDescription()
+ * @return the meta object for the reference 'Foreground Color '.
+ * @see org.eclipse.sirius.components.view.ButtonDescriptionStyle#getForegroundColor()
+ * @see #getButtonDescriptionStyle()
* @generated
*/
- EAttribute getListDescription_DisplayExpression();
+ EReference getButtonDescriptionStyle_ForegroundColor();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ListDescription#getIsDeletableExpression Is Deletable
- * Expression }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalButtonDescriptionStyle
+ * Conditional Button Description Style }'.
*
- * @return the meta object for the attribute 'Is Deletable Expression '.
- * @see org.eclipse.sirius.components.view.ListDescription#getIsDeletableExpression()
- * @see #getListDescription()
+ * @return the meta object for class 'Conditional Button Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalButtonDescriptionStyle
* @generated
*/
- EAttribute getListDescription_IsDeletableExpression();
+ EClass getConditionalButtonDescriptionStyle();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.ListDescription#getBody Body }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.BarChartDescriptionStyle Bar
+ * Chart Description Style }'.
*
- * @return the meta object for the containment reference list 'Body '.
- * @see org.eclipse.sirius.components.view.ListDescription#getBody()
- * @see #getListDescription()
+ * @return the meta object for class 'Bar Chart Description Style '.
+ * @see org.eclipse.sirius.components.view.BarChartDescriptionStyle
* @generated
*/
- EReference getListDescription_Body();
+ EClass getBarChartDescriptionStyle();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.ListDescription#getStyle Style }'.
- *
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.BarChartDescriptionStyle#getBarsColor Bars Color }'.
*
- * @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.ListDescription#getStyle()
- * @see #getListDescription()
+ * @return the meta object for the attribute 'Bars Color '.
+ * @see org.eclipse.sirius.components.view.BarChartDescriptionStyle#getBarsColor()
+ * @see #getBarChartDescriptionStyle()
* @generated
*/
- EReference getListDescription_Style();
+ EAttribute getBarChartDescriptionStyle_BarsColor();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.ListDescription#getConditionalStyles Conditional Styles }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalBarChartDescriptionStyle
+ * Conditional Bar Chart Description Style }'.
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.ListDescription#getConditionalStyles()
- * @see #getListDescription()
+ * @return the meta object for class 'Conditional Bar Chart Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalBarChartDescriptionStyle
* @generated
*/
- EReference getListDescription_ConditionalStyles();
+ EClass getConditionalBarChartDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ListDescriptionStyle List
- * Description Style }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle Pie
+ * Chart Description Style }'.
*
- * @return the meta object for class 'List Description Style '.
- * @see org.eclipse.sirius.components.view.ListDescriptionStyle
+ * @return the meta object for class 'Pie Chart Description Style '.
+ * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle
* @generated
*/
- EClass getListDescriptionStyle();
+ EClass getPieChartDescriptionStyle();
/**
- * Returns the meta object for the reference
- * '{@link org.eclipse.sirius.components.view.ListDescriptionStyle#getColor Color }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getColors Colors }'.
*
- * @return the meta object for the reference 'Color '.
- * @see org.eclipse.sirius.components.view.ListDescriptionStyle#getColor()
- * @see #getListDescriptionStyle()
+ * @return the meta object for the attribute 'Colors '.
+ * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getColors()
+ * @see #getPieChartDescriptionStyle()
* @generated
*/
- EReference getListDescriptionStyle_Color();
+ EAttribute getPieChartDescriptionStyle_Colors();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalListDescriptionStyle
- * Conditional List Description Style }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeWidth Stroke Width }'.
*
- * @return the meta object for class 'Conditional List Description Style '.
- * @see org.eclipse.sirius.components.view.ConditionalListDescriptionStyle
+ * @return the meta object for the attribute 'Stroke Width '.
+ * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeWidth()
+ * @see #getPieChartDescriptionStyle()
* @generated
*/
- EClass getConditionalListDescriptionStyle();
+ EAttribute getPieChartDescriptionStyle_StrokeWidth();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.DiagramPalette Diagram
- * Palette }'.
+ * Returns the meta object for the reference
+ * '{@link org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeColor Stroke Color }'.
*
- * @return the meta object for class 'Diagram Palette '.
- * @see org.eclipse.sirius.components.view.DiagramPalette
+ * @return the meta object for the reference 'Stroke Color '.
* @generated
+ * @see org.eclipse.sirius.components.view.PieChartDescriptionStyle#getStrokeColor()
+ * @see #getPieChartDescriptionStyle()
*/
- EClass getDiagramPalette();
+ EReference getPieChartDescriptionStyle_StrokeColor();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.DiagramPalette#getDropTool Drop Tool }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalPieChartDescriptionStyle
+ * Conditional Pie Chart Description Style }'.
*
- * @return the meta object for the containment reference 'Drop Tool '.
- * @see org.eclipse.sirius.components.view.DiagramPalette#getDropTool()
- * @see #getDiagramPalette()
+ * @return the meta object for class 'Conditional Pie Chart Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalPieChartDescriptionStyle
* @generated
*/
- EReference getDiagramPalette_DropTool();
+ EClass getConditionalPieChartDescriptionStyle();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.DiagramPalette#getNodeTools Node Tools }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LabelDescription Label
+ * Description }'.
*
- * @return the meta object for the containment reference list 'Node Tools '.
- * @see org.eclipse.sirius.components.view.DiagramPalette#getNodeTools()
- * @see #getDiagramPalette()
+ * @return the meta object for class 'Label Description '.
+ * @see org.eclipse.sirius.components.view.LabelDescription
* @generated
*/
- EReference getDiagramPalette_NodeTools();
+ EClass getLabelDescription();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.NodePalette Node Palette }'.
- *
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.LabelDescription#getValueExpression Value Expression }'.
*
- * @return the meta object for class 'Node Palette '.
- * @see org.eclipse.sirius.components.view.NodePalette
+ * @return the meta object for the attribute 'Value Expression '.
+ * @see org.eclipse.sirius.components.view.LabelDescription#getValueExpression()
+ * @see #getLabelDescription()
* @generated
*/
- EClass getNodePalette();
+ EAttribute getLabelDescription_ValueExpression();
/**
* Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.NodePalette#getDeleteTool Delete Tool }'.
+ * '{@link org.eclipse.sirius.components.view.LabelDescription#getStyle Style }'.
+ *
*
- * @return the meta object for the containment reference 'Delete Tool '.
- * @see org.eclipse.sirius.components.view.NodePalette#getDeleteTool()
- * @see #getNodePalette()
+ * @return the meta object for the containment reference 'Style '.
+ * @see org.eclipse.sirius.components.view.LabelDescription#getStyle()
+ * @see #getLabelDescription()
+ * @generated
+ */
+ EReference getLabelDescription_Style();
+
+ /**
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.LabelDescription#getConditionalStyles Conditional Styles }'.
+ *
+ *
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.LabelDescription#getConditionalStyles()
+ * @see #getLabelDescription()
* @generated
*/
- EReference getNodePalette_DeleteTool();
+ EReference getLabelDescription_ConditionalStyles();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.NodePalette#getLabelEditTool Label Edit Tool }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LabelDescriptionStyle Label
+ * Description Style }'.
*
- * @return the meta object for the containment reference 'Label Edit Tool '.
- * @see org.eclipse.sirius.components.view.NodePalette#getLabelEditTool()
- * @see #getNodePalette()
+ * @return the meta object for class 'Label Description Style '.
+ * @see org.eclipse.sirius.components.view.LabelDescriptionStyle
* @generated
*/
- EReference getNodePalette_LabelEditTool();
+ EClass getLabelDescriptionStyle();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.NodePalette#getNodeTools Node Tools }'.
*
- * @return the meta object for the containment reference list 'Node Tools '.
- * @see org.eclipse.sirius.components.view.NodePalette#getNodeTools()
- * @see #getNodePalette()
+ * @return the meta object for the reference 'Color '.
+ * @see org.eclipse.sirius.components.view.LabelDescriptionStyle#getColor()
+ * @see #getLabelDescriptionStyle()
* @generated
*/
- EReference getNodePalette_NodeTools();
+ EReference getLabelDescriptionStyle_Color();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.NodePalette#getEdgeTools Edge Tools }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalLabelDescriptionStyle
+ * Conditional Label Description Style }'.
*
- * @return the meta object for the containment reference list 'Edge Tools '.
- * @see org.eclipse.sirius.components.view.NodePalette#getEdgeTools()
- * @see #getNodePalette()
+ * @return the meta object for class 'Conditional Label Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalLabelDescriptionStyle
* @generated
*/
- EReference getNodePalette_EdgeTools();
+ EClass getConditionalLabelDescriptionStyle();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.EdgePalette Edge Palette }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LinkDescription Link
+ * Description }'.
*
- * @return the meta object for class 'Edge Palette '.
- * @see org.eclipse.sirius.components.view.EdgePalette
+ * @return the meta object for class 'Link Description '.
+ * @see org.eclipse.sirius.components.view.LinkDescription
* @generated
*/
- EClass getEdgePalette();
+ EClass getLinkDescription();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getDeleteTool Delete Tool }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.LinkDescription#getValueExpression Value Expression }'.
*
- * @return the meta object for the containment reference 'Delete Tool '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getDeleteTool()
- * @see #getEdgePalette()
+ * @return the meta object for the attribute 'Value Expression '.
+ * @see org.eclipse.sirius.components.view.LinkDescription#getValueExpression()
+ * @see #getLinkDescription()
* @generated
*/
- EReference getEdgePalette_DeleteTool();
+ EAttribute getLinkDescription_ValueExpression();
/**
* Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getCenterLabelEditTool Center Label Edit Tool }'.
- *
+ * '{@link org.eclipse.sirius.components.view.LinkDescription#getStyle Style }'.
+ *
*
- * @return the meta object for the containment reference 'Center Label Edit Tool '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getCenterLabelEditTool()
- * @see #getEdgePalette()
+ * @return the meta object for the containment reference 'Style '.
+ * @see org.eclipse.sirius.components.view.LinkDescription#getStyle()
+ * @see #getLinkDescription()
* @generated
*/
- EReference getEdgePalette_CenterLabelEditTool();
+ EReference getLinkDescription_Style();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getBeginLabelEditTool Begin Label Edit Tool }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.LinkDescription#getConditionalStyles Conditional Styles }'.
*
*
- * @return the meta object for the containment reference 'Begin Label Edit Tool '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getBeginLabelEditTool()
- * @see #getEdgePalette()
+ * @return the meta object for the containment reference list 'Conditional Styles '.
+ * @see org.eclipse.sirius.components.view.LinkDescription#getConditionalStyles()
+ * @see #getLinkDescription()
* @generated
*/
- EReference getEdgePalette_BeginLabelEditTool();
+ EReference getLinkDescription_ConditionalStyles();
/**
- * Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getEndLabelEditTool End Label Edit Tool }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.LinkDescriptionStyle Link
+ * Description Style }'.
*
- * @return the meta object for the containment reference 'End Label Edit Tool '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getEndLabelEditTool()
- * @see #getEdgePalette()
+ * @return the meta object for class 'Link Description Style '.
+ * @see org.eclipse.sirius.components.view.LinkDescriptionStyle
* @generated
*/
- EReference getEdgePalette_EndLabelEditTool();
+ EClass getLinkDescriptionStyle();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getNodeTools Node Tools }'.
*
- * @return the meta object for the containment reference list 'Node Tools '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getNodeTools()
- * @see #getEdgePalette()
+ * @return the meta object for the reference 'Color '.
+ * @see org.eclipse.sirius.components.view.LinkDescriptionStyle#getColor()
+ * @see #getLinkDescriptionStyle()
* @generated
*/
- EReference getEdgePalette_NodeTools();
+ EReference getLinkDescriptionStyle_Color();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.EdgePalette#getEdgeReconnectionTools Edge Reconnection
- * Tools }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalLinkDescriptionStyle
+ * Conditional Link Description Style }'.
*
- * @return the meta object for the containment reference list 'Edge Reconnection Tools '.
- * @see org.eclipse.sirius.components.view.EdgePalette#getEdgeReconnectionTools()
- * @see #getEdgePalette()
+ * @return the meta object for class 'Conditional Link Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalLinkDescriptionStyle
* @generated
*/
- EReference getEdgePalette_EdgeReconnectionTools();
+ EClass getConditionalLinkDescriptionStyle();
/**
- * Returns the meta object for enum '{@link org.eclipse.sirius.components.view.LayoutDirection Layout
- * Direction }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ListDescription List
+ * Description }'.
*
- * @return the meta object for enum 'Layout Direction '.
- * @see org.eclipse.sirius.components.view.LayoutDirection
+ * @return the meta object for class 'List Description '.
+ * @see org.eclipse.sirius.components.view.ListDescription
* @generated
*/
- EEnum getLayoutDirection();
+ EClass getListDescription();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.BarChartDescription Bar Chart
- * Description }'.
+ * Returns the meta object for the attribute
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getValueExpression Value Expression }'.
*
- * @return the meta object for class 'Bar Chart Description '.
- * @see org.eclipse.sirius.components.view.BarChartDescription
+ * @return the meta object for the attribute 'Value Expression '.
+ * @see org.eclipse.sirius.components.view.ListDescription#getValueExpression()
+ * @see #getListDescription()
* @generated
*/
- EClass getBarChartDescription();
+ EAttribute getListDescription_ValueExpression();
/**
* Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getValuesExpression Values Expression }'.
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getDisplayExpression Display Expression }'.
*
*
- * @return the meta object for the attribute 'Values Expression '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getValuesExpression()
- * @see #getBarChartDescription()
+ * @return the meta object for the attribute 'Display Expression '.
+ * @see org.eclipse.sirius.components.view.ListDescription#getDisplayExpression()
+ * @see #getListDescription()
* @generated
*/
- EAttribute getBarChartDescription_ValuesExpression();
+ EAttribute getListDescription_DisplayExpression();
/**
* Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getKeysExpression Keys Expression }'.
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getIsDeletableExpression Is Deletable
+ * Expression }'.
*
- * @return the meta object for the attribute 'Keys Expression '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getKeysExpression()
- * @see #getBarChartDescription()
+ * @return the meta object for the attribute 'Is Deletable Expression '.
+ * @see org.eclipse.sirius.components.view.ListDescription#getIsDeletableExpression()
+ * @see #getListDescription()
* @generated
*/
- EAttribute getBarChartDescription_KeysExpression();
+ EAttribute getListDescription_IsDeletableExpression();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getYAxisLabelExpression YAxis Label
- * Expression }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getBody Body }'.
*
- * @return the meta object for the attribute 'YAxis Label Expression '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getYAxisLabelExpression()
- * @see #getBarChartDescription()
+ * @return the meta object for the containment reference list 'Body '.
+ * @see org.eclipse.sirius.components.view.ListDescription#getBody()
+ * @see #getListDescription()
* @generated
*/
- EAttribute getBarChartDescription_YAxisLabelExpression();
+ EReference getListDescription_Body();
/**
* Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getStyle Style }'.
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getStyle Style }'.
*
*
* @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getStyle()
- * @see #getBarChartDescription()
+ * @see org.eclipse.sirius.components.view.ListDescription#getStyle()
+ * @see #getListDescription()
* @generated
*/
- EReference getBarChartDescription_Style();
+ EReference getListDescription_Style();
/**
* Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getConditionalStyles Conditional
- * Styles }'.
+ * '{@link org.eclipse.sirius.components.view.ListDescription#getConditionalStyles Conditional Styles }'.
+ *
*
* @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getConditionalStyles()
- * @see #getBarChartDescription()
+ * @see org.eclipse.sirius.components.view.ListDescription#getConditionalStyles()
+ * @see #getListDescription()
* @generated
*/
- EReference getBarChartDescription_ConditionalStyles();
+ EReference getListDescription_ConditionalStyles();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.sirius.components.view.BarChartDescription#getWidth
- * Width }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ListDescriptionStyle List
+ * Description Style }'.
*
- * @return the meta object for the attribute 'Width '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getWidth()
- * @see #getBarChartDescription()
+ * @return the meta object for class 'List Description Style '.
+ * @see org.eclipse.sirius.components.view.ListDescriptionStyle
* @generated
*/
- EAttribute getBarChartDescription_Width();
+ EClass getListDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.BarChartDescription#getHeight Height }'.
*
- * @return the meta object for the attribute 'Height '.
- * @see org.eclipse.sirius.components.view.BarChartDescription#getHeight()
- * @see #getBarChartDescription()
- * @generated
- */
- EAttribute getBarChartDescription_Height();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.PieChartDescription Pie Chart
- * Description }'.
- *
- * @return the meta object for class 'Pie Chart Description '.
- * @see org.eclipse.sirius.components.view.PieChartDescription
+ * @return the meta object for the reference 'Color '.
+ * @see org.eclipse.sirius.components.view.ListDescriptionStyle#getColor()
+ * @see #getListDescriptionStyle()
* @generated
*/
- EClass getPieChartDescription();
+ EReference getListDescriptionStyle_Color();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.PieChartDescription#getValuesExpression Values Expression }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ConditionalListDescriptionStyle
+ * Conditional List Description Style }'.
*
- * @return the meta object for the attribute 'Values Expression '.
- * @see org.eclipse.sirius.components.view.PieChartDescription#getValuesExpression()
- * @see #getPieChartDescription()
+ * @return the meta object for class 'Conditional List Description Style '.
+ * @see org.eclipse.sirius.components.view.ConditionalListDescriptionStyle
* @generated
*/
- EAttribute getPieChartDescription_ValuesExpression();
+ EClass getConditionalListDescriptionStyle();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.PieChartDescription#getKeysExpression Keys Expression }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.DiagramPalette Diagram
+ * Palette }'.
*
- * @return the meta object for the attribute 'Keys Expression '.
- * @see org.eclipse.sirius.components.view.PieChartDescription#getKeysExpression()
- * @see #getPieChartDescription()
+ * @return the meta object for class 'Diagram Palette '.
+ * @see org.eclipse.sirius.components.view.DiagramPalette
* @generated
*/
- EAttribute getPieChartDescription_KeysExpression();
+ EClass getDiagramPalette();
/**
* Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.PieChartDescription#getStyle Style }'.
- *
+ * '{@link org.eclipse.sirius.components.view.DiagramPalette#getDropTool Drop Tool }'.
*
- * @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.PieChartDescription#getStyle()
- * @see #getPieChartDescription()
+ * @return the meta object for the containment reference 'Drop Tool '.
+ * @see org.eclipse.sirius.components.view.DiagramPalette#getDropTool()
+ * @see #getDiagramPalette()
* @generated
*/
- EReference getPieChartDescription_Style();
+ EReference getDiagramPalette_DropTool();
/**
* Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.PieChartDescription#getConditionalStyles Conditional
- * Styles }'.
+ * '{@link org.eclipse.sirius.components.view.DiagramPalette#getNodeTools Node Tools }'.
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.PieChartDescription#getConditionalStyles()
- * @see #getPieChartDescription()
+ * @return the meta object for the containment reference list 'Node Tools '.
+ * @see org.eclipse.sirius.components.view.DiagramPalette#getNodeTools()
+ * @see #getDiagramPalette()
* @generated
*/
- EReference getPieChartDescription_ConditionalStyles();
+ EReference getDiagramPalette_NodeTools();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription
- * Flexbox Container Description }'.
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.NodePalette Node Palette }'.
+ *
*
- * @return the meta object for class 'Flexbox Container Description '.
- * @see org.eclipse.sirius.components.view.FlexboxContainerDescription
+ * @return the meta object for class 'Node Palette '.
+ * @see org.eclipse.sirius.components.view.NodePalette
* @generated
*/
- EClass getFlexboxContainerDescription();
+ EClass getNodePalette();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription#getChildren Children }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.NodePalette#getDeleteTool Delete Tool }'.
*
- * @return the meta object for the containment reference list 'Children '.
- * @see org.eclipse.sirius.components.view.FlexboxContainerDescription#getChildren()
- * @see #getFlexboxContainerDescription()
+ * @return the meta object for the containment reference 'Delete Tool '.
+ * @see org.eclipse.sirius.components.view.NodePalette#getDeleteTool()
+ * @see #getNodePalette()
* @generated
*/
- EReference getFlexboxContainerDescription_Children();
+ EReference getNodePalette_DeleteTool();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription#getFlexDirection Flex
- * Direction }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.NodePalette#getLabelEditTool Label Edit Tool }'.
*
- * @return the meta object for the attribute 'Flex Direction '.
- * @see org.eclipse.sirius.components.view.FlexboxContainerDescription#getFlexDirection()
- * @see #getFlexboxContainerDescription()
+ * @return the meta object for the containment reference 'Label Edit Tool '.
+ * @see org.eclipse.sirius.components.view.NodePalette#getLabelEditTool()
+ * @see #getNodePalette()
* @generated
*/
- EAttribute getFlexboxContainerDescription_FlexDirection();
+ EReference getNodePalette_LabelEditTool();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ButtonDescription Button
- * Description }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.NodePalette#getNodeTools Node Tools }'.
*
- * @return the meta object for class 'Button Description '.
- * @see org.eclipse.sirius.components.view.ButtonDescription
+ * @return the meta object for the containment reference list 'Node Tools '.
+ * @see org.eclipse.sirius.components.view.NodePalette#getNodeTools()
+ * @see #getNodePalette()
* @generated
*/
- EClass getButtonDescription();
+ EReference getNodePalette_NodeTools();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ButtonDescription#getButtonLabelExpression Button Label
- * Expression }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.NodePalette#getEdgeTools Edge Tools }'.
*
- * @return the meta object for the attribute 'Button Label Expression '.
- * @see org.eclipse.sirius.components.view.ButtonDescription#getButtonLabelExpression()
- * @see #getButtonDescription()
+ * @return the meta object for the containment reference list 'Edge Tools '.
+ * @see org.eclipse.sirius.components.view.NodePalette#getEdgeTools()
+ * @see #getNodePalette()
* @generated
*/
- EAttribute getButtonDescription_ButtonLabelExpression();
+ EReference getNodePalette_EdgeTools();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.ButtonDescription#getBody Body }'.
- *
+ * Returns the meta object for class '{@link org.eclipse.sirius.components.view.EdgePalette Edge Palette }'.
+ *
*
- * @return the meta object for the containment reference list 'Body '.
- * @see org.eclipse.sirius.components.view.ButtonDescription#getBody()
- * @see #getButtonDescription()
+ * @return the meta object for class 'Edge Palette '.
+ * @see org.eclipse.sirius.components.view.EdgePalette
* @generated
*/
- EReference getButtonDescription_Body();
+ EClass getEdgePalette();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ButtonDescription#getImageExpression Image Expression }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getDeleteTool Delete Tool }'.
*
- * @return the meta object for the attribute 'Image Expression '.
- * @see org.eclipse.sirius.components.view.ButtonDescription#getImageExpression()
- * @see #getButtonDescription()
+ * @return the meta object for the containment reference 'Delete Tool '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getDeleteTool()
+ * @see #getEdgePalette()
* @generated
*/
- EAttribute getButtonDescription_ImageExpression();
+ EReference getEdgePalette_DeleteTool();
/**
* Returns the meta object for the containment reference
- * '{@link org.eclipse.sirius.components.view.ButtonDescription#getStyle Style }'.
- *
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getCenterLabelEditTool Center Label Edit Tool }'.
+ *
*
- * @return the meta object for the containment reference 'Style '.
- * @see org.eclipse.sirius.components.view.ButtonDescription#getStyle()
- * @see #getButtonDescription()
+ * @return the meta object for the containment reference 'Center Label Edit Tool '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getCenterLabelEditTool()
+ * @see #getEdgePalette()
* @generated
*/
- EReference getButtonDescription_Style();
+ EReference getEdgePalette_CenterLabelEditTool();
/**
- * Returns the meta object for the containment reference list
- * '{@link org.eclipse.sirius.components.view.ButtonDescription#getConditionalStyles Conditional Styles }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getBeginLabelEditTool Begin Label Edit Tool }'.
*
*
- * @return the meta object for the containment reference list 'Conditional Styles '.
- * @see org.eclipse.sirius.components.view.ButtonDescription#getConditionalStyles()
- * @see #getButtonDescription()
+ * @return the meta object for the containment reference 'Begin Label Edit Tool '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getBeginLabelEditTool()
+ * @see #getEdgePalette()
* @generated
*/
- EReference getButtonDescription_ConditionalStyles();
+ EReference getEdgePalette_BeginLabelEditTool();
/**
- * Returns the meta object for class '{@link org.eclipse.sirius.components.view.ImageDescription Image
- * Description }'.
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getEndLabelEditTool End Label Edit Tool }'.
*
- * @return the meta object for class 'Image Description '.
- * @see org.eclipse.sirius.components.view.ImageDescription
+ * @return the meta object for the containment reference 'End Label Edit Tool '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getEndLabelEditTool()
+ * @see #getEdgePalette()
* @generated
*/
- EClass getImageDescription();
+ EReference getEdgePalette_EndLabelEditTool();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ImageDescription#getUrlExpression Url Expression }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getNodeTools Node Tools }'.
*
- * @return the meta object for the attribute 'Url Expression '.
- * @see org.eclipse.sirius.components.view.ImageDescription#getUrlExpression()
- * @see #getImageDescription()
+ * @return the meta object for the containment reference list 'Node Tools '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getNodeTools()
+ * @see #getEdgePalette()
* @generated
*/
- EAttribute getImageDescription_UrlExpression();
+ EReference getEdgePalette_NodeTools();
/**
- * Returns the meta object for the attribute
- * '{@link org.eclipse.sirius.components.view.ImageDescription#getMaxWidthExpression Max Width
- * Expression }'.
+ * Returns the meta object for the containment reference list
+ * '{@link org.eclipse.sirius.components.view.EdgePalette#getEdgeReconnectionTools Edge Reconnection
+ * Tools }'.
*
- * @return the meta object for the attribute 'Max Width Expression '.
- * @see org.eclipse.sirius.components.view.ImageDescription#getMaxWidthExpression()
- * @see #getImageDescription()
+ * @return the meta object for the containment reference list 'Edge Reconnection Tools '.
+ * @see org.eclipse.sirius.components.view.EdgePalette#getEdgeReconnectionTools()
+ * @see #getEdgePalette()
* @generated
*/
- EAttribute getImageDescription_MaxWidthExpression();
+ EReference getEdgePalette_EdgeReconnectionTools();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.sirius.components.view.LayoutDirection Layout
+ * Direction }'.
+ *
+ * @return the meta object for enum 'Layout Direction '.
+ * @see org.eclipse.sirius.components.view.LayoutDirection
+ * @generated
+ */
+ EEnum getLayoutDirection();
/**
* Returns the meta object for enum '{@link org.eclipse.sirius.components.view.ArrowStyle Arrow Style }'.
@@ -9947,12 +10084,12 @@ interface Literals {
EAttribute DIAGRAM_ELEMENT_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION = eINSTANCE.getDiagramElementDescription_SemanticCandidatesExpression();
/**
- * The meta object literal for the 'Label Expression ' attribute feature.
- *
+ * The meta object literal for the 'Precondition Expression ' attribute feature.
*
* @generated
*/
- EAttribute DIAGRAM_ELEMENT_DESCRIPTION__LABEL_EXPRESSION = eINSTANCE.getDiagramElementDescription_LabelExpression();
+ EAttribute DIAGRAM_ELEMENT_DESCRIPTION__PRECONDITION_EXPRESSION = eINSTANCE.getDiagramElementDescription_PreconditionExpression();
/**
* The meta object literal for the 'Synchronization Policy ' attribute feature.
+ * The meta object literal for the 'Label Expression ' attribute feature.
+ *
*
* @generated
*/
- EAttribute DIAGRAM_ELEMENT_DESCRIPTION__PRECONDITION_EXPRESSION = eINSTANCE.getDiagramElementDescription_PreconditionExpression();
+ EAttribute DIAGRAM_ELEMENT_DESCRIPTION__LABEL_EXPRESSION = eINSTANCE.getDiagramElementDescription_LabelExpression();
/**
* The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.NodeDescriptionImpl Node
@@ -9981,84 +10118,84 @@ interface Literals {
EClass NODE_DESCRIPTION = eINSTANCE.getNodeDescription();
/**
- * The meta object literal for the 'Children Descriptions ' containment reference list feature.
- *
+ * The meta object literal for the 'Collapsible ' attribute feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__CHILDREN_DESCRIPTIONS = eINSTANCE.getNodeDescription_ChildrenDescriptions();
+ EAttribute NODE_DESCRIPTION__COLLAPSIBLE = eINSTANCE.getNodeDescription_Collapsible();
/**
- * The meta object literal for the 'Border Nodes Descriptions ' containment reference list
- * feature.
+ * The meta object literal for the 'Palette ' containment reference feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__BORDER_NODES_DESCRIPTIONS = eINSTANCE.getNodeDescription_BorderNodesDescriptions();
+ EReference NODE_DESCRIPTION__PALETTE = eINSTANCE.getNodeDescription_Palette();
/**
- * The meta object literal for the 'Reused Child Node Descriptions ' reference list feature.
+ * The meta object literal for the 'Children Layout Strategy ' containment reference feature.
+ *
*
* @generated
*/
- EReference NODE_DESCRIPTION__REUSED_CHILD_NODE_DESCRIPTIONS = eINSTANCE.getNodeDescription_ReusedChildNodeDescriptions();
+ EReference NODE_DESCRIPTION__CHILDREN_LAYOUT_STRATEGY = eINSTANCE.getNodeDescription_ChildrenLayoutStrategy();
/**
- * The meta object literal for the 'Reused Border Node Descriptions ' reference list feature.
- *
+ * The meta object literal for the 'Style ' containment reference feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__REUSED_BORDER_NODE_DESCRIPTIONS = eINSTANCE.getNodeDescription_ReusedBorderNodeDescriptions();
+ EReference NODE_DESCRIPTION__STYLE = eINSTANCE.getNodeDescription_Style();
/**
- * The meta object literal for the 'Style ' containment reference feature.
+ * The meta object literal for the 'Conditional Styles ' containment reference list feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__STYLE = eINSTANCE.getNodeDescription_Style();
+ EReference NODE_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getNodeDescription_ConditionalStyles();
/**
- * The meta object literal for the 'User Resizable ' attribute feature.
- *
+ * The meta object literal for the 'Children Descriptions ' containment reference list feature.
+ *
*
* @generated
*/
- EAttribute NODE_DESCRIPTION__USER_RESIZABLE = eINSTANCE.getNodeDescription_UserResizable();
+ EReference NODE_DESCRIPTION__CHILDREN_DESCRIPTIONS = eINSTANCE.getNodeDescription_ChildrenDescriptions();
/**
- * The meta object literal for the 'Conditional Styles ' containment reference list feature.
+ * The meta object literal for the 'Border Nodes Descriptions ' containment reference list
+ * feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getNodeDescription_ConditionalStyles();
+ EReference NODE_DESCRIPTION__BORDER_NODES_DESCRIPTIONS = eINSTANCE.getNodeDescription_BorderNodesDescriptions();
/**
- * The meta object literal for the 'Children Layout Strategy ' containment reference feature.
- *
+ * The meta object literal for the 'Reused Child Node Descriptions ' reference list feature.
*
* @generated
*/
- EReference NODE_DESCRIPTION__CHILDREN_LAYOUT_STRATEGY = eINSTANCE.getNodeDescription_ChildrenLayoutStrategy();
+ EReference NODE_DESCRIPTION__REUSED_CHILD_NODE_DESCRIPTIONS = eINSTANCE.getNodeDescription_ReusedChildNodeDescriptions();
/**
- * The meta object literal for the 'Collapsible ' attribute feature.
+ * The meta object literal for the 'Reused Border Node Descriptions ' reference list feature.
+ *
*
* @generated
*/
- EAttribute NODE_DESCRIPTION__COLLAPSIBLE = eINSTANCE.getNodeDescription_Collapsible();
+ EReference NODE_DESCRIPTION__REUSED_BORDER_NODE_DESCRIPTIONS = eINSTANCE.getNodeDescription_ReusedBorderNodeDescriptions();
/**
- * The meta object literal for the 'Palette ' containment reference feature.
+ * The meta object literal for the 'User Resizable ' attribute feature.
+ *
*
* @generated
*/
- EReference NODE_DESCRIPTION__PALETTE = eINSTANCE.getNodeDescription_Palette();
+ EAttribute NODE_DESCRIPTION__USER_RESIZABLE = eINSTANCE.getNodeDescription_UserResizable();
/**
* The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.EdgeDescriptionImpl Edge
@@ -10812,13 +10949,63 @@ interface Literals {
*/
EClass FORM_DESCRIPTION = eINSTANCE.getFormDescription();
+ /**
+ * The meta object literal for the 'Pages ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference FORM_DESCRIPTION__PAGES = eINSTANCE.getFormDescription_Pages();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl Page
+ * Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.PageDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPageDescription()
+ * @generated
+ */
+ EClass PAGE_DESCRIPTION = eINSTANCE.getPageDescription();
+
+ /**
+ * The meta object literal for the 'Name ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute PAGE_DESCRIPTION__NAME = eINSTANCE.getPageDescription_Name();
+
+ /**
+ * The meta object literal for the 'Label Expression ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute PAGE_DESCRIPTION__LABEL_EXPRESSION = eINSTANCE.getPageDescription_LabelExpression();
+
+ /**
+ * The meta object literal for the 'Semantic Candidates Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION = eINSTANCE.getPageDescription_SemanticCandidatesExpression();
+
+ /**
+ * The meta object literal for the 'Precondition Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute PAGE_DESCRIPTION__PRECONDITION_EXPRESSION = eINSTANCE.getPageDescription_PreconditionExpression();
+
/**
* The meta object literal for the 'Groups ' containment reference list feature.
*
* @generated
*/
- EReference FORM_DESCRIPTION__GROUPS = eINSTANCE.getFormDescription_Groups();
+ EReference PAGE_DESCRIPTION__GROUPS = eINSTANCE.getPageDescription_Groups();
/**
* The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.GroupDescriptionImpl
@@ -11170,65 +11357,276 @@ interface Literals {
*
* @generated
*/
- EReference RICH_TEXT_DESCRIPTION__BODY = eINSTANCE.getRichTextDescription_Body();
+ EReference RICH_TEXT_DESCRIPTION__BODY = eINSTANCE.getRichTextDescription_Body();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.RadioDescriptionImpl
+ * Radio Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.RadioDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRadioDescription()
+ * @generated
+ */
+ EClass RADIO_DESCRIPTION = eINSTANCE.getRadioDescription();
+
+ /**
+ * The meta object literal for the 'Value Expression ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute RADIO_DESCRIPTION__VALUE_EXPRESSION = eINSTANCE.getRadioDescription_ValueExpression();
+
+ /**
+ * The meta object literal for the 'Candidates Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute RADIO_DESCRIPTION__CANDIDATES_EXPRESSION = eINSTANCE.getRadioDescription_CandidatesExpression();
+
+ /**
+ * The meta object literal for the 'Candidate Label Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute RADIO_DESCRIPTION__CANDIDATE_LABEL_EXPRESSION = eINSTANCE.getRadioDescription_CandidateLabelExpression();
+
+ /**
+ * The meta object literal for the 'Body ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference RADIO_DESCRIPTION__BODY = eINSTANCE.getRadioDescription_Body();
+
+ /**
+ * The meta object literal for the 'Style ' containment reference feature.
+ *
+ * @generated
+ */
+ EReference RADIO_DESCRIPTION__STYLE = eINSTANCE.getRadioDescription_Style();
+
+ /**
+ * The meta object literal for the 'Conditional Styles ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference RADIO_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getRadioDescription_ConditionalStyles();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.BarChartDescriptionImpl
+ * Bar Chart Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.BarChartDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getBarChartDescription()
+ * @generated
+ */
+ EClass BAR_CHART_DESCRIPTION = eINSTANCE.getBarChartDescription();
+
+ /**
+ * The meta object literal for the 'Values Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute BAR_CHART_DESCRIPTION__VALUES_EXPRESSION = eINSTANCE.getBarChartDescription_ValuesExpression();
+
+ /**
+ * The meta object literal for the 'Keys Expression ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute BAR_CHART_DESCRIPTION__KEYS_EXPRESSION = eINSTANCE.getBarChartDescription_KeysExpression();
+
+ /**
+ * The meta object literal for the 'YAxis Label Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute BAR_CHART_DESCRIPTION__YAXIS_LABEL_EXPRESSION = eINSTANCE.getBarChartDescription_YAxisLabelExpression();
+
+ /**
+ * The meta object literal for the 'Style ' containment reference feature.
+ *
+ * @generated
+ */
+ EReference BAR_CHART_DESCRIPTION__STYLE = eINSTANCE.getBarChartDescription_Style();
+
+ /**
+ * The meta object literal for the 'Conditional Styles ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference BAR_CHART_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getBarChartDescription_ConditionalStyles();
+
+ /**
+ * The meta object literal for the 'Width ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute BAR_CHART_DESCRIPTION__WIDTH = eINSTANCE.getBarChartDescription_Width();
+
+ /**
+ * The meta object literal for the 'Height ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute BAR_CHART_DESCRIPTION__HEIGHT = eINSTANCE.getBarChartDescription_Height();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.PieChartDescriptionImpl
+ * Pie Chart Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.PieChartDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPieChartDescription()
+ * @generated
+ */
+ EClass PIE_CHART_DESCRIPTION = eINSTANCE.getPieChartDescription();
+
+ /**
+ * The meta object literal for the 'Values Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute PIE_CHART_DESCRIPTION__VALUES_EXPRESSION = eINSTANCE.getPieChartDescription_ValuesExpression();
+
+ /**
+ * The meta object literal for the 'Keys Expression ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute PIE_CHART_DESCRIPTION__KEYS_EXPRESSION = eINSTANCE.getPieChartDescription_KeysExpression();
+
+ /**
+ * The meta object literal for the 'Style ' containment reference feature.
+ *
+ * @generated
+ */
+ EReference PIE_CHART_DESCRIPTION__STYLE = eINSTANCE.getPieChartDescription_Style();
+
+ /**
+ * The meta object literal for the 'Conditional Styles ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference PIE_CHART_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getPieChartDescription_ConditionalStyles();
+
+ /**
+ * The meta object literal for the
+ * '{@link org.eclipse.sirius.components.view.impl.FlexboxContainerDescriptionImpl Flexbox Container
+ * Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.FlexboxContainerDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getFlexboxContainerDescription()
+ * @generated
+ */
+ EClass FLEXBOX_CONTAINER_DESCRIPTION = eINSTANCE.getFlexboxContainerDescription();
+
+ /**
+ * The meta object literal for the 'Children ' containment reference list feature.
+ *
+ * @generated
+ */
+ EReference FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN = eINSTANCE.getFlexboxContainerDescription_Children();
+
+ /**
+ * The meta object literal for the 'Flex Direction ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute FLEXBOX_CONTAINER_DESCRIPTION__FLEX_DIRECTION = eINSTANCE.getFlexboxContainerDescription_FlexDirection();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.ButtonDescriptionImpl
+ * Button Description }' class.
+ *
+ * @see org.eclipse.sirius.components.view.impl.ButtonDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getButtonDescription()
+ * @generated
+ */
+ EClass BUTTON_DESCRIPTION = eINSTANCE.getButtonDescription();
+
+ /**
+ * The meta object literal for the 'Button Label Expression ' attribute feature.
+ *
+ * @generated
+ */
+ EAttribute BUTTON_DESCRIPTION__BUTTON_LABEL_EXPRESSION = eINSTANCE.getButtonDescription_ButtonLabelExpression();
/**
- * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.RadioDescriptionImpl
- * Radio Description }' class.
+ * The meta object literal for the 'Body ' containment reference list feature.
*
- * @see org.eclipse.sirius.components.view.impl.RadioDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getRadioDescription()
* @generated
*/
- EClass RADIO_DESCRIPTION = eINSTANCE.getRadioDescription();
+ EReference BUTTON_DESCRIPTION__BODY = eINSTANCE.getButtonDescription_Body();
/**
- * The meta object literal for the 'Value Expression ' attribute feature.
+ * The meta object literal for the 'Image Expression ' attribute feature.
*
*
* @generated
*/
- EAttribute RADIO_DESCRIPTION__VALUE_EXPRESSION = eINSTANCE.getRadioDescription_ValueExpression();
+ EAttribute BUTTON_DESCRIPTION__IMAGE_EXPRESSION = eINSTANCE.getButtonDescription_ImageExpression();
/**
- * The meta object literal for the 'Candidates Expression ' attribute feature.
+ * The meta object literal for the 'Style ' containment reference feature.
*
* @generated
*/
- EAttribute RADIO_DESCRIPTION__CANDIDATES_EXPRESSION = eINSTANCE.getRadioDescription_CandidatesExpression();
+ EReference BUTTON_DESCRIPTION__STYLE = eINSTANCE.getButtonDescription_Style();
/**
- * The meta object literal for the 'Candidate Label Expression ' attribute feature.
*
* @generated
*/
- EAttribute RADIO_DESCRIPTION__CANDIDATE_LABEL_EXPRESSION = eINSTANCE.getRadioDescription_CandidateLabelExpression();
+ EReference BUTTON_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getButtonDescription_ConditionalStyles();
/**
- * The meta object literal for the 'Body ' containment reference list feature.
+ * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.ImageDescriptionImpl
+ * Image Description }' class.
*
+ * @see org.eclipse.sirius.components.view.impl.ImageDescriptionImpl
+ * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getImageDescription()
* @generated
*/
- EReference RADIO_DESCRIPTION__BODY = eINSTANCE.getRadioDescription_Body();
+ EClass IMAGE_DESCRIPTION = eINSTANCE.getImageDescription();
/**
- * The meta object literal for the 'Style ' containment reference feature.
+ * The meta object literal for the 'Url Expression ' attribute feature.
+ *
*
* @generated
*/
- EReference RADIO_DESCRIPTION__STYLE = eINSTANCE.getRadioDescription_Style();
+ EAttribute IMAGE_DESCRIPTION__URL_EXPRESSION = eINSTANCE.getImageDescription_UrlExpression();
/**
- * The meta object literal for the 'Conditional Styles ' containment reference list feature.
+ * The meta object literal for the 'Max Width Expression ' attribute feature.
*
* @generated
*/
- EReference RADIO_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getRadioDescription_ConditionalStyles();
+ EAttribute IMAGE_DESCRIPTION__MAX_WIDTH_EXPRESSION = eINSTANCE.getImageDescription_MaxWidthExpression();
/**
* The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.WidgetDescriptionStyleImpl
@@ -11907,217 +12305,6 @@ interface Literals {
*/
EEnum LAYOUT_DIRECTION = eINSTANCE.getLayoutDirection();
- /**
- * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.BarChartDescriptionImpl
- * Bar Chart Description }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.BarChartDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getBarChartDescription()
- * @generated
- */
- EClass BAR_CHART_DESCRIPTION = eINSTANCE.getBarChartDescription();
-
- /**
- * The meta object literal for the 'Values Expression ' attribute feature.
- *
- * @generated
- */
- EAttribute BAR_CHART_DESCRIPTION__VALUES_EXPRESSION = eINSTANCE.getBarChartDescription_ValuesExpression();
-
- /**
- * The meta object literal for the 'Keys Expression ' attribute feature.
- *
- *
- * @generated
- */
- EAttribute BAR_CHART_DESCRIPTION__KEYS_EXPRESSION = eINSTANCE.getBarChartDescription_KeysExpression();
-
- /**
- * The meta object literal for the 'YAxis Label Expression ' attribute feature.
- *
- * @generated
- */
- EAttribute BAR_CHART_DESCRIPTION__YAXIS_LABEL_EXPRESSION = eINSTANCE.getBarChartDescription_YAxisLabelExpression();
-
- /**
- * The meta object literal for the 'Style ' containment reference feature.
- *
- * @generated
- */
- EReference BAR_CHART_DESCRIPTION__STYLE = eINSTANCE.getBarChartDescription_Style();
-
- /**
- * The meta object literal for the 'Conditional Styles ' containment reference list feature.
- *
- * @generated
- */
- EReference BAR_CHART_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getBarChartDescription_ConditionalStyles();
-
- /**
- * The meta object literal for the 'Width ' attribute feature.
- *
- * @generated
- */
- EAttribute BAR_CHART_DESCRIPTION__WIDTH = eINSTANCE.getBarChartDescription_Width();
-
- /**
- * The meta object literal for the 'Height ' attribute feature.
- *
- * @generated
- */
- EAttribute BAR_CHART_DESCRIPTION__HEIGHT = eINSTANCE.getBarChartDescription_Height();
-
- /**
- * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.PieChartDescriptionImpl
- * Pie Chart Description }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.PieChartDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getPieChartDescription()
- * @generated
- */
- EClass PIE_CHART_DESCRIPTION = eINSTANCE.getPieChartDescription();
-
- /**
- * The meta object literal for the 'Values Expression ' attribute feature.
- *
- * @generated
- */
- EAttribute PIE_CHART_DESCRIPTION__VALUES_EXPRESSION = eINSTANCE.getPieChartDescription_ValuesExpression();
-
- /**
- * The meta object literal for the 'Keys Expression ' attribute feature.
- *
- *
- * @generated
- */
- EAttribute PIE_CHART_DESCRIPTION__KEYS_EXPRESSION = eINSTANCE.getPieChartDescription_KeysExpression();
-
- /**
- * The meta object literal for the 'Style ' containment reference feature.
- *
- * @generated
- */
- EReference PIE_CHART_DESCRIPTION__STYLE = eINSTANCE.getPieChartDescription_Style();
-
- /**
- * The meta object literal for the 'Conditional Styles ' containment reference list feature.
- *
- * @generated
- */
- EReference PIE_CHART_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getPieChartDescription_ConditionalStyles();
-
- /**
- * The meta object literal for the
- * '{@link org.eclipse.sirius.components.view.impl.FlexboxContainerDescriptionImpl Flexbox Container
- * Description }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.FlexboxContainerDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getFlexboxContainerDescription()
- * @generated
- */
- EClass FLEXBOX_CONTAINER_DESCRIPTION = eINSTANCE.getFlexboxContainerDescription();
-
- /**
- * The meta object literal for the 'Children ' containment reference list feature.
- *
- * @generated
- */
- EReference FLEXBOX_CONTAINER_DESCRIPTION__CHILDREN = eINSTANCE.getFlexboxContainerDescription_Children();
-
- /**
- * The meta object literal for the 'Flex Direction ' attribute feature.
- *
- *
- * @generated
- */
- EAttribute FLEXBOX_CONTAINER_DESCRIPTION__FLEX_DIRECTION = eINSTANCE.getFlexboxContainerDescription_FlexDirection();
-
- /**
- * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.ButtonDescriptionImpl
- * Button Description }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ButtonDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getButtonDescription()
- * @generated
- */
- EClass BUTTON_DESCRIPTION = eINSTANCE.getButtonDescription();
-
- /**
- * The meta object literal for the 'Button Label Expression ' attribute feature.
- *
- * @generated
- */
- EAttribute BUTTON_DESCRIPTION__BUTTON_LABEL_EXPRESSION = eINSTANCE.getButtonDescription_ButtonLabelExpression();
-
- /**
- * The meta object literal for the 'Body ' containment reference list feature.
- *
- * @generated
- */
- EReference BUTTON_DESCRIPTION__BODY = eINSTANCE.getButtonDescription_Body();
-
- /**
- * The meta object literal for the 'Image Expression ' attribute feature.
- *
- *
- * @generated
- */
- EAttribute BUTTON_DESCRIPTION__IMAGE_EXPRESSION = eINSTANCE.getButtonDescription_ImageExpression();
-
- /**
- * The meta object literal for the 'Style ' containment reference feature.
- *
- * @generated
- */
- EReference BUTTON_DESCRIPTION__STYLE = eINSTANCE.getButtonDescription_Style();
-
- /**
- * The meta object literal for the 'Conditional Styles ' containment reference list feature.
- *
- * @generated
- */
- EReference BUTTON_DESCRIPTION__CONDITIONAL_STYLES = eINSTANCE.getButtonDescription_ConditionalStyles();
-
- /**
- * The meta object literal for the '{@link org.eclipse.sirius.components.view.impl.ImageDescriptionImpl
- * Image Description }' class.
- *
- * @see org.eclipse.sirius.components.view.impl.ImageDescriptionImpl
- * @see org.eclipse.sirius.components.view.impl.ViewPackageImpl#getImageDescription()
- * @generated
- */
- EClass IMAGE_DESCRIPTION = eINSTANCE.getImageDescription();
-
- /**
- * The meta object literal for the 'Url Expression ' attribute feature.
- *
- *
- * @generated
- */
- EAttribute IMAGE_DESCRIPTION__URL_EXPRESSION = eINSTANCE.getImageDescription_UrlExpression();
-
- /**
- * The meta object literal for the 'Max Width Expression ' attribute feature.
- *
- * @generated
- */
- EAttribute IMAGE_DESCRIPTION__MAX_WIDTH_EXPRESSION = eINSTANCE.getImageDescription_MaxWidthExpression();
-
/**
* The meta object literal for the '{@link org.eclipse.sirius.components.view.ArrowStyle Arrow Style }'
* enum.
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/BarChartDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/BarChartDescriptionImpl.java
index bc22d0bc79..d8dbfabc44 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/BarChartDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/BarChartDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/CheckboxDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/CheckboxDescriptionImpl.java
index f8ee2a5067..02e618383a 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/CheckboxDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/CheckboxDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/FormDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/FormDescriptionImpl.java
index b7431d2cee..2a30fa6281 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/FormDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/FormDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
@@ -21,7 +21,7 @@
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.sirius.components.view.FormDescription;
-import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.ViewPackage;
/**
@@ -37,15 +37,16 @@
* @generated
*/
public class FormDescriptionImpl extends RepresentationDescriptionImpl implements FormDescription {
+
/**
- * The cached value of the '{@link #getGroups() Groups }' containment reference list.
+ * The cached value of the '{@link #getPages() Pages }' containment reference list.
+ *
*
- * @see #getGroups()
* @generated
* @ordered
+ * @see #getPages()
*/
- protected EList groups;
+ protected EList pages;
/**
*
@@ -72,11 +73,11 @@ protected EClass eStaticClass() {
* @generated
*/
@Override
- public EList getGroups() {
- if (this.groups == null) {
- this.groups = new EObjectContainmentEList<>(GroupDescription.class, this, ViewPackage.FORM_DESCRIPTION__GROUPS);
+ public EList getPages() {
+ if (this.pages == null) {
+ this.pages = new EObjectContainmentEList<>(PageDescription.class, this, ViewPackage.FORM_DESCRIPTION__PAGES);
}
- return this.groups;
+ return this.pages;
}
/**
@@ -87,8 +88,8 @@ public EList getGroups() {
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
- return ((InternalEList>) this.getGroups()).basicRemove(otherEnd, msgs);
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
+ return ((InternalEList>) this.getPages()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -101,8 +102,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
- return this.getGroups();
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
+ return this.getPages();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -116,9 +117,9 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
- this.getGroups().clear();
- this.getGroups().addAll((Collection extends GroupDescription>) newValue);
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
+ this.getPages().clear();
+ this.getPages().addAll((Collection extends PageDescription>) newValue);
return;
}
super.eSet(featureID, newValue);
@@ -132,8 +133,8 @@ public void eSet(int featureID, Object newValue) {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
- this.getGroups().clear();
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
+ this.getPages().clear();
return;
}
super.eUnset(featureID);
@@ -147,8 +148,8 @@ public void eUnset(int featureID) {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ViewPackage.FORM_DESCRIPTION__GROUPS:
- return this.groups != null && !this.groups.isEmpty();
+ case ViewPackage.FORM_DESCRIPTION__PAGES:
+ return this.pages != null && !this.pages.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/MultiSelectDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/MultiSelectDescriptionImpl.java
index 2f40a6bc84..6f1487f995 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/MultiSelectDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/MultiSelectDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PageDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PageDescriptionImpl.java
new file mode 100644
index 0000000000..0d30295c6f
--- /dev/null
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PageDescriptionImpl.java
@@ -0,0 +1,404 @@
+/*******************************************************************************
+ * 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.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.sirius.components.view.GroupDescription;
+import org.eclipse.sirius.components.view.PageDescription;
+import org.eclipse.sirius.components.view.ViewPackage;
+
+/**
+ * An implementation of the model object 'Page Description '.
+ *
+ * The following features are implemented:
+ *
+ *
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getName Name }
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getLabelExpression Label
+ * Expression }
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getSemanticCandidatesExpression Semantic
+ * Candidates Expression }
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getPreconditionExpression Precondition
+ * Expression }
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getToolbarActions Toolbar
+ * Actions }
+ * {@link org.eclipse.sirius.components.view.impl.PageDescriptionImpl#getGroups Groups }
+ *
+ *
+ * @generated
+ */
+public class PageDescriptionImpl extends MinimalEObjectImpl.Container implements PageDescription {
+ /**
+ * The default value of the '{@link #getName() Name }' attribute.
+ *
+ * @generated
+ * @ordered
+ * @see #getName()
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() Name }' attribute.
+ *
+ * @generated
+ * @ordered
+ * @see #getName()
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLabelExpression() Label Expression }' attribute.
+ *
+ * @see #getLabelExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String LABEL_EXPRESSION_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLabelExpression() Label Expression }' attribute.
+ *
+ * @see #getLabelExpression()
+ * @generated
+ * @ordered
+ */
+ protected String labelExpression = LABEL_EXPRESSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSemanticCandidatesExpression() Semantic Candidates Expression }'
+ * attribute.
+ *
+ * @see #getSemanticCandidatesExpression()
+ * @generated
+ * @ordered
+ */
+ protected static final String SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT = "aql:self";
+
+ /**
+ * The cached value of the '{@link #getSemanticCandidatesExpression() Semantic Candidates Expression }'
+ * attribute.
+ *
+ * @see #getSemanticCandidatesExpression()
+ * @generated
+ * @ordered
+ */
+ protected String semanticCandidatesExpression = SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPreconditionExpression() Precondition Expression }' attribute.
+ *
+ * @generated
+ * @ordered
+ * @see #getPreconditionExpression()
+ */
+ protected static final String PRECONDITION_EXPRESSION_EDEFAULT = "";
+
+ /**
+ * The cached value of the '{@link #getPreconditionExpression() Precondition Expression }' attribute.
+ *
+ * @generated
+ * @ordered
+ * @see #getPreconditionExpression()
+ */
+ protected String preconditionExpression = PRECONDITION_EXPRESSION_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getGroups() Groups }' containment reference list.
+ *
+ * @see #getGroups()
+ * @generated
+ * @ordered
+ */
+ protected EList groups;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected PageDescriptionImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ViewPackage.Literals.PAGE_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, ViewPackage.PAGE_DESCRIPTION__NAME, oldName, this.name));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getLabelExpression() {
+ return this.labelExpression;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setLabelExpression(String newLabelExpression) {
+ String oldLabelExpression = this.labelExpression;
+ this.labelExpression = newLabelExpression;
+ if (this.eNotificationRequired())
+ this.eNotify(new ENotificationImpl(this, Notification.SET, ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION, oldLabelExpression, this.labelExpression));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getSemanticCandidatesExpression() {
+ return this.semanticCandidatesExpression;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setSemanticCandidatesExpression(String newSemanticCandidatesExpression) {
+ String oldSemanticCandidatesExpression = this.semanticCandidatesExpression;
+ this.semanticCandidatesExpression = newSemanticCandidatesExpression;
+ if (this.eNotificationRequired())
+ this.eNotify(
+ new ENotificationImpl(this, Notification.SET, ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION, oldSemanticCandidatesExpression, this.semanticCandidatesExpression));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getPreconditionExpression() {
+ return this.preconditionExpression;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setPreconditionExpression(String newPreconditionExpression) {
+ String oldPreconditionExpression = this.preconditionExpression;
+ this.preconditionExpression = newPreconditionExpression;
+ if (this.eNotificationRequired())
+ this.eNotify(new ENotificationImpl(this, Notification.SET, ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION, oldPreconditionExpression, this.preconditionExpression));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EList getGroups() {
+ if (this.groups == null) {
+ this.groups = new EObjectContainmentEList<>(GroupDescription.class, this, ViewPackage.PAGE_DESCRIPTION__GROUPS);
+ }
+ return this.groups;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ return ((InternalEList>) this.getGroups()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ViewPackage.PAGE_DESCRIPTION__NAME:
+ return this.getName();
+ case ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION:
+ return this.getLabelExpression();
+ case ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION:
+ return this.getSemanticCandidatesExpression();
+ case ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION:
+ return this.getPreconditionExpression();
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ return this.getGroups();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ViewPackage.PAGE_DESCRIPTION__NAME:
+ this.setName((String) newValue);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION:
+ this.setLabelExpression((String) newValue);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION:
+ this.setSemanticCandidatesExpression((String) newValue);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION:
+ this.setPreconditionExpression((String) newValue);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ this.getGroups().clear();
+ this.getGroups().addAll((Collection extends GroupDescription>) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ViewPackage.PAGE_DESCRIPTION__NAME:
+ this.setName(NAME_EDEFAULT);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION:
+ this.setLabelExpression(LABEL_EXPRESSION_EDEFAULT);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION:
+ this.setSemanticCandidatesExpression(SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION:
+ this.setPreconditionExpression(PRECONDITION_EXPRESSION_EDEFAULT);
+ return;
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ this.getGroups().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ViewPackage.PAGE_DESCRIPTION__NAME:
+ return NAME_EDEFAULT == null ? this.name != null : !NAME_EDEFAULT.equals(this.name);
+ case ViewPackage.PAGE_DESCRIPTION__LABEL_EXPRESSION:
+ return LABEL_EXPRESSION_EDEFAULT == null ? this.labelExpression != null : !LABEL_EXPRESSION_EDEFAULT.equals(this.labelExpression);
+ case ViewPackage.PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION:
+ return SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT == null ? this.semanticCandidatesExpression != null : !SEMANTIC_CANDIDATES_EXPRESSION_EDEFAULT.equals(this.semanticCandidatesExpression);
+ case ViewPackage.PAGE_DESCRIPTION__PRECONDITION_EXPRESSION:
+ return PRECONDITION_EXPRESSION_EDEFAULT == null ? this.preconditionExpression != null : !PRECONDITION_EXPRESSION_EDEFAULT.equals(this.preconditionExpression);
+ case ViewPackage.PAGE_DESCRIPTION__GROUPS:
+ return this.groups != null && !this.groups.isEmpty();
+ }
+ 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(", labelExpression: ");
+ result.append(this.labelExpression);
+ result.append(", semanticCandidatesExpression: ");
+ result.append(this.semanticCandidatesExpression);
+ result.append(", preconditionExpression: ");
+ result.append(this.preconditionExpression);
+ result.append(')');
+ return result.toString();
+ }
+
+} // PageDescriptionImpl
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PieChartDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PieChartDescriptionImpl.java
index 8f7269ba10..53ae5bfe22 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PieChartDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/PieChartDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextAreaDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextAreaDescriptionImpl.java
index a298552bd5..ed4f6fe171 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextAreaDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextAreaDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextfieldDescriptionImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextfieldDescriptionImpl.java
index 30422408c3..5cd87e057f 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextfieldDescriptionImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/TextfieldDescriptionImpl.java
@@ -1,4 +1,4 @@
-/**
+/*******************************************************************************
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
@@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Obeo - initial API and implementation
- */
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.sirius.components.view.impl;
import java.util.Collection;
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewFactoryImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewFactoryImpl.java
index da838632d8..208571571a 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewFactoryImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewFactoryImpl.java
@@ -79,6 +79,7 @@
import org.eclipse.sirius.components.view.NodeDescription;
import org.eclipse.sirius.components.view.NodePalette;
import org.eclipse.sirius.components.view.NodeTool;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.PieChartDescription;
import org.eclipse.sirius.components.view.PieChartDescriptionStyle;
import org.eclipse.sirius.components.view.RadioDescription;
@@ -198,6 +199,8 @@ public EObject create(EClass eClass) {
return this.createConditionalEdgeStyle();
case ViewPackage.FORM_DESCRIPTION:
return this.createFormDescription();
+ case ViewPackage.PAGE_DESCRIPTION:
+ return this.createPageDescription();
case ViewPackage.GROUP_DESCRIPTION:
return this.createGroupDescription();
case ViewPackage.TEXTFIELD_DESCRIPTION:
@@ -682,6 +685,17 @@ public FormDescription createFormDescription() {
return formDescription;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public PageDescription createPageDescription() {
+ PageDescriptionImpl pageDescription = new PageDescriptionImpl();
+ return pageDescription;
+ }
+
/**
*
*
@@ -770,6 +784,61 @@ public RadioDescription createRadioDescription() {
return radioDescription;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public BarChartDescription createBarChartDescription() {
+ BarChartDescriptionImpl barChartDescription = new BarChartDescriptionImpl();
+ return barChartDescription;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public PieChartDescription createPieChartDescription() {
+ PieChartDescriptionImpl pieChartDescription = new PieChartDescriptionImpl();
+ return pieChartDescription;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public FlexboxContainerDescription createFlexboxContainerDescription() {
+ FlexboxContainerDescriptionImpl flexboxContainerDescription = new FlexboxContainerDescriptionImpl();
+ return flexboxContainerDescription;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public ButtonDescription createButtonDescription() {
+ ButtonDescriptionImpl buttonDescription = new ButtonDescriptionImpl();
+ return buttonDescription;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public ImageDescription createImageDescription() {
+ ImageDescriptionImpl imageDescription = new ImageDescriptionImpl();
+ return imageDescription;
+ }
+
/**
*
*
@@ -1121,61 +1190,6 @@ public String convertLayoutDirectionToString(EDataType eDataType, Object instanc
return instanceValue == null ? null : instanceValue.toString();
}
- /**
- *
- *
- * @generated
- */
- @Override
- public BarChartDescription createBarChartDescription() {
- BarChartDescriptionImpl barChartDescription = new BarChartDescriptionImpl();
- return barChartDescription;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public PieChartDescription createPieChartDescription() {
- PieChartDescriptionImpl pieChartDescription = new PieChartDescriptionImpl();
- return pieChartDescription;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public FlexboxContainerDescription createFlexboxContainerDescription() {
- FlexboxContainerDescriptionImpl flexboxContainerDescription = new FlexboxContainerDescriptionImpl();
- return flexboxContainerDescription;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public ButtonDescription createButtonDescription() {
- ButtonDescriptionImpl buttonDescription = new ButtonDescriptionImpl();
- return buttonDescription;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public ImageDescription createImageDescription() {
- ImageDescriptionImpl imageDescription = new ImageDescriptionImpl();
- return imageDescription;
- }
-
/**
*
*
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewPackageImpl.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewPackageImpl.java
index 135b2cf6f6..a9f91d01e7 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewPackageImpl.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/impl/ViewPackageImpl.java
@@ -88,6 +88,7 @@
import org.eclipse.sirius.components.view.NodeStyleDescription;
import org.eclipse.sirius.components.view.NodeTool;
import org.eclipse.sirius.components.view.Operation;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.PieChartDescription;
import org.eclipse.sirius.components.view.PieChartDescriptionStyle;
import org.eclipse.sirius.components.view.RadioDescription;
@@ -408,6 +409,13 @@ public class ViewPackageImpl extends EPackageImpl implements ViewPackage {
*/
private EClass formDescriptionEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass pageDescriptionEClass = null;
+
/**
*
*
@@ -471,6 +479,41 @@ public class ViewPackageImpl extends EPackageImpl implements ViewPackage {
*/
private EClass radioDescriptionEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass barChartDescriptionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass pieChartDescriptionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass flexboxContainerDescriptionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass buttonDescriptionEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass imageDescriptionEClass = null;
+
/**
*
*
@@ -695,41 +738,6 @@ public class ViewPackageImpl extends EPackageImpl implements ViewPackage {
*/
private EEnum layoutDirectionEEnum = null;
- /**
- *
- *
- * @generated
- */
- private EClass barChartDescriptionEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass pieChartDescriptionEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass flexboxContainerDescriptionEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass buttonDescriptionEClass = null;
-
- /**
- *
- *
- * @generated
- */
- private EClass imageDescriptionEClass = null;
-
/**
*
*
@@ -1114,8 +1122,8 @@ public EAttribute getDiagramElementDescription_SemanticCandidatesExpression() {
* @generated
*/
@Override
- public EAttribute getDiagramElementDescription_LabelExpression() {
- return (EAttribute) this.diagramElementDescriptionEClass.getEStructuralFeatures().get(5);
+ public EAttribute getDiagramElementDescription_PreconditionExpression() {
+ return (EAttribute) this.diagramElementDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -1134,8 +1142,8 @@ public EAttribute getDiagramElementDescription_SynchronizationPolicy() {
* @generated
*/
@Override
- public EAttribute getDiagramElementDescription_PreconditionExpression() {
- return (EAttribute) this.diagramElementDescriptionEClass.getEStructuralFeatures().get(3);
+ public EAttribute getDiagramElementDescription_LabelExpression() {
+ return (EAttribute) this.diagramElementDescriptionEClass.getEStructuralFeatures().get(5);
}
/**
@@ -1154,8 +1162,8 @@ public EClass getNodeDescription() {
* @generated
*/
@Override
- public EReference getNodeDescription_ChildrenDescriptions() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(5);
+ public EAttribute getNodeDescription_Collapsible() {
+ return (EAttribute) this.nodeDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -1164,8 +1172,8 @@ public EReference getNodeDescription_ChildrenDescriptions() {
* @generated
*/
@Override
- public EReference getNodeDescription_BorderNodesDescriptions() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(6);
+ public EReference getNodeDescription_Palette() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -1174,8 +1182,8 @@ public EReference getNodeDescription_BorderNodesDescriptions() {
* @generated
*/
@Override
- public EReference getNodeDescription_ReusedChildNodeDescriptions() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(7);
+ public EReference getNodeDescription_ChildrenLayoutStrategy() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -1184,8 +1192,8 @@ public EReference getNodeDescription_ReusedChildNodeDescriptions() {
* @generated
*/
@Override
- public EReference getNodeDescription_ReusedBorderNodeDescriptions() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(8);
+ public EReference getNodeDescription_Style() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -1194,8 +1202,8 @@ public EReference getNodeDescription_ReusedBorderNodeDescriptions() {
* @generated
*/
@Override
- public EReference getNodeDescription_Style() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(3);
+ public EReference getNodeDescription_ConditionalStyles() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(4);
}
/**
@@ -1204,8 +1212,8 @@ public EReference getNodeDescription_Style() {
* @generated
*/
@Override
- public EAttribute getNodeDescription_UserResizable() {
- return (EAttribute) this.nodeDescriptionEClass.getEStructuralFeatures().get(9);
+ public EReference getNodeDescription_ChildrenDescriptions() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(5);
}
/**
@@ -1214,8 +1222,8 @@ public EAttribute getNodeDescription_UserResizable() {
* @generated
*/
@Override
- public EReference getNodeDescription_ConditionalStyles() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(4);
+ public EReference getNodeDescription_BorderNodesDescriptions() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(6);
}
/**
@@ -1224,8 +1232,8 @@ public EReference getNodeDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EReference getNodeDescription_ChildrenLayoutStrategy() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(2);
+ public EReference getNodeDescription_ReusedChildNodeDescriptions() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(7);
}
/**
@@ -1234,8 +1242,8 @@ public EReference getNodeDescription_ChildrenLayoutStrategy() {
* @generated
*/
@Override
- public EAttribute getNodeDescription_Collapsible() {
- return (EAttribute) this.nodeDescriptionEClass.getEStructuralFeatures().get(0);
+ public EReference getNodeDescription_ReusedBorderNodeDescriptions() {
+ return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(8);
}
/**
@@ -1244,8 +1252,8 @@ public EAttribute getNodeDescription_Collapsible() {
* @generated
*/
@Override
- public EReference getNodeDescription_Palette() {
- return (EReference) this.nodeDescriptionEClass.getEStructuralFeatures().get(1);
+ public EAttribute getNodeDescription_UserResizable() {
+ return (EAttribute) this.nodeDescriptionEClass.getEStructuralFeatures().get(9);
}
/**
@@ -2104,10 +2112,70 @@ public EClass getFormDescription() {
* @generated
*/
@Override
- public EReference getFormDescription_Groups() {
+ public EReference getFormDescription_Pages() {
return (EReference) this.formDescriptionEClass.getEStructuralFeatures().get(0);
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getPageDescription() {
+ return this.pageDescriptionEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPageDescription_Name() {
+ return (EAttribute) this.pageDescriptionEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPageDescription_LabelExpression() {
+ return (EAttribute) this.pageDescriptionEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPageDescription_SemanticCandidatesExpression() {
+ return (EAttribute) this.pageDescriptionEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getPageDescription_PreconditionExpression() {
+ return (EAttribute) this.pageDescriptionEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EReference getPageDescription_Groups() {
+ return (EReference) this.pageDescriptionEClass.getEStructuralFeatures().get(4);
+ }
+
/**
*
*
@@ -2604,8 +2672,8 @@ public EReference getRadioDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getWidgetDescriptionStyle() {
- return this.widgetDescriptionStyleEClass;
+ public EClass getBarChartDescription() {
+ return this.barChartDescriptionEClass;
}
/**
@@ -2614,8 +2682,8 @@ public EClass getWidgetDescriptionStyle() {
* @generated
*/
@Override
- public EClass getTextfieldDescriptionStyle() {
- return this.textfieldDescriptionStyleEClass;
+ public EAttribute getBarChartDescription_ValuesExpression() {
+ return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2624,8 +2692,8 @@ public EClass getTextfieldDescriptionStyle() {
* @generated
*/
@Override
- public EReference getTextfieldDescriptionStyle_BackgroundColor() {
- return (EReference) this.textfieldDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getBarChartDescription_KeysExpression() {
+ return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2634,8 +2702,8 @@ public EReference getTextfieldDescriptionStyle_BackgroundColor() {
* @generated
*/
@Override
- public EReference getTextfieldDescriptionStyle_ForegroundColor() {
- return (EReference) this.textfieldDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EAttribute getBarChartDescription_YAxisLabelExpression() {
+ return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -2644,8 +2712,8 @@ public EReference getTextfieldDescriptionStyle_ForegroundColor() {
* @generated
*/
@Override
- public EClass getConditionalTextfieldDescriptionStyle() {
- return this.conditionalTextfieldDescriptionStyleEClass;
+ public EReference getBarChartDescription_Style() {
+ return (EReference) this.barChartDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -2654,8 +2722,8 @@ public EClass getConditionalTextfieldDescriptionStyle() {
* @generated
*/
@Override
- public EClass getCheckboxDescriptionStyle() {
- return this.checkboxDescriptionStyleEClass;
+ public EReference getBarChartDescription_ConditionalStyles() {
+ return (EReference) this.barChartDescriptionEClass.getEStructuralFeatures().get(4);
}
/**
@@ -2664,8 +2732,8 @@ public EClass getCheckboxDescriptionStyle() {
* @generated
*/
@Override
- public EReference getCheckboxDescriptionStyle_Color() {
- return (EReference) this.checkboxDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getBarChartDescription_Width() {
+ return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(5);
}
/**
@@ -2674,8 +2742,8 @@ public EReference getCheckboxDescriptionStyle_Color() {
* @generated
*/
@Override
- public EClass getConditionalCheckboxDescriptionStyle() {
- return this.conditionalCheckboxDescriptionStyleEClass;
+ public EAttribute getBarChartDescription_Height() {
+ return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(6);
}
/**
@@ -2684,8 +2752,8 @@ public EClass getConditionalCheckboxDescriptionStyle() {
* @generated
*/
@Override
- public EClass getSelectDescriptionStyle() {
- return this.selectDescriptionStyleEClass;
+ public EClass getPieChartDescription() {
+ return this.pieChartDescriptionEClass;
}
/**
@@ -2694,8 +2762,8 @@ public EClass getSelectDescriptionStyle() {
* @generated
*/
@Override
- public EReference getSelectDescriptionStyle_BackgroundColor() {
- return (EReference) this.selectDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getPieChartDescription_ValuesExpression() {
+ return (EAttribute) this.pieChartDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2704,8 +2772,8 @@ public EReference getSelectDescriptionStyle_BackgroundColor() {
* @generated
*/
@Override
- public EReference getSelectDescriptionStyle_ForegroundColor() {
- return (EReference) this.selectDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EAttribute getPieChartDescription_KeysExpression() {
+ return (EAttribute) this.pieChartDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2714,8 +2782,8 @@ public EReference getSelectDescriptionStyle_ForegroundColor() {
* @generated
*/
@Override
- public EClass getConditionalSelectDescriptionStyle() {
- return this.conditionalSelectDescriptionStyleEClass;
+ public EReference getPieChartDescription_Style() {
+ return (EReference) this.pieChartDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -2724,8 +2792,8 @@ public EClass getConditionalSelectDescriptionStyle() {
* @generated
*/
@Override
- public EClass getMultiSelectDescriptionStyle() {
- return this.multiSelectDescriptionStyleEClass;
+ public EReference getPieChartDescription_ConditionalStyles() {
+ return (EReference) this.pieChartDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -2734,8 +2802,8 @@ public EClass getMultiSelectDescriptionStyle() {
* @generated
*/
@Override
- public EReference getMultiSelectDescriptionStyle_BackgroundColor() {
- return (EReference) this.multiSelectDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EClass getFlexboxContainerDescription() {
+ return this.flexboxContainerDescriptionEClass;
}
/**
@@ -2744,8 +2812,8 @@ public EReference getMultiSelectDescriptionStyle_BackgroundColor() {
* @generated
*/
@Override
- public EReference getMultiSelectDescriptionStyle_ForegroundColor() {
- return (EReference) this.multiSelectDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EReference getFlexboxContainerDescription_Children() {
+ return (EReference) this.flexboxContainerDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2754,8 +2822,8 @@ public EReference getMultiSelectDescriptionStyle_ForegroundColor() {
* @generated
*/
@Override
- public EClass getConditionalMultiSelectDescriptionStyle() {
- return this.conditionalMultiSelectDescriptionStyleEClass;
+ public EAttribute getFlexboxContainerDescription_FlexDirection() {
+ return (EAttribute) this.flexboxContainerDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2764,8 +2832,8 @@ public EClass getConditionalMultiSelectDescriptionStyle() {
* @generated
*/
@Override
- public EClass getTextareaDescriptionStyle() {
- return this.textareaDescriptionStyleEClass;
+ public EClass getButtonDescription() {
+ return this.buttonDescriptionEClass;
}
/**
@@ -2774,8 +2842,8 @@ public EClass getTextareaDescriptionStyle() {
* @generated
*/
@Override
- public EReference getTextareaDescriptionStyle_BackgroundColor() {
- return (EReference) this.textareaDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getButtonDescription_ButtonLabelExpression() {
+ return (EAttribute) this.buttonDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2784,8 +2852,8 @@ public EReference getTextareaDescriptionStyle_BackgroundColor() {
* @generated
*/
@Override
- public EReference getTextareaDescriptionStyle_ForegroundColor() {
- return (EReference) this.textareaDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EReference getButtonDescription_Body() {
+ return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2794,8 +2862,8 @@ public EReference getTextareaDescriptionStyle_ForegroundColor() {
* @generated
*/
@Override
- public EClass getConditionalTextareaDescriptionStyle() {
- return this.conditionalTextareaDescriptionStyleEClass;
+ public EAttribute getButtonDescription_ImageExpression() {
+ return (EAttribute) this.buttonDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -2804,8 +2872,8 @@ public EClass getConditionalTextareaDescriptionStyle() {
* @generated
*/
@Override
- public EClass getRadioDescriptionStyle() {
- return this.radioDescriptionStyleEClass;
+ public EReference getButtonDescription_Style() {
+ return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -2814,8 +2882,8 @@ public EClass getRadioDescriptionStyle() {
* @generated
*/
@Override
- public EReference getRadioDescriptionStyle_Color() {
- return (EReference) this.radioDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EReference getButtonDescription_ConditionalStyles() {
+ return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(4);
}
/**
@@ -2824,8 +2892,8 @@ public EReference getRadioDescriptionStyle_Color() {
* @generated
*/
@Override
- public EClass getConditionalRadioDescriptionStyle() {
- return this.conditionalRadioDescriptionStyleEClass;
+ public EClass getImageDescription() {
+ return this.imageDescriptionEClass;
}
/**
@@ -2834,8 +2902,8 @@ public EClass getConditionalRadioDescriptionStyle() {
* @generated
*/
@Override
- public EClass getButtonDescriptionStyle() {
- return this.buttonDescriptionStyleEClass;
+ public EAttribute getImageDescription_UrlExpression() {
+ return (EAttribute) this.imageDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2844,8 +2912,8 @@ public EClass getButtonDescriptionStyle() {
* @generated
*/
@Override
- public EReference getButtonDescriptionStyle_BackgroundColor() {
- return (EReference) this.buttonDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getImageDescription_MaxWidthExpression() {
+ return (EAttribute) this.imageDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2854,8 +2922,8 @@ public EReference getButtonDescriptionStyle_BackgroundColor() {
* @generated
*/
@Override
- public EReference getButtonDescriptionStyle_ForegroundColor() {
- return (EReference) this.buttonDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EClass getWidgetDescriptionStyle() {
+ return this.widgetDescriptionStyleEClass;
}
/**
@@ -2864,8 +2932,8 @@ public EReference getButtonDescriptionStyle_ForegroundColor() {
* @generated
*/
@Override
- public EClass getConditionalButtonDescriptionStyle() {
- return this.conditionalButtonDescriptionStyleEClass;
+ public EClass getTextfieldDescriptionStyle() {
+ return this.textfieldDescriptionStyleEClass;
}
/**
@@ -2874,8 +2942,8 @@ public EClass getConditionalButtonDescriptionStyle() {
* @generated
*/
@Override
- public EClass getBarChartDescriptionStyle() {
- return this.barChartDescriptionStyleEClass;
+ public EReference getTextfieldDescriptionStyle_BackgroundColor() {
+ return (EReference) this.textfieldDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2884,8 +2952,8 @@ public EClass getBarChartDescriptionStyle() {
* @generated
*/
@Override
- public EAttribute getBarChartDescriptionStyle_BarsColor() {
- return (EAttribute) this.barChartDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EReference getTextfieldDescriptionStyle_ForegroundColor() {
+ return (EReference) this.textfieldDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2894,8 +2962,8 @@ public EAttribute getBarChartDescriptionStyle_BarsColor() {
* @generated
*/
@Override
- public EClass getConditionalBarChartDescriptionStyle() {
- return this.conditionalBarChartDescriptionStyleEClass;
+ public EClass getConditionalTextfieldDescriptionStyle() {
+ return this.conditionalTextfieldDescriptionStyleEClass;
}
/**
@@ -2904,8 +2972,8 @@ public EClass getConditionalBarChartDescriptionStyle() {
* @generated
*/
@Override
- public EClass getPieChartDescriptionStyle() {
- return this.pieChartDescriptionStyleEClass;
+ public EClass getCheckboxDescriptionStyle() {
+ return this.checkboxDescriptionStyleEClass;
}
/**
@@ -2914,8 +2982,8 @@ public EClass getPieChartDescriptionStyle() {
* @generated
*/
@Override
- public EAttribute getPieChartDescriptionStyle_Colors() {
- return (EAttribute) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EReference getCheckboxDescriptionStyle_Color() {
+ return (EReference) this.checkboxDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2924,8 +2992,8 @@ public EAttribute getPieChartDescriptionStyle_Colors() {
* @generated
*/
@Override
- public EAttribute getPieChartDescriptionStyle_StrokeWidth() {
- return (EAttribute) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(1);
+ public EClass getConditionalCheckboxDescriptionStyle() {
+ return this.conditionalCheckboxDescriptionStyleEClass;
}
/**
@@ -2934,8 +3002,8 @@ public EAttribute getPieChartDescriptionStyle_StrokeWidth() {
* @generated
*/
@Override
- public EReference getPieChartDescriptionStyle_StrokeColor() {
- return (EReference) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(2);
+ public EClass getSelectDescriptionStyle() {
+ return this.selectDescriptionStyleEClass;
}
/**
@@ -2944,8 +3012,8 @@ public EReference getPieChartDescriptionStyle_StrokeColor() {
* @generated
*/
@Override
- public EClass getConditionalPieChartDescriptionStyle() {
- return this.conditionalPieChartDescriptionStyleEClass;
+ public EReference getSelectDescriptionStyle_BackgroundColor() {
+ return (EReference) this.selectDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2954,8 +3022,8 @@ public EClass getConditionalPieChartDescriptionStyle() {
* @generated
*/
@Override
- public EClass getLabelDescription() {
- return this.labelDescriptionEClass;
+ public EReference getSelectDescriptionStyle_ForegroundColor() {
+ return (EReference) this.selectDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -2964,8 +3032,8 @@ public EClass getLabelDescription() {
* @generated
*/
@Override
- public EAttribute getLabelDescription_ValueExpression() {
- return (EAttribute) this.labelDescriptionEClass.getEStructuralFeatures().get(0);
+ public EClass getConditionalSelectDescriptionStyle() {
+ return this.conditionalSelectDescriptionStyleEClass;
}
/**
@@ -2974,8 +3042,8 @@ public EAttribute getLabelDescription_ValueExpression() {
* @generated
*/
@Override
- public EReference getLabelDescription_Style() {
- return (EReference) this.labelDescriptionEClass.getEStructuralFeatures().get(1);
+ public EClass getMultiSelectDescriptionStyle() {
+ return this.multiSelectDescriptionStyleEClass;
}
/**
@@ -2984,8 +3052,8 @@ public EReference getLabelDescription_Style() {
* @generated
*/
@Override
- public EReference getLabelDescription_ConditionalStyles() {
- return (EReference) this.labelDescriptionEClass.getEStructuralFeatures().get(2);
+ public EReference getMultiSelectDescriptionStyle_BackgroundColor() {
+ return (EReference) this.multiSelectDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -2994,8 +3062,8 @@ public EReference getLabelDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getLabelDescriptionStyle() {
- return this.labelDescriptionStyleEClass;
+ public EReference getMultiSelectDescriptionStyle_ForegroundColor() {
+ return (EReference) this.multiSelectDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3004,8 +3072,8 @@ public EClass getLabelDescriptionStyle() {
* @generated
*/
@Override
- public EReference getLabelDescriptionStyle_Color() {
- return (EReference) this.labelDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EClass getConditionalMultiSelectDescriptionStyle() {
+ return this.conditionalMultiSelectDescriptionStyleEClass;
}
/**
@@ -3014,8 +3082,8 @@ public EReference getLabelDescriptionStyle_Color() {
* @generated
*/
@Override
- public EClass getConditionalLabelDescriptionStyle() {
- return this.conditionalLabelDescriptionStyleEClass;
+ public EClass getTextareaDescriptionStyle() {
+ return this.textareaDescriptionStyleEClass;
}
/**
@@ -3024,8 +3092,8 @@ public EClass getConditionalLabelDescriptionStyle() {
* @generated
*/
@Override
- public EClass getLinkDescription() {
- return this.linkDescriptionEClass;
+ public EReference getTextareaDescriptionStyle_BackgroundColor() {
+ return (EReference) this.textareaDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3034,8 +3102,8 @@ public EClass getLinkDescription() {
* @generated
*/
@Override
- public EAttribute getLinkDescription_ValueExpression() {
- return (EAttribute) this.linkDescriptionEClass.getEStructuralFeatures().get(0);
+ public EReference getTextareaDescriptionStyle_ForegroundColor() {
+ return (EReference) this.textareaDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3044,8 +3112,8 @@ public EAttribute getLinkDescription_ValueExpression() {
* @generated
*/
@Override
- public EReference getLinkDescription_Style() {
- return (EReference) this.linkDescriptionEClass.getEStructuralFeatures().get(1);
+ public EClass getConditionalTextareaDescriptionStyle() {
+ return this.conditionalTextareaDescriptionStyleEClass;
}
/**
@@ -3054,8 +3122,8 @@ public EReference getLinkDescription_Style() {
* @generated
*/
@Override
- public EReference getLinkDescription_ConditionalStyles() {
- return (EReference) this.linkDescriptionEClass.getEStructuralFeatures().get(2);
+ public EClass getRadioDescriptionStyle() {
+ return this.radioDescriptionStyleEClass;
}
/**
@@ -3064,8 +3132,8 @@ public EReference getLinkDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getLinkDescriptionStyle() {
- return this.linkDescriptionStyleEClass;
+ public EReference getRadioDescriptionStyle_Color() {
+ return (EReference) this.radioDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3074,8 +3142,8 @@ public EClass getLinkDescriptionStyle() {
* @generated
*/
@Override
- public EReference getLinkDescriptionStyle_Color() {
- return (EReference) this.linkDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EClass getConditionalRadioDescriptionStyle() {
+ return this.conditionalRadioDescriptionStyleEClass;
}
/**
@@ -3084,8 +3152,8 @@ public EReference getLinkDescriptionStyle_Color() {
* @generated
*/
@Override
- public EClass getConditionalLinkDescriptionStyle() {
- return this.conditionalLinkDescriptionStyleEClass;
+ public EClass getButtonDescriptionStyle() {
+ return this.buttonDescriptionStyleEClass;
}
/**
@@ -3094,8 +3162,8 @@ public EClass getConditionalLinkDescriptionStyle() {
* @generated
*/
@Override
- public EClass getListDescription() {
- return this.listDescriptionEClass;
+ public EReference getButtonDescriptionStyle_BackgroundColor() {
+ return (EReference) this.buttonDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3104,8 +3172,8 @@ public EClass getListDescription() {
* @generated
*/
@Override
- public EAttribute getListDescription_ValueExpression() {
- return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(0);
+ public EReference getButtonDescriptionStyle_ForegroundColor() {
+ return (EReference) this.buttonDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3114,8 +3182,8 @@ public EAttribute getListDescription_ValueExpression() {
* @generated
*/
@Override
- public EAttribute getListDescription_DisplayExpression() {
- return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(1);
+ public EClass getConditionalButtonDescriptionStyle() {
+ return this.conditionalButtonDescriptionStyleEClass;
}
/**
@@ -3124,8 +3192,8 @@ public EAttribute getListDescription_DisplayExpression() {
* @generated
*/
@Override
- public EAttribute getListDescription_IsDeletableExpression() {
- return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(2);
+ public EClass getBarChartDescriptionStyle() {
+ return this.barChartDescriptionStyleEClass;
}
/**
@@ -3134,8 +3202,8 @@ public EAttribute getListDescription_IsDeletableExpression() {
* @generated
*/
@Override
- public EReference getListDescription_Body() {
- return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(3);
+ public EAttribute getBarChartDescriptionStyle_BarsColor() {
+ return (EAttribute) this.barChartDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3144,8 +3212,8 @@ public EReference getListDescription_Body() {
* @generated
*/
@Override
- public EReference getListDescription_Style() {
- return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(4);
+ public EClass getConditionalBarChartDescriptionStyle() {
+ return this.conditionalBarChartDescriptionStyleEClass;
}
/**
@@ -3154,8 +3222,8 @@ public EReference getListDescription_Style() {
* @generated
*/
@Override
- public EReference getListDescription_ConditionalStyles() {
- return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(5);
+ public EClass getPieChartDescriptionStyle() {
+ return this.pieChartDescriptionStyleEClass;
}
/**
@@ -3164,8 +3232,8 @@ public EReference getListDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getListDescriptionStyle() {
- return this.listDescriptionStyleEClass;
+ public EAttribute getPieChartDescriptionStyle_Colors() {
+ return (EAttribute) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3174,8 +3242,8 @@ public EClass getListDescriptionStyle() {
* @generated
*/
@Override
- public EReference getListDescriptionStyle_Color() {
- return (EReference) this.listDescriptionStyleEClass.getEStructuralFeatures().get(0);
+ public EAttribute getPieChartDescriptionStyle_StrokeWidth() {
+ return (EAttribute) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3184,8 +3252,8 @@ public EReference getListDescriptionStyle_Color() {
* @generated
*/
@Override
- public EClass getConditionalListDescriptionStyle() {
- return this.conditionalListDescriptionStyleEClass;
+ public EReference getPieChartDescriptionStyle_StrokeColor() {
+ return (EReference) this.pieChartDescriptionStyleEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3194,8 +3262,8 @@ public EClass getConditionalListDescriptionStyle() {
* @generated
*/
@Override
- public EClass getDiagramPalette() {
- return this.diagramPaletteEClass;
+ public EClass getConditionalPieChartDescriptionStyle() {
+ return this.conditionalPieChartDescriptionStyleEClass;
}
/**
@@ -3204,8 +3272,8 @@ public EClass getDiagramPalette() {
* @generated
*/
@Override
- public EReference getDiagramPalette_DropTool() {
- return (EReference) this.diagramPaletteEClass.getEStructuralFeatures().get(0);
+ public EClass getLabelDescription() {
+ return this.labelDescriptionEClass;
}
/**
@@ -3214,8 +3282,8 @@ public EReference getDiagramPalette_DropTool() {
* @generated
*/
@Override
- public EReference getDiagramPalette_NodeTools() {
- return (EReference) this.diagramPaletteEClass.getEStructuralFeatures().get(1);
+ public EAttribute getLabelDescription_ValueExpression() {
+ return (EAttribute) this.labelDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3224,8 +3292,8 @@ public EReference getDiagramPalette_NodeTools() {
* @generated
*/
@Override
- public EClass getNodePalette() {
- return this.nodePaletteEClass;
+ public EReference getLabelDescription_Style() {
+ return (EReference) this.labelDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3234,8 +3302,8 @@ public EClass getNodePalette() {
* @generated
*/
@Override
- public EReference getNodePalette_DeleteTool() {
- return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(0);
+ public EReference getLabelDescription_ConditionalStyles() {
+ return (EReference) this.labelDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3244,8 +3312,8 @@ public EReference getNodePalette_DeleteTool() {
* @generated
*/
@Override
- public EReference getNodePalette_LabelEditTool() {
- return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(1);
+ public EClass getLabelDescriptionStyle() {
+ return this.labelDescriptionStyleEClass;
}
/**
@@ -3254,8 +3322,8 @@ public EReference getNodePalette_LabelEditTool() {
* @generated
*/
@Override
- public EReference getNodePalette_NodeTools() {
- return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(2);
+ public EReference getLabelDescriptionStyle_Color() {
+ return (EReference) this.labelDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3264,8 +3332,8 @@ public EReference getNodePalette_NodeTools() {
* @generated
*/
@Override
- public EReference getNodePalette_EdgeTools() {
- return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(3);
+ public EClass getConditionalLabelDescriptionStyle() {
+ return this.conditionalLabelDescriptionStyleEClass;
}
/**
@@ -3274,8 +3342,8 @@ public EReference getNodePalette_EdgeTools() {
* @generated
*/
@Override
- public EClass getEdgePalette() {
- return this.edgePaletteEClass;
+ public EClass getLinkDescription() {
+ return this.linkDescriptionEClass;
}
/**
@@ -3284,8 +3352,8 @@ public EClass getEdgePalette() {
* @generated
*/
@Override
- public EReference getEdgePalette_DeleteTool() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(0);
+ public EAttribute getLinkDescription_ValueExpression() {
+ return (EAttribute) this.linkDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3294,8 +3362,8 @@ public EReference getEdgePalette_DeleteTool() {
* @generated
*/
@Override
- public EReference getEdgePalette_CenterLabelEditTool() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(1);
+ public EReference getLinkDescription_Style() {
+ return (EReference) this.linkDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3304,8 +3372,8 @@ public EReference getEdgePalette_CenterLabelEditTool() {
* @generated
*/
@Override
- public EReference getEdgePalette_BeginLabelEditTool() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(2);
+ public EReference getLinkDescription_ConditionalStyles() {
+ return (EReference) this.linkDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3314,8 +3382,8 @@ public EReference getEdgePalette_BeginLabelEditTool() {
* @generated
*/
@Override
- public EReference getEdgePalette_EndLabelEditTool() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(3);
+ public EClass getLinkDescriptionStyle() {
+ return this.linkDescriptionStyleEClass;
}
/**
@@ -3324,8 +3392,8 @@ public EReference getEdgePalette_EndLabelEditTool() {
* @generated
*/
@Override
- public EReference getEdgePalette_NodeTools() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(4);
+ public EReference getLinkDescriptionStyle_Color() {
+ return (EReference) this.linkDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3334,8 +3402,8 @@ public EReference getEdgePalette_NodeTools() {
* @generated
*/
@Override
- public EReference getEdgePalette_EdgeReconnectionTools() {
- return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(5);
+ public EClass getConditionalLinkDescriptionStyle() {
+ return this.conditionalLinkDescriptionStyleEClass;
}
/**
@@ -3344,8 +3412,8 @@ public EReference getEdgePalette_EdgeReconnectionTools() {
* @generated
*/
@Override
- public EEnum getLayoutDirection() {
- return this.layoutDirectionEEnum;
+ public EClass getListDescription() {
+ return this.listDescriptionEClass;
}
/**
@@ -3354,8 +3422,8 @@ public EEnum getLayoutDirection() {
* @generated
*/
@Override
- public EClass getBarChartDescription() {
- return this.barChartDescriptionEClass;
+ public EAttribute getListDescription_ValueExpression() {
+ return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3364,8 +3432,8 @@ public EClass getBarChartDescription() {
* @generated
*/
@Override
- public EAttribute getBarChartDescription_ValuesExpression() {
- return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(0);
+ public EAttribute getListDescription_DisplayExpression() {
+ return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3374,8 +3442,8 @@ public EAttribute getBarChartDescription_ValuesExpression() {
* @generated
*/
@Override
- public EAttribute getBarChartDescription_KeysExpression() {
- return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(1);
+ public EAttribute getListDescription_IsDeletableExpression() {
+ return (EAttribute) this.listDescriptionEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3384,8 +3452,8 @@ public EAttribute getBarChartDescription_KeysExpression() {
* @generated
*/
@Override
- public EAttribute getBarChartDescription_YAxisLabelExpression() {
- return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(2);
+ public EReference getListDescription_Body() {
+ return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(3);
}
/**
@@ -3394,8 +3462,8 @@ public EAttribute getBarChartDescription_YAxisLabelExpression() {
* @generated
*/
@Override
- public EReference getBarChartDescription_Style() {
- return (EReference) this.barChartDescriptionEClass.getEStructuralFeatures().get(3);
+ public EReference getListDescription_Style() {
+ return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(4);
}
/**
@@ -3404,8 +3472,8 @@ public EReference getBarChartDescription_Style() {
* @generated
*/
@Override
- public EReference getBarChartDescription_ConditionalStyles() {
- return (EReference) this.barChartDescriptionEClass.getEStructuralFeatures().get(4);
+ public EReference getListDescription_ConditionalStyles() {
+ return (EReference) this.listDescriptionEClass.getEStructuralFeatures().get(5);
}
/**
@@ -3414,8 +3482,8 @@ public EReference getBarChartDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EAttribute getBarChartDescription_Width() {
- return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(5);
+ public EClass getListDescriptionStyle() {
+ return this.listDescriptionStyleEClass;
}
/**
@@ -3424,8 +3492,8 @@ public EAttribute getBarChartDescription_Width() {
* @generated
*/
@Override
- public EAttribute getBarChartDescription_Height() {
- return (EAttribute) this.barChartDescriptionEClass.getEStructuralFeatures().get(6);
+ public EReference getListDescriptionStyle_Color() {
+ return (EReference) this.listDescriptionStyleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3434,8 +3502,8 @@ public EAttribute getBarChartDescription_Height() {
* @generated
*/
@Override
- public EClass getPieChartDescription() {
- return this.pieChartDescriptionEClass;
+ public EClass getConditionalListDescriptionStyle() {
+ return this.conditionalListDescriptionStyleEClass;
}
/**
@@ -3444,8 +3512,8 @@ public EClass getPieChartDescription() {
* @generated
*/
@Override
- public EAttribute getPieChartDescription_ValuesExpression() {
- return (EAttribute) this.pieChartDescriptionEClass.getEStructuralFeatures().get(0);
+ public EClass getDiagramPalette() {
+ return this.diagramPaletteEClass;
}
/**
@@ -3454,8 +3522,8 @@ public EAttribute getPieChartDescription_ValuesExpression() {
* @generated
*/
@Override
- public EAttribute getPieChartDescription_KeysExpression() {
- return (EAttribute) this.pieChartDescriptionEClass.getEStructuralFeatures().get(1);
+ public EReference getDiagramPalette_DropTool() {
+ return (EReference) this.diagramPaletteEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3464,8 +3532,8 @@ public EAttribute getPieChartDescription_KeysExpression() {
* @generated
*/
@Override
- public EReference getPieChartDescription_Style() {
- return (EReference) this.pieChartDescriptionEClass.getEStructuralFeatures().get(2);
+ public EReference getDiagramPalette_NodeTools() {
+ return (EReference) this.diagramPaletteEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3474,8 +3542,8 @@ public EReference getPieChartDescription_Style() {
* @generated
*/
@Override
- public EReference getPieChartDescription_ConditionalStyles() {
- return (EReference) this.pieChartDescriptionEClass.getEStructuralFeatures().get(3);
+ public EClass getNodePalette() {
+ return this.nodePaletteEClass;
}
/**
@@ -3484,8 +3552,8 @@ public EReference getPieChartDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getFlexboxContainerDescription() {
- return this.flexboxContainerDescriptionEClass;
+ public EReference getNodePalette_DeleteTool() {
+ return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3494,8 +3562,8 @@ public EClass getFlexboxContainerDescription() {
* @generated
*/
@Override
- public EReference getFlexboxContainerDescription_Children() {
- return (EReference) this.flexboxContainerDescriptionEClass.getEStructuralFeatures().get(0);
+ public EReference getNodePalette_LabelEditTool() {
+ return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3504,8 +3572,8 @@ public EReference getFlexboxContainerDescription_Children() {
* @generated
*/
@Override
- public EAttribute getFlexboxContainerDescription_FlexDirection() {
- return (EAttribute) this.flexboxContainerDescriptionEClass.getEStructuralFeatures().get(1);
+ public EReference getNodePalette_NodeTools() {
+ return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3514,8 +3582,8 @@ public EAttribute getFlexboxContainerDescription_FlexDirection() {
* @generated
*/
@Override
- public EClass getButtonDescription() {
- return this.buttonDescriptionEClass;
+ public EReference getNodePalette_EdgeTools() {
+ return (EReference) this.nodePaletteEClass.getEStructuralFeatures().get(3);
}
/**
@@ -3524,8 +3592,8 @@ public EClass getButtonDescription() {
* @generated
*/
@Override
- public EAttribute getButtonDescription_ButtonLabelExpression() {
- return (EAttribute) this.buttonDescriptionEClass.getEStructuralFeatures().get(0);
+ public EClass getEdgePalette() {
+ return this.edgePaletteEClass;
}
/**
@@ -3534,8 +3602,8 @@ public EAttribute getButtonDescription_ButtonLabelExpression() {
* @generated
*/
@Override
- public EReference getButtonDescription_Body() {
- return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(1);
+ public EReference getEdgePalette_DeleteTool() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(0);
}
/**
@@ -3544,8 +3612,8 @@ public EReference getButtonDescription_Body() {
* @generated
*/
@Override
- public EAttribute getButtonDescription_ImageExpression() {
- return (EAttribute) this.buttonDescriptionEClass.getEStructuralFeatures().get(2);
+ public EReference getEdgePalette_CenterLabelEditTool() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(1);
}
/**
@@ -3554,8 +3622,8 @@ public EAttribute getButtonDescription_ImageExpression() {
* @generated
*/
@Override
- public EReference getButtonDescription_Style() {
- return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(3);
+ public EReference getEdgePalette_BeginLabelEditTool() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(2);
}
/**
@@ -3564,8 +3632,8 @@ public EReference getButtonDescription_Style() {
* @generated
*/
@Override
- public EReference getButtonDescription_ConditionalStyles() {
- return (EReference) this.buttonDescriptionEClass.getEStructuralFeatures().get(4);
+ public EReference getEdgePalette_EndLabelEditTool() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(3);
}
/**
@@ -3574,8 +3642,8 @@ public EReference getButtonDescription_ConditionalStyles() {
* @generated
*/
@Override
- public EClass getImageDescription() {
- return this.imageDescriptionEClass;
+ public EReference getEdgePalette_NodeTools() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(4);
}
/**
@@ -3584,8 +3652,8 @@ public EClass getImageDescription() {
* @generated
*/
@Override
- public EAttribute getImageDescription_UrlExpression() {
- return (EAttribute) this.imageDescriptionEClass.getEStructuralFeatures().get(0);
+ public EReference getEdgePalette_EdgeReconnectionTools() {
+ return (EReference) this.edgePaletteEClass.getEStructuralFeatures().get(5);
}
/**
@@ -3594,8 +3662,8 @@ public EAttribute getImageDescription_UrlExpression() {
* @generated
*/
@Override
- public EAttribute getImageDescription_MaxWidthExpression() {
- return (EAttribute) this.imageDescriptionEClass.getEStructuralFeatures().get(1);
+ public EEnum getLayoutDirection() {
+ return this.layoutDirectionEEnum;
}
/**
@@ -3900,7 +3968,14 @@ public void createPackageContents() {
this.conditionalEdgeStyleEClass = this.createEClass(CONDITIONAL_EDGE_STYLE);
this.formDescriptionEClass = this.createEClass(FORM_DESCRIPTION);
- this.createEReference(this.formDescriptionEClass, FORM_DESCRIPTION__GROUPS);
+ this.createEReference(this.formDescriptionEClass, FORM_DESCRIPTION__PAGES);
+
+ this.pageDescriptionEClass = this.createEClass(PAGE_DESCRIPTION);
+ this.createEAttribute(this.pageDescriptionEClass, PAGE_DESCRIPTION__NAME);
+ this.createEAttribute(this.pageDescriptionEClass, PAGE_DESCRIPTION__LABEL_EXPRESSION);
+ this.createEAttribute(this.pageDescriptionEClass, PAGE_DESCRIPTION__SEMANTIC_CANDIDATES_EXPRESSION);
+ this.createEAttribute(this.pageDescriptionEClass, PAGE_DESCRIPTION__PRECONDITION_EXPRESSION);
+ this.createEReference(this.pageDescriptionEClass, PAGE_DESCRIPTION__GROUPS);
this.groupDescriptionEClass = this.createEClass(GROUP_DESCRIPTION);
this.createEAttribute(this.groupDescriptionEClass, GROUP_DESCRIPTION__NAME);
@@ -4483,7 +4558,19 @@ public void initializePackageContents() {
this.initEClass(this.conditionalEdgeStyleEClass, ConditionalEdgeStyle.class, "ConditionalEdgeStyle", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
this.initEClass(this.formDescriptionEClass, FormDescription.class, "FormDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- this.initEReference(this.getFormDescription_Groups(), this.getGroupDescription(), null, "groups", null, 0, -1, FormDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ this.initEReference(this.getFormDescription_Pages(), this.getPageDescription(), null, "pages", null, 0, -1, FormDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ this.initEClass(this.pageDescriptionEClass, PageDescription.class, "PageDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ this.initEAttribute(this.getPageDescription_Name(), this.getIdentifier(), "name", null, 0, 1, PageDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ this.initEAttribute(this.getPageDescription_LabelExpression(), this.getInterpretedExpression(), "labelExpression", null, 0, 1, PageDescription.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ this.initEAttribute(this.getPageDescription_SemanticCandidatesExpression(), this.getInterpretedExpression(), "semanticCandidatesExpression", "aql:self", 0, 1, PageDescription.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ this.initEAttribute(this.getPageDescription_PreconditionExpression(), this.getInterpretedExpression(), "preconditionExpression", "", 0, 1, PageDescription.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ this.initEReference(this.getPageDescription_Groups(), this.getGroupDescription(), null, "groups", null, 0, -1, PageDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE,
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
this.initEClass(this.groupDescriptionEClass, GroupDescription.class, "GroupDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewAdapterFactory.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewAdapterFactory.java
index df5179a2c6..52d3a12c62 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewAdapterFactory.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewAdapterFactory.java
@@ -79,6 +79,7 @@
import org.eclipse.sirius.components.view.NodeStyleDescription;
import org.eclipse.sirius.components.view.NodeTool;
import org.eclipse.sirius.components.view.Operation;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.PieChartDescription;
import org.eclipse.sirius.components.view.PieChartDescriptionStyle;
import org.eclipse.sirius.components.view.RadioDescription;
@@ -360,6 +361,11 @@ public Adapter caseFormDescription(FormDescription object) {
return ViewAdapterFactory.this.createFormDescriptionAdapter();
}
+ @Override
+ public Adapter casePageDescription(PageDescription object) {
+ return ViewAdapterFactory.this.createPageDescriptionAdapter();
+ }
+
@Override
public Adapter caseGroupDescription(GroupDescription object) {
return ViewAdapterFactory.this.createGroupDescriptionAdapter();
@@ -1154,6 +1160,19 @@ public Adapter createFormDescriptionAdapter() {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.PageDescription Page
+ * 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.PageDescription
+ * @generated
+ */
+ public Adapter createPageDescriptionAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.GroupDescription
* Group Description }'. This default implementation returns null so that we can
@@ -1280,6 +1299,76 @@ public Adapter createRadioDescriptionAdapter() {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.BarChartDescription
+ * Bar Chart 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.
+ * @generated
+ * @see org.eclipse.sirius.components.view.BarChartDescription
+ */
+ public Adapter createBarChartDescriptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.PieChartDescription
+ * Pie Chart 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.
+ * @generated
+ * @see org.eclipse.sirius.components.view.PieChartDescription
+ */
+ public Adapter createPieChartDescriptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class
+ * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription Flexbox Container 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.
+ * @generated
+ * @see org.eclipse.sirius.components.view.FlexboxContainerDescription
+ */
+ public Adapter createFlexboxContainerDescriptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.ButtonDescription
+ * Button 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.
+ * @generated
+ * @see org.eclipse.sirius.components.view.ButtonDescription
+ */
+ public Adapter createButtonDescriptionAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.ImageDescription
+ * Image 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.
+ * @generated
+ * @see org.eclipse.sirius.components.view.ImageDescription
+ */
+ public Adapter createImageDescriptionAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.WidgetDescriptionStyle
* Widget Description Style }'. This default implementation returns null so that we
@@ -1716,76 +1805,6 @@ public Adapter createEdgePaletteAdapter() {
return null;
}
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.BarChartDescription
- * Bar Chart 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.BarChartDescription
- * @generated
- */
- public Adapter createBarChartDescriptionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.PieChartDescription
- * Pie Chart 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.PieChartDescription
- * @generated
- */
- public Adapter createPieChartDescriptionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class
- * '{@link org.eclipse.sirius.components.view.FlexboxContainerDescription Flexbox Container 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.FlexboxContainerDescription
- * @generated
- */
- public Adapter createFlexboxContainerDescriptionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.ButtonDescription
- * Button 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.ButtonDescription
- * @generated
- */
- public Adapter createButtonDescriptionAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.ImageDescription
- * Image 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.ImageDescription
- * @generated
- */
- public Adapter createImageDescriptionAdapter() {
- return null;
- }
-
/**
* Creates a new adapter for the default case. This default implementation returns null.
*
diff --git a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewSwitch.java b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewSwitch.java
index d9596b8b0f..988cac1f1a 100644
--- a/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewSwitch.java
+++ b/packages/view/backend/sirius-components-view/src/main/java/org/eclipse/sirius/components/view/util/ViewSwitch.java
@@ -78,6 +78,7 @@
import org.eclipse.sirius.components.view.NodeStyleDescription;
import org.eclipse.sirius.components.view.NodeTool;
import org.eclipse.sirius.components.view.Operation;
+import org.eclipse.sirius.components.view.PageDescription;
import org.eclipse.sirius.components.view.PieChartDescription;
import org.eclipse.sirius.components.view.PieChartDescriptionStyle;
import org.eclipse.sirius.components.view.RadioDescription;
@@ -533,6 +534,13 @@ protected T doSwitch(int classifierID, EObject theEObject) {
result = this.defaultCase(theEObject);
return result;
}
+ case ViewPackage.PAGE_DESCRIPTION: {
+ PageDescription pageDescription = (PageDescription) theEObject;
+ T result = this.casePageDescription(pageDescription);
+ if (result == null)
+ result = this.defaultCase(theEObject);
+ return result;
+ }
case ViewPackage.GROUP_DESCRIPTION: {
GroupDescription groupDescription = (GroupDescription) theEObject;
T result = this.caseGroupDescription(groupDescription);
@@ -1619,6 +1627,21 @@ public T caseFormDescription(FormDescription object) {
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Page 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 'Page Description '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePageDescription(PageDescription object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'Group 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.
+ * @return the result of interpreting the object as an instance of 'Bar Chart Description '.
+ * @generated
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ */
+ public T caseBarChartDescription(BarChartDescription object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Pie Chart 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 'Pie Chart Description '.
+ * @generated
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ */
+ public T casePieChartDescription(PieChartDescription object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Flexbox Container 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 'Flexbox Container Description '.
+ * @generated
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ */
+ public T caseFlexboxContainerDescription(FlexboxContainerDescription object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Button 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 'Button Description '.
+ * @generated
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ */
+ public T caseButtonDescription(ButtonDescription object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Image 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 'Image Description '.
+ * @generated
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ */
+ public T caseImageDescription(ImageDescription object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'Widget Description Style '. 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.
- * @return the result of interpreting the object as an instance of 'Bar Chart Description '.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseBarChartDescription(BarChartDescription object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'Pie Chart 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 'Pie Chart Description '.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T casePieChartDescription(PieChartDescription object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'Flexbox Container 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 'Flexbox Container Description '.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseFlexboxContainerDescription(FlexboxContainerDescription object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'Button 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 'Button Description '.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseButtonDescription(ButtonDescription object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of 'Image 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 'Image Description '.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseImageDescription(ImageDescription object) {
- return null;
- }
-
/**
* Returns the result of interpreting the object as an instance of 'EObject '. This
* implementation returns null; returning a non-null result will terminate the switch, but this is the last case
diff --git a/packages/view/backend/sirius-components-view/src/main/resources/model/view.ecore b/packages/view/backend/sirius-components-view/src/main/resources/model/view.ecore
index 797018ac2e..d6731bbbec 100644
--- a/packages/view/backend/sirius-components-view/src/main/resources/model/view.ecore
+++ b/packages/view/backend/sirius-components-view/src/main/resources/model/view.ecore
@@ -261,6 +261,16 @@
+
+
+
+
+
+
+
diff --git a/packages/view/backend/sirius-components-view/src/main/resources/model/view.genmodel b/packages/view/backend/sirius-components-view/src/main/resources/model/view.genmodel
index 545547aaf5..049dc1ef73 100644
--- a/packages/view/backend/sirius-components-view/src/main/resources/model/view.genmodel
+++ b/packages/view/backend/sirius-components-view/src/main/resources/model/view.genmodel
@@ -211,7 +211,14 @@
-
+
+
+
+
+
+
+
+