diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 57e13c2dfc..70bad3f37a 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -111,7 +111,7 @@ It is not an API breaking change but a breaking change from the end-user point o In order to find the `editingContextId` from the `projectId` one should leverage `IProjectSemanticDataSearchService#findByProjectId` and use the `ìd` of the semantic data found. To find instead the `projectId` from the `editingContextId`, `IProjectSemanticDataSearchService#findBySemanticDataId` should be used along with the `id` of the project. The method `IEditingContextLoader#load` has also been updated to not use `projectId` as parameter anymore but instead the `SemanticData` directly. - +- https://github.com/eclipse-sirius/sirius-web/issues/4375[#4375] [diagram] `ToolVariable` has been moved from `sirius-component-collaborative-diagram` to `sirius-component-collaborative` === Dependency update @@ -216,6 +216,7 @@ A new search command as been contributed to the palette in Sirius Web, which can - https://github.com/eclipse-sirius/sirius-web/issues/4329[#4329] [form] Add support for tables as widget in the form view DSL - https://github.com/eclipse-sirius/sirius-web/issues/4586[#4586] [core] Allow to override the default behavior of commands in the command palette. The `omniboxCommandOverrideContributionExtensionPoint` extension point can be used to contribute components to use when a command is selected. +- https://github.com/eclipse-sirius/sirius-web/issues/4375[#4375] [diagram] Add support for a first version of impact analysis before tool execution. === Improvements diff --git a/integration-tests/cypress/e2e/project/impactanalysis/diagram-impact-analysis.cy.ts b/integration-tests/cypress/e2e/project/impactanalysis/diagram-impact-analysis.cy.ts new file mode 100644 index 0000000000..02f9590bb2 --- /dev/null +++ b/integration-tests/cypress/e2e/project/impactanalysis/diagram-impact-analysis.cy.ts @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2025 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 { Studio } from '../../../usecases/Studio'; +import { Details } from '../../../workbench/Details'; +import { Diagram } from '../../../workbench/Diagram'; +import { Explorer } from '../../../workbench/Explorer'; +import { ImpactAnalysis } from '../../../workbench/ImpactAnalysis'; + +describe('Impact analysis - diagram', () => { + const domainName: string = 'diagramImpactAnalysis'; + context('Given a view with a node tool with impact analysis', () => { + context('When we create a new instance project', () => { + let instanceProjectId: string = ''; + const diagramDescriptionName = `${domainName} - simple node`; + const diagramTitle = 'Impact analysis diagram'; + + beforeEach(() => { + const studio = new Studio(); + studio.createProjectFromDomain('Cypress - Studio Instance', domainName, 'Root').then((res) => { + instanceProjectId = res.projectId; + }); + }); + + afterEach(() => cy.deleteProject(instanceProjectId)); + + it('Then the tool trigger the impact analysis dialog with the good report', () => { + const explorer = new Explorer(); + const diagram = new Diagram(); + const details = new Details(); + const impactAnalysis = new ImpactAnalysis(); + explorer.createObject('Root', 'entity1s-Entity1'); + details.getTextField('Name').type('InitialName{enter}'); + new Explorer().createRepresentation('Root', diagramDescriptionName, diagramTitle); + diagram.fitToScreen(); + diagram.getNodes('Impact analysis diagram', 'InitialName').findByTestId('Label - InitialName').rightclick(); + diagram.getPalette().should('exist'); + diagram.getPalette().findByTestId('tool-Tool with impact analysis').click(); + impactAnalysis.getImpactAnalysisDialog().should('exist'); + impactAnalysis.getNbElementModified().should('contain', 'Elements modified: 2'); + impactAnalysis.getNbElementCreated().should('contain', 'Elements added: 1'); + }); + + it('Then after impact analysis it is possible to confirm the tool execution', () => { + const explorer = new Explorer(); + const diagram = new Diagram(); + const details = new Details(); + const impactAnalysis = new ImpactAnalysis(); + explorer.createObject('Root', 'entity1s-Entity1'); + details.getTextField('Name').type('InitialName{enter}'); + new Explorer().createRepresentation('Root', diagramDescriptionName, diagramTitle); + diagram.fitToScreen(); + diagram.getNodes('Impact analysis diagram', 'InitialName').findByTestId('Label - InitialName').rightclick(); + diagram.getPalette().should('exist'); + diagram.getPalette().findByTestId('tool-Tool with impact analysis').click(); + impactAnalysis.getImpactAnalysisDialog().should('exist'); + impactAnalysis.confirmExecution(); + diagram.getNodes('Impact analysis diagram', 'newName').should('exist'); + diagram.getNodes('Impact analysis diagram', 'InitialName').should('not.exist'); + }); + }); + }); +}); diff --git a/integration-tests/cypress/workbench/ImpactAnalysis.ts b/integration-tests/cypress/workbench/ImpactAnalysis.ts new file mode 100644 index 0000000000..f8a56f119a --- /dev/null +++ b/integration-tests/cypress/workbench/ImpactAnalysis.ts @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2025 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 + *******************************************************************************/ + +export class ImpactAnalysis { + public getImpactAnalysisDialog(): Cypress.Chainable> { + return cy.getByTestId('impact-analysis-dialog'); + } + + public cancelExecution(): void { + cy.getByTestId('impact-analysis-dialog-button-cancel').click(); + } + + public confirmExecution(): void { + cy.getByTestId('impact-analysis-dialog-button-ok').click(); + } + + public getNbElementCreated(): Cypress.Chainable> { + return cy.getByTestId('impact-analysis-report-nbElementCreated').should('exist'); + } + + public getNbElementDeleted(): Cypress.Chainable> { + return cy.getByTestId('impact-analysis-report-nbElementDeleted').should('exist'); + } + + public getNbElementModified(): Cypress.Chainable> { + return cy.getByTestId('impact-analysis-report-nbElementModified').should('exist'); + } +} diff --git a/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/services/diagrams/CompatibilityPaletteProvider.java b/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/services/diagrams/CompatibilityPaletteProvider.java index f01eb7abba..b6a8aeb28d 100644 --- a/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/services/diagrams/CompatibilityPaletteProvider.java +++ b/packages/compatibility/backend/sirius-components-compatibility/src/main/java/org/eclipse/sirius/components/compatibility/services/diagrams/CompatibilityPaletteProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022, 2024 Obeo. + * Copyright (c) 2022, 2025 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 @@ -79,6 +79,7 @@ public CompatibilityPaletteProvider(IIdentifierProvider identifierProvider, IODe this.odesignRegistry = Objects.requireNonNull(odesignRegistry); this.interpreterFactory = Objects.requireNonNull(interpreterFactory); } + @Override public boolean canHandle(DiagramDescription diagramDescription) { return this.identifierProvider.findVsmElementId(diagramDescription.getId()).isPresent(); @@ -136,7 +137,7 @@ private ITool convertTool(org.eclipse.sirius.components.diagrams.tools.ITool too if (tool instanceof org.eclipse.sirius.components.diagrams.tools.SingleClickOnDiagramElementTool singleClickOnDiagramElementTool) { convertedTool = new SingleClickOnDiagramElementTool(singleClickOnDiagramElementTool.getId(), singleClickOnDiagramElementTool.getLabel(), singleClickOnDiagramElementTool.getIconURL(), singleClickOnDiagramElementTool.getTargetDescriptions(), - singleClickOnDiagramElementTool.getDialogDescriptionId(), singleClickOnDiagramElementTool.isAppliesToDiagramRoot()); + singleClickOnDiagramElementTool.getDialogDescriptionId(), singleClickOnDiagramElementTool.isAppliesToDiagramRoot(), singleClickOnDiagramElementTool.isWithImpactAnalysis()); } if (tool instanceof org.eclipse.sirius.components.diagrams.tools.SingleClickOnTwoDiagramElementsTool singleClickOnTwoDiagramElementsTool) { List candidates = new ArrayList<>(); @@ -302,26 +303,26 @@ private List createExtraToolSections(Object diagramElementDescripti } else { targetDescriptions.addAll(edgeDescription.getSourceNodeDescriptions()); } - unsynchronizedMapping = SynchronizationPolicy.UNSYNCHRONIZED.equals(((EdgeDescription) diagramElementDescription).getSynchronizationPolicy()); + unsynchronizedMapping = SynchronizationPolicy.UNSYNCHRONIZED.equals(edgeDescription.getSynchronizationPolicy()); } // Graphical Delete Tool for unsynchronized mapping only (the handler is never called) if (diagramElementDescription instanceof NodeDescription || diagramElementDescription instanceof EdgeDescription) { // Edit Tool (the handler is never called) - SingleClickOnDiagramElementTool editTool = new SingleClickOnDiagramElementTool("edit", "Edit", List.of(DiagramImageConstants.EDIT_SVG), targetDescriptions, null, false); + SingleClickOnDiagramElementTool editTool = new SingleClickOnDiagramElementTool("edit", "Edit", List.of(DiagramImageConstants.EDIT_SVG), targetDescriptions, null, false, false); var editToolSection = new ToolSection("edit-section", "", List.of(), List.of(editTool)); extraToolSections.add(editToolSection); if (unsynchronizedMapping) { SingleClickOnDiagramElementTool graphicalDeleteTool = new SingleClickOnDiagramElementTool("graphical-delete", "Delete from diagram", - List.of(DiagramImageConstants.GRAPHICAL_DELETE_SVG), targetDescriptions, null, false); + List.of(DiagramImageConstants.GRAPHICAL_DELETE_SVG), targetDescriptions, null, false, false); var graphicalDeleteToolSection = new ToolSection("graphical-delete-section", "", List.of(), List.of(graphicalDeleteTool)); extraToolSections.add(graphicalDeleteToolSection); } // Semantic Delete Tool (the handler is never called) SingleClickOnDiagramElementTool semanticDeleteTool = new SingleClickOnDiagramElementTool("semantic-delete", "Delete from model", - List.of(DiagramImageConstants.SEMANTIC_DELETE_SVG), targetDescriptions, null, false); + List.of(DiagramImageConstants.SEMANTIC_DELETE_SVG), targetDescriptions, null, false, false); var graphicalDeleteToolSection = new ToolSection("semantic-delete-section", "", List.of(), List.of(semanticDeleteTool)); extraToolSections.add(graphicalDeleteToolSection); } diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IRepresentationSearchService.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IRepresentationSearchService.java index c7f0bc13bc..871e6873cc 100644 --- a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IRepresentationSearchService.java +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IRepresentationSearchService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2024 Obeo. + * Copyright (c) 2021, 2025 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 @@ -24,6 +24,9 @@ * @author sbegaudeau */ public interface IRepresentationSearchService { + + Optional findById(IEditingContext editingContext, String representationId); + Optional findById(IEditingContext editingContext, String representationId, Class representationClass); boolean existByIdAndKind(String representationId, List kinds); @@ -35,6 +38,11 @@ public interface IRepresentationSearchService { */ class NoOp implements IRepresentationSearchService { + @Override + public Optional findById(IEditingContext editingContext, String representationId) { + return Optional.empty(); + } + @Override public Optional findById(IEditingContext editingContext, String representationId, Class representationClass) { return Optional.empty(); diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IToolRepresentationExecutor.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IToolRepresentationExecutor.java new file mode 100644 index 0000000000..6084a550b8 --- /dev/null +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/api/IToolRepresentationExecutor.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2025 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.api; + +import java.util.List; + +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; +import org.eclipse.sirius.components.core.api.IEditingContext; +import org.eclipse.sirius.components.representations.IRepresentation; +import org.eclipse.sirius.components.representations.IStatus; + +/** + * Used to execute a tool on a representation. + * + * @author frouene + */ +public interface IToolRepresentationExecutor { + + boolean canExecute(IEditingContext editingContext, IRepresentation representation); + + IStatus execute(IEditingContext editingContext, IRepresentation representation, String toolId, String targetObjectId, List variables); +} diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ImpactAnalysisReport.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ImpactAnalysisReport.java new file mode 100644 index 0000000000..68fc44e4b3 --- /dev/null +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ImpactAnalysisReport.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2025 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.dto; + +import java.util.List; + +/** + * Report with data to display on an impact analysis. + * + * @author frouene + */ +public record ImpactAnalysisReport(int nbElementDeleted, int nbElementModified, int nbElementCreated, List additionalReports) { + +} diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolInput.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolInput.java new file mode 100644 index 0000000000..8b022a98b3 --- /dev/null +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolInput.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2025 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.dto; + +import java.util.List; +import java.util.UUID; + +import org.eclipse.sirius.components.core.api.IInput; + +/** + * The input for the "impact analysis" query. + * + * @author frouene + */ +public record InvokeImpactAnalysisToolInput(UUID id, String editingContextId, String representationId, String toolId, String targetObjectId, List variables) implements IInput { + +} diff --git a/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolSuccessPayload.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolSuccessPayload.java new file mode 100644 index 0000000000..eca3476f54 --- /dev/null +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/InvokeImpactAnalysisToolSuccessPayload.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2022, 2025 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.dto; + +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +import org.eclipse.sirius.components.core.api.IPayload; +import org.eclipse.sirius.components.representations.Message; + +/** + * The "initial direct edit element label" success payload. + * + * @author gcoutable + */ +public record InvokeImpactAnalysisToolSuccessPayload(UUID id, ImpactAnalysisReport impactAnalysisReport, List messages) implements IPayload { + + public InvokeImpactAnalysisToolSuccessPayload { + Objects.requireNonNull(id); + Objects.requireNonNull(impactAnalysisReport); + Objects.requireNonNull(messages); + } +} diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariable.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariable.java similarity index 87% rename from packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariable.java rename to packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariable.java index 61cc275a49..08cc5a2b33 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariable.java +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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,7 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.components.collaborative.diagrams.dto; +package org.eclipse.sirius.components.collaborative.dto; /** * Represents a ToolVariable entry. diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariableType.java b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariableType.java similarity index 89% rename from packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariableType.java rename to packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariableType.java index 255c3b93f6..2c0b7670cb 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/ToolVariableType.java +++ b/packages/core/backend/sirius-components-collaborative/src/main/java/org/eclipse/sirius/components/collaborative/dto/ToolVariableType.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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,7 +10,7 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -package org.eclipse.sirius.components.collaborative.diagrams.dto; +package org.eclipse.sirius.components.collaborative.dto; /** * Represent the Type of the Tool Variable. diff --git a/packages/core/backend/sirius-components-collaborative/src/main/resources/schema/impactanalysis.graphqls b/packages/core/backend/sirius-components-collaborative/src/main/resources/schema/impactanalysis.graphqls new file mode 100644 index 0000000000..cd4cbae6d2 --- /dev/null +++ b/packages/core/backend/sirius-components-collaborative/src/main/resources/schema/impactanalysis.graphqls @@ -0,0 +1,10 @@ +extend type RepresentationMetadata { + impactAnalysisReport(toolId: ID!, targetObjectId: ID!, variables: [ToolVariable!]!): ImpactAnalysisReport! +} + +type ImpactAnalysisReport { + nbElementDeleted: Int! + nbElementModified: Int! + nbElementCreated: Int! + additionalReports: [String!]! +} diff --git a/packages/core/backend/sirius-components-core-graphql/src/main/java/org/eclipse/sirius/components/core/graphql/datafetchers/ImpactAnalysisReportDataFetcher.java b/packages/core/backend/sirius-components-core-graphql/src/main/java/org/eclipse/sirius/components/core/graphql/datafetchers/ImpactAnalysisReportDataFetcher.java new file mode 100644 index 0000000000..53e14c1e1a --- /dev/null +++ b/packages/core/backend/sirius-components-core-graphql/src/main/java/org/eclipse/sirius/components/core/graphql/datafetchers/ImpactAnalysisReportDataFetcher.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2025 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.core.graphql.datafetchers; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +import org.eclipse.sirius.components.annotations.spring.graphql.QueryDataFetcher; +import org.eclipse.sirius.components.collaborative.dto.ImpactAnalysisReport; +import org.eclipse.sirius.components.collaborative.dto.InvokeImpactAnalysisToolInput; +import org.eclipse.sirius.components.collaborative.dto.InvokeImpactAnalysisToolSuccessPayload; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; +import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates; +import org.eclipse.sirius.components.graphql.api.IEditingContextDispatcher; +import org.eclipse.sirius.components.graphql.api.LocalContextConstants; + +import graphql.schema.DataFetchingEnvironment; +import reactor.core.publisher.Mono; + +/** + * Used to retrieve the impact analysis on a tool execution. + * + * @author frouene + */ +@QueryDataFetcher(type = "RepresentationMetadata", field = "impactAnalysisReport") +public class ImpactAnalysisReportDataFetcher implements IDataFetcherWithFieldCoordinates> { + + private static final String TOOL_ID = "toolId"; + private static final String TARGET_OBJECT_ID = "targetObjectId"; + + private static final String VARIABLES = "variables"; + + private final ObjectMapper objectMapper; + + private final IEditingContextDispatcher editingContextDispatcher; + + public ImpactAnalysisReportDataFetcher(ObjectMapper objectMapper, IEditingContextDispatcher editingContextDispatcher) { + this.objectMapper = Objects.requireNonNull(objectMapper); + this.editingContextDispatcher = Objects.requireNonNull(editingContextDispatcher); + } + + @Override + public CompletableFuture get(DataFetchingEnvironment environment) throws Exception { + CompletableFuture result = Mono.empty().toFuture(); + Map localContext = environment.getLocalContext(); + + String editingContextId = Optional.ofNullable(localContext.get(LocalContextConstants.EDITING_CONTEXT_ID)).map(Object::toString).orElse(null); + String representationId = Optional.ofNullable(localContext.get(LocalContextConstants.REPRESENTATION_ID)).map(Object::toString).orElse(null); + String toolId = environment.getArgument(TOOL_ID); + String targetObjectId = environment.getArgument(TARGET_OBJECT_ID); + var variables = Optional.ofNullable(environment.getArgument(VARIABLES)) + .filter(List.class::isInstance) + .map(List.class::cast) + .map(this::convertToToolVariables) + .orElseGet(List::of); + if (editingContextId != null && representationId != null) { + InvokeImpactAnalysisToolInput input = new InvokeImpactAnalysisToolInput(UUID.randomUUID(), editingContextId, representationId, toolId, targetObjectId, variables); + result = this.editingContextDispatcher.dispatchQuery(input.editingContextId(), input) + .filter(InvokeImpactAnalysisToolSuccessPayload.class::isInstance) + .map(InvokeImpactAnalysisToolSuccessPayload.class::cast) + .map(InvokeImpactAnalysisToolSuccessPayload::impactAnalysisReport) + .toFuture(); + } + return result; + } + + private List convertToToolVariables(List arguments) { + return arguments.stream() + .map(argument -> this.objectMapper.convertValue(argument, ToolVariable.class)) + .toList(); + } + +} diff --git a/packages/core/frontend/sirius-components-core/src/graphql/GQLTypes.types.ts b/packages/core/frontend/sirius-components-core/src/graphql/GQLTypes.types.ts index d48c92b472..016af2981c 100644 --- a/packages/core/frontend/sirius-components-core/src/graphql/GQLTypes.types.ts +++ b/packages/core/frontend/sirius-components-core/src/graphql/GQLTypes.types.ts @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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 @@ -27,3 +27,11 @@ export interface GQLSuccessPayload { id: string | null; messages: GQLMessage[] | null; } + +export interface GQLToolVariable { + name: string; + value: string; + type: GQLToolVariableType; +} + +export type GQLToolVariableType = 'STRING' | 'OBJECT_ID' | 'OBJECT_ID_ARRAY'; diff --git a/packages/core/frontend/sirius-components-core/src/index.ts b/packages/core/frontend/sirius-components-core/src/index.ts index 93475fccc3..e8e2f60714 100644 --- a/packages/core/frontend/sirius-components-core/src/index.ts +++ b/packages/core/frontend/sirius-components-core/src/index.ts @@ -46,6 +46,10 @@ export * from './modals/confirmation/ConfirmationDialogContext'; export type * from './modals/confirmation/ConfirmationDialogContext.types'; export * from './modals/confirmation/useConfirmationDialog'; export type * from './modals/confirmation/useConfirmationDialog.types'; +export * from './modals/impact-analysis/ImpactAnalysisDialogContext'; +export type * from './modals/impact-analysis/ImpactAnalysisDialogContext.types'; +export * from './modals/impact-analysis/useImpactAnalysisDialog'; +export type * from './modals/impact-analysis/useImpactAnalysisDialog.types'; export * from './modals/share-representation/ShareRepresentationModal'; export type * from './modals/share-representation/ShareRepresentationModal.types'; export * from './representationmetadata/useRepresentationMetadata'; diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.tsx b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.tsx new file mode 100644 index 0000000000..e3ec4478bf --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.tsx @@ -0,0 +1,194 @@ +/******************************************************************************* + * Copyright (c) 2025 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 ErrorOutlineIcon from '@mui/icons-material/ErrorOutline'; +import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; +import Button from '@mui/material/Button'; +import CircularProgress from '@mui/material/CircularProgress'; +import Dialog from '@mui/material/Dialog'; +import DialogActions from '@mui/material/DialogActions'; +import DialogContent from '@mui/material/DialogContent'; +import DialogTitle from '@mui/material/DialogTitle'; +import Box from '@mui/material/Box'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import ListItemIcon from '@mui/material/ListItemIcon'; +import ListItemText from '@mui/material/ListItemText'; +import { SxProps, Theme } from '@mui/material/styles'; +import Typography from '@mui/material/Typography'; +import { useEffect, useState } from 'react'; +import { makeStyles } from 'tss-react/mui'; +import { ImpactAnalysisDialogProps } from './ImpactAnalysisDialog.types'; +import { useInvokeImpactAnalysis } from './useImpactAnalysis'; +import { GQLImpactAnalysisReport, ReportViewerProps } from './useImpactAnalysis.types'; + +const useImpactAnalysisDialogStyles = makeStyles()((theme: Theme) => ({ + title: { + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + paddingTop: theme.spacing(2), + paddingLeft: theme.spacing(2), + }, + titleIcon: { + color: theme.palette.primary.main, + fontSize: theme.spacing(4), + }, + confirmButton: { + backgroundColor: theme.palette.primary.main, + color: 'white', + '&:hover': { + backgroundColor: theme.palette.primary.dark, + }, + }, +})); + +export const ImpactAnalysisDialog = ({ + open, + editingContextId, + representationId, + toolId, + toolLabel, + targetObjectId, + variables, + onConfirm, + onCancel, +}: ImpactAnalysisDialogProps) => { + const [report, setReport] = useState(null); + const { classes } = useImpactAnalysisDialogStyles(); + + const { impactAnalysisReport, loading } = useInvokeImpactAnalysis( + editingContextId, + representationId, + toolId, + targetObjectId, + variables + ); + + useEffect(() => { + if (impactAnalysisReport) { + setReport(impactAnalysisReport); + } + }, [impactAnalysisReport]); + return ( + <> + +
+ + {`You are about to ${toolLabel}`} +
+ + {report != null ? ( + + ) : ( + + )} + + + + +
+ + ); +}; + +const ReportViewer = ({ + nbElementCreated, + nbElementDeleted, + nbElementModified, + additionalReports, + toolLabel, +}: ReportViewerProps) => { + const listStyle: SxProps = { + padding: '0', + }; + const listItemStyle: SxProps = (theme) => ({ + gap: theme.spacing(0.5), + padding: theme.spacing(0, 1), + }); + const listItemIconStyle: SxProps = { + minWidth: 'auto', + }; + const iconStyle: SxProps = (theme) => ({ + fontSize: theme.spacing(0.8), + }); + return ( + + {`The ${toolLabel} tool will have the following effects on your model:`} + + {nbElementCreated > 0 && ( + + + + + + + )} + {nbElementDeleted > 0 && ( + + + + + + + )} + {nbElementModified > 0 && ( + + + + + + + )} + {additionalReports?.length > 0 && + additionalReports.map((additionalReport, index) => { + return ( + + + + + + + ); + })} + + {`Are you sure you want to proceed?`} + + ); +}; diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.types.ts b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.types.ts new file mode 100644 index 0000000000..57d8362540 --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialog.types.ts @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2025 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 { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +export interface ImpactAnalysisDialogProps { + open: boolean; + editingContextId: string; + representationId: string; + toolId: string; + toolLabel: string; + targetObjectId: string; + variables: GQLToolVariable[]; + onConfirm: () => void; + onCancel: () => void; +} diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.tsx b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.tsx new file mode 100644 index 0000000000..3f0dfe9bbf --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.tsx @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 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 React, { useState } from 'react'; +import { + ImpactAnalysisDialogContextValue, + ImpactAnalysisDialogContextProviderState, +} from './ImpactAnalysisDialogContext.types'; +import { ImpactAnalysisDialog } from './ImpactAnalysisDialog'; +import { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +const defaultValue: ImpactAnalysisDialogContextValue = { + showImpactAnalysisDialog: () => {}, +}; + +export const ImpactAnalysisDialogContext = React.createContext(defaultValue); + +export const ImpactAnalysisDialogContextProvider = ({ children }) => { + const [state, setState] = useState({ + open: false, + onConfirm: () => {}, + editingContextId: null, + representationId: null, + toolId: null, + toolLabel: null, + targetObjectId: null, + variables: [], + }); + + const showImpactAnalysisDialog = ( + editingContextId: string, + representationId: string, + toolId: string, + toolLabel: string, + targetObjectId: string, + variables: GQLToolVariable[], + onConfirm: () => void + ) => { + setState({ + open: true, + onConfirm, + editingContextId, + representationId, + toolId, + toolLabel, + targetObjectId, + variables, + }); + }; + + const handleConfirm = () => { + state.onConfirm(); + handleClose(); + }; + + const handleClose = () => { + setState((prevState) => ({ ...prevState, open: false })); + }; + + return ( + + {children} + {state.open && state.editingContextId && state.representationId && state.toolId && state.toolLabel && ( + + )} + + ); +}; diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.types.ts b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.types.ts new file mode 100644 index 0000000000..20ea926bd8 --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/ImpactAnalysisDialogContext.types.ts @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 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 { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +export interface ImpactAnalysisDialogContextValue { + showImpactAnalysisDialog: ( + editingContextId: string, + representationId: string, + toolId: string, + toolLabel: string, + targetObjectId: string, + variables: GQLToolVariable[], + onConfirm: () => void + ) => void; +} + +export interface ImpactAnalysisDialogContextProviderState { + open: boolean; + onConfirm: () => void; + editingContextId: string | null; + representationId: string | null; + toolId: string | null; + toolLabel: string | null; + targetObjectId: string | null; + variables: GQLToolVariable[]; +} diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.ts b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.ts new file mode 100644 index 0000000000..c770d75906 --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.ts @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2025 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 { gql, useQuery } from '@apollo/client'; +import { useEffect } from 'react'; +import { + GQLInvokeImpactAnalysisToolVariables, + GQLGetImpactAnalysisReportData, + UseInvokeImpactAnalysisValue, + GQLImpactAnalysisReport, +} from './useImpactAnalysis.types'; +import { useMultiToast } from '../../toast/MultiToast'; +import { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +const getImpactAnalysisReportQuery = gql` + query getImpactAnalysisReport( + $editingContextId: ID! + $representationId: ID! + $toolId: ID! + $targetObjectId: ID! + $variables: [ToolVariable!]! + ) { + viewer { + editingContext(editingContextId: $editingContextId) { + representation(representationId: $representationId) { + impactAnalysisReport(toolId: $toolId, targetObjectId: $targetObjectId, variables: $variables) { + nbElementDeleted + nbElementModified + nbElementCreated + additionalReports + } + } + } + } + } +`; + +export const useInvokeImpactAnalysis = ( + editingContextId: string, + representationId: string, + toolId: string, + targetObjectId: string, + variables: GQLToolVariable[] +): UseInvokeImpactAnalysisValue => { + const { loading, data, error } = useQuery( + getImpactAnalysisReportQuery, + { + variables: { + editingContextId, + representationId, + toolId, + targetObjectId, + variables, + }, + } + ); + + const { addErrorMessage } = useMultiToast(); + + useEffect(() => { + if (error) { + const { message } = error; + addErrorMessage(message); + } + }, [error]); + + const impactAnalysisReport: GQLImpactAnalysisReport | null = + data?.viewer.editingContext.representation.impactAnalysisReport ?? null; + + return { impactAnalysisReport, loading }; +}; diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.types.ts b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.types.ts new file mode 100644 index 0000000000..c5e910ee26 --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysis.types.ts @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2025 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 { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +export interface UseInvokeImpactAnalysisValue { + impactAnalysisReport: GQLImpactAnalysisReport | null; + loading: boolean; +} + +export interface GQLInvokeImpactAnalysisToolVariables { + editingContextId: string; + representationId: string; + toolId: string; + targetObjectId: string; + variables: GQLToolVariable[]; +} + +export interface GQLGetImpactAnalysisReportData { + viewer: GQLGetImpactAnalysisReportViewer; +} + +export interface GQLGetImpactAnalysisReportViewer { + editingContext: GQLGetImpactAnalysisReportEditingContext; +} + +export interface GQLGetImpactAnalysisReportEditingContext { + representation: GQLGetImpactAnalysisReportRepresentation; +} + +export interface GQLGetImpactAnalysisReportRepresentation { + impactAnalysisReport: GQLImpactAnalysisReport; +} + +export interface GQLImpactAnalysisReport { + nbElementDeleted: number; + nbElementModified: number; + nbElementCreated: number; + additionalReports: string[]; +} + +export interface ReportViewerProps extends GQLImpactAnalysisReport { + toolLabel: string; +} diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.tsx b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.tsx new file mode 100644 index 0000000000..554bac5c0a --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.tsx @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 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 { useContext } from 'react'; +import { ImpactAnalysisDialogContext } from './ImpactAnalysisDialogContext'; +import { UseImpactAnalysisDialogValue } from './useImpactAnalysisDialog.types'; + +export const useImpactAnalysisDialog = (): UseImpactAnalysisDialogValue => { + const { showImpactAnalysisDialog } = useContext(ImpactAnalysisDialogContext); + return { showImpactAnalysisDialog }; +}; diff --git a/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.types.ts b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.types.ts new file mode 100644 index 0000000000..72ba1bc91f --- /dev/null +++ b/packages/core/frontend/sirius-components-core/src/modals/impact-analysis/useImpactAnalysisDialog.types.ts @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2024, 2025 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 { GQLToolVariable } from '../../graphql/GQLTypes.types'; + +export interface UseImpactAnalysisDialogValue { + showImpactAnalysisDialog: ( + editingContextId: string, + representationId: string, + toolId: string, + toolLabel: string, + targetObjectId: string, + variables: GQLToolVariable[], + onConfirm: () => void + ) => void; +} diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnDiagramElementToolInput.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnDiagramElementToolInput.java index eb53994fe3..3eac1c2ef0 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnDiagramElementToolInput.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnDiagramElementToolInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2024 Obeo and others. + * Copyright (c) 2019, 2025 Obeo and others. * 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,7 @@ import java.util.UUID; import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramInput; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; /** * The input for the "Invoke single click on diagram element tool" mutation. @@ -23,5 +24,6 @@ * @author pcdavid */ public record InvokeSingleClickOnDiagramElementToolInput(UUID id, String editingContextId, String representationId, String diagramElementId, String toolId, double startingPositionX, - double startingPositionY, List variables) implements IDiagramInput { + double startingPositionY, List variables) implements IDiagramInput { + } diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnTwoDiagramElementsToolInput.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnTwoDiagramElementsToolInput.java index 3749c9703f..9bd342af71 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnTwoDiagramElementsToolInput.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/InvokeSingleClickOnTwoDiagramElementsToolInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2024 Obeo. + * Copyright (c) 2019, 2025 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,7 @@ import java.util.UUID; import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramInput; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; /** * The input for the "Invoke single click on two diagram elements tool" mutation. @@ -35,4 +36,5 @@ public record InvokeSingleClickOnTwoDiagramElementsToolInput( double targetPositionY, String toolId, List variables) implements IDiagramInput { + } diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/SingleClickOnDiagramElementTool.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/SingleClickOnDiagramElementTool.java index ba5bbdf035..126324e709 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/SingleClickOnDiagramElementTool.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/dto/SingleClickOnDiagramElementTool.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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 @@ -28,7 +28,8 @@ public record SingleClickOnDiagramElementTool( List iconURL, List targetDescriptions, String dialogDescriptionId, - boolean appliesToDiagramRoot) implements ITool { + boolean appliesToDiagramRoot, + boolean withImpactAnalysis) implements ITool { public SingleClickOnDiagramElementTool { Objects.requireNonNull(id); @@ -62,6 +63,8 @@ public static final class Builder { private boolean appliesToDiagramRoot; + private boolean withImpactAnalysis; + private Builder(String id) { this.id = Objects.requireNonNull(id); } @@ -91,8 +94,13 @@ public Builder dialogDescriptionId(String dialogDescriptionId) { return this; } + public Builder withImpactAnalysis(boolean withImpactAnalysis) { + this.withImpactAnalysis = withImpactAnalysis; + return this; + } + public SingleClickOnDiagramElementTool build() { - return new SingleClickOnDiagramElementTool(this.id, this.label, this.iconURL, this.targetDescriptions, this.dialogDescriptionId, this.appliesToDiagramRoot); + return new SingleClickOnDiagramElementTool(this.id, this.label, this.iconURL, this.targetDescriptions, this.dialogDescriptionId, this.appliesToDiagramRoot, this.withImpactAnalysis); } } diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandler.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandler.java index ab7b7ce0aa..f875e61311 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandler.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandler.java @@ -12,40 +12,30 @@ *******************************************************************************/ package org.eclipse.sirius.components.collaborative.diagrams.handlers; +import java.util.Collection; import java.util.List; import java.util.Objects; -import java.util.Optional; 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.diagrams.DiagramService; import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramContext; import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramEventHandler; import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramInput; -import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramQueryService; -import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramService; -import org.eclipse.sirius.components.collaborative.diagrams.api.IToolService; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolInput; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolSuccessPayload; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariable; import org.eclipse.sirius.components.collaborative.diagrams.messages.ICollaborativeDiagramMessageService; -import org.eclipse.sirius.components.core.api.Environment; +import org.eclipse.sirius.components.collaborative.diagrams.services.ToolDiagramExecutor; import org.eclipse.sirius.components.core.api.ErrorPayload; import org.eclipse.sirius.components.core.api.IEditingContext; -import org.eclipse.sirius.components.core.api.IObjectSearchService; import org.eclipse.sirius.components.core.api.IPayload; -import org.eclipse.sirius.components.diagrams.Diagram; -import org.eclipse.sirius.components.diagrams.Edge; -import org.eclipse.sirius.components.diagrams.Node; -import org.eclipse.sirius.components.diagrams.tools.SingleClickOnDiagramElementTool; +import org.eclipse.sirius.components.diagrams.ViewCreationRequest; +import org.eclipse.sirius.components.diagrams.ViewDeletionRequest; +import org.eclipse.sirius.components.diagrams.events.IDiagramEvent; import org.eclipse.sirius.components.representations.Failure; import org.eclipse.sirius.components.representations.IStatus; import org.eclipse.sirius.components.representations.Success; -import org.eclipse.sirius.components.representations.VariableManager; import org.eclipse.sirius.components.representations.WorkbenchSelection; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import io.micrometer.core.instrument.Counter; @@ -61,24 +51,15 @@ @Service public class InvokeSingleClickOnDiagramElementToolEventHandler implements IDiagramEventHandler { - private final Logger logger = LoggerFactory.getLogger(InvokeSingleClickOnDiagramElementToolEventHandler.class); - - private final IObjectSearchService objectSearchService; - - private final IDiagramQueryService diagramQueryService; - - private final IToolService toolService; - private final ICollaborativeDiagramMessageService messageService; + private final ToolDiagramExecutor toolDiagramExecutor; + private final Counter counter; - public InvokeSingleClickOnDiagramElementToolEventHandler(IObjectSearchService objectSearchService, IDiagramQueryService diagramQueryService, IToolService toolService, - ICollaborativeDiagramMessageService messageService, MeterRegistry meterRegistry) { - this.objectSearchService = Objects.requireNonNull(objectSearchService); - this.diagramQueryService = Objects.requireNonNull(diagramQueryService); - this.toolService = Objects.requireNonNull(toolService); + public InvokeSingleClickOnDiagramElementToolEventHandler(ICollaborativeDiagramMessageService messageService, ToolDiagramExecutor toolDiagramExecutor, MeterRegistry meterRegistry) { this.messageService = Objects.requireNonNull(messageService); + this.toolDiagramExecutor = Objects.requireNonNull(toolDiagramExecutor); this.counter = Counter.builder(Monitoring.EVENT_HANDLER) .tag(Monitoring.NAME, this.getClass().getSimpleName()) @@ -99,23 +80,29 @@ public void handle(One payloadSink, Many changeDesc ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, diagramInput.representationId(), diagramInput); if (diagramInput instanceof InvokeSingleClickOnDiagramElementToolInput input) { - Diagram diagram = diagramContext.getDiagram(); - var optionalTool = this.toolService.findToolById(editingContext, diagram, input.toolId()) - .filter(SingleClickOnDiagramElementTool.class::isInstance) - .map(SingleClickOnDiagramElementTool.class::cast); - if (optionalTool.isPresent()) { - IStatus status = this.executeTool(editingContext, diagramContext, input.diagramElementId(), optionalTool.get(), input.variables()); - if (status instanceof Success success) { - WorkbenchSelection newSelection = null; - Object newSelectionParameter = success.getParameters().get(Success.NEW_SELECTION); - if (newSelectionParameter instanceof WorkbenchSelection workbenchSelection) { - newSelection = workbenchSelection; - } - payload = new InvokeSingleClickOnDiagramElementToolSuccessPayload(diagramInput.id(), newSelection, success.getMessages()); - changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, diagramInput.representationId(), diagramInput); - } else if (status instanceof Failure failure) { - payload = new ErrorPayload(diagramInput.id(), failure.getMessages()); + IStatus status = this.toolDiagramExecutor.execute(editingContext, diagramContext.getDiagram(), input.toolId(), input.diagramElementId(), input.variables()); + if (status instanceof Success success) { + WorkbenchSelection newSelection = null; + Object newSelectionParameter = success.getParameters().get(Success.NEW_SELECTION); + if (newSelectionParameter instanceof WorkbenchSelection workbenchSelection) { + newSelection = workbenchSelection; + } + Object viewCreationRequestsParameter = success.getParameters().get(ToolDiagramExecutor.VIEW_CREATION_REQUESTS); + if (viewCreationRequestsParameter instanceof List viewCreationRequests && viewCreationRequests.stream().allMatch(ViewCreationRequest.class::isInstance)) { + diagramContext.getViewCreationRequests().addAll((Collection) viewCreationRequests); + } + Object viewDeletionRequestsParameter = success.getParameters().get(ToolDiagramExecutor.VIEW_DELETION_REQUESTS); + if (viewDeletionRequestsParameter instanceof List viewDeletionRequests && viewDeletionRequests.stream().allMatch(ViewDeletionRequest.class::isInstance)) { + diagramContext.getViewDeletionRequests().addAll((Collection) viewDeletionRequests); } + Object diagramEventsParameter = success.getParameters().get(ToolDiagramExecutor.DIAGRAM_EVENTS); + if (diagramEventsParameter instanceof List diagramEvents && diagramEvents.stream().allMatch(IDiagramEvent.class::isInstance)) { + diagramContext.getDiagramEvents().addAll((Collection) diagramEvents); + } + payload = new InvokeSingleClickOnDiagramElementToolSuccessPayload(diagramInput.id(), newSelection, success.getMessages()); + changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, diagramInput.representationId(), diagramInput); + } else if (status instanceof Failure failure) { + payload = new ErrorPayload(diagramInput.id(), failure.getMessages()); } } @@ -123,77 +110,4 @@ public void handle(One payloadSink, Many changeDesc changeDescriptionSink.tryEmitNext(changeDescription); } - private IStatus executeTool(IEditingContext editingContext, IDiagramContext diagramContext, String diagramElementId, SingleClickOnDiagramElementTool tool, List variables) { - IStatus result = new Failure(""); - Diagram diagram = diagramContext.getDiagram(); - Optional node = this.diagramQueryService.findNodeById(diagram, diagramElementId); - Optional edge = Optional.empty(); - if (node.isEmpty()) { - // may be the tool applies on an Edge - edge = this.diagramQueryService.findEdgeById(diagram, diagramElementId); - } - Optional self = this.getCurrentContext(editingContext, diagramElementId, tool, diagram, node, edge); - - // Else, cannot find the node with the given optionalDiagramElementId - if (self.isPresent()) { - VariableManager variableManager = this.populateVariableManager(editingContext, diagramContext, node, edge, self); - var dialogDescriptionId = tool.getDialogDescriptionId(); - variables.forEach(toolVariable -> this.addToolVariablesInVariableManager(toolVariable, editingContext, variableManager)); - - //We do not apply the tool if a dialog is defined but no variables have been provided - if (dialogDescriptionId == null || !variables.isEmpty()) { - result = tool.getHandler().apply(variableManager); - } - } - return result; - } - - private void addToolVariablesInVariableManager(ToolVariable toolvariable, IEditingContext editingContext, VariableManager variableManager) { - switch (toolvariable.type()) { - case STRING -> variableManager.put(toolvariable.name(), toolvariable.value()); - case OBJECT_ID -> { - var optionalObject = this.objectSearchService.getObject(editingContext, toolvariable.value()); - variableManager.put(toolvariable.name(), optionalObject.orElse(null)); - } - case OBJECT_ID_ARRAY -> { - String value = toolvariable.value(); - List objectsIds = List.of(value.split(",")); - List objects = objectsIds.stream() - .map(objectId -> this.objectSearchService.getObject(editingContext, objectId)) - .map(optionalObject -> optionalObject.orElse(null)) - .toList(); - variableManager.put(toolvariable.name(), objects); - } - default -> { - //We do nothing, the variable type is not supported - } - } - } - - private Optional getCurrentContext(IEditingContext editingContext, String diagramElementId, SingleClickOnDiagramElementTool tool, Diagram diagram, Optional node, - Optional edge) { - Optional self = Optional.empty(); - if (node.isPresent()) { - self = this.objectSearchService.getObject(editingContext, node.get().getTargetObjectId()); - } else if (edge.isPresent()) { - self = this.objectSearchService.getObject(editingContext, edge.get().getTargetObjectId()); - } else if (Objects.equals(diagram.getId(), diagramElementId)) { - self = this.objectSearchService.getObject(editingContext, diagram.getTargetObjectId()); - } else { - this.logger.warn("The tool {0} cannot be applied on the current diagram {1} and editing context {2}", tool.getId(), diagram.getId(), editingContext.getId()); - } - return self; - } - - private VariableManager populateVariableManager(IEditingContext editingContext, IDiagramContext diagramContext, Optional node, Optional edge, Optional self) { - VariableManager variableManager = new VariableManager(); - variableManager.put(IDiagramContext.DIAGRAM_CONTEXT, diagramContext); - variableManager.put(IEditingContext.EDITING_CONTEXT, editingContext); - variableManager.put(Environment.ENVIRONMENT, new Environment(Environment.SIRIUS_COMPONENTS)); - variableManager.put(IDiagramService.DIAGRAM_SERVICES, new DiagramService(diagramContext)); - variableManager.put(VariableManager.SELF, self.get()); - variableManager.put(Node.SELECTED_NODE, node.orElse(null)); - variableManager.put(Edge.SELECTED_EDGE, edge.orElse(null)); - return variableManager; - } } diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnTwoDiagramElementsToolEventHandler.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnTwoDiagramElementsToolEventHandler.java index 3ce34840b3..021c19e062 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnTwoDiagramElementsToolEventHandler.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnTwoDiagramElementsToolEventHandler.java @@ -30,8 +30,8 @@ import org.eclipse.sirius.components.collaborative.diagrams.api.IToolService; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnTwoDiagramElementsToolInput; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnTwoDiagramElementsToolSuccessPayload; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariable; import org.eclipse.sirius.components.collaborative.diagrams.messages.ICollaborativeDiagramMessageService; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; import org.eclipse.sirius.components.core.api.Environment; import org.eclipse.sirius.components.core.api.ErrorPayload; import org.eclipse.sirius.components.core.api.IEditingContext; diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/services/ToolDiagramExecutor.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/services/ToolDiagramExecutor.java new file mode 100644 index 0000000000..e0de8f323c --- /dev/null +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/java/org/eclipse/sirius/components/collaborative/diagrams/services/ToolDiagramExecutor.java @@ -0,0 +1,173 @@ +/******************************************************************************* + * Copyright (c) 2025 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.diagrams.services; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.eclipse.sirius.components.collaborative.api.IToolRepresentationExecutor; +import org.eclipse.sirius.components.collaborative.diagrams.DiagramContext; +import org.eclipse.sirius.components.collaborative.diagrams.DiagramService; +import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramContext; +import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramQueryService; +import org.eclipse.sirius.components.collaborative.diagrams.api.IDiagramService; +import org.eclipse.sirius.components.collaborative.diagrams.api.IToolService; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; +import org.eclipse.sirius.components.core.api.Environment; +import org.eclipse.sirius.components.core.api.IEditingContext; +import org.eclipse.sirius.components.core.api.IObjectSearchService; +import org.eclipse.sirius.components.diagrams.Diagram; +import org.eclipse.sirius.components.diagrams.Edge; +import org.eclipse.sirius.components.diagrams.Node; +import org.eclipse.sirius.components.diagrams.tools.SingleClickOnDiagramElementTool; +import org.eclipse.sirius.components.representations.Failure; +import org.eclipse.sirius.components.representations.IRepresentation; +import org.eclipse.sirius.components.representations.IStatus; +import org.eclipse.sirius.components.representations.Success; +import org.eclipse.sirius.components.representations.VariableManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +/** + * Service to handle diagram tool execution. + * + * @author frouene + */ +@Service +public class ToolDiagramExecutor implements IToolRepresentationExecutor { + + public static final String VIEW_CREATION_REQUESTS = "viewCreationRequests"; + + public static final String VIEW_DELETION_REQUESTS = "viewDeletionRequests"; + + public static final String DIAGRAM_EVENTS = "diagramEvents"; + + private final Logger logger = LoggerFactory.getLogger(ToolDiagramExecutor.class); + + private final IToolService toolService; + + private final IObjectSearchService objectSearchService; + + private final IDiagramQueryService diagramQueryService; + + public ToolDiagramExecutor(IToolService toolService, IObjectSearchService objectSearchService, IDiagramQueryService diagramQueryService) { + this.toolService = Objects.requireNonNull(toolService); + this.objectSearchService = Objects.requireNonNull(objectSearchService); + this.diagramQueryService = Objects.requireNonNull(diagramQueryService); + } + + @Override + public boolean canExecute(IEditingContext editingContext, IRepresentation representation) { + return representation instanceof Diagram; + } + + @Override + public IStatus execute(IEditingContext editingContext, IRepresentation representation, String toolId, String targetObjectId, List variables) { + if (representation instanceof Diagram diagram) { + + DiagramContext diagramContext = new DiagramContext(diagram); + + var optionalTool = this.toolService.findToolById(editingContext, diagram, toolId) + .filter(SingleClickOnDiagramElementTool.class::isInstance) + .map(SingleClickOnDiagramElementTool.class::cast); + + if (optionalTool.isPresent()) { + return this.executeTool(editingContext, diagramContext, targetObjectId, optionalTool.get(), variables); + } + + } + + return new Failure(String.format("The tool %s cannot be found on the current diagram %s and editing context %s", toolId, representation.getId(), editingContext.getId())); + } + + private IStatus executeTool(IEditingContext editingContext, IDiagramContext diagramContext, String diagramElementId, SingleClickOnDiagramElementTool tool, List variables) { + IStatus result = new Failure(""); + Diagram diagram = diagramContext.getDiagram(); + Optional node = this.diagramQueryService.findNodeById(diagram, diagramElementId); + Optional edge = Optional.empty(); + if (node.isEmpty()) { + // may be the tool applies on an Edge + edge = this.diagramQueryService.findEdgeById(diagram, diagramElementId); + } + Optional self = this.getCurrentContext(editingContext, diagramElementId, tool, diagram, node, edge); + + // Else, cannot find the node with the given optionalDiagramElementId + if (self.isPresent()) { + VariableManager variableManager = this.populateVariableManager(editingContext, diagramContext, node, edge, self); + var dialogDescriptionId = tool.getDialogDescriptionId(); + variables.forEach(toolVariable -> this.addToolVariablesInVariableManager(toolVariable, editingContext, variableManager)); + + //We do not apply the tool if a dialog is defined but no variables have been provided + if (dialogDescriptionId == null || !variables.isEmpty()) { + result = tool.getHandler().apply(variableManager); + } + } + if (result instanceof Success success) { + success.getParameters().put(VIEW_CREATION_REQUESTS, diagramContext.getViewCreationRequests()); + success.getParameters().put(VIEW_DELETION_REQUESTS, diagramContext.getViewDeletionRequests()); + success.getParameters().put(DIAGRAM_EVENTS, diagramContext.getDiagramEvents()); + } + return result; + } + + private void addToolVariablesInVariableManager(ToolVariable toolvariable, IEditingContext editingContext, VariableManager variableManager) { + switch (toolvariable.type()) { + case STRING -> variableManager.put(toolvariable.name(), toolvariable.value()); + case OBJECT_ID -> { + var optionalObject = this.objectSearchService.getObject(editingContext, toolvariable.value()); + variableManager.put(toolvariable.name(), optionalObject.orElse(null)); + } + case OBJECT_ID_ARRAY -> { + String value = toolvariable.value(); + List objectsIds = List.of(value.split(",")); + List objects = objectsIds.stream() + .map(objectId -> this.objectSearchService.getObject(editingContext, objectId)) + .map(optionalObject -> optionalObject.orElse(null)) + .toList(); + variableManager.put(toolvariable.name(), objects); + } + default -> { + //We do nothing, the variable type is not supported + } + } + } + + private Optional getCurrentContext(IEditingContext editingContext, String diagramElementId, SingleClickOnDiagramElementTool tool, Diagram diagram, Optional node, + Optional edge) { + Optional self = Optional.empty(); + if (node.isPresent()) { + self = this.objectSearchService.getObject(editingContext, node.get().getTargetObjectId()); + } else if (edge.isPresent()) { + self = this.objectSearchService.getObject(editingContext, edge.get().getTargetObjectId()); + } else if (Objects.equals(diagram.getId(), diagramElementId)) { + self = this.objectSearchService.getObject(editingContext, diagram.getTargetObjectId()); + } else { + this.logger.warn("The tool {0} cannot be applied on the current diagram {1} and editing context {2}", tool.getId(), diagram.getId(), editingContext.getId()); + } + return self; + } + + private VariableManager populateVariableManager(IEditingContext editingContext, IDiagramContext diagramContext, Optional node, Optional edge, Optional self) { + VariableManager variableManager = new VariableManager(); + variableManager.put(IDiagramContext.DIAGRAM_CONTEXT, diagramContext); + variableManager.put(IEditingContext.EDITING_CONTEXT, editingContext); + variableManager.put(Environment.ENVIRONMENT, new Environment(Environment.SIRIUS_COMPONENTS)); + variableManager.put(IDiagramService.DIAGRAM_SERVICES, new DiagramService(diagramContext)); + variableManager.put(VariableManager.SELF, self.get()); + variableManager.put(Node.SELECTED_NODE, node.orElse(null)); + variableManager.put(Edge.SELECTED_EDGE, edge.orElse(null)); + return variableManager; + } +} diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/resources/schema/diagram.graphqls b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/resources/schema/diagram.graphqls index d868cbfc5b..949f69a9a8 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/resources/schema/diagram.graphqls +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/main/resources/schema/diagram.graphqls @@ -300,6 +300,7 @@ type SingleClickOnDiagramElementTool implements Tool { appliesToDiagramRoot: Boolean! dialogDescriptionId: String targetDescriptions: [DiagramElementDescription!]! + withImpactAnalysis: Boolean! } type SingleClickOnTwoDiagramElementsTool implements Tool { diff --git a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/test/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandlerTests.java b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/test/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandlerTests.java index 4f2f3d4e9c..fa1b994635 100644 --- a/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/test/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandlerTests.java +++ b/packages/diagrams/backend/sirius-components-collaborative-diagrams/src/test/java/org/eclipse/sirius/components/collaborative/diagrams/handlers/InvokeSingleClickOnDiagramElementToolEventHandlerTests.java @@ -30,9 +30,10 @@ import org.eclipse.sirius.components.collaborative.diagrams.api.IToolService; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolInput; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolSuccessPayload; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariable; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariableType; import org.eclipse.sirius.components.collaborative.diagrams.messages.ICollaborativeDiagramMessageService; +import org.eclipse.sirius.components.collaborative.diagrams.services.ToolDiagramExecutor; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; +import org.eclipse.sirius.components.collaborative.dto.ToolVariableType; import org.eclipse.sirius.components.core.api.ErrorPayload; import org.eclipse.sirius.components.core.api.IEditingContext; import org.eclipse.sirius.components.core.api.IObjectSearchService; @@ -133,7 +134,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var input = new InvokeSingleClickOnDiagramElementToolInput(UUID.randomUUID(), EDITING_CONTEXT_ID, REPRESENTATION_ID, DIAGRAM_ID, TOOL_ID, 5.0, 8.0, VARIABLES); @@ -184,7 +186,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var input = new InvokeSingleClickOnDiagramElementToolInput(UUID.randomUUID(), EDITING_CONTEXT_ID, REPRESENTATION_ID, NODE_1_ID, TOOL_ID, 5.0, 8.0, VARIABLES); @@ -250,7 +253,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var variables = List.of(new ToolVariable(SELECTED_OBJECT, OBJECT_2_ID, ToolVariableType.OBJECT_ID), new ToolVariable(NAME_VARIABLE, NAME_VARIABLE_VALUE, ToolVariableType.STRING), new ToolVariable(SELECTED_OBJECTS, OBJECT_1_ID + "," + OBJECT_2_ID + "," + OBJECT_3_ID, ToolVariableType.OBJECT_ID_ARRAY)); @@ -308,7 +312,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var input = new InvokeSingleClickOnDiagramElementToolInput(UUID.randomUUID(), EDITING_CONTEXT_ID, REPRESENTATION_ID, "anotherNodeId", TOOL_ID, 5.0, 8.0, VARIABLES); @@ -374,7 +379,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var input = new InvokeSingleClickOnDiagramElementToolInput(UUID.randomUUID(), EDITING_CONTEXT_ID, REPRESENTATION_ID, EDGE_1_ID, TOOL_ID, 5.0, 8.0, VARIABLES); @@ -432,7 +438,8 @@ public Optional findToolById(IEditingContext editingContext, Diagram diag } }; - var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(objectSearchService, diagramQueryService, toolService, new ICollaborativeDiagramMessageService.NoOp(), new SimpleMeterRegistry()); + var handler = new InvokeSingleClickOnDiagramElementToolEventHandler(new ICollaborativeDiagramMessageService.NoOp(), new ToolDiagramExecutor(toolService, objectSearchService, diagramQueryService + ), new SimpleMeterRegistry()); var input = new InvokeSingleClickOnDiagramElementToolInput(UUID.randomUUID(), EDITING_CONTEXT_ID, REPRESENTATION_ID, "anotherEdgeId", TOOL_ID, 5.0, 8.0, VARIABLES); diff --git a/packages/diagrams/backend/sirius-components-diagrams/src/main/java/org/eclipse/sirius/components/diagrams/tools/SingleClickOnDiagramElementTool.java b/packages/diagrams/backend/sirius-components-diagrams/src/main/java/org/eclipse/sirius/components/diagrams/tools/SingleClickOnDiagramElementTool.java index 570b757d87..b91ee93889 100644 --- a/packages/diagrams/backend/sirius-components-diagrams/src/main/java/org/eclipse/sirius/components/diagrams/tools/SingleClickOnDiagramElementTool.java +++ b/packages/diagrams/backend/sirius-components-diagrams/src/main/java/org/eclipse/sirius/components/diagrams/tools/SingleClickOnDiagramElementTool.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019, 2024 Obeo. + * Copyright (c) 2019, 2025 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,6 +47,8 @@ public final class SingleClickOnDiagramElementTool implements ITool { private String dialogDescriptionId; + private boolean withImpactAnalysis; + private SingleClickOnDiagramElementTool() { // Prevent instantiation } @@ -63,6 +65,10 @@ public boolean isAppliesToDiagramRoot() { return this.appliesToDiagramRoot; } + public boolean isWithImpactAnalysis() { + return this.withImpactAnalysis; + } + @Override public String getId() { return this.id; @@ -115,6 +121,8 @@ public static final class Builder { private String dialogDescriptionId; + private boolean withImpactAnalysis; + private Builder(String id) { this.id = Objects.requireNonNull(id); } @@ -149,6 +157,11 @@ public Builder dialogDescriptionId(String dialogDescriptionId) { return this; } + public Builder withImpactAnalysis(boolean withImpactAnalysis) { + this.withImpactAnalysis = withImpactAnalysis; + return this; + } + public SingleClickOnDiagramElementTool build() { SingleClickOnDiagramElementTool tool = new SingleClickOnDiagramElementTool(); tool.id = Objects.requireNonNull(this.id); @@ -158,6 +171,7 @@ public SingleClickOnDiagramElementTool build() { tool.targetDescriptions = Objects.requireNonNull(this.targetDescriptions); tool.appliesToDiagramRoot = this.appliesToDiagramRoot; tool.dialogDescriptionId = this.dialogDescriptionId; + tool.withImpactAnalysis = this.withImpactAnalysis; return tool; } } diff --git a/packages/diagrams/frontend/sirius-components-diagrams/src/index.ts b/packages/diagrams/frontend/sirius-components-diagrams/src/index.ts index 52c06c606a..d972870767 100644 --- a/packages/diagrams/frontend/sirius-components-diagrams/src/index.ts +++ b/packages/diagrams/frontend/sirius-components-diagrams/src/index.ts @@ -67,7 +67,6 @@ export type { DiagramPaletteToolContributionProps, } from './renderer/palette/extensions/DiagramPaletteToolContribution.types'; export { diagramPaletteToolExtensionPoint } from './renderer/palette/extensions/DiagramPaletteToolExtensionPoints'; -export type { GQLToolVariable, GQLToolVariableType } from './renderer/palette/usePalette.types'; export type { DiagramPanelActionProps } from './renderer/panel/DiagramPanel.types'; export { diagramPanelActionExtensionPoint } from './renderer/panel/DiagramPanelExtensionPoints'; export { DiagramRepresentation } from './representation/DiagramRepresentation'; diff --git a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/Palette.types.ts b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/Palette.types.ts index dde881c370..133319e606 100644 --- a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/Palette.types.ts +++ b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/Palette.types.ts @@ -60,6 +60,7 @@ export interface GQLTool extends GQLPaletteEntry { export interface GQLSingleClickOnDiagramElementTool extends GQLTool { appliesToDiagramRoot: boolean; dialogDescriptionId: string; + withImpactAnalysis: boolean; } export interface GQLPalette { diff --git a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.tsx b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.tsx index e079cb3c7c..f18f4ba062 100644 --- a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.tsx +++ b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.tsx @@ -12,7 +12,13 @@ *******************************************************************************/ import { gql, useMutation, useQuery } from '@apollo/client'; -import { useDeletionConfirmationDialog, useMultiToast, useSelection } from '@eclipse-sirius/sirius-components-core'; +import { + useDeletionConfirmationDialog, + useMultiToast, + useSelection, + useImpactAnalysisDialog, + GQLToolVariable, +} from '@eclipse-sirius/sirius-components-core'; import { Edge, Node, useStoreApi } from '@xyflow/react'; import { useCallback, useContext, useEffect } from 'react'; import { DiagramContext } from '../../contexts/DiagramContext'; @@ -41,7 +47,6 @@ import { GQLInvokeSingleClickOnDiagramElementToolSuccessPayload, GQLInvokeSingleClickOnDiagramElementToolVariables, GQLRepresentationDescription, - GQLToolVariable, GQLUpdateCollapsingStateData, GQLUpdateCollapsingStateInput, GQLUpdateCollapsingStateVariables, @@ -61,6 +66,7 @@ export const getPaletteQuery = gql` } appliesToDiagramRoot dialogDescriptionId + withImpactAnalysis } } query getPalette($editingContextId: ID!, $diagramId: ID!, $diagramElementId: ID!) { @@ -185,6 +191,7 @@ export const usePalette = ({ const { showDeletionConfirmation } = useDeletionConfirmationDialog(); const { showDialog } = useDialog(); const { setSelection } = useSelection(); + const { showImpactAnalysisDialog } = useImpactAnalysisDialog(); const { data: paletteData, error: paletteError } = useQuery( getPaletteQuery, @@ -317,11 +324,23 @@ export const usePalette = ({ const handleDialogDescription = (tool: GQLSingleClickOnDiagramElementTool) => { const onConfirm = (variables: GQLToolVariable[]) => { - invokeSingleClickTool(tool, variables); + if (tool.withImpactAnalysis) { + showImpactAnalysisDialog(editingContextId, diagramId, tool.id, tool.label, diagramElementId, variables, () => + invokeSingleClickTool(tool, variables) + ); + } else { + invokeSingleClickTool(tool, variables); + } }; showDialog(tool.dialogDescriptionId, [{ name: 'targetObjectId', value: targetObjectId }], onConfirm, () => {}); }; + const handleImpactAnalysisDialog = (tool: GQLTool, diagramElementId: string) => { + showImpactAnalysisDialog(editingContextId, diagramId, tool.id, tool.label, diagramElementId, [], () => + invokeSingleClickTool(tool, []) + ); + }; + const { setLastToolInvoked } = useDiagramPalette(); const handleToolClick = (tool: GQLTool) => { @@ -349,7 +368,11 @@ export const usePalette = ({ if (tool.dialogDescriptionId) { handleDialogDescription(tool); } else { - invokeSingleClickTool(tool, []); + if (tool.withImpactAnalysis) { + handleImpactAnalysisDialog(tool, diagramElementId); + } else { + invokeSingleClickTool(tool, []); + } } } break; diff --git a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.types.ts b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.types.ts index 0da7bf15a0..0c792cd1ef 100644 --- a/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.types.ts +++ b/packages/diagrams/frontend/sirius-components-diagrams/src/renderer/palette/usePalette.types.ts @@ -11,6 +11,7 @@ * Obeo - initial API and implementation *******************************************************************************/ +import { GQLToolVariable } from '@eclipse-sirius/sirius-components-core'; import { GQLMessage } from '@eclipse-sirius/sirius-components-core'; import { GQLPalette, GQLTool } from './Palette.types'; @@ -26,6 +27,7 @@ export interface UsePaletteValue { handleToolClick: (tool: GQLTool) => void; palette: GQLPalette | null; } + export interface GQLGetToolSectionsVariables { editingContextId: string; diagramId: string; @@ -134,14 +136,6 @@ export interface GQLInvokeSingleClickOnDiagramElementToolInput { variables: GQLToolVariable[]; } -export interface GQLToolVariable { - name: string; - value: string; - type: GQLToolVariableType; -} - -export type GQLToolVariableType = 'STRING' | 'OBJECT_ID' | 'OBJECT_ID_ARRAY'; - export interface GQLGetToolSectionsData { viewer: GQLViewer; } diff --git a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddWidgetDataFetcher.java b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddWidgetDataFetcher.java index 3539bef5f4..fd08ce4e1c 100644 --- a/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddWidgetDataFetcher.java +++ b/packages/formdescriptioneditors/backend/sirius-components-formdescriptioneditors-graphql/src/main/java/org/eclipse/sirius/components/formdescriptioneditors/graphql/datafetchers/mutation/MutationAddWidgetDataFetcher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022, 2023 Obeo. + * Copyright (c) 2022, 2025 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/portals/backend/sirius-components-collaborative-portals/src/test/java/org/eclipse/sirius/components/collaborative/portals/services/PortalServicesTests.java b/packages/portals/backend/sirius-components-collaborative-portals/src/test/java/org/eclipse/sirius/components/collaborative/portals/services/PortalServicesTests.java index ca8baab9b4..a23d897da5 100644 --- a/packages/portals/backend/sirius-components-collaborative-portals/src/test/java/org/eclipse/sirius/components/collaborative/portals/services/PortalServicesTests.java +++ b/packages/portals/backend/sirius-components-collaborative-portals/src/test/java/org/eclipse/sirius/components/collaborative/portals/services/PortalServicesTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -40,6 +40,11 @@ public class PortalServicesTests { private static final IEditingContext NOOP_EDITING_CONTEXT = new IEditingContext.NoOp(); private static final IRepresentationSearchService NOOP_SEARCH_SERVICE = new IRepresentationSearchService() { + @Override + public Optional findById(IEditingContext editingContext, String representationId) { + return Optional.empty(); + } + @Override public Optional findById(IEditingContext editingContext, String representationId, Class representationClass) { return Optional.empty(); @@ -136,6 +141,11 @@ public void testPreventDirectLoop() { .build(); IRepresentationSearchService mockSearchService = new IRepresentationSearchService() { + @Override + public Optional findById(IEditingContext editingContext, String representationId) { + return Optional.empty(); + } + @Override public Optional findById(IEditingContext editingContext, String representationId, Class representationClass) { return Optional.of(representationClass.cast(portal)); @@ -167,6 +177,11 @@ public void testPreventIndirectLoop() { portalsRepository.add(portal2); IRepresentationSearchService mockSearchService = new IRepresentationSearchService() { + @Override + public Optional findById(IEditingContext editingContext, String representationId) { + return Optional.empty(); + } + @Override public Optional findById(IEditingContext editingContext, String representationId, Class representationClass) { return portalsRepository.stream().filter(portal -> portal.getId().equals(representationId)).findFirst().map(representationClass::cast); diff --git a/packages/selection/frontend/sirius-components-selection/src/SelectionDialog.tsx b/packages/selection/frontend/sirius-components-selection/src/SelectionDialog.tsx index 8e7b053d3b..3033e1b424 100644 --- a/packages/selection/frontend/sirius-components-selection/src/SelectionDialog.tsx +++ b/packages/selection/frontend/sirius-components-selection/src/SelectionDialog.tsx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2024 Obeo. + * Copyright (c) 2021, 2025 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,8 @@ * Contributors: * Obeo - initial API and implementation *******************************************************************************/ -import { Selection, SelectionContext } from '@eclipse-sirius/sirius-components-core'; -import { DiagramDialogComponentProps, GQLToolVariable } from '@eclipse-sirius/sirius-components-diagrams'; +import { GQLToolVariable, Selection, SelectionContext } from '@eclipse-sirius/sirius-components-core'; +import { DiagramDialogComponentProps } from '@eclipse-sirius/sirius-components-diagrams'; import Button from '@mui/material/Button'; import Dialog from '@mui/material/Dialog'; import DialogActions from '@mui/material/DialogActions'; diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/impactanalysis/InvokeImpactAnalysisToolEventHandler.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/impactanalysis/InvokeImpactAnalysisToolEventHandler.java new file mode 100644 index 0000000000..c35aea91bf --- /dev/null +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/impactanalysis/InvokeImpactAnalysisToolEventHandler.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright (c) 2025 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.application.impactanalysis; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.eclipse.emf.ecore.change.util.ChangeRecorder; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.sirius.components.collaborative.api.ChangeDescription; +import org.eclipse.sirius.components.collaborative.api.ChangeKind; +import org.eclipse.sirius.components.collaborative.api.IEditingContextEventHandler; +import org.eclipse.sirius.components.collaborative.api.IRepresentationSearchService; +import org.eclipse.sirius.components.collaborative.api.IToolRepresentationExecutor; +import org.eclipse.sirius.components.collaborative.api.Monitoring; +import org.eclipse.sirius.components.collaborative.dto.ImpactAnalysisReport; +import org.eclipse.sirius.components.collaborative.dto.InvokeImpactAnalysisToolInput; +import org.eclipse.sirius.components.collaborative.dto.InvokeImpactAnalysisToolSuccessPayload; +import org.eclipse.sirius.components.collaborative.messages.ICollaborativeMessageService; +import org.eclipse.sirius.components.core.api.ErrorPayload; +import org.eclipse.sirius.components.core.api.IEditingContext; +import org.eclipse.sirius.components.core.api.IInput; +import org.eclipse.sirius.components.core.api.IPayload; +import org.eclipse.sirius.components.representations.Failure; +import org.eclipse.sirius.components.representations.IStatus; +import org.eclipse.sirius.components.representations.Success; +import org.eclipse.sirius.web.application.editingcontext.EditingContext; +import org.eclipse.sirius.web.application.editingcontext.services.api.IResourceLoader; +import org.eclipse.sirius.web.application.editingcontext.services.api.IResourceToDocumentService; +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 "impact analysis tool" events. + * + * @author frouene + */ +@Service +public class InvokeImpactAnalysisToolEventHandler implements IEditingContextEventHandler { + + private final IResourceLoader resourceLoader; + + private final IResourceToDocumentService resourceToDocumentService; + + private final ICollaborativeMessageService messageService; + + private final IRepresentationSearchService representationSearchService; + + private final List toolExecutors; + + private final Counter counter; + + public InvokeImpactAnalysisToolEventHandler(IResourceLoader resourceLoader, IResourceToDocumentService resourceToDocumentService, + ICollaborativeMessageService messageService, IRepresentationSearchService representationSearchService, List toolExecutors, MeterRegistry meterRegistry) { + this.resourceLoader = Objects.requireNonNull(resourceLoader); + this.resourceToDocumentService = Objects.requireNonNull(resourceToDocumentService); + this.messageService = Objects.requireNonNull(messageService); + this.representationSearchService = Objects.requireNonNull(representationSearchService); + this.toolExecutors = Objects.requireNonNull(toolExecutors); + + this.counter = Counter.builder(Monitoring.EVENT_HANDLER) + .tag(Monitoring.NAME, this.getClass().getSimpleName()) + .register(meterRegistry); + } + + @Override + public boolean canHandle(IEditingContext editingContext, IInput input) { + return input instanceof InvokeImpactAnalysisToolInput; + } + + @Override + public void handle(One payloadSink, Many changeDescriptionSink, IEditingContext editingContext, IInput input) { + this.counter.increment(); + + String message = this.messageService.invalidInput(input.getClass().getSimpleName(), InvokeImpactAnalysisToolInput.class.getSimpleName()); + IPayload payload = new ErrorPayload(input.id(), message); + ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, editingContext.getId(), input); + + if (input instanceof InvokeImpactAnalysisToolInput invokeImpactAnalysisToolInput && editingContext instanceof EditingContext siriusEditingContext) { + ResourceSet resourceSet = siriusEditingContext.getDomain().getResourceSet(); + var snapshotBeforeToolExecution = resourceSet.getResources().stream().map(resource -> this.resourceToDocumentService.toDocument(resource, false)) + .filter(Optional::isPresent) + .map(Optional::get).toList(); + + ChangeRecorder changeRecorder = siriusEditingContext.getChangeRecorder(); + + var representationOptional = this.representationSearchService.findById(editingContext, invokeImpactAnalysisToolInput.representationId()); + if (representationOptional.isPresent()) { + changeRecorder.beginRecording(siriusEditingContext.getDomain().getResourceSet().getResources()); + + IStatus toolExecutionResult = this.toolExecutors.stream().filter(executor -> executor.canExecute(editingContext, representationOptional.get())).findFirst() + .map(executor -> executor.execute(editingContext, representationOptional.get(), invokeImpactAnalysisToolInput.toolId(), invokeImpactAnalysisToolInput.targetObjectId(), + invokeImpactAnalysisToolInput.variables())) + .orElse(new Failure("")); + + var diff = siriusEditingContext.getChangeRecorder().summarize(); + siriusEditingContext.getChangeRecorder().endRecording(); + resourceSet.getResources().clear(); + for (var documentSnapshot : snapshotBeforeToolExecution) { + this.resourceLoader.toResource(resourceSet, documentSnapshot.document().getId().toString(), documentSnapshot.document().getName(), documentSnapshot.document().getContent(), false); + } + if (toolExecutionResult instanceof Success success) { + List additionalReports = new ArrayList<>(); + if (success.getParameters().get("viewCreationRequests") instanceof List viewCreationRequestsList && !viewCreationRequestsList.isEmpty()) { + additionalReports.add("Views added: " + viewCreationRequestsList.size()); + } + if (success.getParameters() + .get("viewDeletionRequests") instanceof List viewDeletionRequestsList && !viewDeletionRequestsList.isEmpty()) { + additionalReports.add("Views deleted: " + viewDeletionRequestsList.size()); + } + payload = new InvokeImpactAnalysisToolSuccessPayload(invokeImpactAnalysisToolInput.id(), + new ImpactAnalysisReport(diff.getObjectsToAttach().size(), diff.getObjectChanges().size(), diff.getObjectsToDetach().size(), additionalReports), + success.getMessages()); + changeDescription = new ChangeDescription(ChangeKind.NOTHING, editingContext.getId(), input); + } else if (toolExecutionResult instanceof Failure failure) { + payload = new ErrorPayload(input.id(), failure.getMessages()); + } + } + } + + payloadSink.tryEmitValue(payload); + changeDescriptionSink.tryEmitNext(changeDescription); + } + +} diff --git a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/representation/services/RepresentationSearchService.java b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/representation/services/RepresentationSearchService.java index 708b0e0f40..d18933f89d 100644 --- a/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/representation/services/RepresentationSearchService.java +++ b/packages/sirius-web/backend/sirius-web-application/src/main/java/org/eclipse/sirius/web/application/representation/services/RepresentationSearchService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -67,6 +67,13 @@ public Optional findById(IEditingContext editingC .map(representationClass::cast); } + @Override + public Optional findById(IEditingContext editingContext, String representationId) { + return new UUIDParser().parse(representationId) + .flatMap(this.representationMetadataSearchService::findMetadataById) + .flatMap(this::getRepresentation); + } + private Optional getRepresentation(RepresentationMetadata representationMetadata) { return this.representationContentSearchService.findContentById(representationMetadata.getId()) .map(representationContent -> this.migratedContent(representationMetadata, representationContent)) @@ -75,7 +82,7 @@ private Optional getRepresentation(RepresentationMetadata repre @Override public boolean existByIdAndKind(String representationId, List kinds) { - Optional uuid = new UUIDParser().parse(representationId); + Optional uuid = new UUIDParser().parse(representationId); return uuid.filter(value -> this.representationMetadataSearchService.existsByIdAndKind(value, kinds)).isPresent(); } diff --git a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlabel/DiagramLabelViewProvider.java b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlabel/DiagramLabelViewProvider.java index 695ae9fd70..12e24aaac7 100644 --- a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlabel/DiagramLabelViewProvider.java +++ b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlabel/DiagramLabelViewProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -39,6 +39,7 @@ import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorPaletteBuilderProvider; import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorProvider; import org.eclipse.sirius.web.e2e.tests.services.api.IE2EViewProvider; +import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; /** @@ -46,6 +47,7 @@ * * @author gcoutable */ +@Profile("test") @Service @SuppressWarnings("checkstyle:MultipleStringLiterals") public class DiagramLabelViewProvider implements IE2EViewProvider { @@ -62,9 +64,9 @@ public List createViews() { var view = new ViewBuilders().newView() .colorPalettes(colorPalette) .descriptions( - fullyDisplayInsideLabelDiagramDescription, - wrapLabelWithoutChangingNodeWidthDiagramDescription, - labelIsTruncatedWithoutChangingNodeWidthDiagramDescription + fullyDisplayInsideLabelDiagramDescription, + wrapLabelWithoutChangingNodeWidthDiagramDescription, + labelIsTruncatedWithoutChangingNodeWidthDiagramDescription ) .build(); @@ -130,58 +132,58 @@ private NodeDescription getNodeDescription(IColorProvider colorProvider, LabelOv .userResizable(UserResizableDirection.BOTH) .keepAspectRatio(false) .palette( - new DiagramBuilders() - .newNodePalette() - .labelEditTool( - new DiagramBuilders() - .newLabelEditTool() - .name("Edit Label") - .body( - new ViewBuilders() - .newChangeContext() - .expression("aql:self.defaultEditLabel(newLabel)") - .build() + new DiagramBuilders() + .newNodePalette() + .labelEditTool( + new DiagramBuilders() + .newLabelEditTool() + .name("Edit Label") + .body( + new ViewBuilders() + .newChangeContext() + .expression("aql:self.defaultEditLabel(newLabel)") + .build() + ) + .build() ) .build() - ) - .build() ) .style( - new DiagramBuilders() - .newRectangularNodeStyleDescription() - .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_BLUE)) - .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.BORDER_BLUE)) - .borderRadius(3) - .borderSize(1) - .borderLineStyle(LineStyle.SOLID) - .build() - ) - .insideLabel( - new DiagramBuilders() - .newInsideLabelDescription() - .labelExpression("aql:self.name") - .overflowStrategy(labelOverflowStrategy) - .textAlign(LabelTextAlign.LEFT) - .position(InsideLabelPosition.TOP_CENTER) - .style( - new DiagramBuilders() - .newInsideLabelStyle() - .fontSize(14) - .italic(false) - .bold(false) - .underline(false) - .strikeThrough(false) - .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) + new DiagramBuilders() + .newRectangularNodeStyleDescription() + .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_BLUE)) + .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.BORDER_BLUE)) .borderRadius(3) - .borderSize(0) + .borderSize(1) .borderLineStyle(LineStyle.SOLID) - .labelColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) - .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_TRANSPARENT)) - .withHeader(false) - .headerSeparatorDisplayMode(HeaderSeparatorDisplayMode.ALWAYS) .build() - ) - .build() + ) + .insideLabel( + new DiagramBuilders() + .newInsideLabelDescription() + .labelExpression("aql:self.name") + .overflowStrategy(labelOverflowStrategy) + .textAlign(LabelTextAlign.LEFT) + .position(InsideLabelPosition.TOP_CENTER) + .style( + new DiagramBuilders() + .newInsideLabelStyle() + .fontSize(14) + .italic(false) + .bold(false) + .underline(false) + .strikeThrough(false) + .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) + .borderRadius(3) + .borderSize(0) + .borderLineStyle(LineStyle.SOLID) + .labelColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) + .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_TRANSPARENT)) + .withHeader(false) + .headerSeparatorDisplayMode(HeaderSeparatorDisplayMode.ALWAYS) + .build() + ) + .build() ) .build(); } @@ -191,25 +193,25 @@ private DiagramPalette getDiagramPalette() { .newNodeTool() .name("New Entity 1") .body( - new ViewBuilders() - .newCreateInstance() - .typeName(DiagramLabelDomainProvider.DOMAIN_NAME + "::Entity1") - .referenceName("entity1s") - .variableName("newInstance") - .children( - new ViewBuilders() - .newChangeContext() - .expression("aql:newInstance") + new ViewBuilders() + .newCreateInstance() + .typeName(DiagramLabelDomainProvider.DOMAIN_NAME + "::Entity1") + .referenceName("entity1s") + .variableName("newInstance") .children( - new ViewBuilders() - .newSetValue() - .featureName("name") - .valueExpression("NewEntity1") - .build() + new ViewBuilders() + .newChangeContext() + .expression("aql:newInstance") + .children( + new ViewBuilders() + .newSetValue() + .featureName("name") + .valueExpression("NewEntity1") + .build() + ) + .build() ) .build() - ) - .build() ) .build(); diff --git a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramListViewProvider.java b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramListViewProvider.java index bfe1443ce1..384d52bcfc 100644 --- a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramListViewProvider.java +++ b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/diagramlist/DiagramListViewProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -37,6 +37,7 @@ import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorPaletteBuilderProvider; import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorProvider; import org.eclipse.sirius.web.e2e.tests.services.api.IE2EViewProvider; +import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Service; /** @@ -44,6 +45,7 @@ * * @author frouene */ +@Profile("test") @Service @SuppressWarnings("checkstyle:MultipleStringLiterals") public class DiagramListViewProvider implements IE2EViewProvider { diff --git a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisDomainProvider.java b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisDomainProvider.java new file mode 100644 index 0000000000..2805e5a702 --- /dev/null +++ b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisDomainProvider.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2025 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.e2e.tests.impactanalysis; + +import java.util.List; + +import org.eclipse.sirius.components.core.api.IEditingContext; +import org.eclipse.sirius.components.domain.Attribute; +import org.eclipse.sirius.components.domain.DataType; +import org.eclipse.sirius.components.domain.Domain; +import org.eclipse.sirius.components.domain.DomainFactory; +import org.eclipse.sirius.components.domain.Entity; +import org.eclipse.sirius.components.domain.Relation; +import org.eclipse.sirius.web.application.studio.services.api.IDomainProvider; +import org.springframework.context.annotation.Profile; +import org.springframework.stereotype.Service; + +/** + * Used to contribute domains for diagram-impact-analysis.cy.ts tests. + * + * @author frouene + */ +@Profile("test") +@Service +public class DiagramImpactAnalysisDomainProvider implements IDomainProvider { + + public static final String DOMAIN_NAME = "diagramImpactAnalysis"; + + @Override + public List getDomains(IEditingContext editingContext) { + var domain = DomainFactory.eINSTANCE.createDomain(); + domain.setName(DOMAIN_NAME); + + Entity root = DomainFactory.eINSTANCE.createEntity(); + root.setName("Root"); + domain.getTypes().add(root); + + Entity entity1 = DomainFactory.eINSTANCE.createEntity(); + entity1.setName("Entity1"); + domain.getTypes().add(entity1); + + Relation entity1s = DomainFactory.eINSTANCE.createRelation(); + entity1s.setName("entity1s"); + entity1s.setContainment(true); + entity1s.setOptional(true); + entity1s.setMany(true); + entity1s.setTargetType(entity1); + root.getRelations().add(entity1s); + + this.addAttribute(entity1, "name", DataType.STRING); + + return List.of(domain); + } + + private void addAttribute(Entity entity, String name, DataType type) { + Attribute attr = DomainFactory.eINSTANCE.createAttribute(); + attr.setName(name); + attr.setOptional(true); + attr.setType(type); + entity.getAttributes().add(attr); + } +} diff --git a/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisViewProvider.java b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisViewProvider.java new file mode 100644 index 0000000000..8b1a685f01 --- /dev/null +++ b/packages/sirius-web/backend/sirius-web-e2e-tests/src/main/java/org/eclipse/sirius/web/e2e/tests/impactanalysis/DiagramImpactAnalysisViewProvider.java @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright (c) 2025 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.e2e.tests.impactanalysis; + +import java.util.List; +import java.util.UUID; + +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.components.emf.ResourceMetadataAdapter; +import org.eclipse.sirius.components.emf.services.IDAdapter; +import org.eclipse.sirius.components.emf.services.JSONResourceFactory; +import org.eclipse.sirius.components.view.View; +import org.eclipse.sirius.components.view.builder.generated.diagram.DiagramBuilders; +import org.eclipse.sirius.components.view.builder.generated.view.ViewBuilders; +import org.eclipse.sirius.components.view.builder.providers.IColorProvider; +import org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection; +import org.eclipse.sirius.components.view.diagram.DiagramDescription; +import org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode; +import org.eclipse.sirius.components.view.diagram.InsideLabelPosition; +import org.eclipse.sirius.components.view.diagram.LabelTextAlign; +import org.eclipse.sirius.components.view.diagram.LineStyle; +import org.eclipse.sirius.components.view.diagram.NodeDescription; +import org.eclipse.sirius.components.view.diagram.SynchronizationPolicy; +import org.eclipse.sirius.components.view.diagram.UserResizableDirection; +import org.eclipse.sirius.emfjson.resource.JsonResource; +import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorPaletteBuilderProvider; +import org.eclipse.sirius.web.e2e.tests.services.SiriusWebE2EColorProvider; +import org.eclipse.sirius.web.e2e.tests.services.api.IE2EViewProvider; +import org.springframework.context.annotation.Profile; +import org.springframework.stereotype.Service; + +/** + * The view provider for the diagram-impact-analysis.cy.ts test suite. + * + * @author frouene + */ +@Profile("test") +@Service +@SuppressWarnings("checkstyle:MultipleStringLiterals") +public class DiagramImpactAnalysisViewProvider implements IE2EViewProvider { + + @Override + public List createViews() { + var colorPalette = new SiriusWebE2EColorPaletteBuilderProvider().getColorPaletteBuilder().build(); + IColorProvider colorProvider = new SiriusWebE2EColorProvider(List.of(colorPalette)); + + var fullyDisplayInsideLabelDiagramDescription = this.fullyDisplayInsideLabelDiagramDescription(colorProvider); + + var view = new ViewBuilders().newView() + .colorPalettes(colorPalette) + .descriptions( + fullyDisplayInsideLabelDiagramDescription + ) + .build(); + + view.eAllContents().forEachRemaining(eObject -> { + eObject.eAdapters().add(new IDAdapter(UUID.nameUUIDFromBytes(EcoreUtil.getURI(eObject).toString().getBytes()))); + }); + + String resourcePath = UUID.nameUUIDFromBytes("DiagramImpactAnalysisView".getBytes()).toString(); + JsonResource resource = new JSONResourceFactory().createResourceFromPath(resourcePath); + resource.eAdapters().add(new ResourceMetadataAdapter("DiagramImpactAnalysisView")); + resource.getContents().add(view); + + return List.of(view); + } + + private DiagramDescription fullyDisplayInsideLabelDiagramDescription(IColorProvider colorProvider) { + return new DiagramBuilders() + .newDiagramDescription() + .name(DiagramImpactAnalysisDomainProvider.DOMAIN_NAME + " - simple node") + .domainType(DiagramImpactAnalysisDomainProvider.DOMAIN_NAME + "::Root") + .titleExpression(DiagramImpactAnalysisDomainProvider.DOMAIN_NAME + " diagram") + .autoLayout(false) + .arrangeLayoutDirection(ArrangeLayoutDirection.UNDEFINED) + .nodeDescriptions(this.getNodeDescription(colorProvider)) + .build(); + } + + + private NodeDescription getNodeDescription(IColorProvider colorProvider) { + return new DiagramBuilders() + .newNodeDescription() + .name("Entity Node 1") + .domainType(DiagramImpactAnalysisDomainProvider.DOMAIN_NAME + "::Entity1") + .semanticCandidatesExpression("aql:self.eContents()") + .synchronizationPolicy(SynchronizationPolicy.SYNCHRONIZED) + .collapsible(true) + .userResizable(UserResizableDirection.BOTH) + .keepAspectRatio(false) + .childrenLayoutStrategy(new DiagramBuilders().newFreeFormLayoutStrategyDescription().build()) + .style( + new DiagramBuilders() + .newRectangularNodeStyleDescription() + .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_BLUE)) + .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.BORDER_BLUE)) + .borderRadius(3) + .borderSize(1) + .borderLineStyle(LineStyle.SOLID) + .build() + ) + .insideLabel( + new DiagramBuilders() + .newInsideLabelDescription() + .labelExpression("aql:self.name") + .textAlign(LabelTextAlign.LEFT) + .position(InsideLabelPosition.TOP_CENTER) + .style( + new DiagramBuilders() + .newInsideLabelStyle() + .fontSize(14) + .italic(false) + .bold(false) + .underline(false) + .strikeThrough(false) + .borderColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) + .borderRadius(3) + .borderSize(0) + .borderLineStyle(LineStyle.SOLID) + .labelColor(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_DARK)) + .background(colorProvider.getColor(SiriusWebE2EColorPaletteBuilderProvider.COLOR_TRANSPARENT)) + .withHeader(true) + .headerSeparatorDisplayMode(HeaderSeparatorDisplayMode.ALWAYS) + .build() + ) + .build() + ) + .palette( + new DiagramBuilders() + .newNodePalette() + .nodeTools( + new DiagramBuilders() + .newNodeTool() + .name("Tool with impact analysis") + .withImpactAnalysis(true) + .body( + new ViewBuilders() + .newChangeContext() + .expression("aql:self") + .children( + new ViewBuilders() + .newSetValue() + .featureName("name") + .valueExpression("newName") + .build() + ) + .build(), + new ViewBuilders() + .newChangeContext() + .expression("aql:self.eContainer()") + .children( + new ViewBuilders() + .newCreateInstance() + .typeName(DiagramImpactAnalysisDomainProvider.DOMAIN_NAME + "::Entity1") + .referenceName("entity1s") + .build() + ) + .build() + ) + .build() + ) + .build() + ) + .build(); + } + +} diff --git a/packages/sirius-web/backend/sirius-web-papaya/src/main/java/org/eclipse/sirius/web/papaya/representations/classdiagram/tools/diagram/ImportExistingTypesToolProvider.java b/packages/sirius-web/backend/sirius-web-papaya/src/main/java/org/eclipse/sirius/web/papaya/representations/classdiagram/tools/diagram/ImportExistingTypesToolProvider.java index 72ad9d3f60..b2e1a29829 100644 --- a/packages/sirius-web/backend/sirius-web-papaya/src/main/java/org/eclipse/sirius/web/papaya/representations/classdiagram/tools/diagram/ImportExistingTypesToolProvider.java +++ b/packages/sirius-web/backend/sirius-web-papaya/src/main/java/org/eclipse/sirius/web/papaya/representations/classdiagram/tools/diagram/ImportExistingTypesToolProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -100,6 +100,7 @@ public NodeTool getNodeTool(IViewDiagramElementFinder cache) { .name("Import existing types") .iconURLsExpression("/icons/full/obj16/Class.svg") .dialogDescription(dialogDescription) + .withImpactAnalysis(true) .body( new ViewBuilders().newChangeContext() .expression("aql:self") diff --git a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/diagrams/ModelOperationDiagramControllerTests.java b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/diagrams/ModelOperationDiagramControllerTests.java index bb6942364b..95d9cc4f1f 100644 --- a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/diagrams/ModelOperationDiagramControllerTests.java +++ b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/diagrams/ModelOperationDiagramControllerTests.java @@ -27,9 +27,9 @@ import org.eclipse.sirius.components.collaborative.diagrams.dto.DiagramRefreshedEventPayload; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolInput; import org.eclipse.sirius.components.collaborative.diagrams.dto.InvokeSingleClickOnDiagramElementToolSuccessPayload; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariable; -import org.eclipse.sirius.components.collaborative.diagrams.dto.ToolVariableType; import org.eclipse.sirius.components.collaborative.dto.CreateRepresentationInput; +import org.eclipse.sirius.components.collaborative.dto.ToolVariable; +import org.eclipse.sirius.components.collaborative.dto.ToolVariableType; import org.eclipse.sirius.components.diagrams.tests.graphql.InvokeSingleClickOnDiagramElementToolMutationRunner; import org.eclipse.sirius.web.AbstractIntegrationTests; import org.eclipse.sirius.web.data.PapayaIdentifiers; @@ -54,7 +54,7 @@ */ @Transactional @SuppressWarnings("checkstyle:MultipleStringLiterals") -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "sirius.web.test.enabled=studio" }) +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = {"sirius.web.test.enabled=studio"}) public class ModelOperationDiagramControllerTests extends AbstractIntegrationTests { @Autowired @@ -203,8 +203,8 @@ public void givenDiagramWhenToolWithSelectionDialogIsExecutedThenItWorksAsExpect .ifPresentOrElse(diagram -> { diagramId.set(diagram.getId()); assertThat(diagram.getNodes()) - .anyMatch(node -> node.getInsideLabel().getText().equals("sirius-web-domain")) - .noneMatch(node -> node.getInsideLabel().getText().equals("componentRenamedAfterSelectedElement")); + .anyMatch(node -> node.getInsideLabel().getText().equals("sirius-web-domain")) + .noneMatch(node -> node.getInsideLabel().getText().equals("componentRenamedAfterSelectedElement")); }, () -> fail("Missing diagram")); Runnable createNode = () -> { @@ -223,8 +223,8 @@ public void givenDiagramWhenToolWithSelectionDialogIsExecutedThenItWorksAsExpect .map(DiagramRefreshedEventPayload::diagram) .ifPresentOrElse(diagram -> { assertThat(diagram.getNodes()) - .noneMatch(node -> node.getInsideLabel().getText().equals("sirius-web-domain")) - .anyMatch(node -> node.getInsideLabel().getText().equals("componentRenamedAfterSelectedElement")); + .noneMatch(node -> node.getInsideLabel().getText().equals("sirius-web-domain")) + .anyMatch(node -> node.getInsideLabel().getText().equals("componentRenamedAfterSelectedElement")); }, () -> fail("Missing diagram")); StepVerifier.create(flux) diff --git a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/impactanalysis/ImpactAnalysisDiagramToolControllerTests.java b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/impactanalysis/ImpactAnalysisDiagramToolControllerTests.java new file mode 100644 index 0000000000..c3115d343e --- /dev/null +++ b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/impactanalysis/ImpactAnalysisDiagramToolControllerTests.java @@ -0,0 +1,148 @@ +/******************************************************************************* + * Copyright (c) 2025 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.application.controllers.impactanalysis; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +import com.jayway.jsonpath.JsonPath; + +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; + +import org.eclipse.sirius.components.collaborative.diagrams.dto.DiagramRefreshedEventPayload; +import org.eclipse.sirius.components.collaborative.dto.CreateRepresentationInput; +import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; +import org.eclipse.sirius.web.AbstractIntegrationTests; +import org.eclipse.sirius.web.data.PapayaIdentifiers; +import org.eclipse.sirius.web.services.diagrams.ModelOperationDiagramDescriptionProvider; +import org.eclipse.sirius.web.tests.data.GivenSiriusWebServer; +import org.eclipse.sirius.web.tests.services.api.IGivenCreatedDiagramSubscription; +import org.eclipse.sirius.web.tests.services.api.IGivenInitialServerState; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.transaction.annotation.Transactional; + +import reactor.core.publisher.Flux; +import reactor.test.StepVerifier; + +/** + * Integration tests of the impact analysis for diagram tools. + * + * @author frouene + */ +@Transactional +@SuppressWarnings("checkstyle:MultipleStringLiterals") +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = {"sirius.web.test.enabled=studio"}) +public class ImpactAnalysisDiagramToolControllerTests extends AbstractIntegrationTests { + + private static final String GET_IMPACT_ANALYSIS_REPORT = """ + query getImpactAnalysisReport( + $editingContextId: ID! + $representationId: ID! + $toolId: ID! + $targetObjectId: ID! + $variables: [ToolVariable!]! + ) { + viewer { + editingContext(editingContextId: $editingContextId) { + representation(representationId: $representationId) { + impactAnalysisReport(toolId: $toolId, targetObjectId: $targetObjectId, variables: $variables) { + nbElementDeleted + nbElementModified + nbElementCreated + additionalReports + } + } + } + } + } + """; + + @Autowired + private IGivenInitialServerState givenInitialServerState; + + @Autowired + private IGivenCreatedDiagramSubscription givenCreatedDiagramSubscription; + + @Autowired + private ModelOperationDiagramDescriptionProvider modelOperationDiagramDescriptionProvider; + + @Autowired + private IGraphQLRequestor graphQLRequestor; + + @BeforeEach + public void beforeEach() { + this.givenInitialServerState.initialize(); + } + + private Flux givenSubscriptionToModelOperationDiagram() { + var input = new CreateRepresentationInput( + UUID.randomUUID(), + PapayaIdentifiers.PAPAYA_EDITING_CONTEXT_ID.toString(), + this.modelOperationDiagramDescriptionProvider.getRepresentationDescriptionId(), + PapayaIdentifiers.PROJECT_OBJECT.toString(), + "ModelOperationDiagram" + ); + return this.givenCreatedDiagramSubscription.createAndSubscribe(input); + } + + @Test + @GivenSiriusWebServer + @DisplayName("Given a diagram with a tool, when asking for impact analysis on tool, then the report return is correct") + public void givenDiagramWithToolWhenAskingForImpactAnalysisOnToolThenTheReportIsCorrect() { + var flux = this.givenSubscriptionToModelOperationDiagram(); + + var diagramId = new AtomicReference(); + + Consumer initialDiagramContentConsumer = payload -> Optional.of(payload) + .filter(DiagramRefreshedEventPayload.class::isInstance) + .map(DiagramRefreshedEventPayload.class::cast) + .map(DiagramRefreshedEventPayload::diagram) + .ifPresentOrElse(diagram -> { + diagramId.set(diagram.getId()); + }, () -> fail("Missing diagram")); + + Runnable invokeImpactAnalysisReport = () -> { + Map variables = Map.of( + "editingContextId", PapayaIdentifiers.PAPAYA_EDITING_CONTEXT_ID.toString(), + "representationId", diagramId.get(), + "toolId", this.modelOperationDiagramDescriptionProvider.getCreateNodeToolId(), + "targetObjectId", diagramId.get(), + "variables", List.of()); + var result = this.graphQLRequestor.execute(GET_IMPACT_ANALYSIS_REPORT, variables); + + int nbElementDeleted = JsonPath.read(result, "$.data.viewer.editingContext.representation.impactAnalysisReport.nbElementDeleted"); + assertThat(nbElementDeleted).isEqualTo(0); + int nbElementCreated = JsonPath.read(result, "$.data.viewer.editingContext.representation.impactAnalysisReport.nbElementCreated"); + assertThat(nbElementCreated).isEqualTo(2); + int nbElementModified = JsonPath.read(result, "$.data.viewer.editingContext.representation.impactAnalysisReport.nbElementModified"); + assertThat(nbElementModified).isEqualTo(3); + }; + + StepVerifier.create(flux) + .consumeNextWith(initialDiagramContentConsumer) + .then(invokeImpactAnalysisReport) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + +} diff --git a/packages/sirius-web/frontend/sirius-web-application/src/application/SiriusWebApplication.tsx b/packages/sirius-web/frontend/sirius-web-application/src/application/SiriusWebApplication.tsx index 008bd6e1ff..bea8e9e8f8 100644 --- a/packages/sirius-web/frontend/sirius-web-application/src/application/SiriusWebApplication.tsx +++ b/packages/sirius-web/frontend/sirius-web-application/src/application/SiriusWebApplication.tsx @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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 @@ -13,6 +13,7 @@ import { ConfirmationDialogContextProvider, ExtensionProvider, + ImpactAnalysisDialogContextProvider, RepresentationPathContext, ServerContext, } from '@eclipse-sirius/sirius-components-core'; @@ -83,11 +84,13 @@ export const SiriusWebApplication = ({ - -
- -
-
+ + +
+ +
+
+
diff --git a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/diagram/NodeToolBuilder.java b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/diagram/NodeToolBuilder.java index ed0a58b4ea..6b16efe62c 100644 --- a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/diagram/NodeToolBuilder.java +++ b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/diagram/NodeToolBuilder.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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,5 +101,15 @@ public NodeToolBuilder elementsToSelectExpression(java.lang.String value) { return this; } + /** + * Setter for WithImpactAnalysis. + * + * @generated + */ + public NodeToolBuilder withImpactAnalysis(java.lang.Boolean value) { + this.getNodeTool().setWithImpactAnalysis(value); + return this; + } + } diff --git a/packages/view/backend/sirius-components-view-diagram-edit/src/main/java/org/eclipse/sirius/components/view/diagram/provider/NodeToolItemProvider.java b/packages/view/backend/sirius-components-view-diagram-edit/src/main/java/org/eclipse/sirius/components/view/diagram/provider/NodeToolItemProvider.java index f19bea0cd1..723b4cdf47 100644 --- a/packages/view/backend/sirius-components-view-diagram-edit/src/main/java/org/eclipse/sirius/components/view/diagram/provider/NodeToolItemProvider.java +++ b/packages/view/backend/sirius-components-view-diagram-edit/src/main/java/org/eclipse/sirius/components/view/diagram/provider/NodeToolItemProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2024 Obeo. + * Copyright (c) 2021, 2025 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 @@ -35,6 +35,7 @@ * @generated */ public class NodeToolItemProvider extends ToolItemProvider { + /** * This constructs an instance from a factory and a notifier. * @@ -56,6 +57,7 @@ public List getPropertyDescriptors(Object object) { this.addIconURLsExpressionPropertyDescriptor(object); this.addElementsToSelectExpressionPropertyDescriptor(object); + this.addWithImpactAnalysisPropertyDescriptor(object); } return this.itemPropertyDescriptors; } @@ -85,6 +87,18 @@ protected void addElementsToSelectExpressionPropertyDescriptor(Object object) { DiagramPackage.Literals.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); } + /** + * This adds a property descriptor for the With Impact Analysis feature. + * + * @generated + */ + protected void addWithImpactAnalysisPropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_NodeTool_withImpactAnalysis_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_NodeTool_withImpactAnalysis_feature", "_UI_NodeTool_type"), + DiagramPackage.Literals.NODE_TOOL__WITH_IMPACT_ANALYSIS, true, false, false, ItemPropertyDescriptor.BOOLEAN_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 @@ -160,6 +174,7 @@ public void notifyChanged(Notification notification) { switch (notification.getFeatureID(NodeTool.class)) { case DiagramPackage.NODE_TOOL__ICON_UR_LS_EXPRESSION: case DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION: + case DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS: this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; case DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION: diff --git a/packages/view/backend/sirius-components-view-diagram-edit/src/main/resources/plugin.properties b/packages/view/backend/sirius-components-view-diagram-edit/src/main/resources/plugin.properties index accc243d85..1acf8504bb 100644 --- a/packages/view/backend/sirius-components-view-diagram-edit/src/main/resources/plugin.properties +++ b/packages/view/backend/sirius-components-view-diagram-edit/src/main/resources/plugin.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2021, 2024 Obeo. +# Copyright (c) 2021, 2025 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 @@ -175,12 +175,13 @@ _UI_Tool_preconditionExpression_feature=Precondition Expression _UI_Tool_body_feature=Body _UI_EdgeTool_targetElementDescriptions_feature=Target Element Descriptions _UI_EdgeTool_iconURLsExpression_feature=Icon URLs Expression -_UI_EdgeTool_elementsToSelectExpression_feature = Elements To Select Expression +_UI_EdgeTool_elementsToSelectExpression_feature=Elements To Select Expression _UI_LabelEditTool_initialDirectEditLabelExpression_feature=Initial Direct Edit Label Expression _UI_NodeTool_dialogDescription_feature=Dialog Description _UI_NodeTool_iconURLsExpression_feature=Icon URLs Expression -_UI_EdgeTool_dialogDescription_feature = Dialog Description -_UI_NodeTool_elementsToSelectExpression_feature = Elements To Select Expression +_UI_EdgeTool_dialogDescription_feature=Dialog Description +_UI_NodeTool_elementsToSelectExpression_feature=Elements To Select Expression +_UI_NodeTool_withImpactAnalysis_feature=With Impact Analysis _UI_CreateView_parentViewExpression_feature=Parent View Expression _UI_CreateView_elementDescription_feature=Element Description _UI_CreateView_semanticElementExpression_feature=Semantic Element Expression @@ -189,7 +190,7 @@ _UI_CreateView_containmentKind_feature=Containment Kind _UI_DeleteView_viewExpression_feature=View Expression _UI_SelectionDialogDescription_selectionMessage_feature=Selection Message _UI_SelectionDialogDescription_selectionDialogTreeDescription_feature=Selection Dialog Tree Description -_UI_SelectionDialogDescription_multiple_feature = Multiple +_UI_SelectionDialogDescription_multiple_feature=Multiple _UI_ToolSection_name_feature=Name _UI_DiagramToolSection_nodeTools_feature=Node Tools _UI_NodeToolSection_nodeTools_feature=Node Tools diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/DiagramPackage.java b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/DiagramPackage.java index 4426f37832..27bc30b356 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/DiagramPackage.java +++ b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/DiagramPackage.java @@ -30,9 +30,9 @@ * * * - * @see org.eclipse.sirius.components.view.diagram.DiagramFactory * @model kind="package" * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramFactory */ public interface DiagramPackage extends EPackage { @@ -61,9 +61,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramDescriptionImpl * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramDescription() - * @generated */ int DIAGRAM_DESCRIPTION = 0; @@ -115,7 +115,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DIAGRAM_DESCRIPTION__AUTO_LAYOUT = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 0; + int DIAGRAM_DESCRIPTION__AUTO_LAYOUT = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Palette' containment reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramElementDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramElementDescription() - * @generated */ int DIAGRAM_ELEMENT_DESCRIPTION = 1; @@ -245,9 +245,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeDescriptionImpl Node * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeDescription() - * @generated */ int NODE_DESCRIPTION = 2; @@ -300,7 +300,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int NODE_DESCRIPTION__COLLAPSIBLE = DIAGRAM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 0; + int NODE_DESCRIPTION__COLLAPSIBLE = DIAGRAM_ELEMENT_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Palette' containment reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeDescription() - * @generated */ int EDGE_DESCRIPTION = 3; @@ -531,7 +531,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int EDGE_DESCRIPTION__BEGIN_LABEL_EXPRESSION = DIAGRAM_ELEMENT_DESCRIPTION_FEATURE_COUNT + 0; + int EDGE_DESCRIPTION__BEGIN_LABEL_EXPRESSION = DIAGRAM_ELEMENT_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Center Label Expression' attribute. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LayoutStrategyDescription * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLayoutStrategyDescription() - * @generated */ int LAYOUT_STRATEGY_DESCRIPTION = 4; @@ -673,9 +673,9 @@ public interface DiagramPackage extends EPackage { * '{@link org.eclipse.sirius.components.view.diagram.impl.ListLayoutStrategyDescriptionImpl List Layout * Strategy Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ListLayoutStrategyDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getListLayoutStrategyDescription() - * @generated */ int LIST_LAYOUT_STRATEGY_DESCRIPTION = 5; @@ -686,7 +686,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int LIST_LAYOUT_STRATEGY_DESCRIPTION__ARE_CHILD_NODES_DRAGGABLE_EXPRESSION = LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT + 0; + int LIST_LAYOUT_STRATEGY_DESCRIPTION__ARE_CHILD_NODES_DRAGGABLE_EXPRESSION = LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Top Gap Expression' attribute. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.FreeFormLayoutStrategyDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getFreeFormLayoutStrategyDescription() - * @generated */ int FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION = 6; @@ -751,7 +751,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT = LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT + 0; + int FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT = LAYOUT_STRATEGY_DESCRIPTION_FEATURE_COUNT; /** * The number of operations of the 'Free Form Layout Strategy Description' class. @@ -760,15 +760,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION_OPERATION_COUNT = LAYOUT_STRATEGY_DESCRIPTION_OPERATION_COUNT + 0; + int FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION_OPERATION_COUNT = LAYOUT_STRATEGY_DESCRIPTION_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.LabelDescriptionImpl Label * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.LabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelDescription() - * @generated */ int LABEL_DESCRIPTION = 7; @@ -819,9 +819,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.InsideLabelDescriptionImpl * Inside Label Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.InsideLabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelDescription() - * @generated */ int INSIDE_LABEL_DESCRIPTION = 8; @@ -857,7 +857,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int INSIDE_LABEL_DESCRIPTION__POSITION = LABEL_DESCRIPTION_FEATURE_COUNT + 0; + int INSIDE_LABEL_DESCRIPTION__POSITION = LABEL_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Style' containment reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.OutsideLabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelDescription() - * @generated */ int OUTSIDE_LABEL_DESCRIPTION = 9; @@ -937,7 +937,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int OUTSIDE_LABEL_DESCRIPTION__POSITION = LABEL_DESCRIPTION_FEATURE_COUNT + 0; + int OUTSIDE_LABEL_DESCRIPTION__POSITION = LABEL_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Style' containment reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.StyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getStyle() - * @generated */ int STYLE = 10; @@ -1013,9 +1013,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.BorderStyle Border Style}' * class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.BorderStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getBorderStyle() - * @generated */ int BORDER_STYLE = 11; @@ -1073,9 +1073,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.NodeLabelStyle Node Label * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeLabelStyle() - * @generated */ int NODE_LABEL_STYLE = 14; @@ -1125,7 +1125,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int NODE_LABEL_STYLE__BORDER_COLOR = ViewPackage.LABEL_STYLE_FEATURE_COUNT + 0; + int NODE_LABEL_STYLE__BORDER_COLOR = ViewPackage.LABEL_STYLE_FEATURE_COUNT; /** * The feature id for the 'Border Radius' attribute. @@ -1209,15 +1209,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int NODE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.LABEL_STYLE_OPERATION_COUNT + 0; + int NODE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.LABEL_STYLE_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.InsideLabelStyleImpl * Inside Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.InsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelStyle() - * @generated */ int INSIDE_LABEL_STYLE = 12; @@ -1342,7 +1342,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int INSIDE_LABEL_STYLE__WITH_HEADER = NODE_LABEL_STYLE_FEATURE_COUNT + 0; + int INSIDE_LABEL_STYLE__WITH_HEADER = NODE_LABEL_STYLE_FEATURE_COUNT; /** * The feature id for the 'Header Separator Display Mode' attribute. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.OutsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelStyle() - * @generated */ int OUTSIDE_LABEL_STYLE = 13; @@ -1503,7 +1503,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int OUTSIDE_LABEL_STYLE_FEATURE_COUNT = NODE_LABEL_STYLE_FEATURE_COUNT + 0; + int OUTSIDE_LABEL_STYLE_FEATURE_COUNT = NODE_LABEL_STYLE_FEATURE_COUNT; /** * The number of operations of the 'Outside Label Style' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeStyleDescription * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeStyleDescription() - * @generated */ int NODE_STYLE_DESCRIPTION = 15; @@ -1531,381 +1531,338 @@ public interface DiagramPackage extends EPackage { * @ordered */ int NODE_STYLE_DESCRIPTION__BORDER_COLOR = BORDER_STYLE__BORDER_COLOR; - /** - * The feature id for the 'Border Radius' attribute. + * The feature id for the 'Border Color' reference. * * @generated * @ordered */ - int NODE_STYLE_DESCRIPTION__BORDER_RADIUS = BORDER_STYLE__BORDER_RADIUS; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; /** - * The feature id for the 'Border Size' attribute. + * The feature id for the 'Border Color' reference. * * @generated * @ordered */ - int NODE_STYLE_DESCRIPTION__BORDER_SIZE = BORDER_STYLE__BORDER_SIZE; - + int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; /** - * The feature id for the 'Border Line Style' attribute. + * The feature id for the 'Border Color' reference. * * @generated * @ordered */ - int NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = BORDER_STYLE__BORDER_LINE_STYLE; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; /** - * The number of structural features of the 'Node Style Description' class. + * The feature id for the 'Border Radius' attribute. * * @generated * @ordered */ - int NODE_STYLE_DESCRIPTION_FEATURE_COUNT = BORDER_STYLE_FEATURE_COUNT + 0; - + int NODE_STYLE_DESCRIPTION__BORDER_RADIUS = BORDER_STYLE__BORDER_RADIUS; /** - * The number of operations of the 'Node Style Description' class. + * The feature id for the 'Border Radius' attribute. * * @generated * @ordered */ - int NODE_STYLE_DESCRIPTION_OPERATION_COUNT = BORDER_STYLE_OPERATION_COUNT + 0; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; /** - * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl - * Conditional Node Style}' class. + * The feature id for the 'Border Radius' attribute. * - * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl - * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalNodeStyle() * @generated + * @ordered */ - int CONDITIONAL_NODE_STYLE = 16; - + int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; /** - * The feature id for the 'Condition' attribute. + * The feature id for the 'Border Radius' attribute. * * @generated * @ordered */ - int CONDITIONAL_NODE_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; /** - * The feature id for the 'Style' containment reference. + * The feature id for the 'Border Size' attribute. * * @generated * @ordered */ - int CONDITIONAL_NODE_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; - + int NODE_STYLE_DESCRIPTION__BORDER_SIZE = BORDER_STYLE__BORDER_SIZE; /** - * The number of structural features of the 'Conditional Node Style' class. + * The feature id for the 'Border Size' attribute. * * @generated * @ordered */ - int CONDITIONAL_NODE_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; /** - * The number of operations of the 'Conditional Node Style' class. + * The feature id for the 'Border Size' attribute. * * @generated * @ordered */ - int CONDITIONAL_NODE_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; - + int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; /** - * The meta object id for the - * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl Conditional Inside - * Label Style}' class. + * The feature id for the 'Border Size' attribute. * - * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl - * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalInsideLabelStyle() * @generated + * @ordered */ - int CONDITIONAL_INSIDE_LABEL_STYLE = 17; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; /** - * The feature id for the 'Condition' attribute. + * The feature id for the 'Border Line Style' attribute. * * @generated * @ordered */ - int CONDITIONAL_INSIDE_LABEL_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; - + int NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = BORDER_STYLE__BORDER_LINE_STYLE; /** - * The feature id for the 'Style' containment reference. * * @generated * @ordered */ - int CONDITIONAL_INSIDE_LABEL_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; /** - * The number of structural features of the 'Conditional Inside Label Style' class. - * + * The feature id for the 'Border Line Style' attribute. * * @generated * @ordered */ - int CONDITIONAL_INSIDE_LABEL_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; - + int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; /** - * The number of operations of the 'Conditional Inside Label Style' class. + * The feature id for the 'Border Line Style' attribute. * * @generated * @ordered */ - int CONDITIONAL_INSIDE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; /** - * The meta object id for the - * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl Conditional Outside - * Label Style}' class. + * The number of structural features of the 'Node Style Description' class. * - * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl - * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalOutsideLabelStyle() * @generated + * @ordered */ - int CONDITIONAL_OUTSIDE_LABEL_STYLE = 18; - + int NODE_STYLE_DESCRIPTION_FEATURE_COUNT = BORDER_STYLE_FEATURE_COUNT; /** - * The feature id for the 'Condition' attribute. + * The feature id for the 'Background' reference. * * @generated * @ordered */ - int CONDITIONAL_OUTSIDE_LABEL_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION__BACKGROUND = NODE_STYLE_DESCRIPTION_FEATURE_COUNT; /** - * The feature id for the 'Style' containment reference. + * The number of structural features of the 'Rectangular Node Style Description' class. * * @generated * @ordered */ - int CONDITIONAL_OUTSIDE_LABEL_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; /** - * The number of structural features of the 'Conditional Outside Label Style' class. + * The feature id for the 'Shape' attribute. * * @generated * @ordered */ - int CONDITIONAL_OUTSIDE_LABEL_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; - + int IMAGE_NODE_STYLE_DESCRIPTION__SHAPE = NODE_STYLE_DESCRIPTION_FEATURE_COUNT; /** - * The number of operations of the 'Conditional Outside Label Style' class. * * @generated * @ordered */ - int CONDITIONAL_OUTSIDE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; - + int IMAGE_NODE_STYLE_DESCRIPTION__POSITION_DEPENDENT_ROTATION = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; /** - * The feature id for the 'Border Color' reference. + * The number of structural features of the 'Image Node Style Description' class. + * * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; - + int IMAGE_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 2; /** - * The feature id for the 'Border Radius' attribute. + * The feature id for the 'Background' reference. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION__BACKGROUND = NODE_STYLE_DESCRIPTION_FEATURE_COUNT; /** - * The feature id for the 'Border Size' attribute. + * The number of structural features of the 'Icon Label Node Style Description' class. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; /** - * The feature id for the 'Border Line Style' attribute. + * The number of operations of the 'Node Style Description' class. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; - + int NODE_STYLE_DESCRIPTION_OPERATION_COUNT = BORDER_STYLE_OPERATION_COUNT; /** - * The feature id for the 'Background' reference. + * The number of operations of the 'Rectangular Node Style Description' class. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION__BACKGROUND = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 0; - + int RECTANGULAR_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT; /** - * The number of structural features of the 'Rectangular Node Style Description' class. + * The number of operations of the 'Image Node Style Description' class. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; - + int IMAGE_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT; /** - * The number of operations of the 'Rectangular Node Style Description' class. * * @generated * @ordered */ - int RECTANGULAR_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT + 0; - + int ICON_LABEL_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT; /** - * The feature id for the 'Border Color' reference. + * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl + * Conditional Node Style}' class. * * @generated - * @ordered + * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl + * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalNodeStyle() */ - int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; - + int CONDITIONAL_NODE_STYLE = 16; /** - * The feature id for the 'Border Radius' attribute. + * The feature id for the 'Condition' attribute. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; - + int CONDITIONAL_NODE_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; /** - * The feature id for the 'Border Size' attribute. + * The feature id for the 'Style' containment reference. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; - + int CONDITIONAL_NODE_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT; /** - * The feature id for the 'Border Line Style' attribute. + * The number of structural features of the 'Conditional Node Style' class. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; - + int CONDITIONAL_NODE_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; /** - * The feature id for the 'Shape' attribute. + * The number of operations of the 'Conditional Node Style' class. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION__SHAPE = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 0; - + int CONDITIONAL_NODE_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; /** - * The feature id for the 'Position Dependent Rotation' attribute. + * The meta object id for the + * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl Conditional Inside + * Label Style}' class. * * @generated - * @ordered + * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl + * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalInsideLabelStyle() */ - int IMAGE_NODE_STYLE_DESCRIPTION__POSITION_DEPENDENT_ROTATION = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; - + int CONDITIONAL_INSIDE_LABEL_STYLE = 17; /** - * The number of structural features of the 'Image Node Style Description' class. - * + * The feature id for the 'Condition' attribute. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 2; - + int CONDITIONAL_INSIDE_LABEL_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; /** - * The number of operations of the 'Image Node Style Description' class. + * The feature id for the 'Style' containment reference. * * @generated * @ordered */ - int IMAGE_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT + 0; - + int CONDITIONAL_INSIDE_LABEL_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT; /** - * The feature id for the 'Border Color' reference. + * The number of structural features of the 'Conditional Inside Label Style' class. + * * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_COLOR = NODE_STYLE_DESCRIPTION__BORDER_COLOR; - + int CONDITIONAL_INSIDE_LABEL_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; /** - * The feature id for the 'Border Radius' attribute. + * The number of operations of the 'Conditional Inside Label Style' class. * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_RADIUS = NODE_STYLE_DESCRIPTION__BORDER_RADIUS; - + int CONDITIONAL_INSIDE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; /** - * The feature id for the 'Border Size' attribute. + * The meta object id for the + * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl Conditional Outside + * Label Style}' class. * * @generated - * @ordered + * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl + * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalOutsideLabelStyle() */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_SIZE = NODE_STYLE_DESCRIPTION__BORDER_SIZE; - + int CONDITIONAL_OUTSIDE_LABEL_STYLE = 18; /** - * The feature id for the 'Border Line Style' attribute. + * The feature id for the 'Condition' attribute. * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE = NODE_STYLE_DESCRIPTION__BORDER_LINE_STYLE; - + int CONDITIONAL_OUTSIDE_LABEL_STYLE__CONDITION = ViewPackage.CONDITIONAL__CONDITION; /** - * The feature id for the 'Background' reference. + * The feature id for the 'Style' containment reference. * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION__BACKGROUND = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 0; - + int CONDITIONAL_OUTSIDE_LABEL_STYLE__STYLE = ViewPackage.CONDITIONAL_FEATURE_COUNT; /** - * The number of structural features of the 'Icon Label Node Style Description' class. * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION_FEATURE_COUNT = NODE_STYLE_DESCRIPTION_FEATURE_COUNT + 1; - + int CONDITIONAL_OUTSIDE_LABEL_STYLE_FEATURE_COUNT = ViewPackage.CONDITIONAL_FEATURE_COUNT + 1; /** - * The number of operations of the 'Icon Label Node Style Description' class. * * @generated * @ordered */ - int ICON_LABEL_NODE_STYLE_DESCRIPTION_OPERATION_COUNT = NODE_STYLE_DESCRIPTION_OPERATION_COUNT + 0; - + int CONDITIONAL_OUTSIDE_LABEL_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; /** * The meta object id for the * '{@link org.eclipse.sirius.components.view.diagram.impl.RectangularNodeStyleDescriptionImpl Rectangular Node * Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.RectangularNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getRectangularNodeStyleDescription() - * @generated */ int RECTANGULAR_NODE_STYLE_DESCRIPTION = 19; @@ -1913,9 +1870,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.ImageNodeStyleDescriptionImpl * Image Node Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ImageNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getImageNodeStyleDescription() - * @generated */ int IMAGE_NODE_STYLE_DESCRIPTION = 20; @@ -1924,9 +1881,9 @@ public interface DiagramPackage extends EPackage { * '{@link org.eclipse.sirius.components.view.diagram.impl.IconLabelNodeStyleDescriptionImpl Icon Label Node * Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.IconLabelNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getIconLabelNodeStyleDescription() - * @generated */ int ICON_LABEL_NODE_STYLE_DESCRIPTION = 21; @@ -1934,9 +1891,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeStyleImpl Edge * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeStyle() - * @generated */ int EDGE_STYLE = 22; @@ -1954,7 +1911,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int EDGE_STYLE__FONT_SIZE = STYLE_FEATURE_COUNT + 0; + int EDGE_STYLE__FONT_SIZE = STYLE_FEATURE_COUNT; /** * The feature id for the 'Italic' attribute. @@ -2103,15 +2060,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int EDGE_STYLE_OPERATION_COUNT = STYLE_OPERATION_COUNT + 0; + int EDGE_STYLE_OPERATION_COUNT = STYLE_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalEdgeStyleImpl * Conditional Edge Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalEdgeStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalEdgeStyle() - * @generated */ int CONDITIONAL_EDGE_STYLE = 23; @@ -2129,7 +2086,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_EDGE_STYLE__COLOR = ViewPackage.CONDITIONAL_FEATURE_COUNT + 0; + int CONDITIONAL_EDGE_STYLE__COLOR = ViewPackage.CONDITIONAL_FEATURE_COUNT; /** * The feature id for the 'Font Size' attribute. @@ -2287,15 +2244,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int CONDITIONAL_EDGE_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT + 0; + int CONDITIONAL_EDGE_STYLE_OPERATION_COUNT = ViewPackage.CONDITIONAL_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramPaletteImpl * Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramPalette() - * @generated */ int DIAGRAM_PALETTE = 24; @@ -2364,9 +2321,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodePaletteImpl Node * Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodePaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodePalette() - * @generated */ int NODE_PALETTE = 25; @@ -2454,9 +2411,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgePaletteImpl Edge * Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgePaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgePalette() - * @generated */ int EDGE_PALETTE = 26; @@ -2553,9 +2510,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.ToolImpl Tool}' * class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getTool() - * @generated */ int TOOL = 27; @@ -2605,9 +2562,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.DeleteToolImpl Delete * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DeleteToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDeleteTool() - * @generated */ int DELETE_TOOL = 28; @@ -2644,7 +2601,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DELETE_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 0; + int DELETE_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT; /** * The number of operations of the 'Delete Tool' class. @@ -2652,15 +2609,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DELETE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; + int DELETE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.DropToolImpl Drop * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DropToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDropTool() - * @generated */ int DROP_TOOL = 29; @@ -2697,7 +2654,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DROP_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 0; + int DROP_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT; /** * The number of operations of the 'Drop Tool' class. @@ -2705,15 +2662,15 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DROP_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; + int DROP_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeToolImpl Edge * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeTool() - * @generated */ int EDGE_TOOL = 30; @@ -2750,7 +2707,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int EDGE_TOOL__TARGET_ELEMENT_DESCRIPTIONS = TOOL_FEATURE_COUNT + 0; + int EDGE_TOOL__TARGET_ELEMENT_DESCRIPTIONS = TOOL_FEATURE_COUNT; /** * The feature id for the 'Icon UR Ls Expression' attribute. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeReconnectionTool() - * @generated */ int EDGE_RECONNECTION_TOOL = 31; @@ -2813,70 +2770,60 @@ public interface DiagramPackage extends EPackage { * @ordered */ int EDGE_RECONNECTION_TOOL__NAME = TOOL__NAME; - /** - * The feature id for the 'Precondition Expression' attribute. + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; - + int SOURCE_EDGE_END_RECONNECTION_TOOL__NAME = EDGE_RECONNECTION_TOOL__NAME; /** - * The feature id for the 'Body' containment reference list. + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int EDGE_RECONNECTION_TOOL__BODY = TOOL__BODY; - + int TARGET_EDGE_END_RECONNECTION_TOOL__NAME = EDGE_RECONNECTION_TOOL__NAME; /** - * The number of structural features of the 'Edge Reconnection Tool' class. * * @generated * @ordered */ - int EDGE_RECONNECTION_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 0; - + int EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; /** - * The number of operations of the 'Edge Reconnection Tool' class. * * @generated * @ordered */ - int EDGE_RECONNECTION_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; - + int SOURCE_EDGE_END_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION; /** - * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl Label - * Edit Tool}' class. + * The feature id for the 'Precondition Expression' attribute. * - * @see org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl - * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelEditTool() * @generated + * @ordered */ - int LABEL_EDIT_TOOL = 32; - + int TARGET_EDGE_END_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION; /** - * The feature id for the 'Name' attribute. + * The feature id for the 'Body' containment reference list. * * @generated * @ordered */ - int LABEL_EDIT_TOOL__NAME = TOOL__NAME; - + int EDGE_RECONNECTION_TOOL__BODY = TOOL__BODY; /** - * The feature id for the 'Precondition Expression' attribute. * * @generated * @ordered */ - int LABEL_EDIT_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; - + int SOURCE_EDGE_END_RECONNECTION_TOOL__BODY = EDGE_RECONNECTION_TOOL__BODY; /** * The feature id for the 'Body' containment reference list. @@ -2884,203 +2831,190 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int LABEL_EDIT_TOOL__BODY = TOOL__BODY; - + int TARGET_EDGE_END_RECONNECTION_TOOL__BODY = EDGE_RECONNECTION_TOOL__BODY; /** - * The feature id for the 'Initial Direct Edit Label Expression' attribute. - * + * The number of structural features of the 'Edge Reconnection Tool' class. * * @generated * @ordered */ - int LABEL_EDIT_TOOL__INITIAL_DIRECT_EDIT_LABEL_EXPRESSION = TOOL_FEATURE_COUNT + 0; - + int EDGE_RECONNECTION_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT; /** - * The number of structural features of the 'Label Edit Tool' class. + * The number of structural features of the 'Source Edge End Reconnection Tool' class. * * @generated * @ordered */ - int LABEL_EDIT_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 1; - + int SOURCE_EDGE_END_RECONNECTION_TOOL_FEATURE_COUNT = EDGE_RECONNECTION_TOOL_FEATURE_COUNT; /** - * The number of operations of the 'Label Edit Tool' class. + * The number of structural features of the 'Target Edge End Reconnection Tool' class. * * @generated * @ordered */ - int LABEL_EDIT_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; - + int TARGET_EDGE_END_RECONNECTION_TOOL_FEATURE_COUNT = EDGE_RECONNECTION_TOOL_FEATURE_COUNT; /** - * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl Node - * Tool}' class. + * The number of operations of the 'Edge Reconnection Tool' class. * - * @see org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl - * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeTool() * @generated + * @ordered */ - int NODE_TOOL = 33; - + int EDGE_RECONNECTION_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** - * The feature id for the 'Name' attribute. + * The number of operations of the 'Source Edge End Reconnection Tool' class. * * @generated * @ordered */ - int NODE_TOOL__NAME = TOOL__NAME; - + int SOURCE_EDGE_END_RECONNECTION_TOOL_OPERATION_COUNT = EDGE_RECONNECTION_TOOL_OPERATION_COUNT; /** - * The feature id for the 'Precondition Expression' attribute. * * @generated * @ordered */ - int NODE_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; - + int TARGET_EDGE_END_RECONNECTION_TOOL_OPERATION_COUNT = EDGE_RECONNECTION_TOOL_OPERATION_COUNT; /** - * The feature id for the 'Body' containment reference list. + * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl Label + * Edit Tool}' class. + * + * @generated + * @see org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl + * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelEditTool() + */ + int LABEL_EDIT_TOOL = 32; + /** + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int NODE_TOOL__BODY = TOOL__BODY; - - int NODE_TOOL__DIALOG_DESCRIPTION = TOOL_FEATURE_COUNT; - + int LABEL_EDIT_TOOL__NAME = TOOL__NAME; /** - * The feature id for the 'Icon UR Ls Expression' attribute. * * @generated * @ordered */ - int NODE_TOOL__ICON_UR_LS_EXPRESSION = TOOL_FEATURE_COUNT + 1; - + int LABEL_EDIT_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; /** - * The feature id for the 'Elements To Select Expression' attribute. * * @generated * @ordered */ - int NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION = TOOL_FEATURE_COUNT + 2; - + int LABEL_EDIT_TOOL__BODY = TOOL__BODY; /** - * The number of structural features of the 'Node Tool' class. + * The feature id for the 'Initial Direct Edit Label Expression' attribute. + * * * @generated * @ordered */ - int NODE_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 3; - + int LABEL_EDIT_TOOL__INITIAL_DIRECT_EDIT_LABEL_EXPRESSION = TOOL_FEATURE_COUNT; /** - * The number of operations of the 'Node Tool' class. + * The number of structural features of the 'Label Edit Tool' class. * * @generated * @ordered */ - int NODE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; - + int LABEL_EDIT_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 1; /** - * The feature id for the 'Name' attribute. + * The number of operations of the 'Label Edit Tool' class. * * @generated * @ordered */ - int SOURCE_EDGE_END_RECONNECTION_TOOL__NAME = EDGE_RECONNECTION_TOOL__NAME; - + int LABEL_EDIT_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** - * The feature id for the 'Precondition Expression' attribute. + * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl Node + * Tool}' class. * * @generated - * @ordered + * @see org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl + * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeTool() */ - int SOURCE_EDGE_END_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION; - + int NODE_TOOL = 33; /** - * The feature id for the 'Body' containment reference list. + * The feature id for the 'Name' attribute. * * @generated * @ordered */ - int SOURCE_EDGE_END_RECONNECTION_TOOL__BODY = EDGE_RECONNECTION_TOOL__BODY; - + int NODE_TOOL__NAME = TOOL__NAME; /** - * The number of structural features of the 'Source Edge End Reconnection Tool' class. + * The feature id for the 'Precondition Expression' attribute. * * @generated * @ordered */ - int SOURCE_EDGE_END_RECONNECTION_TOOL_FEATURE_COUNT = EDGE_RECONNECTION_TOOL_FEATURE_COUNT + 0; - + int NODE_TOOL__PRECONDITION_EXPRESSION = TOOL__PRECONDITION_EXPRESSION; /** - * The number of operations of the 'Source Edge End Reconnection Tool' class. * * @generated * @ordered */ - int SOURCE_EDGE_END_RECONNECTION_TOOL_OPERATION_COUNT = EDGE_RECONNECTION_TOOL_OPERATION_COUNT + 0; - + int NODE_TOOL__BODY = TOOL__BODY; + int NODE_TOOL__DIALOG_DESCRIPTION = TOOL_FEATURE_COUNT; /** - * The feature id for the 'Name' attribute. + * The feature id for the 'Icon UR Ls Expression' attribute. * * @generated * @ordered */ - int TARGET_EDGE_END_RECONNECTION_TOOL__NAME = EDGE_RECONNECTION_TOOL__NAME; - + int NODE_TOOL__ICON_UR_LS_EXPRESSION = TOOL_FEATURE_COUNT + 1; /** - * The feature id for the 'Precondition Expression' attribute. * * @generated * @ordered */ - int TARGET_EDGE_END_RECONNECTION_TOOL__PRECONDITION_EXPRESSION = EDGE_RECONNECTION_TOOL__PRECONDITION_EXPRESSION; - + int NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION = TOOL_FEATURE_COUNT + 2; /** - * The feature id for the 'Body' containment reference list. * * @generated * @ordered */ - int TARGET_EDGE_END_RECONNECTION_TOOL__BODY = EDGE_RECONNECTION_TOOL__BODY; - + int NODE_TOOL__WITH_IMPACT_ANALYSIS = TOOL_FEATURE_COUNT + 3; /** - * The number of structural features of the 'Target Edge End Reconnection Tool' class. + * The number of structural features of the 'Node Tool' class. * * @generated * @ordered */ - int TARGET_EDGE_END_RECONNECTION_TOOL_FEATURE_COUNT = EDGE_RECONNECTION_TOOL_FEATURE_COUNT + 0; - + int NODE_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 4; /** - * The number of operations of the 'Target Edge End Reconnection Tool' class. + * The number of operations of the 'Node Tool' class. * * @generated * @ordered */ - int TARGET_EDGE_END_RECONNECTION_TOOL_OPERATION_COUNT = EDGE_RECONNECTION_TOOL_OPERATION_COUNT + 0; - + int NODE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** * The meta object id for the * '{@link org.eclipse.sirius.components.view.diagram.impl.SourceEdgeEndReconnectionToolImpl Source Edge End * Reconnection Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SourceEdgeEndReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSourceEdgeEndReconnectionTool() - * @generated */ int SOURCE_EDGE_END_RECONNECTION_TOOL = 34; @@ -3089,9 +3023,9 @@ public interface DiagramPackage extends EPackage { * '{@link org.eclipse.sirius.components.view.diagram.impl.TargetEdgeEndReconnectionToolImpl Target Edge End * Reconnection Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.TargetEdgeEndReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getTargetEdgeEndReconnectionTool() - * @generated */ int TARGET_EDGE_END_RECONNECTION_TOOL = 35; @@ -3099,9 +3033,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.CreateViewImpl Create * View}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.CreateViewImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getCreateView() - * @generated */ int CREATE_VIEW = 36; @@ -3121,7 +3055,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int CREATE_VIEW__PARENT_VIEW_EXPRESSION = ViewPackage.OPERATION_FEATURE_COUNT + 0; + int CREATE_VIEW__PARENT_VIEW_EXPRESSION = ViewPackage.OPERATION_FEATURE_COUNT; /** * The feature id for the 'Element Description' reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DeleteViewImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDeleteView() - * @generated */ int DELETE_VIEW = 37; @@ -3200,7 +3134,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DELETE_VIEW__VIEW_EXPRESSION = ViewPackage.OPERATION_FEATURE_COUNT + 0; + int DELETE_VIEW__VIEW_EXPRESSION = ViewPackage.OPERATION_FEATURE_COUNT; /** * The number of structural features of the 'Delete View' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DialogDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDialogDescription() - * @generated */ int DIALOG_DESCRIPTION = 44; @@ -3251,9 +3185,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.SelectionDialogDescriptionImpl * Selection Dialog Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SelectionDialogDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSelectionDialogDescription() - * @generated */ int SELECTION_DIALOG_DESCRIPTION = 38; @@ -3264,7 +3198,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int SELECTION_DIALOG_DESCRIPTION__SELECTION_MESSAGE = DIALOG_DESCRIPTION_FEATURE_COUNT + 0; + int SELECTION_DIALOG_DESCRIPTION__SELECTION_MESSAGE = DIALOG_DESCRIPTION_FEATURE_COUNT; /** * The feature id for the 'Selection Dialog Tree Description' containment reference. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getToolSection() - * @generated */ int TOOL_SECTION = 39; @@ -3340,9 +3274,9 @@ public interface DiagramPackage extends EPackage { * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramToolSectionImpl * Tool Section}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramToolSection() - * @generated */ int DIAGRAM_TOOL_SECTION = 40; @@ -3361,7 +3295,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DIAGRAM_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT + 0; + int DIAGRAM_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT; /** * The number of structural features of the 'Tool Section' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodeToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeToolSection() - * @generated */ int NODE_TOOL_SECTION = 41; @@ -3405,7 +3339,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int NODE_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT + 0; + int NODE_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT; /** * The feature id for the 'Edge Tools' containment reference list. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeToolSection() - * @generated */ int EDGE_TOOL_SECTION = 42; @@ -3458,7 +3392,7 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int EDGE_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT + 0; + int EDGE_TOOL_SECTION__NODE_TOOLS = TOOL_SECTION_FEATURE_COUNT; /** * The number of structural features of the 'Edge Tool Section' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DropNodeToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDropNodeTool() - * @generated */ int DROP_NODE_TOOL = 43; @@ -3520,8 +3454,13 @@ public interface DiagramPackage extends EPackage { * @generated * @ordered */ - int DROP_NODE_TOOL__ACCEPTED_NODE_TYPES = TOOL_FEATURE_COUNT + 0; - + int DROP_NODE_TOOL__ACCEPTED_NODE_TYPES = TOOL_FEATURE_COUNT; + /** + * The singleton instance of the package. + * + * @generated + */ + DiagramPackage eINSTANCE = org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl.init(); /** * The number of structural features of the 'Drop Node Tool' class. @@ -3530,26 +3469,23 @@ public interface DiagramPackage extends EPackage { * @ordered */ int DROP_NODE_TOOL_FEATURE_COUNT = TOOL_FEATURE_COUNT + 1; - /** * The number of operations of the 'Drop Node Tool' class. * * @generated * @ordered */ - int DROP_NODE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT + 0; - + int DROP_NODE_TOOL_OPERATION_COUNT = TOOL_OPERATION_COUNT; /** * The meta object id for the * '{@link org.eclipse.sirius.components.view.diagram.impl.SelectionDialogTreeDescriptionImpl Selection Dialog * Tree Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SelectionDialogTreeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSelectionDialogTreeDescription() - * @generated */ int SELECTION_DIALOG_TREE_DESCRIPTION = 45; - /** * The feature id for the 'Elements Expression' attribute. @@ -3558,7 +3494,6 @@ public interface DiagramPackage extends EPackage { * @ordered */ int SELECTION_DIALOG_TREE_DESCRIPTION__ELEMENTS_EXPRESSION = 0; - /** * The feature id for the 'Children Expression' attribute. @@ -3567,7 +3502,6 @@ public interface DiagramPackage extends EPackage { * @ordered */ int SELECTION_DIALOG_TREE_DESCRIPTION__CHILDREN_EXPRESSION = 1; - /** * The feature id for the 'Is Selectable Expression' attribute. @@ -3576,7 +3510,6 @@ public interface DiagramPackage extends EPackage { * @ordered */ int SELECTION_DIALOG_TREE_DESCRIPTION__IS_SELECTABLE_EXPRESSION = 2; - /** * The number of structural features of the 'Selection Dialog Tree Description' class. @@ -3585,7 +3518,6 @@ public interface DiagramPackage extends EPackage { * @ordered */ int SELECTION_DIALOG_TREE_DESCRIPTION_FEATURE_COUNT = 3; - /** * The number of operations of the 'Selection Dialog Tree Description' class. @@ -3594,141 +3526,122 @@ public interface DiagramPackage extends EPackage { * @ordered */ int SELECTION_DIALOG_TREE_DESCRIPTION_OPERATION_COUNT = 0; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.ArrowStyle Arrow Style}' * enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.ArrowStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getArrowStyle() - * @generated */ int ARROW_STYLE = 46; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.LayoutDirection Layout * Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LayoutDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLayoutDirection() - * @generated */ int LAYOUT_DIRECTION = 47; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.LineStyle Line Style}' * enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LineStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLineStyle() - * @generated */ int LINE_STYLE = 48; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.NodeContainmentKind Node * Containment Kind}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeContainmentKind * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeContainmentKind() - * @generated */ int NODE_CONTAINMENT_KIND = 49; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.SynchronizationPolicy * Synchronization Policy}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.SynchronizationPolicy * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSynchronizationPolicy() - * @generated */ int SYNCHRONIZATION_POLICY = 50; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.InsideLabelPosition Inside * Label Position}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.InsideLabelPosition * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelPosition() - * @generated */ int INSIDE_LABEL_POSITION = 51; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.OutsideLabelPosition Outside * Label Position}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.OutsideLabelPosition * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelPosition() - * @generated */ int OUTSIDE_LABEL_POSITION = 52; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy Label * Overflow Strategy}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelOverflowStrategy() - * @generated */ int LABEL_OVERFLOW_STRATEGY = 53; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection Arrange * Layout Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getArrangeLayoutDirection() - * @generated */ int ARRANGE_LAYOUT_DIRECTION = 54; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.LabelTextAlign Label Text * Align}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelTextAlign * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelTextAlign() - * @generated */ int LABEL_TEXT_ALIGN = 55; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.UserResizableDirection User * Resizable Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.UserResizableDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getUserResizableDirection() - * @generated */ int USER_RESIZABLE_DIRECTION = 56; - /** * The meta object id for the '{@link org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode * Header Separator Display Mode}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getHeaderSeparatorDisplayMode() - * @generated */ int HEADER_SEPARATOR_DISPLAY_MODE = 57; - /** - * The singleton instance of the package. - * - * @generated - */ - DiagramPackage eINSTANCE = org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl.init(); - /** * Returns the meta object for class '{@link org.eclipse.sirius.components.view.diagram.DiagramDescription * Description}'. * * @return the meta object for class 'Description'. - * @see org.eclipse.sirius.components.view.diagram.DiagramDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramDescription */ EClass getDiagramDescription(); @@ -3762,9 +3675,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the containment reference list 'Node Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramDescription#getNodeDescriptions() * @see #getDiagramDescription() - * @generated */ EReference getDiagramDescription_NodeDescriptions(); @@ -3774,9 +3687,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the containment reference list 'Edge Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramDescription#getEdgeDescriptions() * @see #getDiagramDescription() - * @generated */ EReference getDiagramDescription_EdgeDescriptions(); @@ -3786,9 +3699,9 @@ public interface DiagramPackage extends EPackage { * Layout Direction}'. * * @return the meta object for the attribute 'Arrange Layout Direction'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramDescription#getArrangeLayoutDirection() * @see #getDiagramDescription() - * @generated */ EAttribute getDiagramDescription_ArrangeLayoutDirection(); @@ -3797,8 +3710,8 @@ public interface DiagramPackage extends EPackage { * Element Description}'. * * @return the meta object for class 'Element Description'. - * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription */ EClass getDiagramElementDescription(); @@ -3820,9 +3733,9 @@ public interface DiagramPackage extends EPackage { * Type}'. * * @return the meta object for the attribute 'Domain Type'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription#getDomainType() * @see #getDiagramElementDescription() - * @generated */ EAttribute getDiagramElementDescription_DomainType(); @@ -3832,9 +3745,9 @@ public interface DiagramPackage extends EPackage { * Semantic Candidates Expression}'. * * @return the meta object for the attribute 'Semantic Candidates Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription#getSemanticCandidatesExpression() * @see #getDiagramElementDescription() - * @generated */ EAttribute getDiagramElementDescription_SemanticCandidatesExpression(); @@ -3844,9 +3757,9 @@ public interface DiagramPackage extends EPackage { * Precondition Expression}'. * * @return the meta object for the attribute 'Precondition Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription#getPreconditionExpression() * @see #getDiagramElementDescription() - * @generated */ EAttribute getDiagramElementDescription_PreconditionExpression(); @@ -3856,9 +3769,9 @@ public interface DiagramPackage extends EPackage { * Synchronization Policy}'. * * @return the meta object for the attribute 'Synchronization Policy'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DiagramElementDescription#getSynchronizationPolicy() * @see #getDiagramElementDescription() - * @generated */ EAttribute getDiagramElementDescription_SynchronizationPolicy(); @@ -3867,8 +3780,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Node Description'. - * @see org.eclipse.sirius.components.view.diagram.NodeDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeDescription */ EClass getNodeDescription(); @@ -3902,9 +3815,9 @@ public interface DiagramPackage extends EPackage { * Strategy}'. * * @return the meta object for the containment reference 'Children Layout Strategy'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getChildrenLayoutStrategy() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_ChildrenLayoutStrategy(); @@ -3914,9 +3827,9 @@ public interface DiagramPackage extends EPackage { * --> * * @return the meta object for the containment reference 'Style'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getStyle() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_Style(); @@ -3926,9 +3839,9 @@ public interface DiagramPackage extends EPackage { * Styles}'. * * @return the meta object for the containment reference list 'Conditional Styles'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getConditionalStyles() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_ConditionalStyles(); @@ -3938,9 +3851,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the containment reference list 'Children Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getChildrenDescriptions() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_ChildrenDescriptions(); @@ -3950,9 +3863,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the containment reference list 'Border Nodes Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getBorderNodesDescriptions() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_BorderNodesDescriptions(); @@ -3962,9 +3875,9 @@ public interface DiagramPackage extends EPackage { * Child Node Descriptions}'. * * @return the meta object for the reference list 'Reused Child Node Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getReusedChildNodeDescriptions() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_ReusedChildNodeDescriptions(); @@ -3974,9 +3887,9 @@ public interface DiagramPackage extends EPackage { * Border Node Descriptions}'. * * @return the meta object for the reference list 'Reused Border Node Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getReusedBorderNodeDescriptions() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_ReusedBorderNodeDescriptions(); @@ -3986,9 +3899,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'User Resizable'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getUserResizable() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_UserResizable(); @@ -3998,9 +3911,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Default Width Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getDefaultWidthExpression() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_DefaultWidthExpression(); @@ -4010,9 +3923,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Default Height Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getDefaultHeightExpression() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_DefaultHeightExpression(); @@ -4022,9 +3935,9 @@ public interface DiagramPackage extends EPackage { * Ratio}'. * * @return the meta object for the attribute 'Keep Aspect Ratio'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#isKeepAspectRatio() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_KeepAspectRatio(); @@ -4034,9 +3947,9 @@ public interface DiagramPackage extends EPackage { * Collapsed By Default Expression}'. * * @return the meta object for the attribute 'Is Collapsed By Default Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getIsCollapsedByDefaultExpression() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_IsCollapsedByDefaultExpression(); @@ -4058,9 +3971,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the containment reference list 'Outside Labels'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getOutsideLabels() * @see #getNodeDescription() - * @generated */ EReference getNodeDescription_OutsideLabels(); @@ -4070,9 +3983,9 @@ public interface DiagramPackage extends EPackage { * By Default Expression}'. * * @return the meta object for the attribute 'Is Hidden By Default Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getIsHiddenByDefaultExpression() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_IsHiddenByDefaultExpression(); @@ -4082,9 +3995,9 @@ public interface DiagramPackage extends EPackage { * Default Expression}'. * * @return the meta object for the attribute 'Is Faded By Default Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeDescription#getIsFadedByDefaultExpression() * @see #getNodeDescription() - * @generated */ EAttribute getNodeDescription_IsFadedByDefaultExpression(); @@ -4093,8 +4006,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Edge Description'. - * @see org.eclipse.sirius.components.view.diagram.EdgeDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgeDescription */ EClass getEdgeDescription(); @@ -4104,9 +4017,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Begin Label Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getBeginLabelExpression() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_BeginLabelExpression(); @@ -4116,9 +4029,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Center Label Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getCenterLabelExpression() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_CenterLabelExpression(); @@ -4128,9 +4041,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'End Label Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getEndLabelExpression() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_EndLabelExpression(); @@ -4140,9 +4053,9 @@ public interface DiagramPackage extends EPackage { * Edge}'. * * @return the meta object for the attribute 'Is Domain Based Edge'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#isIsDomainBasedEdge() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_IsDomainBasedEdge(); @@ -4164,9 +4077,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the reference list 'Source Node Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getSourceNodeDescriptions() * @see #getEdgeDescription() - * @generated */ EReference getEdgeDescription_SourceNodeDescriptions(); @@ -4176,9 +4089,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the reference list 'Target Node Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getTargetNodeDescriptions() * @see #getEdgeDescription() - * @generated */ EReference getEdgeDescription_TargetNodeDescriptions(); @@ -4188,9 +4101,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Source Nodes Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getSourceNodesExpression() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_SourceNodesExpression(); @@ -4200,9 +4113,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Target Nodes Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getTargetNodesExpression() * @see #getEdgeDescription() - * @generated */ EAttribute getEdgeDescription_TargetNodesExpression(); @@ -4212,9 +4125,9 @@ public interface DiagramPackage extends EPackage { * --> * * @return the meta object for the containment reference 'Style'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getStyle() * @see #getEdgeDescription() - * @generated */ EReference getEdgeDescription_Style(); @@ -4224,9 +4137,9 @@ public interface DiagramPackage extends EPackage { * Styles}'. * * @return the meta object for the containment reference list 'Conditional Styles'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeDescription#getConditionalStyles() * @see #getEdgeDescription() - * @generated */ EReference getEdgeDescription_ConditionalStyles(); @@ -4235,8 +4148,8 @@ public interface DiagramPackage extends EPackage { * Layout Strategy Description}'. * * @return the meta object for class 'Layout Strategy Description'. - * @see org.eclipse.sirius.components.view.diagram.LayoutStrategyDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.LayoutStrategyDescription */ EClass getLayoutStrategyDescription(); @@ -4246,8 +4159,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'List Layout Strategy Description'. - * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription */ EClass getListLayoutStrategyDescription(); @@ -4257,9 +4170,9 @@ public interface DiagramPackage extends EPackage { * Are Child Nodes Draggable Expression}'. * * @return the meta object for the attribute 'Are Child Nodes Draggable Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription#getAreChildNodesDraggableExpression() * @see #getListLayoutStrategyDescription() - * @generated */ EAttribute getListLayoutStrategyDescription_AreChildNodesDraggableExpression(); @@ -4269,9 +4182,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Top Gap Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription#getTopGapExpression() * @see #getListLayoutStrategyDescription() - * @generated */ EAttribute getListLayoutStrategyDescription_TopGapExpression(); @@ -4281,9 +4194,9 @@ public interface DiagramPackage extends EPackage { * Bottom Gap Expression}'. * * @return the meta object for the attribute 'Bottom Gap Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription#getBottomGapExpression() * @see #getListLayoutStrategyDescription() - * @generated */ EAttribute getListLayoutStrategyDescription_BottomGapExpression(); @@ -4293,9 +4206,9 @@ public interface DiagramPackage extends EPackage { * Nodes}'. * * @return the meta object for the reference list 'Growable Nodes'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ListLayoutStrategyDescription#getGrowableNodes() * @see #getListLayoutStrategyDescription() - * @generated */ EReference getListLayoutStrategyDescription_GrowableNodes(); @@ -4305,8 +4218,8 @@ public interface DiagramPackage extends EPackage { * Strategy Description}'. * * @return the meta object for class 'Free Form Layout Strategy Description'. - * @see org.eclipse.sirius.components.view.diagram.FreeFormLayoutStrategyDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.FreeFormLayoutStrategyDescription */ EClass getFreeFormLayoutStrategyDescription(); @@ -4315,8 +4228,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Label Description'. - * @see org.eclipse.sirius.components.view.diagram.LabelDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.LabelDescription */ EClass getLabelDescription(); @@ -4326,9 +4239,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Label Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelDescription#getLabelExpression() * @see #getLabelDescription() - * @generated */ EAttribute getLabelDescription_LabelExpression(); @@ -4338,9 +4251,9 @@ public interface DiagramPackage extends EPackage { * Strategy}'. * * @return the meta object for the attribute 'Overflow Strategy'. + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelDescription#getOverflowStrategy() * @see #getLabelDescription() - * @generated */ EAttribute getLabelDescription_OverflowStrategy(); @@ -4361,8 +4274,8 @@ public interface DiagramPackage extends EPackage { * Inside Label Description}'. * * @return the meta object for class 'Inside Label Description'. - * @see org.eclipse.sirius.components.view.diagram.InsideLabelDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.InsideLabelDescription */ EClass getInsideLabelDescription(); @@ -4396,9 +4309,9 @@ public interface DiagramPackage extends EPackage { * Styles}'. * * @return the meta object for the containment reference list 'Conditional Styles'. + * @generated * @see org.eclipse.sirius.components.view.diagram.InsideLabelDescription#getConditionalStyles() * @see #getInsideLabelDescription() - * @generated */ EReference getInsideLabelDescription_ConditionalStyles(); @@ -4407,8 +4320,8 @@ public interface DiagramPackage extends EPackage { * Outside Label Description}'. * * @return the meta object for class 'Outside Label Description'. - * @see org.eclipse.sirius.components.view.diagram.OutsideLabelDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.OutsideLabelDescription */ EClass getOutsideLabelDescription(); @@ -4442,9 +4355,9 @@ public interface DiagramPackage extends EPackage { * Styles}'. * * @return the meta object for the containment reference list 'Conditional Styles'. + * @generated * @see org.eclipse.sirius.components.view.diagram.OutsideLabelDescription#getConditionalStyles() * @see #getOutsideLabelDescription() - * @generated */ EReference getOutsideLabelDescription_ConditionalStyles(); @@ -4463,9 +4376,9 @@ public interface DiagramPackage extends EPackage { * Color}'. * * @return the meta object for the reference 'Color'. + * @generated * @see org.eclipse.sirius.components.view.diagram.Style#getColor() * @see #getStyle() - * @generated */ EReference getStyle_Color(); @@ -4474,8 +4387,8 @@ public interface DiagramPackage extends EPackage { * Style}'. * * @return the meta object for class 'Border Style'. - * @see org.eclipse.sirius.components.view.diagram.BorderStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.BorderStyle */ EClass getBorderStyle(); @@ -4521,9 +4434,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'Border Line Style'. + * @generated * @see org.eclipse.sirius.components.view.diagram.BorderStyle#getBorderLineStyle() * @see #getBorderStyle() - * @generated */ EAttribute getBorderStyle_BorderLineStyle(); @@ -4532,8 +4445,8 @@ public interface DiagramPackage extends EPackage { * Label Style}'. * * @return the meta object for class 'Inside Label Style'. - * @see org.eclipse.sirius.components.view.diagram.InsideLabelStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.InsideLabelStyle */ EClass getInsideLabelStyle(); @@ -4555,9 +4468,9 @@ public interface DiagramPackage extends EPackage { * Separator Display Mode}'. * * @return the meta object for the attribute 'Header Separator Display Mode'. + * @generated * @see org.eclipse.sirius.components.view.diagram.InsideLabelStyle#getHeaderSeparatorDisplayMode() * @see #getInsideLabelStyle() - * @generated */ EAttribute getInsideLabelStyle_HeaderSeparatorDisplayMode(); @@ -4566,8 +4479,8 @@ public interface DiagramPackage extends EPackage { * Outside Label Style}'. * * @return the meta object for class 'Outside Label Style'. - * @see org.eclipse.sirius.components.view.diagram.OutsideLabelStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.OutsideLabelStyle */ EClass getOutsideLabelStyle(); @@ -4576,8 +4489,8 @@ public interface DiagramPackage extends EPackage { * Label Style}'. * * @return the meta object for class 'Node Label Style'. - * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle */ EClass getNodeLabelStyle(); @@ -4611,9 +4524,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Show Icon Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle#getShowIconExpression() * @see #getNodeLabelStyle() - * @generated */ EAttribute getNodeLabelStyle_ShowIconExpression(); @@ -4635,9 +4548,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Max Width Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle#getMaxWidthExpression() * @see #getNodeLabelStyle() - * @generated */ EAttribute getNodeLabelStyle_MaxWidthExpression(); @@ -4646,8 +4559,8 @@ public interface DiagramPackage extends EPackage { * Node Style Description}'. * * @return the meta object for class 'Node Style Description'. - * @see org.eclipse.sirius.components.view.diagram.NodeStyleDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeStyleDescription */ EClass getNodeStyleDescription(); @@ -4656,8 +4569,8 @@ public interface DiagramPackage extends EPackage { * Conditional Node Style}'. * * @return the meta object for class 'Conditional Node Style'. - * @see org.eclipse.sirius.components.view.diagram.ConditionalNodeStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.ConditionalNodeStyle */ EClass getConditionalNodeStyle(); @@ -4678,8 +4591,8 @@ public interface DiagramPackage extends EPackage { * Conditional Inside Label Style}'. * * @return the meta object for class 'Conditional Inside Label Style'. - * @see org.eclipse.sirius.components.view.diagram.ConditionalInsideLabelStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.ConditionalInsideLabelStyle */ EClass getConditionalInsideLabelStyle(); @@ -4700,8 +4613,8 @@ public interface DiagramPackage extends EPackage { * Conditional Outside Label Style}'. * * @return the meta object for class 'Conditional Outside Label Style'. - * @see org.eclipse.sirius.components.view.diagram.ConditionalOutsideLabelStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.ConditionalOutsideLabelStyle */ EClass getConditionalOutsideLabelStyle(); @@ -4723,8 +4636,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Rectangular Node Style Description'. - * @see org.eclipse.sirius.components.view.diagram.RectangularNodeStyleDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.RectangularNodeStyleDescription */ EClass getRectangularNodeStyleDescription(); @@ -4734,9 +4647,9 @@ public interface DiagramPackage extends EPackage { * Background}'. * * @return the meta object for the reference 'Background'. + * @generated * @see org.eclipse.sirius.components.view.diagram.RectangularNodeStyleDescription#getBackground() * @see #getRectangularNodeStyleDescription() - * @generated */ EReference getRectangularNodeStyleDescription_Background(); @@ -4745,8 +4658,8 @@ public interface DiagramPackage extends EPackage { * Image Node Style Description}'. * * @return the meta object for class 'Image Node Style Description'. - * @see org.eclipse.sirius.components.view.diagram.ImageNodeStyleDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.ImageNodeStyleDescription */ EClass getImageNodeStyleDescription(); @@ -4768,9 +4681,9 @@ public interface DiagramPackage extends EPackage { * Position Dependent Rotation}'. * * @return the meta object for the attribute 'Position Dependent Rotation'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ImageNodeStyleDescription#isPositionDependentRotation() * @see #getImageNodeStyleDescription() - * @generated */ EAttribute getImageNodeStyleDescription_PositionDependentRotation(); @@ -4780,8 +4693,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Icon Label Node Style Description'. - * @see org.eclipse.sirius.components.view.diagram.IconLabelNodeStyleDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.IconLabelNodeStyleDescription */ EClass getIconLabelNodeStyleDescription(); @@ -4791,9 +4704,9 @@ public interface DiagramPackage extends EPackage { * Background}'. * * @return the meta object for the reference 'Background'. + * @generated * @see org.eclipse.sirius.components.view.diagram.IconLabelNodeStyleDescription#getBackground() * @see #getIconLabelNodeStyleDescription() - * @generated */ EReference getIconLabelNodeStyleDescription_Background(); @@ -4802,8 +4715,8 @@ public interface DiagramPackage extends EPackage { * Style}'. * * @return the meta object for class 'Edge Style'. - * @see org.eclipse.sirius.components.view.diagram.EdgeStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgeStyle */ EClass getEdgeStyle(); @@ -4825,9 +4738,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'Source Arrow Style'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeStyle#getSourceArrowStyle() * @see #getEdgeStyle() - * @generated */ EAttribute getEdgeStyle_SourceArrowStyle(); @@ -4837,9 +4750,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'Target Arrow Style'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeStyle#getTargetArrowStyle() * @see #getEdgeStyle() - * @generated */ EAttribute getEdgeStyle_TargetArrowStyle(); @@ -4860,9 +4773,9 @@ public interface DiagramPackage extends EPackage { * Show Icon}'. * * @return the meta object for the attribute 'Show Icon'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeStyle#isShowIcon() * @see #getEdgeStyle() - * @generated */ EAttribute getEdgeStyle_ShowIcon(); @@ -4896,9 +4809,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Max Width Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeStyle#getMaxWidthExpression() * @see #getEdgeStyle() - * @generated */ EAttribute getEdgeStyle_MaxWidthExpression(); @@ -4907,8 +4820,8 @@ public interface DiagramPackage extends EPackage { * Conditional Edge Style}'. * * @return the meta object for class 'Conditional Edge Style'. - * @see org.eclipse.sirius.components.view.diagram.ConditionalEdgeStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.ConditionalEdgeStyle */ EClass getConditionalEdgeStyle(); @@ -4917,8 +4830,8 @@ public interface DiagramPackage extends EPackage { * Palette}'. * * @return the meta object for class 'Palette'. - * @see org.eclipse.sirius.components.view.diagram.DiagramPalette * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramPalette */ EClass getDiagramPalette(); @@ -4987,8 +4900,8 @@ public interface DiagramPackage extends EPackage { * Palette}'. * * @return the meta object for class 'Node Palette'. - * @see org.eclipse.sirius.components.view.diagram.NodePalette * @generated + * @see org.eclipse.sirius.components.view.diagram.NodePalette */ EClass getNodePalette(); @@ -5081,8 +4994,8 @@ public interface DiagramPackage extends EPackage { * Palette}'. * * @return the meta object for class 'Edge Palette'. - * @see org.eclipse.sirius.components.view.diagram.EdgePalette * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgePalette */ EClass getEdgePalette(); @@ -5104,9 +5017,9 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for the containment reference 'Center Label Edit Tool'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgePalette#getCenterLabelEditTool() * @see #getEdgePalette() - * @generated */ EReference getEdgePalette_CenterLabelEditTool(); @@ -5116,9 +5029,9 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for the containment reference 'Begin Label Edit Tool'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgePalette#getBeginLabelEditTool() * @see #getEdgePalette() - * @generated */ EReference getEdgePalette_BeginLabelEditTool(); @@ -5128,9 +5041,9 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for the containment reference 'End Label Edit Tool'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgePalette#getEndLabelEditTool() * @see #getEdgePalette() - * @generated */ EReference getEdgePalette_EndLabelEditTool(); @@ -5164,9 +5077,9 @@ public interface DiagramPackage extends EPackage { * Tools}'. * * @return the meta object for the containment reference list 'Edge Reconnection Tools'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgePalette#getEdgeReconnectionTools() * @see #getEdgePalette() - * @generated */ EReference getEdgePalette_EdgeReconnectionTools(); @@ -5197,9 +5110,9 @@ public interface DiagramPackage extends EPackage { * Name}'. * * @return the meta object for the attribute 'Name'. + * @generated * @see org.eclipse.sirius.components.view.diagram.Tool#getName() * @see #getTool() - * @generated */ EAttribute getTool_Name(); @@ -5209,9 +5122,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Precondition Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.Tool#getPreconditionExpression() * @see #getTool() - * @generated */ EAttribute getTool_PreconditionExpression(); @@ -5221,9 +5134,9 @@ public interface DiagramPackage extends EPackage { * end-user-doc --> * * @return the meta object for the containment reference list 'Body'. + * @generated * @see org.eclipse.sirius.components.view.diagram.Tool#getBody() * @see #getTool() - * @generated */ EReference getTool_Body(); @@ -5232,8 +5145,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Delete Tool'. - * @see org.eclipse.sirius.components.view.diagram.DeleteTool * @generated + * @see org.eclipse.sirius.components.view.diagram.DeleteTool */ EClass getDeleteTool(); @@ -5242,8 +5155,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Drop Tool'. - * @see org.eclipse.sirius.components.view.diagram.DropTool * @generated + * @see org.eclipse.sirius.components.view.diagram.DropTool */ EClass getDropTool(); @@ -5252,8 +5165,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Edge Tool'. - * @see org.eclipse.sirius.components.view.diagram.EdgeTool * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgeTool */ EClass getEdgeTool(); @@ -5263,9 +5176,9 @@ public interface DiagramPackage extends EPackage { * Descriptions}'. * * @return the meta object for the reference list 'Target Element Descriptions'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeTool#getTargetElementDescriptions() * @see #getEdgeTool() - * @generated */ EReference getEdgeTool_TargetElementDescriptions(); @@ -5275,9 +5188,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Icon UR Ls Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeTool#getIconURLsExpression() * @see #getEdgeTool() - * @generated */ EAttribute getEdgeTool_IconURLsExpression(); @@ -5287,9 +5200,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the containment reference 'Dialog Description'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeTool#getDialogDescription() * @see #getEdgeTool() - * @generated */ EReference getEdgeTool_DialogDescription(); @@ -5299,9 +5212,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Elements To Select Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.EdgeTool#getElementsToSelectExpression() * @see #getEdgeTool() - * @generated */ EAttribute getEdgeTool_ElementsToSelectExpression(); @@ -5310,8 +5223,8 @@ public interface DiagramPackage extends EPackage { * Edge Reconnection Tool}'. * * @return the meta object for class 'Edge Reconnection Tool'. - * @see org.eclipse.sirius.components.view.diagram.EdgeReconnectionTool * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgeReconnectionTool */ EClass getEdgeReconnectionTool(); @@ -5320,8 +5233,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Label Edit Tool'. - * @see org.eclipse.sirius.components.view.diagram.LabelEditTool * @generated + * @see org.eclipse.sirius.components.view.diagram.LabelEditTool */ EClass getLabelEditTool(); @@ -5331,9 +5244,9 @@ public interface DiagramPackage extends EPackage { * Direct Edit Label Expression}'. * * @return the meta object for the attribute 'Initial Direct Edit Label Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelEditTool#getInitialDirectEditLabelExpression() * @see #getLabelEditTool() - * @generated */ EAttribute getLabelEditTool_InitialDirectEditLabelExpression(); @@ -5342,8 +5255,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Node Tool'. - * @see org.eclipse.sirius.components.view.diagram.NodeTool * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeTool */ EClass getNodeTool(); @@ -5353,9 +5266,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the containment reference 'Dialog Description'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeTool#getDialogDescription() * @see #getNodeTool() - * @generated */ EReference getNodeTool_DialogDescription(); @@ -5365,9 +5278,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Icon UR Ls Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeTool#getIconURLsExpression() * @see #getNodeTool() - * @generated */ EAttribute getNodeTool_IconURLsExpression(); @@ -5377,20 +5290,32 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Elements To Select Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeTool#getElementsToSelectExpression() * @see #getNodeTool() - * @generated */ EAttribute getNodeTool_ElementsToSelectExpression(); + /** + * Returns the meta object for the attribute + * '{@link org.eclipse.sirius.components.view.diagram.NodeTool#isWithImpactAnalysis With Impact Analysis}'. + * + * + * @return the meta object for the attribute 'With Impact Analysis'. + * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeTool#isWithImpactAnalysis() + * @see #getNodeTool() + */ + EAttribute getNodeTool_WithImpactAnalysis(); + /** * Returns the meta object for class * '{@link org.eclipse.sirius.components.view.diagram.SourceEdgeEndReconnectionTool Source Edge End Reconnection * Tool}'. * * @return the meta object for class 'Source Edge End Reconnection Tool'. - * @see org.eclipse.sirius.components.view.diagram.SourceEdgeEndReconnectionTool * @generated + * @see org.eclipse.sirius.components.view.diagram.SourceEdgeEndReconnectionTool */ EClass getSourceEdgeEndReconnectionTool(); @@ -5400,8 +5325,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Target Edge End Reconnection Tool'. - * @see org.eclipse.sirius.components.view.diagram.TargetEdgeEndReconnectionTool * @generated + * @see org.eclipse.sirius.components.view.diagram.TargetEdgeEndReconnectionTool */ EClass getTargetEdgeEndReconnectionTool(); @@ -5410,8 +5335,8 @@ public interface DiagramPackage extends EPackage { * View}'. * * @return the meta object for class 'Create View'. - * @see org.eclipse.sirius.components.view.diagram.CreateView * @generated + * @see org.eclipse.sirius.components.view.diagram.CreateView */ EClass getCreateView(); @@ -5421,9 +5346,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Parent View Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.CreateView#getParentViewExpression() * @see #getCreateView() - * @generated */ EAttribute getCreateView_ParentViewExpression(); @@ -5433,9 +5358,9 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for the reference 'Element Description'. + * @generated * @see org.eclipse.sirius.components.view.diagram.CreateView#getElementDescription() * @see #getCreateView() - * @generated */ EReference getCreateView_ElementDescription(); @@ -5445,9 +5370,9 @@ public interface DiagramPackage extends EPackage { * Expression}'. * * @return the meta object for the attribute 'Semantic Element Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.CreateView#getSemanticElementExpression() * @see #getCreateView() - * @generated */ EAttribute getCreateView_SemanticElementExpression(); @@ -5469,9 +5394,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'Containment Kind'. + * @generated * @see org.eclipse.sirius.components.view.diagram.CreateView#getContainmentKind() * @see #getCreateView() - * @generated */ EAttribute getCreateView_ContainmentKind(); @@ -5480,8 +5405,8 @@ public interface DiagramPackage extends EPackage { * View}'. * * @return the meta object for class 'Delete View'. - * @see org.eclipse.sirius.components.view.diagram.DeleteView * @generated + * @see org.eclipse.sirius.components.view.diagram.DeleteView */ EClass getDeleteView(); @@ -5502,8 +5427,8 @@ public interface DiagramPackage extends EPackage { * Selection Dialog Description}'. * * @return the meta object for class 'Selection Dialog Description'. - * @see org.eclipse.sirius.components.view.diagram.SelectionDialogDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.SelectionDialogDescription */ EClass getSelectionDialogDescription(); @@ -5513,9 +5438,9 @@ public interface DiagramPackage extends EPackage { * Message}'. * * @return the meta object for the attribute 'Selection Message'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogDescription#getSelectionMessage() * @see #getSelectionDialogDescription() - * @generated */ EAttribute getSelectionDialogDescription_SelectionMessage(); @@ -5525,9 +5450,9 @@ public interface DiagramPackage extends EPackage { * Selection Dialog Tree Description}'. * * @return the meta object for the containment reference 'Selection Dialog Tree Description'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogDescription#getSelectionDialogTreeDescription() * @see #getSelectionDialogDescription() - * @generated */ EReference getSelectionDialogDescription_SelectionDialogTreeDescription(); @@ -5537,9 +5462,9 @@ public interface DiagramPackage extends EPackage { * * * @return the meta object for the attribute 'Multiple'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogDescription#isMultiple() * @see #getSelectionDialogDescription() - * @generated */ EAttribute getSelectionDialogDescription_Multiple(); @@ -5548,8 +5473,8 @@ public interface DiagramPackage extends EPackage { * Section}'. * * @return the meta object for class 'Tool Section'. - * @see org.eclipse.sirius.components.view.diagram.ToolSection * @generated + * @see org.eclipse.sirius.components.view.diagram.ToolSection */ EClass getToolSection(); @@ -5558,9 +5483,9 @@ public interface DiagramPackage extends EPackage { * Name}'. * * @return the meta object for the attribute 'Name'. + * @generated * @see org.eclipse.sirius.components.view.diagram.ToolSection#getName() * @see #getToolSection() - * @generated */ EAttribute getToolSection_Name(); @@ -5569,8 +5494,8 @@ public interface DiagramPackage extends EPackage { * Section}'. * * @return the meta object for class 'Tool Section'. - * @see org.eclipse.sirius.components.view.diagram.DiagramToolSection * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramToolSection */ EClass getDiagramToolSection(); @@ -5591,8 +5516,8 @@ public interface DiagramPackage extends EPackage { * Tool Section}'. * * @return the meta object for class 'Node Tool Section'. - * @see org.eclipse.sirius.components.view.diagram.NodeToolSection * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeToolSection */ EClass getNodeToolSection(); @@ -5625,8 +5550,8 @@ public interface DiagramPackage extends EPackage { * Tool Section}'. * * @return the meta object for class 'Edge Tool Section'. - * @see org.eclipse.sirius.components.view.diagram.EdgeToolSection * @generated + * @see org.eclipse.sirius.components.view.diagram.EdgeToolSection */ EClass getEdgeToolSection(); @@ -5647,8 +5572,8 @@ public interface DiagramPackage extends EPackage { * Tool}'. * * @return the meta object for class 'Drop Node Tool'. - * @see org.eclipse.sirius.components.view.diagram.DropNodeTool * @generated + * @see org.eclipse.sirius.components.view.diagram.DropNodeTool */ EClass getDropNodeTool(); @@ -5658,9 +5583,9 @@ public interface DiagramPackage extends EPackage { * Types}'. * * @return the meta object for the reference list 'Accepted Node Types'. + * @generated * @see org.eclipse.sirius.components.view.diagram.DropNodeTool#getAcceptedNodeTypes() * @see #getDropNodeTool() - * @generated */ EReference getDropNodeTool_AcceptedNodeTypes(); @@ -5669,8 +5594,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Dialog Description'. - * @see org.eclipse.sirius.components.view.diagram.DialogDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.DialogDescription */ EClass getDialogDescription(); @@ -5680,8 +5605,8 @@ public interface DiagramPackage extends EPackage { * Description}'. * * @return the meta object for class 'Selection Dialog Tree Description'. - * @see org.eclipse.sirius.components.view.diagram.SelectionDialogTreeDescription * @generated + * @see org.eclipse.sirius.components.view.diagram.SelectionDialogTreeDescription */ EClass getSelectionDialogTreeDescription(); @@ -5691,9 +5616,9 @@ public interface DiagramPackage extends EPackage { * Elements Expression}'. * * @return the meta object for the attribute 'Elements Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogTreeDescription#getElementsExpression() * @see #getSelectionDialogTreeDescription() - * @generated */ EAttribute getSelectionDialogTreeDescription_ElementsExpression(); @@ -5703,9 +5628,9 @@ public interface DiagramPackage extends EPackage { * Children Expression}'. * * @return the meta object for the attribute 'Children Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogTreeDescription#getChildrenExpression() * @see #getSelectionDialogTreeDescription() - * @generated */ EAttribute getSelectionDialogTreeDescription_ChildrenExpression(); @@ -5715,9 +5640,9 @@ public interface DiagramPackage extends EPackage { * Is Selectable Expression}'. * * @return the meta object for the attribute 'Is Selectable Expression'. + * @generated * @see org.eclipse.sirius.components.view.diagram.SelectionDialogTreeDescription#getIsSelectableExpression() * @see #getSelectionDialogTreeDescription() - * @generated */ EAttribute getSelectionDialogTreeDescription_IsSelectableExpression(); @@ -5726,8 +5651,8 @@ public interface DiagramPackage extends EPackage { * Style}'. * * @return the meta object for enum 'Arrow Style'. - * @see org.eclipse.sirius.components.view.diagram.ArrowStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.ArrowStyle */ EEnum getArrowStyle(); @@ -5736,8 +5661,8 @@ public interface DiagramPackage extends EPackage { * Direction}'. * * @return the meta object for enum 'Layout Direction'. - * @see org.eclipse.sirius.components.view.diagram.LayoutDirection * @generated + * @see org.eclipse.sirius.components.view.diagram.LayoutDirection */ EEnum getLayoutDirection(); @@ -5746,8 +5671,8 @@ public interface DiagramPackage extends EPackage { * Style}'. * * @return the meta object for enum 'Line Style'. - * @see org.eclipse.sirius.components.view.diagram.LineStyle * @generated + * @see org.eclipse.sirius.components.view.diagram.LineStyle */ EEnum getLineStyle(); @@ -5756,8 +5681,8 @@ public interface DiagramPackage extends EPackage { * Containment Kind}'. * * @return the meta object for enum 'Node Containment Kind'. - * @see org.eclipse.sirius.components.view.diagram.NodeContainmentKind * @generated + * @see org.eclipse.sirius.components.view.diagram.NodeContainmentKind */ EEnum getNodeContainmentKind(); @@ -5766,8 +5691,8 @@ public interface DiagramPackage extends EPackage { * Synchronization Policy}'. * * @return the meta object for enum 'Synchronization Policy'. - * @see org.eclipse.sirius.components.view.diagram.SynchronizationPolicy * @generated + * @see org.eclipse.sirius.components.view.diagram.SynchronizationPolicy */ EEnum getSynchronizationPolicy(); @@ -5776,8 +5701,8 @@ public interface DiagramPackage extends EPackage { * Inside Label Position}'. * * @return the meta object for enum 'Inside Label Position'. - * @see org.eclipse.sirius.components.view.diagram.InsideLabelPosition * @generated + * @see org.eclipse.sirius.components.view.diagram.InsideLabelPosition */ EEnum getInsideLabelPosition(); @@ -5786,8 +5711,8 @@ public interface DiagramPackage extends EPackage { * Outside Label Position}'. * * @return the meta object for enum 'Outside Label Position'. - * @see org.eclipse.sirius.components.view.diagram.OutsideLabelPosition * @generated + * @see org.eclipse.sirius.components.view.diagram.OutsideLabelPosition */ EEnum getOutsideLabelPosition(); @@ -5796,8 +5721,8 @@ public interface DiagramPackage extends EPackage { * Label Overflow Strategy}'. * * @return the meta object for enum 'Label Overflow Strategy'. - * @see org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy * @generated + * @see org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy */ EEnum getLabelOverflowStrategy(); @@ -5806,8 +5731,8 @@ public interface DiagramPackage extends EPackage { * Arrange Layout Direction}'. * * @return the meta object for enum 'Arrange Layout Direction'. - * @see org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection * @generated + * @see org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection */ EEnum getArrangeLayoutDirection(); @@ -5816,8 +5741,8 @@ public interface DiagramPackage extends EPackage { * Align}'. * * @return the meta object for enum 'Label Text Align'. - * @see org.eclipse.sirius.components.view.diagram.LabelTextAlign * @generated + * @see org.eclipse.sirius.components.view.diagram.LabelTextAlign */ EEnum getLabelTextAlign(); @@ -5826,8 +5751,8 @@ public interface DiagramPackage extends EPackage { * User Resizable Direction}'. * * @return the meta object for enum 'User Resizable Direction'. - * @see org.eclipse.sirius.components.view.diagram.UserResizableDirection * @generated + * @see org.eclipse.sirius.components.view.diagram.UserResizableDirection */ EEnum getUserResizableDirection(); @@ -5836,8 +5761,8 @@ public interface DiagramPackage extends EPackage { * Header Separator Display Mode}'. * * @return the meta object for enum 'Header Separator Display Mode'. - * @see org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode * @generated + * @see org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode */ EEnum getHeaderSeparatorDisplayMode(); @@ -5869,9 +5794,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramDescriptionImpl Description}' class. * * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramDescription() - * @generated */ EClass DIAGRAM_DESCRIPTION = eINSTANCE.getDiagramDescription(); @@ -5920,9 +5845,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramElementDescriptionImpl Element * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramElementDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramElementDescription() - * @generated */ EClass DIAGRAM_ELEMENT_DESCRIPTION = eINSTANCE.getDiagramElementDescription(); @@ -5970,9 +5895,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeDescriptionImpl * Node Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeDescription() - * @generated */ EClass NODE_DESCRIPTION = eINSTANCE.getNodeDescription(); @@ -6124,9 +6049,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeDescriptionImpl * Edge Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeDescription() - * @generated */ EClass EDGE_DESCRIPTION = eINSTANCE.getEdgeDescription(); @@ -6222,9 +6147,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.LayoutStrategyDescription * Layout Strategy Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LayoutStrategyDescription * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLayoutStrategyDescription() - * @generated */ EClass LAYOUT_STRATEGY_DESCRIPTION = eINSTANCE.getLayoutStrategyDescription(); @@ -6233,9 +6158,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ListLayoutStrategyDescriptionImpl List Layout * Strategy Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ListLayoutStrategyDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getListLayoutStrategyDescription() - * @generated */ EClass LIST_LAYOUT_STRATEGY_DESCRIPTION = eINSTANCE.getListLayoutStrategyDescription(); @@ -6276,9 +6201,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.FreeFormLayoutStrategyDescriptionImpl Free Form * Layout Strategy Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.FreeFormLayoutStrategyDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getFreeFormLayoutStrategyDescription() - * @generated */ EClass FREE_FORM_LAYOUT_STRATEGY_DESCRIPTION = eINSTANCE.getFreeFormLayoutStrategyDescription(); @@ -6286,9 +6211,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.LabelDescriptionImpl * Label Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.LabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelDescription() - * @generated */ EClass LABEL_DESCRIPTION = eINSTANCE.getLabelDescription(); @@ -6321,9 +6246,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.InsideLabelDescriptionImpl Inside Label * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.InsideLabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelDescription() - * @generated */ EClass INSIDE_LABEL_DESCRIPTION = eINSTANCE.getInsideLabelDescription(); @@ -6356,9 +6281,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.OutsideLabelDescriptionImpl Outside Label * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.OutsideLabelDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelDescription() - * @generated */ EClass OUTSIDE_LABEL_DESCRIPTION = eINSTANCE.getOutsideLabelDescription(); @@ -6390,9 +6315,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.StyleImpl * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.StyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getStyle() - * @generated */ EClass STYLE = eINSTANCE.getStyle(); @@ -6408,9 +6333,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.BorderStyle Border * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.BorderStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getBorderStyle() - * @generated */ EClass BORDER_STYLE = eINSTANCE.getBorderStyle(); @@ -6450,9 +6375,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.InsideLabelStyleImpl * Inside Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.InsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelStyle() - * @generated */ EClass INSIDE_LABEL_STYLE = eINSTANCE.getInsideLabelStyle(); @@ -6476,9 +6401,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.OutsideLabelStyleImpl * Outside Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.OutsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelStyle() - * @generated */ EClass OUTSIDE_LABEL_STYLE = eINSTANCE.getOutsideLabelStyle(); @@ -6486,9 +6411,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.NodeLabelStyle Node * Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeLabelStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeLabelStyle() - * @generated */ EClass NODE_LABEL_STYLE = eINSTANCE.getNodeLabelStyle(); @@ -6536,9 +6461,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.NodeStyleDescription * Node Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeStyleDescription * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeStyleDescription() - * @generated */ EClass NODE_STYLE_DESCRIPTION = eINSTANCE.getNodeStyleDescription(); @@ -6547,9 +6472,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl Conditional Node * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalNodeStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalNodeStyle() - * @generated */ EClass CONDITIONAL_NODE_STYLE = eINSTANCE.getConditionalNodeStyle(); @@ -6566,9 +6491,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl Conditional * Inside Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalInsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalInsideLabelStyle() - * @generated */ EClass CONDITIONAL_INSIDE_LABEL_STYLE = eINSTANCE.getConditionalInsideLabelStyle(); @@ -6585,9 +6510,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl Conditional * Outside Label Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalOutsideLabelStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalOutsideLabelStyle() - * @generated */ EClass CONDITIONAL_OUTSIDE_LABEL_STYLE = eINSTANCE.getConditionalOutsideLabelStyle(); @@ -6604,9 +6529,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.RectangularNodeStyleDescriptionImpl Rectangular * Node Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.RectangularNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getRectangularNodeStyleDescription() - * @generated */ EClass RECTANGULAR_NODE_STYLE_DESCRIPTION = eINSTANCE.getRectangularNodeStyleDescription(); @@ -6623,9 +6548,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ImageNodeStyleDescriptionImpl Image Node Style * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ImageNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getImageNodeStyleDescription() - * @generated */ EClass IMAGE_NODE_STYLE_DESCRIPTION = eINSTANCE.getImageNodeStyleDescription(); @@ -6650,9 +6575,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.IconLabelNodeStyleDescriptionImpl Icon Label Node * Style Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.IconLabelNodeStyleDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getIconLabelNodeStyleDescription() - * @generated */ EClass ICON_LABEL_NODE_STYLE_DESCRIPTION = eINSTANCE.getIconLabelNodeStyleDescription(); @@ -6668,9 +6593,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeStyleImpl * Edge Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeStyle() - * @generated */ EClass EDGE_STYLE = eINSTANCE.getEdgeStyle(); @@ -6743,9 +6668,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.ConditionalEdgeStyleImpl Conditional Edge * Style}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ConditionalEdgeStyleImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getConditionalEdgeStyle() - * @generated */ EClass CONDITIONAL_EDGE_STYLE = eINSTANCE.getConditionalEdgeStyle(); @@ -6753,9 +6678,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramPaletteImpl * Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramPalette() - * @generated */ EClass DIAGRAM_PALETTE = eINSTANCE.getDiagramPalette(); @@ -6803,9 +6728,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodePaletteImpl * Node Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodePaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodePalette() - * @generated */ EClass NODE_PALETTE = eINSTANCE.getNodePalette(); @@ -6869,9 +6794,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgePaletteImpl * Edge Palette}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgePaletteImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgePalette() - * @generated */ EClass EDGE_PALETTE = eINSTANCE.getEdgePalette(); @@ -6943,9 +6868,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.ToolImpl * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getTool() - * @generated */ EClass TOOL = eINSTANCE.getTool(); @@ -6977,9 +6902,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DeleteToolImpl * Delete Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DeleteToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDeleteTool() - * @generated */ EClass DELETE_TOOL = eINSTANCE.getDeleteTool(); @@ -6987,9 +6912,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DropToolImpl Drop * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DropToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDropTool() - * @generated */ EClass DROP_TOOL = eINSTANCE.getDropTool(); @@ -6997,9 +6922,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeToolImpl Edge * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeTool() - * @generated */ EClass EDGE_TOOL = eINSTANCE.getEdgeTool(); @@ -7040,9 +6965,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeReconnectionToolImpl Edge Reconnection * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeReconnectionTool() - * @generated */ EClass EDGE_RECONNECTION_TOOL = eINSTANCE.getEdgeReconnectionTool(); @@ -7050,9 +6975,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl * Label Edit Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.LabelEditToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelEditTool() - * @generated */ EClass LABEL_EDIT_TOOL = eINSTANCE.getLabelEditTool(); @@ -7068,9 +6993,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl Node * Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeTool() - * @generated */ EClass NODE_TOOL = eINSTANCE.getNodeTool(); @@ -7098,14 +7023,22 @@ interface Literals { */ EAttribute NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION = eINSTANCE.getNodeTool_ElementsToSelectExpression(); + /** + * The meta object literal for the 'With Impact Analysis' attribute feature. + * + * @generated + */ + EAttribute NODE_TOOL__WITH_IMPACT_ANALYSIS = eINSTANCE.getNodeTool_WithImpactAnalysis(); + /** * The meta object literal for the * '{@link org.eclipse.sirius.components.view.diagram.impl.SourceEdgeEndReconnectionToolImpl Source Edge End * Reconnection Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SourceEdgeEndReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSourceEdgeEndReconnectionTool() - * @generated */ EClass SOURCE_EDGE_END_RECONNECTION_TOOL = eINSTANCE.getSourceEdgeEndReconnectionTool(); @@ -7114,9 +7047,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.TargetEdgeEndReconnectionToolImpl Target Edge End * Reconnection Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.TargetEdgeEndReconnectionToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getTargetEdgeEndReconnectionTool() - * @generated */ EClass TARGET_EDGE_END_RECONNECTION_TOOL = eINSTANCE.getTargetEdgeEndReconnectionTool(); @@ -7124,9 +7057,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.CreateViewImpl * Create View}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.CreateViewImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getCreateView() - * @generated */ EClass CREATE_VIEW = eINSTANCE.getCreateView(); @@ -7174,9 +7107,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DeleteViewImpl * Delete View}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DeleteViewImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDeleteView() - * @generated */ EClass DELETE_VIEW = eINSTANCE.getDeleteView(); @@ -7193,9 +7126,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.SelectionDialogDescriptionImpl Selection Dialog * Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SelectionDialogDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSelectionDialogDescription() - * @generated */ EClass SELECTION_DIALOG_DESCRIPTION = eINSTANCE.getSelectionDialogDescription(); @@ -7227,9 +7160,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.ToolSectionImpl * Tool Section}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.ToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getToolSection() - * @generated */ EClass TOOL_SECTION = eINSTANCE.getToolSection(); @@ -7246,9 +7179,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.DiagramToolSectionImpl Tool Section}' class. * * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DiagramToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDiagramToolSection() - * @generated */ EClass DIAGRAM_TOOL_SECTION = eINSTANCE.getDiagramToolSection(); @@ -7264,9 +7197,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.NodeToolSectionImpl * Node Tool Section}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.NodeToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeToolSection() - * @generated */ EClass NODE_TOOL_SECTION = eINSTANCE.getNodeToolSection(); @@ -7290,9 +7223,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.EdgeToolSectionImpl * Edge Tool Section}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.EdgeToolSectionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getEdgeToolSection() - * @generated */ EClass EDGE_TOOL_SECTION = eINSTANCE.getEdgeToolSection(); @@ -7308,9 +7241,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DropNodeToolImpl * Drop Node Tool}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DropNodeToolImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDropNodeTool() - * @generated */ EClass DROP_NODE_TOOL = eINSTANCE.getDropNodeTool(); @@ -7326,9 +7259,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.impl.DialogDescriptionImpl * Dialog Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.DialogDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getDialogDescription() - * @generated */ EClass DIALOG_DESCRIPTION = eINSTANCE.getDialogDescription(); @@ -7337,9 +7270,9 @@ interface Literals { * '{@link org.eclipse.sirius.components.view.diagram.impl.SelectionDialogTreeDescriptionImpl Selection * Dialog Tree Description}' class. * + * @generated * @see org.eclipse.sirius.components.view.diagram.impl.SelectionDialogTreeDescriptionImpl * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSelectionDialogTreeDescription() - * @generated */ EClass SELECTION_DIALOG_TREE_DESCRIPTION = eINSTANCE.getSelectionDialogTreeDescription(); @@ -7371,9 +7304,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.ArrowStyle Arrow * Style}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.ArrowStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getArrowStyle() - * @generated */ EEnum ARROW_STYLE = eINSTANCE.getArrowStyle(); @@ -7381,9 +7314,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.LayoutDirection Layout * Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LayoutDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLayoutDirection() - * @generated */ EEnum LAYOUT_DIRECTION = eINSTANCE.getLayoutDirection(); @@ -7391,9 +7324,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.LineStyle Line * Style}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LineStyle * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLineStyle() - * @generated */ EEnum LINE_STYLE = eINSTANCE.getLineStyle(); @@ -7401,9 +7334,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.NodeContainmentKind * Node Containment Kind}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.NodeContainmentKind * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getNodeContainmentKind() - * @generated */ EEnum NODE_CONTAINMENT_KIND = eINSTANCE.getNodeContainmentKind(); @@ -7411,9 +7344,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.SynchronizationPolicy * Synchronization Policy}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.SynchronizationPolicy * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getSynchronizationPolicy() - * @generated */ EEnum SYNCHRONIZATION_POLICY = eINSTANCE.getSynchronizationPolicy(); @@ -7421,9 +7354,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.InsideLabelPosition * Inside Label Position}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.InsideLabelPosition * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getInsideLabelPosition() - * @generated */ EEnum INSIDE_LABEL_POSITION = eINSTANCE.getInsideLabelPosition(); @@ -7431,9 +7364,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.OutsideLabelPosition * Outside Label Position}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.OutsideLabelPosition * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getOutsideLabelPosition() - * @generated */ EEnum OUTSIDE_LABEL_POSITION = eINSTANCE.getOutsideLabelPosition(); @@ -7441,9 +7374,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy * Label Overflow Strategy}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelOverflowStrategy * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelOverflowStrategy() - * @generated */ EEnum LABEL_OVERFLOW_STRATEGY = eINSTANCE.getLabelOverflowStrategy(); @@ -7451,9 +7384,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection * Arrange Layout Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.ArrangeLayoutDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getArrangeLayoutDirection() - * @generated */ EEnum ARRANGE_LAYOUT_DIRECTION = eINSTANCE.getArrangeLayoutDirection(); @@ -7461,9 +7394,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.LabelTextAlign Label * Text Align}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.LabelTextAlign * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getLabelTextAlign() - * @generated */ EEnum LABEL_TEXT_ALIGN = eINSTANCE.getLabelTextAlign(); @@ -7471,9 +7404,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.UserResizableDirection * User Resizable Direction}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.UserResizableDirection * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getUserResizableDirection() - * @generated */ EEnum USER_RESIZABLE_DIRECTION = eINSTANCE.getUserResizableDirection(); @@ -7481,9 +7414,9 @@ interface Literals { * The meta object literal for the '{@link org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode * Header Separator Display Mode}' enum. * + * @generated * @see org.eclipse.sirius.components.view.diagram.HeaderSeparatorDisplayMode * @see org.eclipse.sirius.components.view.diagram.impl.DiagramPackageImpl#getHeaderSeparatorDisplayMode() - * @generated */ EEnum HEADER_SEPARATOR_DISPLAY_MODE = eINSTANCE.getHeaderSeparatorDisplayMode(); diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/NodeTool.java b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/NodeTool.java index 28ea57910d..5ada4910c4 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/NodeTool.java +++ b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/NodeTool.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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 @@ -24,22 +24,25 @@ * Expression} *
  • {@link org.eclipse.sirius.components.view.diagram.NodeTool#getElementsToSelectExpression Elements To Select * Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.diagram.NodeTool#isWithImpactAnalysis With Impact + * Analysis}
  • * * - * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool() * @model * @generated + * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool() */ public interface NodeTool extends Tool { + /** * Returns the value of the 'Dialog Description' containment reference. * * @return the value of the 'Dialog Description' containment reference. - * @see #setDialogDescription(DialogDescription) - * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_DialogDescription() * @model containment="true" * @generated + * @see #setDialogDescription(DialogDescription) + * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_DialogDescription() */ DialogDescription getDialogDescription(); @@ -48,9 +51,9 @@ public interface NodeTool extends Tool { * Description}' containment reference. * * @param value - * the new value of the 'Dialog Description' containment reference. - * @see #getDialogDescription() + * the new value of the 'Dialog Description' containment reference. * @generated + * @see #getDialogDescription() */ void setDialogDescription(DialogDescription value); @@ -59,10 +62,10 @@ public interface NodeTool extends Tool { * end-user-doc --> * * @return the value of the 'Icon UR Ls Expression' attribute. - * @see #setIconURLsExpression(String) - * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_IconURLsExpression() * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" * @generated + * @see #setIconURLsExpression(String) + * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_IconURLsExpression() */ String getIconURLsExpression(); @@ -71,9 +74,9 @@ public interface NodeTool extends Tool { * UR Ls Expression}' attribute. * * @param value - * the new value of the 'Icon UR Ls Expression' attribute. - * @see #getIconURLsExpression() + * the new value of the 'Icon UR Ls Expression' attribute. * @generated + * @see #getIconURLsExpression() */ void setIconURLsExpression(String value); @@ -82,10 +85,10 @@ public interface NodeTool extends Tool { * end-user-doc --> * * @return the value of the 'Elements To Select Expression' attribute. - * @see #setElementsToSelectExpression(String) - * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_ElementsToSelectExpression() * @model dataType="org.eclipse.sirius.components.view.InterpretedExpression" * @generated + * @see #setElementsToSelectExpression(String) + * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_ElementsToSelectExpression() */ String getElementsToSelectExpression(); @@ -94,10 +97,33 @@ public interface NodeTool extends Tool { * Elements To Select Expression}' attribute. * * @param value - * the new value of the 'Elements To Select Expression' attribute. - * @see #getElementsToSelectExpression() + * the new value of the 'Elements To Select Expression' attribute. * @generated + * @see #getElementsToSelectExpression() */ void setElementsToSelectExpression(String value); + /** + * Returns the value of the 'With Impact Analysis' attribute. + * + * @return the value of the 'With Impact Analysis' attribute. + * @model + * @generated + * @see #setWithImpactAnalysis(boolean) + * @see org.eclipse.sirius.components.view.diagram.DiagramPackage#getNodeTool_WithImpactAnalysis() + */ + boolean isWithImpactAnalysis(); + + /** + * Sets the value of the '{@link org.eclipse.sirius.components.view.diagram.NodeTool#isWithImpactAnalysis With + * Impact Analysis}' attribute. + * + * @param value + * the new value of the 'With Impact Analysis' attribute. + * @generated + * @see #isWithImpactAnalysis() + */ + void setWithImpactAnalysis(boolean value); + } // NodeTool diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/DiagramPackageImpl.java b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/DiagramPackageImpl.java index 46dbbf497a..e46ee942f8 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/DiagramPackageImpl.java +++ b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/DiagramPackageImpl.java @@ -539,10 +539,10 @@ private DiagramPackageImpl() { * not invoke it directly. Instead, they should simply access that field to obtain the package. * + * @generated * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() - * @generated */ public static DiagramPackage init() { if (isInited) @@ -2011,6 +2011,16 @@ public EAttribute getNodeTool_ElementsToSelectExpression() { return (EAttribute) this.nodeToolEClass.getEStructuralFeatures().get(2); } + /** + * + * + * @generated + */ + @Override + public EAttribute getNodeTool_WithImpactAnalysis() { + return (EAttribute) this.nodeToolEClass.getEStructuralFeatures().get(3); + } + /** * * @@ -2630,6 +2640,7 @@ public void createPackageContents() { this.createEReference(this.nodeToolEClass, NODE_TOOL__DIALOG_DESCRIPTION); this.createEAttribute(this.nodeToolEClass, NODE_TOOL__ICON_UR_LS_EXPRESSION); this.createEAttribute(this.nodeToolEClass, NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION); + this.createEAttribute(this.nodeToolEClass, NODE_TOOL__WITH_IMPACT_ANALYSIS); this.sourceEdgeEndReconnectionToolEClass = this.createEClass(SOURCE_EDGE_END_RECONNECTION_TOOL); @@ -3055,6 +3066,8 @@ public void initializePackageContents() { IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getNodeTool_ElementsToSelectExpression(), theViewPackage.getInterpretedExpression(), "elementsToSelectExpression", null, 0, 1, NodeTool.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEAttribute(this.getNodeTool_WithImpactAnalysis(), this.ecorePackage.getEBoolean(), "withImpactAnalysis", null, 0, 1, NodeTool.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEClass(this.sourceEdgeEndReconnectionToolEClass, SourceEdgeEndReconnectionTool.class, "SourceEdgeEndReconnectionTool", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/NodeToolImpl.java b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/NodeToolImpl.java index 5f0b9f22b8..711d4042b5 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/NodeToolImpl.java +++ b/packages/view/backend/sirius-components-view-diagram/src/main/java/org/eclipse/sirius/components/view/diagram/impl/NodeToolImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023, 2024 Obeo. + * Copyright (c) 2023, 2025 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 @@ -12,6 +12,8 @@ *******************************************************************************/ package org.eclipse.sirius.components.view.diagram.impl; +import java.util.Objects; + import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; @@ -33,60 +35,77 @@ * Expression} *
  • {@link org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl#getElementsToSelectExpression Elements To * Select Expression}
  • + *
  • {@link org.eclipse.sirius.components.view.diagram.impl.NodeToolImpl#isWithImpactAnalysis With Impact + * Analysis}
  • * * * @generated */ public class NodeToolImpl extends ToolImpl implements NodeTool { + /** - * The cached value of the '{@link #getDialogDescription() Dialog Description}' containment reference. * - * @see #getDialogDescription() * @generated * @ordered + * @see #getIconURLsExpression() */ - protected DialogDescription dialogDescription; - + protected static final String ICON_UR_LS_EXPRESSION_EDEFAULT = null; /** - * The default value of the '{@link #getIconURLsExpression() Icon UR Ls Expression}' attribute. + * + * @generated + * @ordered + * @see #getElementsToSelectExpression() + */ + protected static final String ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT = null; + /** + * The default value of the '{@link #isWithImpactAnalysis() With Impact Analysis}' attribute. * - * @see #getIconURLsExpression() * @generated * @ordered + * @see #isWithImpactAnalysis() */ - protected static final String ICON_UR_LS_EXPRESSION_EDEFAULT = null; - + protected static final boolean WITH_IMPACT_ANALYSIS_EDEFAULT = false; /** - * The cached value of the '{@link #getIconURLsExpression() Icon UR Ls Expression}' attribute. * - * @see #getIconURLsExpression() * @generated * @ordered + * @see #getDialogDescription() */ - protected String iconURLsExpression = ICON_UR_LS_EXPRESSION_EDEFAULT; - + protected DialogDescription dialogDescription; /** - * The default value of the '{@link #getElementsToSelectExpression() Elements To Select Expression}' - * attribute. + * The cached value of the '{@link #getIconURLsExpression() Icon UR Ls Expression}' attribute. * - * @see #getElementsToSelectExpression() * @generated * @ordered + * @see #getIconURLsExpression() */ - protected static final String ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT = null; - + protected String iconURLsExpression = ICON_UR_LS_EXPRESSION_EDEFAULT; /** * The cached value of the '{@link #getElementsToSelectExpression() Elements To Select Expression}' * attribute. * - * @see #getElementsToSelectExpression() * @generated * @ordered + * @see #getElementsToSelectExpression() */ protected String elementsToSelectExpression = ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT; + /** + * The cached value of the '{@link #isWithImpactAnalysis() With Impact Analysis}' attribute. + * + * @generated + * @ordered + * @see #isWithImpactAnalysis() + */ + protected boolean withImpactAnalysis = WITH_IMPACT_ANALYSIS_EDEFAULT; /** * @@ -117,24 +136,6 @@ public DialogDescription getDialogDescription() { return this.dialogDescription; } - /** - * - * - * @generated - */ - public NotificationChain basicSetDialogDescription(DialogDescription newDialogDescription, NotificationChain msgs) { - DialogDescription oldDialogDescription = this.dialogDescription; - this.dialogDescription = newDialogDescription; - if (this.eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION, oldDialogDescription, newDialogDescription); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - /** * * @@ -155,6 +156,24 @@ public void setDialogDescription(DialogDescription newDialogDescription) { this.eNotify(new ENotificationImpl(this, Notification.SET, DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION, newDialogDescription, newDialogDescription)); } + /** + * + * + * @generated + */ + public NotificationChain basicSetDialogDescription(DialogDescription newDialogDescription, NotificationChain msgs) { + DialogDescription oldDialogDescription = this.dialogDescription; + this.dialogDescription = newDialogDescription; + if (this.eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION, oldDialogDescription, newDialogDescription); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + /** * * @@ -201,6 +220,29 @@ public void setElementsToSelectExpression(String newElementsToSelectExpression) this.eNotify(new ENotificationImpl(this, Notification.SET, DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION, oldElementsToSelectExpression, this.elementsToSelectExpression)); } + /** + * + * + * @generated + */ + @Override + public boolean isWithImpactAnalysis() { + return this.withImpactAnalysis; + } + + /** + * + * + * @generated + */ + @Override + public void setWithImpactAnalysis(boolean newWithImpactAnalysis) { + boolean oldWithImpactAnalysis = this.withImpactAnalysis; + this.withImpactAnalysis = newWithImpactAnalysis; + if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS, oldWithImpactAnalysis, this.withImpactAnalysis)); + } + /** * * @@ -229,6 +271,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return this.getIconURLsExpression(); case DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION: return this.getElementsToSelectExpression(); + case DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS: + return this.isWithImpactAnalysis(); } return super.eGet(featureID, resolve, coreType); } @@ -250,6 +294,9 @@ public void eSet(int featureID, Object newValue) { case DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION: this.setElementsToSelectExpression((String) newValue); return; + case DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS: + this.setWithImpactAnalysis((Boolean) newValue); + return; } super.eSet(featureID, newValue); } @@ -263,7 +310,7 @@ public void eSet(int featureID, Object newValue) { public void eUnset(int featureID) { switch (featureID) { case DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION: - this.setDialogDescription((DialogDescription) null); + this.setDialogDescription(null); return; case DiagramPackage.NODE_TOOL__ICON_UR_LS_EXPRESSION: this.setIconURLsExpression(ICON_UR_LS_EXPRESSION_EDEFAULT); @@ -271,6 +318,9 @@ public void eUnset(int featureID) { case DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION: this.setElementsToSelectExpression(ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT); return; + case DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS: + this.setWithImpactAnalysis(WITH_IMPACT_ANALYSIS_EDEFAULT); + return; } super.eUnset(featureID); } @@ -286,9 +336,11 @@ public boolean eIsSet(int featureID) { case DiagramPackage.NODE_TOOL__DIALOG_DESCRIPTION: return this.dialogDescription != null; case DiagramPackage.NODE_TOOL__ICON_UR_LS_EXPRESSION: - return ICON_UR_LS_EXPRESSION_EDEFAULT == null ? this.iconURLsExpression != null : !ICON_UR_LS_EXPRESSION_EDEFAULT.equals(this.iconURLsExpression); + return !Objects.equals(ICON_UR_LS_EXPRESSION_EDEFAULT, this.iconURLsExpression); case DiagramPackage.NODE_TOOL__ELEMENTS_TO_SELECT_EXPRESSION: - return ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT == null ? this.elementsToSelectExpression != null : !ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT.equals(this.elementsToSelectExpression); + return !Objects.equals(ELEMENTS_TO_SELECT_EXPRESSION_EDEFAULT, this.elementsToSelectExpression); + case DiagramPackage.NODE_TOOL__WITH_IMPACT_ANALYSIS: + return this.withImpactAnalysis != WITH_IMPACT_ANALYSIS_EDEFAULT; } return super.eIsSet(featureID); } @@ -303,13 +355,14 @@ public String toString() { if (this.eIsProxy()) return super.toString(); - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (iconURLsExpression: "); - result.append(this.iconURLsExpression); - result.append(", elementsToSelectExpression: "); - result.append(this.elementsToSelectExpression); - result.append(')'); - return result.toString(); + String result = super.toString() + " (iconURLsExpression: " + + this.iconURLsExpression + + ", elementsToSelectExpression: " + + this.elementsToSelectExpression + + ", withImpactAnalysis: " + + this.withImpactAnalysis + + ')'; + return result; } } // NodeToolImpl diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.ecore b/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.ecore index cd5f0e68da..6ea1ddd4d7 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.ecore +++ b/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.ecore @@ -350,6 +350,7 @@ + diff --git a/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.genmodel b/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.genmodel index 4e469b2755..cfbd735192 100644 --- a/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.genmodel +++ b/packages/view/backend/sirius-components-view-diagram/src/main/resources/model/diagram.genmodel @@ -261,6 +261,7 @@ + diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/PaletteDefaultToolsProvider.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/PaletteDefaultToolsProvider.java index d203da808f..7d7215dfd0 100644 --- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/PaletteDefaultToolsProvider.java +++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/PaletteDefaultToolsProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 Obeo. + * Copyright (c) 2024, 2025 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 @@ -31,6 +31,7 @@ /** * An helper to build default tools in the palette. + * * @author fbarbin */ @Service @@ -67,7 +68,7 @@ private List createExtraTools(Object diagramElementDescription, Object di unsynchronizedMapping = SynchronizationPolicy.UNSYNCHRONIZED.equals(nodeDescription.getSynchronizationPolicy()); } else if (diagramElementDescription instanceof EdgeDescription edgeDescription) { targetDescriptions.addAll(edgeDescription.getSourceNodeDescriptions()); - unsynchronizedMapping = SynchronizationPolicy.UNSYNCHRONIZED.equals(((EdgeDescription) diagramElementDescription).getSynchronizationPolicy()); + unsynchronizedMapping = SynchronizationPolicy.UNSYNCHRONIZED.equals(edgeDescription.getSynchronizationPolicy()); } List extraTools = new ArrayList<>(); @@ -103,6 +104,7 @@ private Optional createExtraExpandCollapseTool(List createExtraExpandCollapseTool(List tar .iconURL(List.of(DiagramImageConstants.SEMANTIC_DELETE_SVG)) .targetDescriptions(targetDescriptions) .appliesToDiagramRoot(false) + .withImpactAnalysis(false) .build(); } @@ -137,6 +141,7 @@ private ITool createExtraGraphicalDeleteTool(List ta .iconURL(List.of(DiagramImageConstants.GRAPHICAL_DELETE_SVG)) .targetDescriptions(targetDescriptions) .appliesToDiagramRoot(false) + .withImpactAnalysis(false) .build(); } @@ -168,6 +173,7 @@ private ITool createExtraEditLabelEditTool(List targ .iconURL(List.of(DiagramImageConstants.EDIT_SVG)) .targetDescriptions(targetDescriptions) .appliesToDiagramRoot(false) + .withImpactAnalysis(false) .build(); } diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ToolConverter.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ToolConverter.java index 008cbe60e9..f9820edf98 100644 --- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ToolConverter.java +++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ToolConverter.java @@ -214,6 +214,7 @@ private ITool createNodeTool(NodeTool nodeTool, ViewDiagramDescriptionConverterC .targetDescriptions(List.of()) .dialogDescriptionId(this.diagramIdProvider.getId(nodeTool.getDialogDescription())) .appliesToDiagramRoot(appliesToDiagramRoot) + .withImpactAnalysis(nodeTool.isWithImpactAnalysis()) .build(); } diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ViewPaletteProvider.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ViewPaletteProvider.java index f0a1eacac4..3edd99f1f5 100644 --- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ViewPaletteProvider.java +++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/diagram/ViewPaletteProvider.java @@ -140,13 +140,13 @@ private Palette getDiagramPalette(DiagramDescription diagramDescription, org.ecl List paletteEntries = new ArrayList<>(); toolFinder.findNodeTools(viewDiagramDescription).stream() - .filter(tool -> this.checkPrecondition(tool, variableManager, interpreter)) - .map(tool -> this.createDiagramRootNodeTool(tool, variableManager, interpreter)) - .forEach(paletteEntries::add); + .filter(tool -> this.checkPrecondition(tool, variableManager, interpreter)) + .map(tool -> this.createDiagramRootNodeTool(tool, variableManager, interpreter)) + .forEach(paletteEntries::add); toolFinder.findToolSections(viewDiagramDescription).stream() - .map(toolSection -> this.createToolSection(toolSection, variableManager, interpreter)) - .forEach(paletteEntries::add); + .map(toolSection -> this.createToolSection(toolSection, variableManager, interpreter)) + .forEach(paletteEntries::add); List quickAccessTools = new ArrayList<>(); toolFinder.findQuickAccessDiagramTools(viewDiagramDescription).stream() @@ -197,6 +197,7 @@ private ITool createNodeTool(NodeTool viewNodeTool, boolean appliesToDiagramRoot .dialogDescriptionId(dialogDescriptionId) .targetDescriptions(List.of()) .appliesToDiagramRoot(appliesToDiagramRoot) + .withImpactAnalysis(viewNodeTool.isWithImpactAnalysis()) .build(); } @@ -209,11 +210,11 @@ private Palette getNodePalette(IEditingContext editingContext, DiagramDescriptio if (optionalNodeDescription.isPresent()) { List extraToolSections = new ArrayList<>(); - paletteToolsProviders.stream().map(paletteToolsProvider -> paletteToolsProvider.createExtraToolSections(nodeDescription, diagramElement)).flatMap(List::stream) + this.paletteToolsProviders.stream().map(paletteToolsProvider -> paletteToolsProvider.createExtraToolSections(nodeDescription, diagramElement)).flatMap(List::stream) .forEach(extraToolSections::add); List quickAccessTools = new ArrayList<>(); - paletteToolsProviders.stream().map(paletteToolsProvider -> paletteToolsProvider.createQuickAccessTools(nodeDescription, diagramElement)).flatMap(List::stream) + this.paletteToolsProviders.stream().map(paletteToolsProvider -> paletteToolsProvider.createQuickAccessTools(nodeDescription, diagramElement)).flatMap(List::stream) .forEach(quickAccessTools::add); org.eclipse.sirius.components.view.diagram.NodeDescription viewNodeDescription = optionalNodeDescription.get(); @@ -320,9 +321,9 @@ private Palette getEdgePalette(IEditingContext editingContext, EdgeDescription e .forEach(paletteEntries::add); toolFinder.findNodeTools(viewEdgeDescription).stream() - .filter(tool -> this.checkPrecondition(tool, variableManager, interpreter)) - .map(tool -> this.createNodeTool(tool, variableManager, interpreter)) - .forEach(paletteEntries::add); + .filter(tool -> this.checkPrecondition(tool, variableManager, interpreter)) + .map(tool -> this.createNodeTool(tool, variableManager, interpreter)) + .forEach(paletteEntries::add); paletteEntries.addAll(extraToolSections);