diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 3a4a0ba54..b62adb2ac 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -53,6 +53,9 @@ Any `Namespace` stored in those libraries are now cached for quick access. As a consequence, some coding rules violations have been fixed. The `org.eclipse.syson.services.grammars` package in `syson-direct-edit-grammar` has been renamed into `org.eclipse.syson.direct.edit.grammars`. `AbtractItemUsageBorderNodeDescriptionProvider` has been renamed to `AbstractItemUsageBorderNodeDescriptionProvider`. +- https://github.com/eclipse-syson/syson/issues/1532[#1532] [tables] Add new Requirements table View. +As a consequence, the `syson-table-requirements-view` and `syson-common-view` modules has been created. +`IViewDescriptionProvider.java` and `SysONViewDescriptionProvider.java` have been moved from `syson-diagram-common-view` to `syson-common-view`. === Dependency update @@ -98,6 +101,7 @@ This contribution allows to switch from one _ViewDefinition_ to another one in a * `SysMLPackageNodeAppearanceHandler implements INodeAppearanceHandler` handles how the node is updated from the `appearanceChanges`. * A GraphQL mutation is also added through `editSysMLPackageNodeAppearance`. * Same mechanism is applied to `ImportedPackage`, `Note` and `ViewFrame` nodes. +- https://github.com/eclipse-syson/syson/issues/1532[#1532] [tables] Add new Requirements table View. == v2025.8.0 diff --git a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/migration/DiagramOnViewUsageMigrationHook.java b/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/migration/DiagramOnViewUsageMigrationHook.java index c83872520..5495cdc28 100644 --- a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/migration/DiagramOnViewUsageMigrationHook.java +++ b/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/migration/DiagramOnViewUsageMigrationHook.java @@ -30,13 +30,13 @@ import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.RepresentationMetadata; import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.repositories.IRepresentationContentRepository; import org.eclipse.sirius.web.domain.boundedcontexts.representationdata.services.api.IRepresentationMetadataUpdateService; -import org.eclipse.syson.application.services.GetIntermediateContainerCreationSwitch; import org.eclipse.syson.sysml.Element; import org.eclipse.syson.sysml.Relationship; import org.eclipse.syson.sysml.SysmlFactory; import org.eclipse.syson.sysml.ViewDefinition; import org.eclipse.syson.sysml.ViewUsage; import org.eclipse.syson.sysml.util.ElementUtil; +import org.eclipse.syson.util.GetIntermediateContainerCreationSwitch; import org.eclipse.syson.util.SysONRepresentationDescriptionIdentifiers; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/SysMLv2EditService.java b/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/SysMLv2EditService.java index 37be31026..ad6ea5307 100644 --- a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/SysMLv2EditService.java +++ b/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/SysMLv2EditService.java @@ -52,6 +52,7 @@ import org.eclipse.syson.sysml.SysmlPackage; import org.eclipse.syson.sysml.ViewUsage; import org.eclipse.syson.sysml.util.ElementUtil; +import org.eclipse.syson.util.GetIntermediateContainerCreationSwitch; import org.eclipse.syson.util.SysMLMetamodelHelper; import org.eclipse.syson.util.SysONRepresentationDescriptionIdentifiers; import org.springframework.stereotype.Service; diff --git a/backend/application/syson-application/pom.xml b/backend/application/syson-application/pom.xml index 82fcab6fa..68b8a0879 100644 --- a/backend/application/syson-application/pom.xml +++ b/backend/application/syson-application/pom.xml @@ -114,6 +114,11 @@ syson-standard-diagrams-view 2025.8.5 + + org.eclipse.syson + syson-table-requirements-view + 2025.8.5 + org.eclipse.syson syson-tree-explorer-view @@ -148,6 +153,12 @@ ${sirius.web.version} test + + org.eclipse.sirius + sirius-components-tables-tests + ${sirius.web.version} + test + org.eclipse.sirius sirius-components-trees-tests diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/CreateRequirementMutationRunner.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/CreateRequirementMutationRunner.java new file mode 100644 index 000000000..c168651d5 --- /dev/null +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/CreateRequirementMutationRunner.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * 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.syson.application.controllers.diagrams.graphql; + +import java.util.Objects; + +import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; +import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; +import org.eclipse.syson.table.requirements.view.dto.CreateRequirementInput; +import org.springframework.stereotype.Service; + +/** + * Used to invoke a create requirement table action with the GraphQL API. + * + * @author arichard + */ +@Service +public class CreateRequirementMutationRunner implements IMutationRunner { + + private static final String CREATE_REQUIREMENT_MUTATION = """ + mutation createRequirement($input: CreateRequirementInput!) { + createRequirement(input: $input) { + __typename + ... on ErrorPayload { + messages { + body + level + } + } + ... on SuccessPayload { + messages { + body + level + } + } + } + } + """; + + private final IGraphQLRequestor graphQLRequestor; + + public CreateRequirementMutationRunner(IGraphQLRequestor graphQLRequestor) { + this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); + } + + @Override + public String run(CreateRequirementInput input) { + return this.graphQLRequestor.execute(CREATE_REQUIREMENT_MUTATION, input); + } +} \ No newline at end of file diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/ExposeRequirementsMutationRunner.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/ExposeRequirementsMutationRunner.java new file mode 100644 index 000000000..99e818a94 --- /dev/null +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/diagrams/graphql/ExposeRequirementsMutationRunner.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * 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.syson.application.controllers.diagrams.graphql; + +import java.util.Objects; + +import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; +import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; +import org.eclipse.syson.table.requirements.view.dto.ExposeRequirementsInput; +import org.springframework.stereotype.Service; + +/** + * Used to invoke a expose requirements table action with the GraphQL API. + * + * @author arichard + */ +@Service +public class ExposeRequirementsMutationRunner implements IMutationRunner { + + private static final String EXPOSE_REQUIREMENTS_MUTATION = """ + mutation exposeRequirements($input: ExposeRequirementsInput!) { + exposeRequirements(input: $input) { + __typename + ... on ErrorPayload { + messages { + body + level + } + } + ... on SuccessPayload { + messages { + body + level + } + } + } + } + """; + + private final IGraphQLRequestor graphQLRequestor; + + public ExposeRequirementsMutationRunner(IGraphQLRequestor graphQLRequestor) { + this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); + } + + @Override + public String run(ExposeRequirementsInput input) { + return this.graphQLRequestor.execute(EXPOSE_REQUIREMENTS_MUTATION, input); + } +} \ No newline at end of file diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/tables/RequirementsTableControllerIntegrationTests.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/tables/RequirementsTableControllerIntegrationTests.java new file mode 100644 index 000000000..a880d8378 --- /dev/null +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/controllers/tables/RequirementsTableControllerIntegrationTests.java @@ -0,0 +1,426 @@ +/******************************************************************************* + * 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.syson.application.controllers.tables; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.sirius.components.tables.tests.TableEventPayloadConsumer.assertRefreshedTableThat; + +import com.jayway.jsonpath.JsonPath; + +import java.time.Duration; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; + +import org.eclipse.sirius.components.collaborative.dto.CreateRepresentationInput; +import org.eclipse.sirius.components.collaborative.tables.TableEventInput; +import org.eclipse.sirius.components.collaborative.tables.dto.InvokeRowContextMenuEntryInput; +import org.eclipse.sirius.components.core.api.SuccessPayload; +import org.eclipse.sirius.components.tables.TextareaCell; +import org.eclipse.sirius.components.tables.TextfieldCell; +import org.eclipse.sirius.components.tables.tests.graphql.InvokeRowContextMenuEntryMutationRunner; +import org.eclipse.sirius.components.tables.tests.graphql.RowContextMenuQueryRunner; +import org.eclipse.sirius.components.tables.tests.graphql.TableEventSubscriptionRunner; +import org.eclipse.sirius.web.tests.services.api.IGivenCommittedTransaction; +import org.eclipse.sirius.web.tests.services.api.IGivenCreatedTableSubscription; +import org.eclipse.sirius.web.tests.services.api.IGivenInitialServerState; +import org.eclipse.syson.AbstractIntegrationTests; +import org.eclipse.syson.application.controllers.diagrams.graphql.CreateRequirementMutationRunner; +import org.eclipse.syson.application.controllers.diagrams.graphql.ExposeRequirementsMutationRunner; +import org.eclipse.syson.application.data.RequirementsTableTestProjectData; +import org.eclipse.syson.table.requirements.view.dto.CreateRequirementInput; +import org.eclipse.syson.table.requirements.view.dto.ExposeRequirementsInput; +import org.eclipse.syson.util.SysONRepresentationDescriptionIdentifiers; +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.test.context.jdbc.Sql; +import org.springframework.test.context.jdbc.SqlConfig; +import org.springframework.transaction.annotation.Transactional; + +import reactor.core.publisher.Flux; +import reactor.test.StepVerifier; + +/** + * Integration tests of the Requirements view table description. + * + * @author arichard + */ +@Transactional +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +public class RequirementsTableControllerIntegrationTests extends AbstractIntegrationTests { + + @Autowired + private IGivenInitialServerState givenInitialServerState; + + @Autowired + private IGivenCommittedTransaction givenCommittedTransaction; + + @Autowired + private IGivenCreatedTableSubscription givenCreatedTableSubscription; + + @Autowired + private CreateRequirementMutationRunner createRequirementMutationRunner; + + @Autowired + private ExposeRequirementsMutationRunner exposeRequirementsMutationRunner; + + @Autowired + private RowContextMenuQueryRunner rowContextMenuQueryRunner; + + @Autowired + private InvokeRowContextMenuEntryMutationRunner invokeRowContextMenuEntryMutationRunner; + + @Autowired + private TableEventSubscriptionRunner tableEventSubscriptionRunner; + + @BeforeEach + public void beforeEach() { + this.givenInitialServerState.initialize(); + } + + private Flux givenSubscriptionToNewViewTableRepresentation() { + var input = new CreateRepresentationInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + SysONRepresentationDescriptionIdentifiers.REQUIREMENTS_TABLE_VIEW_DESCRIPTION_ID, + RequirementsTableTestProjectData.SemanticIds.VIEW_1_ELEMENT_ID, + "NewRequirementsTableView"); + return this.givenCreatedTableSubscription.createAndSubscribe(input); + } + + private Flux givenSubscriptionToExistingViewTableRepresentation() { + this.givenCommittedTransaction.commit(); + + var tableEventInput = new TableEventInput(UUID.randomUUID(), RequirementsTableTestProjectData.EDITING_CONTEXT_ID, RequirementsTableTestProjectData.GraphicalIds.TABLE_ID); + var flux = this.tableEventSubscriptionRunner.run(tableEventInput); + + this.givenCommittedTransaction.commit(); + + return flux; + } + + @DisplayName("Given a new requirements view table description, when a subscription is created, then the table is render") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void givenNewRequirementsViewTableDescriptionWhenSubscriptionIsCreatedThenTableIsRender() { + var flux = this.givenSubscriptionToNewViewTableRepresentation(); + + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + + assertThat(table.getColumns()).hasSize(3); + assertThat(table.getColumns().get(0).getHeaderLabel()).isEqualTo("DeclaredName"); + assertThat(table.getColumns().get(0).getHeaderIndexLabel()).isEqualTo(""); + assertThat(table.getColumns().get(1).getHeaderLabel()).isEqualTo("ReqId"); + assertThat(table.getColumns().get(1).getHeaderIndexLabel()).isEqualTo(""); + assertThat(table.getColumns().get(2).getHeaderLabel()).isEqualTo("Documentation"); + assertThat(table.getColumns().get(2).getHeaderIndexLabel()).isEqualTo(""); + + assertThat(table.getLines()).hasSize(0); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + + @DisplayName("Given a existing requirements view table description, when a subscription is created, then the table is render") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void givenRequirementsViewTableDescriptionWhenSubscriptionIsCreatedThenTableIsRender() { + var flux = this.givenSubscriptionToExistingViewTableRepresentation(); + + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + + assertThat(table.getColumns()).hasSize(3); + assertThat(table.getColumns().get(0).getHeaderLabel()).isEqualTo("DeclaredName"); + assertThat(table.getColumns().get(0).getHeaderIndexLabel()).isEqualTo(""); + assertThat(table.getColumns().get(1).getHeaderLabel()).isEqualTo("ReqId"); + assertThat(table.getColumns().get(1).getHeaderIndexLabel()).isEqualTo(""); + assertThat(table.getColumns().get(2).getHeaderLabel()).isEqualTo("Documentation"); + assertThat(table.getColumns().get(2).getHeaderIndexLabel()).isEqualTo(""); + + assertThat(table.getLines()).hasSize(0); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + + @DisplayName("Given a requirements view table, when the create requirement table action invoked, then the create requirement table action is correctly executed") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void testCreateRequirementTableAction() { + var flux = this.givenSubscriptionToNewViewTableRepresentation(); + + var tableId = new AtomicReference(); + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(0); + tableId.set(table.getId()); + }); + + Runnable createRequirementTask = () -> { + var createRequirementInput = new CreateRequirementInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get()); + + var result = this.createRequirementMutationRunner.run(createRequirementInput); + String typename = JsonPath.read(result, "$.data.createRequirement.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(1); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement3"); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .then(createRequirementTask) + .consumeNextWith(updatedTableContentConsumer) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + + @DisplayName("Given a requirements view table, when the expose requirements table action invoked, then the expose requirements table action is correctly executed") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void testExposeRequirementsTableAction() { + var flux = this.givenSubscriptionToExistingViewTableRepresentation(); + + var tableId = new AtomicReference(); + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(0); + tableId.set(table.getId()); + }); + + Runnable exposeRequirementsTask = () -> { + var createRequirementInput = new ExposeRequirementsInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get()); + + var result = this.exposeRequirementsMutationRunner.run(createRequirementInput); + String typename = JsonPath.read(result, "$.data.exposeRequirements.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(2); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement1"); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(1)).getValue()).isEqualTo("ReqR1"); + assertThat(((TextareaCell) table.getLines().get(0).getCells().get(2)).getValue()).isEqualTo("doc R1"); + assertThat(((TextfieldCell) table.getLines().get(1).getCells().get(0)).getValue()).isEqualTo("requirement2"); + assertThat(((TextfieldCell) table.getLines().get(1).getCells().get(1)).getValue()).isEqualTo("ReqR2"); + assertThat(((TextareaCell) table.getLines().get(1).getCells().get(2)).getValue()).isEqualTo("doc R2"); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .then(exposeRequirementsTask) + .consumeNextWith(updatedTableContentConsumer) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + + @DisplayName("Given a requirements view table, when the delete from table row action invoked, then the delete from table row action is correctly executed") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void testDeleteFromTable() { + var flux = this.givenSubscriptionToExistingViewTableRepresentation(); + + var tableId = new AtomicReference(); + var rowId = new AtomicReference(); + + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(0); + tableId.set(table.getId()); + }); + + Runnable exposeRequirementsTask = () -> { + var createRequirementInput = new ExposeRequirementsInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get()); + + var result = this.exposeRequirementsMutationRunner.run(createRequirementInput); + String typename = JsonPath.read(result, "$.data.exposeRequirements.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumerFirst = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(2); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement1"); + assertThat(((TextfieldCell) table.getLines().get(1).getCells().get(0)).getValue()).isEqualTo("requirement2"); + rowId.set(table.getLines().get(0).getId()); + }); + + var actionId = new AtomicReference(); + Runnable getContextMenuEntriesTask = () -> { + Map variables = Map.of( + "editingContextId", RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + "representationId", tableId.get(), + "tableId", tableId.get(), + "rowId", rowId.get().toString()); + + var result = this.rowContextMenuQueryRunner.run(variables); + List actionLabels = JsonPath.read(result, "$.data.viewer.editingContext.representation.description.rowContextMenuEntries[*].label"); + assertThat(actionLabels).isNotEmpty().hasSize(2); + assertThat(actionLabels.get(0)).isEqualTo("Delete from model"); + assertThat(actionLabels.get(1)).isEqualTo("Delete from table"); + + List actionIds = JsonPath.read(result, "$.data.viewer.editingContext.representation.description.rowContextMenuEntries[*].id"); + actionId.set(actionIds.get(1)); + }; + + Runnable invokeDeleteFromTableAction = () -> { + var invokeRowContextMenuEntryInput = new InvokeRowContextMenuEntryInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get(), + tableId.get(), + rowId.get(), + actionId.get()); + + var result = this.invokeRowContextMenuEntryMutationRunner.run(invokeRowContextMenuEntryInput); + String typename = JsonPath.read(result, "$.data.invokeRowContextMenuEntry.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumerSecond = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(1); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement2"); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .then(exposeRequirementsTask) + .consumeNextWith(updatedTableContentConsumerFirst) + .then(getContextMenuEntriesTask) + .then(invokeDeleteFromTableAction) + .consumeNextWith(updatedTableContentConsumerSecond) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } + + @DisplayName("Given a requirements view table, when the delete from model row action invoked, then the delete from model row action is correctly executed") + @Sql(scripts = { RequirementsTableTestProjectData.SCRIPT_PATH }, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD, + config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Sql(scripts = { "/scripts/cleanup.sql" }, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + @Test + public void testDeleteFromModel() { + var flux = this.givenSubscriptionToExistingViewTableRepresentation(); + + var tableId = new AtomicReference(); + var rowId = new AtomicReference(); + + Consumer tableContentConsumer = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(0); + tableId.set(table.getId()); + }); + + Runnable exposeRequirementsTask = () -> { + var createRequirementInput = new ExposeRequirementsInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get()); + + var result = this.exposeRequirementsMutationRunner.run(createRequirementInput); + String typename = JsonPath.read(result, "$.data.exposeRequirements.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumerFirst = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(2); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement1"); + assertThat(((TextfieldCell) table.getLines().get(1).getCells().get(0)).getValue()).isEqualTo("requirement2"); + rowId.set(table.getLines().get(0).getId()); + }); + + var actionId = new AtomicReference(); + Runnable getContextMenuEntriesTask = () -> { + Map variables = Map.of( + "editingContextId", RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + "representationId", tableId.get(), + "tableId", tableId.get(), + "rowId", rowId.get().toString()); + + var result = this.rowContextMenuQueryRunner.run(variables); + List actionLabels = JsonPath.read(result, "$.data.viewer.editingContext.representation.description.rowContextMenuEntries[*].label"); + assertThat(actionLabels).isNotEmpty().hasSize(2); + assertThat(actionLabels.get(0)).isEqualTo("Delete from model"); + + List actionIds = JsonPath.read(result, "$.data.viewer.editingContext.representation.description.rowContextMenuEntries[*].id"); + actionId.set(actionIds.get(0)); + }; + + Runnable invokeDeleteFromModelAction = () -> { + var invokeRowContextMenuEntryInput = new InvokeRowContextMenuEntryInput( + UUID.randomUUID(), + RequirementsTableTestProjectData.EDITING_CONTEXT_ID, + tableId.get(), + tableId.get(), + rowId.get(), + actionId.get()); + + var result = this.invokeRowContextMenuEntryMutationRunner.run(invokeRowContextMenuEntryInput); + String typename = JsonPath.read(result, "$.data.invokeRowContextMenuEntry.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer updatedTableContentConsumerSecond = assertRefreshedTableThat(table -> { + assertThat(table).isNotNull(); + assertThat(table.getLines()).hasSize(1); + assertThat(((TextfieldCell) table.getLines().get(0).getCells().get(0)).getValue()).isEqualTo("requirement2"); + }); + + StepVerifier.create(flux) + .consumeNextWith(tableContentConsumer) + .then(exposeRequirementsTask) + .consumeNextWith(updatedTableContentConsumerFirst) + .then(getContextMenuEntriesTask) + .then(invokeDeleteFromModelAction) + .consumeNextWith(updatedTableContentConsumerSecond) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } +} diff --git a/backend/application/syson-application/src/test/java/org/eclipse/syson/application/data/RequirementsTableTestProjectData.java b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/data/RequirementsTableTestProjectData.java new file mode 100644 index 000000000..77c1cbec0 --- /dev/null +++ b/backend/application/syson-application/src/test/java/org/eclipse/syson/application/data/RequirementsTableTestProjectData.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * 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.syson.application.data; + +/** + * Project data for the "RequirementsTable" project. + * + * @author arichard + */ +public class RequirementsTableTestProjectData { + + public static final String SCRIPT_PATH = "/scripts/database-content/RequirementsTable.sql"; + + public static final String EDITING_CONTEXT_ID = "62bc073d-9b5c-4aaa-9a1c-44e727fc1898"; + + /** + * Ids of graphical elements. + */ + public static class GraphicalIds { + + public static final String TABLE_ID = "0683aba1-3206-4ace-aac5-62120b01f344"; + + } + + /** + * Ids for the semantic elements. + */ + public static final class SemanticIds { + + public static final String PACKAGE_1_ELEMENT_ID = "51ef7a57-034b-4061-9b46-b647fbeb6451"; + + public static final String VIEW_1_ELEMENT_ID = "cf05a05e-62c0-4e28-9874-b2900b9096d7"; + } + +} diff --git a/backend/application/syson-application/src/test/resources/scripts/database-content/RequirementsTable.sql b/backend/application/syson-application/src/test/resources/scripts/database-content/RequirementsTable.sql new file mode 100644 index 000000000..b8006ecac --- /dev/null +++ b/backend/application/syson-application/src/test/resources/scripts/database-content/RequirementsTable.sql @@ -0,0 +1,100 @@ +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 17.5 (Debian 17.5-1.pgdg120+1) +-- Dumped by pg_dump version 17.6 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Data for Name: semantic_data; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.semantic_data (id, created_on, last_modified_on) VALUES ('62bc073d-9b5c-4aaa-9a1c-44e727fc1898', '2025-09-24 09:12:10.485886+00', '2025-09-24 09:13:26.542996+00'); + + +-- +-- Data for Name: document; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.document (id, semantic_data_id, name, content, created_on, last_modified_on, is_read_only) VALUES ('59aaff8d-4cfb-4ee9-9cd6-09129dc37702', '62bc073d-9b5c-4aaa-9a1c-44e727fc1898', 'SysMLv2.sysml', '{"json":{"version":"1.0","encoding":"utf-8"},"ns":{"sysml":"http://www.eclipse.org/syson/sysml"},"migration":{"lastMigrationPerformed":"none","migrationVersion":"2025.8.0-202508220000"},"content":[{"id":"9f2d1708-219a-4136-af72-8382e965c9b6","eClass":"sysml:Namespace","data":{"elementId":"17c685e7-ddda-4f8b-ab43-b50073fa17d6","ownedRelationship":[{"id":"17fad87c-e730-47e8-9439-d138df0d6d5f","eClass":"sysml:OwningMembership","data":{"elementId":"48e99a1f-f50e-455f-88b8-5d6b7ccd22d6","ownedRelatedElement":[{"id":"2de8a9aa-929a-4efb-85d4-b188c4682a9a","eClass":"sysml:Package","data":{"declaredName":"Package1","elementId":"51ef7a57-034b-4061-9b46-b647fbeb6451","ownedRelationship":[{"id":"a25665aa-e45e-4128-9544-752664dfcc6f","eClass":"sysml:OwningMembership","data":{"elementId":"d9f29320-44f1-4d82-a068-ade4149914e8","ownedRelatedElement":[{"id":"fbf003a8-6ab9-4a90-be51-dea091f0783e","eClass":"sysml:ViewUsage","data":{"declaredName":"view1","elementId":"cf05a05e-62c0-4e28-9874-b2900b9096d7"}}]}},{"id":"c54a6af9-086c-4fb7-85d2-c8e2858bfb4a","eClass":"sysml:OwningMembership","data":{"elementId":"703c4cff-b257-4ec3-9e01-9e467b1e3454","ownedRelatedElement":[{"id":"36dbf043-a777-4053-8793-1029ccbe14dc","eClass":"sysml:RequirementUsage","data":{"declaredName":"requirement1","elementId":"996ec0ef-46ed-4d47-833c-622a07fce7c8","ownedRelationship":[{"id":"52704522-fa34-4e1f-ba7a-413830262d37","eClass":"sysml:OwningMembership","data":{"elementId":"2b4a01d9-9dde-4f87-80e7-a939473b71d6","ownedRelatedElement":[{"id":"8d31f3a3-7a38-4af7-a4fe-1f535cc69cb5","eClass":"sysml:Documentation","data":{"elementId":"e2a3cc32-fda6-44ba-8dc5-975c3ad3747f","body":"doc R1"}}]}}],"isComposite":true,"reqId":"ReqR1"}}]}},{"id":"696239fa-160f-41d7-b0c2-3b96bae2bd60","eClass":"sysml:OwningMembership","data":{"elementId":"644fa892-7ea2-4ad4-93bd-87b8f5fb26b4","ownedRelatedElement":[{"id":"43047917-0f14-4fb6-b3c5-c848273c6e14","eClass":"sysml:RequirementUsage","data":{"declaredName":"requirement2","elementId":"b22831ef-a859-40d5-a12a-89f6889fb819","ownedRelationship":[{"id":"4d249efc-5745-4272-a927-47d90015fa19","eClass":"sysml:OwningMembership","data":{"elementId":"75e32352-700a-4edc-ae63-21cf1ee4b021","ownedRelatedElement":[{"id":"099ee63d-7ef7-401e-997a-0ce0f33db7f4","eClass":"sysml:Documentation","data":{"elementId":"bc49f77c-d583-474d-9997-5938827673bb","body":"doc R2"}}]}}],"isComposite":true,"reqId":"ReqR2"}}]}}]}}]}}]}}]}', '2025-09-24 09:13:26.542964+00', '2025-09-24 09:13:26.542964+00', false); + + +-- +-- Data for Name: image; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + + + +-- +-- Data for Name: library; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + + + +-- +-- Data for Name: project; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.project (id, name, created_on, last_modified_on) VALUES ('0bbae5c2-5128-43e5-9aa1-697968663973', 'RequirementsTable', '2025-09-24 09:12:10.457854+00', '2025-09-24 09:12:20.472371+00'); + + +-- +-- Data for Name: nature; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + + + +-- +-- Data for Name: project_image; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + + + +-- +-- Data for Name: project_semantic_data; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.project_semantic_data (id, project_id, semantic_data_id, name, created_on, last_modified_on) VALUES ('f1d62b1b-bc09-4a82-afcf-89701bceb4ba', '0bbae5c2-5128-43e5-9aa1-697968663973', '62bc073d-9b5c-4aaa-9a1c-44e727fc1898', 'main', '2025-09-24 09:12:10.49635+00', '2025-09-24 09:12:10.49635+00'); + + +-- +-- Data for Name: representation_metadata; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.representation_metadata (id, target_object_id, description_id, label, kind, created_on, last_modified_on, documentation, semantic_data_id) VALUES ('0683aba1-3206-4ace-aac5-62120b01f344', 'fbf003a8-6ab9-4a90-be51-dea091f0783e', 'siriusComponents://representationDescription?kind=tableDescription&sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=05ffd328-a162-3d7e-b09b-7757ef23ef01', 'view1', 'siriusComponents://representation?type=Table', '2025-09-24 09:12:34.262372+00', '2025-09-24 09:12:34.262372+00', '', '62bc073d-9b5c-4aaa-9a1c-44e727fc1898'); + + +-- +-- Data for Name: representation_content; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.representation_content (id, content, last_migration_performed, migration_version, created_on, last_modified_on) VALUES ('0683aba1-3206-4ace-aac5-62120b01f344', '{"id":"0683aba1-3206-4ace-aac5-62120b01f344","kind":"siriusComponents://representation?type=Table","targetObjectId":"fbf003a8-6ab9-4a90-be51-dea091f0783e","targetObjectKind":"siriusComponents://semantic?domain=sysml&entity=ViewUsage","descriptionId":"siriusComponents://representationDescription?kind=tableDescription&sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=05ffd328-a162-3d7e-b09b-7757ef23ef01","stripeRow":true,"lines":[],"columns":[{"id":"4fe41d55-8608-34d1-b6d3-64e15611fe50","targetObjectId":"DeclaredName","targetObjectKind":"","descriptionId":"siriusComponents://columnDescription?sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=51d7f6df-a502-33bd-b270-b54895183960","headerLabel":"DeclaredName","headerIconURLs":[],"headerIndexLabel":"","width":250,"resizable":true,"hidden":false,"filterVariant":"","sortable":true,"index":0},{"id":"5c9213de-2247-3508-8d82-785a11db7741","targetObjectId":"ReqId","targetObjectKind":"","descriptionId":"siriusComponents://columnDescription?sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=1e54ee10-dc2f-3965-86d9-05d6c6011240","headerLabel":"ReqId","headerIconURLs":[],"headerIndexLabel":"","width":150,"resizable":true,"hidden":false,"filterVariant":"","sortable":true,"index":0},{"id":"380554d8-5a01-3b9c-9bea-238f9ed84e5d","targetObjectId":"Documentation","targetObjectKind":"","descriptionId":"siriusComponents://columnDescription?sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=a627de2f-49a9-351e-9ebd-1fcca9743a04","headerLabel":"Documentation","headerIconURLs":[],"headerIndexLabel":"","width":400,"resizable":true,"hidden":false,"filterVariant":"","sortable":true,"index":0}],"paginationData":{"hasPreviousPage":false,"hasNextPage":false,"totalRowCount":0},"globalFilter":"","columnFilters":[],"enableSubRows":false,"columnSort":[],"pageSizeOptions":[10,20,50],"defaultPageSize":10}', 'none', '0', '2025-09-24 09:12:34.27862+00', '2025-09-24 09:12:34.27862+00'); + + +-- +-- Data for Name: semantic_data_dependency; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + + + +-- +-- Data for Name: semantic_data_domain; Type: TABLE DATA; Schema: public; Owner: dbuser +-- + +INSERT INTO public.semantic_data_domain (semantic_data_id, uri) VALUES ('62bc073d-9b5c-4aaa-9a1c-44e727fc1898', 'http://www.eclipse.org/syson/sysml'); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/backend/application/syson-application/src/test/resources/scripts/dump-test-data.sh b/backend/application/syson-application/src/test/resources/scripts/dump-test-data.sh index 6ca80741f..a40c28bb0 100755 --- a/backend/application/syson-application/src/test/resources/scripts/dump-test-data.sh +++ b/backend/application/syson-application/src/test/resources/scripts/dump-test-data.sh @@ -15,9 +15,14 @@ if [[ $isTestContainerRunning -ne 1 ]]; then fi echo "Extracting test data from syson-db to ./${1}" -# Remove winpty if you are not calling the script from git bash + +# Use the following commands if you are not calling the script from git bash pg_dump --host localhost --port 5433 --file "./${1}" --username dbuser --format=p --encoding UTF8 --data-only --column-inserts --table public.document --table public.project --table public.representation_metadata --table public.representation_content --table public.semantic_data --table public.project_semantic_data --table public.semantic_data_dependency --table public.semantic_data_domain --table public.image --table public.library --table public.nature --table public.project_image syson-db -echo "Done" +# Use the following commands if you are calling the script from git bash +#winpty pg_dump --host localhost --port 5433 --file "./${1}" --username dbuser --format=p --encoding UTF8 --data-only --column-inserts --table public.document --table public.project --table public.representation_metadata --table public.representation_content --table public.semantic_data --table public.project_semantic_data --table public.semantic_data_dependency --table public.semantic_data_domain --table public.image --table public.library --table public.nature --table public.project_image syson-db +#echo "Cleaning test data" +#sed -i "/^SELECT pg_catalog.set_config('search_path', '', false);/d" ./${1} +echo "Done" exit 0 \ No newline at end of file diff --git a/backend/application/syson-application/src/test/resources/scripts/initialize-test-data.sh b/backend/application/syson-application/src/test/resources/scripts/initialize-test-data.sh index 3952498c6..eb91608cc 100755 --- a/backend/application/syson-application/src/test/resources/scripts/initialize-test-data.sh +++ b/backend/application/syson-application/src/test/resources/scripts/initialize-test-data.sh @@ -16,8 +16,13 @@ if [[ $isTestContainerRunning -ne 1 ]]; then fi echo "Cleaning syson-db & importing ./${1}" -# Remove winpty if you are not calling the script from git bash -winpty psql -U dbuser -d syson-db --host "localhost" --port "5433" -f ./cleanup.sql -f ./${1} + +# Use the following command if you are not calling the script from git bash +psql -U dbuser -d syson-db --host "localhost" --port "5433" -f ./cleanup.sql -f ./${1} + +# Use the following command if you are calling the script from git bash +#winpty psql -U dbuser -d syson-db --host "localhost" --port "5433" -f ./cleanup.sql -f ./${1} + echo "Done" exit 0 \ No newline at end of file diff --git a/backend/metamodel/syson-sysml-metamodel/src/main/java/org/eclipse/syson/sysml/util/ElementUtil.java b/backend/metamodel/syson-sysml-metamodel/src/main/java/org/eclipse/syson/sysml/util/ElementUtil.java index be0bdff55..d67ed765a 100644 --- a/backend/metamodel/syson-sysml-metamodel/src/main/java/org/eclipse/syson/sysml/util/ElementUtil.java +++ b/backend/metamodel/syson-sysml-metamodel/src/main/java/org/eclipse/syson/sysml/util/ElementUtil.java @@ -36,6 +36,7 @@ import org.eclipse.syson.sysml.Membership; import org.eclipse.syson.sysml.Namespace; import org.eclipse.syson.sysml.Specialization; +import org.eclipse.syson.sysml.SysmlPackage; import org.eclipse.syson.sysml.TypeFeaturing; import org.eclipse.syson.sysml.VisibilityKind; @@ -231,22 +232,16 @@ public T findByNameAndType(Collection roots, String } /** - * Count the number of existing elements having the same type than the given Element inside the owning Namespace of - * the given Element. + * Count the number of existing ViewUsages inside the given Namespace. * - * @param element - * the given {@link Element}. - * @return the number of existing elements having the same type than the given Element inside the owning Namespace - * of the given Element. + * @param namespace + * the given {@link Namespace}. + * @return the number of existing ViewUsages inside the given Namespace. */ - public long existingElementsCount(Element element) { - Namespace owningNamespace = element.getOwningNamespace(); - if (owningNamespace != null) { - return owningNamespace.getOwnedMember().stream() - .filter(member -> element.eClass().equals(member.eClass())) - .count(); - } - return 0; + public long existingViewUsagesCountForRepresentationCreation(Namespace namespace) { + return namespace.getOwnedMember().stream() + .filter(member -> SysmlPackage.eINSTANCE.getViewUsage().equals(member.eClass())) + .count(); } /** diff --git a/backend/releng/syson-test-coverage/pom.xml b/backend/releng/syson-test-coverage/pom.xml index 9b856ddde..8dbc66775 100644 --- a/backend/releng/syson-test-coverage/pom.xml +++ b/backend/releng/syson-test-coverage/pom.xml @@ -100,6 +100,11 @@ syson-standard-diagrams-view 2025.8.5 + + org.eclipse.syson + syson-table-requirements-view + 2025.8.5 + org.eclipse.syson syson-tree-explorer-view diff --git a/backend/services/syson-services/src/main/java/org/eclipse/syson/services/ElementInitializerSwitch.java b/backend/services/syson-services/src/main/java/org/eclipse/syson/services/ElementInitializerSwitch.java index 71f4cb908..b7928d7f7 100644 --- a/backend/services/syson-services/src/main/java/org/eclipse/syson/services/ElementInitializerSwitch.java +++ b/backend/services/syson-services/src/main/java/org/eclipse/syson/services/ElementInitializerSwitch.java @@ -119,7 +119,7 @@ public Element caseDependency(Dependency object) { @Override public Element caseDefinition(Definition object) { - var existingElements = this.elementUtil.existingElementsCount(object); + var existingElements = this.existingElementsCount(object); object.setDeclaredName(object.eClass().getName() + existingElements); return object; } @@ -138,7 +138,7 @@ public Element caseElement(Element object) { @Override public Element caseEnumerationDefinition(EnumerationDefinition object) { object.setIsVariation(true); - var existingElements = this.elementUtil.existingElementsCount(object); + var existingElements = this.existingElementsCount(object); object.setDeclaredName(object.eClass().getName() + existingElements); return object; } @@ -155,7 +155,7 @@ public Element caseFlowUsage(FlowUsage object) { @Override public Element casePackage(Package object) { - var existingElements = this.elementUtil.existingElementsCount(object); + var existingElements = this.existingElementsCount(object); object.setDeclaredName(object.eClass().getName() + existingElements); return object; } @@ -193,7 +193,7 @@ public Element casePerformActionUsage(PerformActionUsage object) { @Override public Element casePortDefinition(PortDefinition object) { - var existingElements = this.elementUtil.existingElementsCount(object); + var existingElements = this.existingElementsCount(object); object.setDeclaredName(object.eClass().getName() + existingElements); OwningMembership owningMembership = SysmlFactory.eINSTANCE.createOwningMembership(); object.getOwnedRelationship().add(owningMembership); @@ -272,7 +272,7 @@ public Element caseUsage(Usage object) { defaultName = defaultName.substring(0, defaultName.length() - 5); } - var existingElements = this.elementUtil.existingElementsCount(object); + var existingElements = this.existingElementsCount(object); object.setDeclaredName(defaultName + existingElements); object.setIsComposite(true); @@ -290,6 +290,25 @@ public Element caseViewUsage(ViewUsage object) { return object; } + /** + * Count the number of existing elements having the same type than the given Element inside the owning Namespace of + * the given Element. + * + * @param element + * the given {@link Element}. + * @return the number of existing elements having the same type than the given Element inside the owning Namespace + * of the given Element. + */ + public long existingElementsCount(Element element) { + Namespace owningNamespace = element.getOwningNamespace(); + if (owningNamespace != null) { + return owningNamespace.getOwnedMember().stream() + .filter(member -> element.eClass().equals(member.eClass())) + .count(); + } + return 0; + } + private ParameterMembership createParameterMembershipWithReferenceUsage(String refName, FeatureDirectionKind direction) { var reference = SysmlFactory.eINSTANCE.createReferenceUsage(); reference.setDirection(direction); diff --git a/backend/services/syson-services/src/main/java/org/eclipse/syson/services/UtilService.java b/backend/services/syson-services/src/main/java/org/eclipse/syson/services/UtilService.java index 186ab3ddc..23fa9961d 100644 --- a/backend/services/syson-services/src/main/java/org/eclipse/syson/services/UtilService.java +++ b/backend/services/syson-services/src/main/java/org/eclipse/syson/services/UtilService.java @@ -1015,16 +1015,14 @@ public boolean isEmptyObjectiveRequirement(Element self) { } /** - * Count the number of existing elements having the same type than the given Element inside the owning Namespace of - * the given Element. + * Count the number of existing ViewUsages inside the given Namespace. * - * @param element - * the given {@link Element}. - * @return the number of existing elements having the same type than the given Element inside the owning Namespace - * of the given Element. + * @param namespace + * the given {@link Namespace}. + * @return the number of existing ViewUsages inside the given Namespace. */ - public long existingElementsCount(Element element) { - return this.elementUtil.existingElementsCount(element); + public long existingViewUsagesCountForRepresentationCreation(Namespace namespace) { + return this.elementUtil.existingViewUsagesCountForRepresentationCreation(namespace); } private ReferenceUsage addConnectorEnd(ConnectorAsUsage connectorAsUsage, Feature end, Type connectorContainer) { diff --git a/backend/services/syson-services/src/main/java/org/eclipse/syson/util/AQLConstants.java b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/AQLConstants.java index d50149ca4..2b5dc5456 100644 --- a/backend/services/syson-services/src/main/java/org/eclipse/syson/util/AQLConstants.java +++ b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/AQLConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 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 @@ -23,6 +23,10 @@ public class AQLConstants { public static final String AQL_SELF = "aql:self"; + public static final String AQL_TRUE = "aql:true"; + + public static final String AQL_FALSE = "aql:false"; + public static final String DEFAULT_LABEL_EXPRESSION = "aql:self.declaredName"; public static final String DIAGRAM = "diagram"; diff --git a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/GetIntermediateContainerCreationSwitch.java b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/GetIntermediateContainerCreationSwitch.java similarity index 95% rename from backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/GetIntermediateContainerCreationSwitch.java rename to backend/services/syson-services/src/main/java/org/eclipse/syson/util/GetIntermediateContainerCreationSwitch.java index 733e72346..d6fa9f254 100644 --- a/backend/application/syson-application-configuration/src/main/java/org/eclipse/syson/application/services/GetIntermediateContainerCreationSwitch.java +++ b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/GetIntermediateContainerCreationSwitch.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 , 2025 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.syson.application.services; +package org.eclipse.syson.util; import java.util.Objects; import java.util.Optional; @@ -30,10 +30,9 @@ import org.eclipse.syson.sysml.SysmlPackage; import org.eclipse.syson.sysml.TextualRepresentation; import org.eclipse.syson.sysml.Usage; -import org.eclipse.syson.util.SysmlEClassSwitch; /** - * Switch for retrieving the intermediate container of the element to create, if there is one.. + * Switch for retrieving the intermediate container of the element to create, if there is one. * * @author arichard */ diff --git a/backend/services/syson-services/src/main/java/org/eclipse/syson/util/SysONRepresentationDescriptionIdentifiers.java b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/SysONRepresentationDescriptionIdentifiers.java index ae611369a..5484b3275 100644 --- a/backend/services/syson-services/src/main/java/org/eclipse/syson/util/SysONRepresentationDescriptionIdentifiers.java +++ b/backend/services/syson-services/src/main/java/org/eclipse/syson/util/SysONRepresentationDescriptionIdentifiers.java @@ -19,11 +19,11 @@ */ public final class SysONRepresentationDescriptionIdentifiers { - // All the general view diagrams have the same description + // All standard diagrams have the same description public static final String GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID = "siriusComponents://representationDescription?kind=diagramDescription&sourceKind=view&sourceId=8dcd14b0-6259-3193-ad2c-743f394c68e4&sourceElementId=db495705-e917-319b-af55-a32ad63f4089"; /** - * All diagram descriptions have been merged into one. + * All standard diagram descriptions have been merged into one. * * @deprecated use GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID instead. */ @@ -31,7 +31,7 @@ public final class SysONRepresentationDescriptionIdentifiers { public static final String INTERCONNECTION_VIEW_DIAGRAM_DESCRIPTION_ID = "siriusComponents://representationDescription?kind=diagramDescription&sourceKind=view&sourceId=74c5d045-51d7-359f-9634-611d0f1bef3d&sourceElementId=e1bd3b6d-357b-3068-b2e9-e0c1e19d6856"; /** - * All diagram descriptions have been merged into one. + * All standard diagram descriptions have been merged into one. * * @deprecated use GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID instead. */ @@ -39,13 +39,15 @@ public final class SysONRepresentationDescriptionIdentifiers { public static final String ACTION_FLOW_VIEW_DIAGRAM_DESCRIPTION_ID = "siriusComponents://representationDescription?kind=diagramDescription&sourceKind=view&sourceId=0d6e5145-02ea-336b-b4d4-9be6b0e63786&sourceElementId=ea3511e5-5ba5-3d2c-8e80-9182db336675"; /** - * All diagram descriptions have been merged into one. + * All standard diagram descriptions have been merged into one. * * @deprecated use GENERAL_VIEW_DIAGRAM_DESCRIPTION_ID instead. */ @Deprecated public static final String STATE_TRANSITION_VIEW_DIAGRAM_DESCRIPTION_ID = "siriusComponents://representationDescription?kind=diagramDescription&sourceKind=view&sourceId=067eb84f-3fe2-3b1b-9d45-9ffb9b5bb65e&sourceElementId=be71dab0-25e1-3180-90d0-24b31f68df8f"; + public static final String REQUIREMENTS_TABLE_VIEW_DESCRIPTION_ID = "siriusComponents://representationDescription?kind=tableDescription&sourceKind=view&sourceId=f445c867-006e-3b07-9385-40143a87f533&sourceElementId=05ffd328-a162-3d7e-b09b-7757ef23ef01"; + private SysONRepresentationDescriptionIdentifiers() { // Prevent instantiation } diff --git a/backend/views/pom.xml b/backend/views/pom.xml index 82c7b3367..6850401ec 100644 --- a/backend/views/pom.xml +++ b/backend/views/pom.xml @@ -32,8 +32,10 @@ + syson-common-view syson-diagram-common-view syson-standard-diagrams-view + syson-table-requirements-view syson-tree-explorer-view syson-diagram-tests diff --git a/backend/views/syson-common-view/.checkstyle b/backend/views/syson-common-view/.checkstyle new file mode 100644 index 000000000..c4ea6718a --- /dev/null +++ b/backend/views/syson-common-view/.checkstyle @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/backend/views/syson-common-view/.classpath b/backend/views/syson-common-view/.classpath new file mode 100644 index 000000000..df66b20f8 --- /dev/null +++ b/backend/views/syson-common-view/.classpath @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/views/syson-common-view/.project b/backend/views/syson-common-view/.project new file mode 100644 index 000000000..db0980af9 --- /dev/null +++ b/backend/views/syson-common-view/.project @@ -0,0 +1,34 @@ + + + syson-common-view + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.springframework.ide.eclipse.boot.validation.springbootbuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + net.sf.eclipsecs.core.CheckstyleNature + + diff --git a/backend/views/syson-common-view/.settings/org.eclipse.core.resources.prefs b/backend/views/syson-common-view/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..29abf9995 --- /dev/null +++ b/backend/views/syson-common-view/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding//src/test/resources=UTF-8 +encoding/=UTF-8 diff --git a/backend/views/syson-common-view/.settings/org.eclipse.jdt.apt.core.prefs b/backend/views/syson-common-view/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 000000000..d4313d4b2 --- /dev/null +++ b/backend/views/syson-common-view/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/backend/views/syson-common-view/.settings/org.eclipse.jdt.core.prefs b/backend/views/syson-common-view/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..26bbd1824 --- /dev/null +++ b/backend/views/syson-common-view/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,410 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_line_comments=false +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=200 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.text_block_indentation=0 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/backend/views/syson-common-view/.settings/org.eclipse.jdt.ui.prefs b/backend/views/syson-common-view/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..0848eaadb --- /dev/null +++ b/backend/views/syson-common-view/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,297 @@ +cleanup.add_all=false +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.also_simplify_lambda=true +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=true +cleanup.always_use_this_for_non_static_method_access=true +cleanup.array_with_curly=false +cleanup.arrays_fill=false +cleanup.bitwise_conditional_expression=false +cleanup.boolean_literal=false +cleanup.boolean_value_rather_than_comparison=true +cleanup.break_loop=false +cleanup.collection_cloning=false +cleanup.comparing_on_criteria=false +cleanup.comparison_statement=false +cleanup.controlflow_merge=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.convert_to_enhanced_for_loop_if_loop_var_used=true +cleanup.convert_to_switch_expressions=false +cleanup.correct_indentation=false +cleanup.do_while_rather_than_while=true +cleanup.double_negation=false +cleanup.else_if=false +cleanup.embedded_if=false +cleanup.evaluate_nullable=false +cleanup.extract_increment=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.hash=false +cleanup.if_condition=false +cleanup.insert_inferred_type_arguments=false +cleanup.instanceof=false +cleanup.instanceof_keyword=false +cleanup.invert_equals=false +cleanup.join=false +cleanup.lazy_logical_operator=false +cleanup.make_local_variable_final=false +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=true +cleanup.map_cloning=false +cleanup.merge_conditional_blocks=false +cleanup.multi_catch=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.no_string_creation=false +cleanup.no_super=false +cleanup.number_suffix=false +cleanup.objects_equals=false +cleanup.one_if_rather_than_duplicate_blocks_that_fall_through=true +cleanup.operand_factorization=false +cleanup.organize_imports=true +cleanup.overridden_assignment=false +cleanup.overridden_assignment_move_decl=true +cleanup.plain_replacement=false +cleanup.precompile_regex=false +cleanup.primitive_comparison=false +cleanup.primitive_parsing=false +cleanup.primitive_rather_than_wrapper=true +cleanup.primitive_serialization=false +cleanup.pull_out_if_from_if_else=false +cleanup.pull_up_assignment=false +cleanup.push_down_negation=false +cleanup.qualify_static_field_accesses_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=true +cleanup.reduce_indentation=false +cleanup.redundant_comparator=false +cleanup.redundant_falling_through_block_end=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=false +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_array_creation=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_method_parameters=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.replace_deprecated_calls=false +cleanup.return_expression=false +cleanup.simplify_lambda_expression_and_method_ref=false +cleanup.single_used_field=false +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.standard_comparison=false +cleanup.static_inner_class=false +cleanup.strictly_equal_or_different=false +cleanup.stringbuffer_to_stringbuilder=false +cleanup.stringbuilder=false +cleanup.stringbuilder_for_local_vars=true +cleanup.stringconcat_stringbuffer_stringbuilder=false +cleanup.stringconcat_to_textblock=false +cleanup.substring=false +cleanup.switch=false +cleanup.system_property=false +cleanup.system_property_boolean=false +cleanup.system_property_file_encoding=false +cleanup.system_property_file_separator=false +cleanup.system_property_line_separator=false +cleanup.system_property_path_separator=false +cleanup.ternary_operator=false +cleanup.try_with_resource=false +cleanup.unlooped_while=false +cleanup.unreachable_block=false +cleanup.use_anonymous_class_creation=false +cleanup.use_autoboxing=false +cleanup.use_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_directly_map_method=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_string_is_blank=false +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=false +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=false +cleanup.use_unboxing=false +cleanup.use_var=false +cleanup.useless_continue=false +cleanup.useless_return=false +cleanup.valueof_rather_than_instantiation=false +cleanup_profile=_SysON +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_SysON +formatter_settings_version=23 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=com;fr;java;javax;org; +org.eclipse.jdt.ui.javadoc=false +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=