From f343ee474bc1c72d6b870350647c5bf86f0578ff Mon Sep 17 00:00:00 2001 From: Laurent Fasani Date: Thu, 20 Jun 2024 10:59:49 +0200 Subject: [PATCH] [3655] Support "Delete Task Dependency" tool in gantt Bug: https://github.com/eclipse-sirius/sirius-web/issues/3655 Signed-off-by: Laurent Fasani --- CHANGELOG.adoc | 3 +- .../images/gantt-task-dependency-palette.png | Bin 0 -> 5247 bytes doc/specifier/images/gantt-task-handlers.png | Bin 5268 -> 5127 bytes doc/specifier/representation-gantt.adoc | 11 +- .../images/gantt-task-dependency-palette.png | Bin 0 -> 5247 bytes doc/user/images/gantt-task-handlers.png | Bin 5268 -> 5127 bytes doc/user/images/gantt-task-palette.png | Bin 0 -> 1982 bytes doc/user/representation-gantt.adoc | 17 ++- package-lock.json | 22 ++-- .../gantt/api/IGanttTaskService.java | 11 ++ .../input/DeleteGanttTaskDependencyInput.java | 33 ++++++ .../DeleteTaskDependencyEventHandler.java | 79 +++++++++++++ .../gantt/service/GanttTaskService.java | 29 +++++ .../src/main/resources/schema/gantt.graphqls | 10 ++ ...tationDeleteTaskDependencyDataFetcher.java | 59 ++++++++++ .../CreateTaskDependencyMutationRunner.java | 60 ++++++++++ .../DeleteTaskDependencyMutationRunner.java | 60 ++++++++++ .../gantt/description/GanttDescription.java | 12 +- .../sirius-components-gantt/package.json | 4 +- .../graphql/mutation/GanttMutation.types.ts | 17 +++ .../src/graphql/mutation/ganttMutation.ts | 20 ++++ .../src/graphql/mutation/useGanttMutations.ts | 26 +++++ .../src/palette/ContextualPalette.tsx | 68 +++++++++-- .../src/palette/ContextualPalette.types.ts | 6 +- .../src/representation/Gantt.tsx | 14 +-- .../src/representation/Gantt.types.ts | 1 + .../representation/GanttRepresentation.tsx | 13 ++- .../papaya/provider/TaskItemProvider.java | 12 ++ .../src/main/resources/plugin.properties | 1 + .../components/papaya/PapayaPackage.java | 30 ++++- .../sirius/components/papaya/Task.java | 12 ++ .../papaya/impl/PapayaPackageImpl.java | 13 +++ .../components/papaya/impl/TaskImpl.java | 35 ++++++ .../src/main/resources/model/papaya.ecore | 2 + .../src/main/resources/model/papaya.genmodel | 1 + ...PapayaGanttControllerIntegrationTests.java | 81 +++++++++++++ .../gantt/PapayaGanttDescriptionProvider.java | 36 ++++++ .../frontend/sirius-web/package.json | 2 +- .../view/ViewGanttDescriptionBuilder.java | 17 +++ .../DeleteTaskDependencyToolBuilder.java | 68 +++++++++++ .../view/builder/generated/GanttBuilders.java | 10 ++ .../generated/GanttDescriptionBuilder.java | 10 ++ .../gantt/ViewGanttDescriptionConverter.java | 3 + .../DeleteTaskDependencyToolItemProvider.java | 108 ++++++++++++++++++ .../GanttDescriptionItemProvider.java | 4 + .../GanttItemProviderAdapterFactory.java | 26 +++++ .../full/obj16/DeleteTaskDependencyTool.svg | 22 ++++ .../src/main/resources/plugin.properties | 2 + .../view/gantt/DeleteTaskDependencyTool.java | 25 ++++ .../view/gantt/GanttDescription.java | 26 +++++ .../components/view/gantt/GanttFactory.java | 9 ++ .../components/view/gantt/GanttPackage.java | 99 +++++++++++++++- .../impl/DeleteTaskDependencyToolImpl.java | 45 ++++++++ .../view/gantt/impl/GanttDescriptionImpl.java | 74 ++++++++++++ .../view/gantt/impl/GanttFactoryImpl.java | 14 +++ .../view/gantt/impl/GanttPackageImpl.java | 38 +++++- .../view/gantt/util/GanttAdapterFactory.java | 20 ++++ .../view/gantt/util/GanttSwitch.java | 25 ++++ .../src/main/resources/model/gantt.ecore | 3 + .../src/main/resources/model/gantt.genmodel | 2 + 60 files changed, 1407 insertions(+), 43 deletions(-) create mode 100644 doc/specifier/images/gantt-task-dependency-palette.png create mode 100644 doc/user/images/gantt-task-dependency-palette.png create mode 100644 doc/user/images/gantt-task-palette.png create mode 100644 packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/dto/input/DeleteGanttTaskDependencyInput.java create mode 100644 packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/handlers/DeleteTaskDependencyEventHandler.java create mode 100644 packages/gantt/backend/sirius-components-gantt-graphql/src/main/java/org/eclipse/sirius/components/gantt/graphql/datafetchers/mutation/MutationDeleteTaskDependencyDataFetcher.java create mode 100644 packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/CreateTaskDependencyMutationRunner.java create mode 100644 packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/DeleteTaskDependencyMutationRunner.java create mode 100644 packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DeleteTaskDependencyToolBuilder.java create mode 100644 packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/DeleteTaskDependencyToolItemProvider.java create mode 100644 packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/icons/full/obj16/DeleteTaskDependencyTool.svg create mode 100644 packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/DeleteTaskDependencyTool.java create mode 100644 packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/DeleteTaskDependencyToolImpl.java diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index b0b97a19d77..7a0050f161d 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -45,7 +45,7 @@ More existing APIs will be migrated to this new common pattern. - [releng] Remove the dependency to `reflect-metadata` - [releng] Switch to `subscriptions-transport-ws` 0.11.0 - [releng] Switch to EMF Json 2.3.11 -- https://github.com/eclipse-sirius/sirius-web/issues/3523[#3523] [gantt] Move to @ObeoNetwork/gantt-task-react 0.4.17 to benefit for enhancements +- https://github.com/eclipse-sirius/sirius-web/issues/3523[#3523] [gantt] Move to @ObeoNetwork/gantt-task-react 0.4.18 to benefit for enhancements === Bug fixes @@ -81,6 +81,7 @@ This dialog presents diagram elements in a tree and allows to select them and up + image:doc/screenshots/diagramFilterView.png[Diagram Filter View, 70%] - https://github.com/eclipse-sirius/sirius-web/issues/3523[#3523] [gantt] Support rounding dates when changing dates from gantt +- https://github.com/eclipse-sirius/sirius-web/issues/3655[#3655] [gantt] Support "Delete Task Dependency" tool in gantt === Improvements diff --git a/doc/specifier/images/gantt-task-dependency-palette.png b/doc/specifier/images/gantt-task-dependency-palette.png new file mode 100644 index 0000000000000000000000000000000000000000..2fc424c92e384175b8825a7c529773e7e7d5124b GIT binary patch literal 5247 zcmb7Ic|4Tg+n%ux*@o=0&Db+4*~+eXEF&`t*+Q~}2*pHxww2ZtI7B67;tr|ciuw`y=^Z-<9`NxP=Ej*$KJkm7N@!r0Pu`{ zcL~;1ouqptxk4j=g~4E+ltGQ^`~m_H&v=kUR1{P7v*^av?Nx^_dAVLWxpQBWF1>wR z@QSNzQ}2z{{7&MyLf@jLjDiAy#7^61cwZ-ZVci8Xgwb^NgBt z{`lxXrox_4>FASO2;2D=+^-vs&Toy^>+h`mc#Xw^OD%?!okc2)U26&{^PEx{z5O3u zA0lw@TA7^WDfZuY6_ptp8cJxC4EY=@aTKn&mAcw9O^4`d<9-nI@#x!q2k&r9A}L2E$Xa8k9akk4&Ggo2Zqvh>t^o}2&(Tg7H~M6 zgL5lGZ%W_zp)fsMq|fE&%i2DNuMrUp;HULoOK~U49O37e`$t?)xGtHbQ8eVPHiDD( z2P%mbVF)Xvl9G}->wu;J+`dTnX65MG@vk#TsO&tdScmDD)mkQ#$L9OVyijkg!%#(q ztdon&*@?OB?MGPF=P$Us-u8dJN9y!ps_Jq5XmIf6^pX|(Xy1dw@1vs%Rwaq;r7fQ6o=4|b>R%=CIiWOqaqu2l>7r#-^t3!p>1u2E?>S3S>q@# zFW;T9&R)q`e>FSN0lu3~)=}ary*(9blZ>l)kh`+ty12T^$nhv|R>a7whJLmC%LL5& znbcMiT;Mt9Ln#~IrCYsGEE2auSg{6P+Tg&(T%{z|(vy`RHG=ycxNx?@L2)LrjHdVZ zKg!Yw8nkWS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}|Qq!TJH{wBELn1BFg|0a?T@c5VlpKEsBJrP#{|qM6AZ9kO;0@WBlXfo8^z)YxH{7(c;F(Eym4;!;3>G}&Dp>H0t6;%1u7U;6xC$0L z<0=XgyezAt#*`zH!^W33Vk(q^1iyH}ZBb*&4M|clcfPa6m-d$|l!64m;laCDS~ti} zUuFd7+{5yQ9>?q}NzPu(zLG>ipR`(q75~N0N;qEQaLi4s+jfQHc#Xj^f_La payloadSink, Many changeDescriptionSink, IEditingContext editingContext, IGanttContext ganttContext, IGanttInput ganttInput) { + this.counter.increment(); + + String message = this.messageService.invalidInput(ganttInput.getClass().getSimpleName(), DeleteGanttTaskDependencyInput.class.getSimpleName()); + IPayload payload = new ErrorPayload(ganttInput.id(), message); + ChangeDescription changeDescription = new ChangeDescription(ChangeKind.NOTHING, ganttInput.representationId(), ganttInput); + + if (ganttInput instanceof DeleteGanttTaskDependencyInput input) { + payload = this.ganttTaskService.deleteTaskDependency(input, editingContext, ganttContext.getGantt()); + + changeDescription = new ChangeDescription(ChangeKind.SEMANTIC_CHANGE, ganttInput.representationId(), ganttInput); + } + + payloadSink.tryEmitValue(payload); + changeDescriptionSink.tryEmitNext(changeDescription); + } +} diff --git a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttTaskService.java b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttTaskService.java index 9d2700d1973..a479e9cefb4 100644 --- a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttTaskService.java +++ b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttTaskService.java @@ -25,6 +25,7 @@ import org.eclipse.sirius.components.collaborative.gantt.dto.input.ChangeTaskCollapseStateInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.CreateGanttTaskDependencyInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.CreateGanttTaskInput; +import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskDependencyInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.DropGanttTaskInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.EditGanttTaskInput; @@ -228,6 +229,34 @@ public IPayload createTaskDependency(CreateGanttTaskDependencyInput createTaskDe return payload; } + @Override + public IPayload deleteTaskDependency(DeleteGanttTaskDependencyInput deleteTaskDependencyInput, IEditingContext editingContext, Gantt gantt) { + IPayload payload = new ErrorPayload(deleteTaskDependencyInput.id(), "Delete task dependency failed"); + + Optional ganttDescriptionOpt = this.findGanttDescription(gantt.descriptionId(), editingContext); + + if (ganttDescriptionOpt.isPresent()) { + VariableManager variableManager = new VariableManager(); + variableManager.put(IEditingContext.EDITING_CONTEXT, editingContext); + + Optional sourceObjectOpt = Optional.of(deleteTaskDependencyInput.sourceTaskId()) + .flatMap(taskId -> this.getTaskSemanticObject(taskId, gantt, editingContext)); + + Optional targetObjectOpt = Optional.of(deleteTaskDependencyInput.targetTaskId()) + .flatMap(taskId -> this.getTaskSemanticObject(taskId, gantt, editingContext)); + + if (sourceObjectOpt.isPresent() && targetObjectOpt.isPresent()) { + variableManager.put(GanttDescription.SOURCE_OBJECT, sourceObjectOpt.get()); + variableManager.put(GanttDescription.TARGET_OBJECT, targetObjectOpt.get()); + ganttDescriptionOpt.get().deleteTaskDependencyProvider().accept(variableManager); + } + + payload = this.getPayload(deleteTaskDependencyInput.id()); + } + + return payload; + } + private Optional getTaskSemanticObject(String taskId, Gantt gantt, IEditingContext editingContext) { Optional targetObjectOpt = this.findTask(task -> Objects.equals(task.id(), taskId), gantt.tasks()) .map(task -> this.objectService.getObject(editingContext, task.targetObjectId())) diff --git a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/schema/gantt.graphqls b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/schema/gantt.graphqls index 014feed9d35..0cf204b221e 100644 --- a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/schema/gantt.graphqls +++ b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/schema/gantt.graphqls @@ -85,6 +85,7 @@ extend type Mutation { editGanttTask(input: EditGanttTaskInput!): EditGanttTaskPayload dropGanttTask(input: DropGanttTaskInput!): DropGanttTaskPayload createGanttTaskDependency(input: CreateGanttTaskDependencyInput!): CreateGanttTaskDependencyPayload + deleteGanttTaskDependency(input: DeleteGanttTaskDependencyInput!): DeleteGanttTaskDependencyPayload changeGanttTaskCollapseState(input: ChangeGanttTaskCollapseStateInput!): ChangeGanttTaskCollapseStatePayload changeGanttColumn(input: ChangeGanttColumnInput!): ChangeGanttColumnPayload } @@ -143,6 +144,15 @@ input CreateGanttTaskDependencyInput { } union CreateGanttTaskDependencyPayload = SuccessPayload | ErrorPayload +input DeleteGanttTaskDependencyInput { + id: ID! + editingContextId: ID! + representationId: ID! + sourceTaskId: ID! + targetTaskId: ID! +} +union DeleteGanttTaskDependencyPayload = SuccessPayload | ErrorPayload + input ChangeGanttTaskCollapseStateInput { id: ID! editingContextId: ID! diff --git a/packages/gantt/backend/sirius-components-gantt-graphql/src/main/java/org/eclipse/sirius/components/gantt/graphql/datafetchers/mutation/MutationDeleteTaskDependencyDataFetcher.java b/packages/gantt/backend/sirius-components-gantt-graphql/src/main/java/org/eclipse/sirius/components/gantt/graphql/datafetchers/mutation/MutationDeleteTaskDependencyDataFetcher.java new file mode 100644 index 00000000000..8b93f461382 --- /dev/null +++ b/packages/gantt/backend/sirius-components-gantt-graphql/src/main/java/org/eclipse/sirius/components/gantt/graphql/datafetchers/mutation/MutationDeleteTaskDependencyDataFetcher.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.gantt.graphql.datafetchers.mutation; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.Objects; +import java.util.concurrent.CompletableFuture; + +import org.eclipse.sirius.components.annotations.spring.graphql.MutationDataFetcher; +import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskDependencyInput; +import org.eclipse.sirius.components.core.api.IPayload; +import org.eclipse.sirius.components.graphql.api.IDataFetcherWithFieldCoordinates; +import org.eclipse.sirius.components.graphql.api.IEditingContextDispatcher; +import org.eclipse.sirius.components.graphql.api.IExceptionWrapper; + +import graphql.schema.DataFetchingEnvironment; + +/** + * The data fetcher used to delete a gantt task dependency. + * + * @author lfasani + */ +@MutationDataFetcher(type = "Mutation", field = "deleteGanttTaskDependency") +public class MutationDeleteTaskDependencyDataFetcher implements IDataFetcherWithFieldCoordinates> { + + private static final String INPUT_ARGUMENT = "input"; + + private final ObjectMapper objectMapper; + + private final IExceptionWrapper exceptionWrapper; + + private final IEditingContextDispatcher editingContextDispatcher; + + public MutationDeleteTaskDependencyDataFetcher(ObjectMapper objectMapper, IExceptionWrapper exceptionWrapper, IEditingContextDispatcher editingContextDispatcher) { + this.objectMapper = Objects.requireNonNull(objectMapper); + this.exceptionWrapper = Objects.requireNonNull(exceptionWrapper); + this.editingContextDispatcher = Objects.requireNonNull(editingContextDispatcher); + } + + @Override + public CompletableFuture get(DataFetchingEnvironment environment) throws Exception { + Object argument = environment.getArgument(INPUT_ARGUMENT); + var input = this.objectMapper.convertValue(argument, DeleteGanttTaskDependencyInput.class); + + return this.exceptionWrapper.wrapMono(() -> this.editingContextDispatcher.dispatchMutation(input.editingContextId(), input), input).toFuture(); + } + +} diff --git a/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/CreateTaskDependencyMutationRunner.java b/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/CreateTaskDependencyMutationRunner.java new file mode 100644 index 00000000000..4a03f7577f9 --- /dev/null +++ b/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/CreateTaskDependencyMutationRunner.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.gantt.tests.graphql; + +import java.util.Objects; + +import org.eclipse.sirius.components.collaborative.gantt.dto.input.CreateGanttTaskDependencyInput; +import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; +import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; +import org.springframework.stereotype.Service; + +/** + * Used to create a Task Dependency with the GraphQL API. + * + * @author lfasani + */ +@Service +public class CreateTaskDependencyMutationRunner implements IMutationRunner { + + private static final String CREATE_TASK_DEPENDENCY_MUTATION = """ + mutation createGanttTaskDependency($input: CreateGanttTaskDependencyInput!) { + createGanttTaskDependency(input: $input) { + __typename + ... on ErrorPayload { + messages { + body + level + } + } + ... on SuccessPayload { + messages { + body + level + } + } + } + } + """; + + private final IGraphQLRequestor graphQLRequestor; + + public CreateTaskDependencyMutationRunner(IGraphQLRequestor graphQLRequestor) { + this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); + } + + @Override + public String run(CreateGanttTaskDependencyInput input) { + return this.graphQLRequestor.execute(CREATE_TASK_DEPENDENCY_MUTATION, input); + } +} diff --git a/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/DeleteTaskDependencyMutationRunner.java b/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/DeleteTaskDependencyMutationRunner.java new file mode 100644 index 00000000000..0592d61cb7e --- /dev/null +++ b/packages/gantt/backend/sirius-components-gantt-tests/src/main/java/org/eclipse/sirius/components/gantt/tests/graphql/DeleteTaskDependencyMutationRunner.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.gantt.tests.graphql; + +import java.util.Objects; + +import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskDependencyInput; +import org.eclipse.sirius.components.graphql.tests.api.IGraphQLRequestor; +import org.eclipse.sirius.components.graphql.tests.api.IMutationRunner; +import org.springframework.stereotype.Service; + +/** + * Used to delete a Task Dependency with the GraphQL API. + * + * @author lfasani + */ +@Service +public class DeleteTaskDependencyMutationRunner implements IMutationRunner { + + private static final String DELETE_TASK_DEPENDENCY_MUTATION = """ + mutation deleteTaskDependency($input: DeleteGanttTaskDependencyInput!) { + deleteGanttTaskDependency(input: $input) { + __typename + ... on ErrorPayload { + messages { + body + level + } + } + ... on SuccessPayload { + messages { + body + level + } + } + } + } + """; + + private final IGraphQLRequestor graphQLRequestor; + + public DeleteTaskDependencyMutationRunner(IGraphQLRequestor graphQLRequestor) { + this.graphQLRequestor = Objects.requireNonNull(graphQLRequestor); + } + + @Override + public String run(DeleteGanttTaskDependencyInput input) { + return this.graphQLRequestor.execute(DELETE_TASK_DEPENDENCY_MUTATION, input); + } +} diff --git a/packages/gantt/backend/sirius-components-gantt/src/main/java/org/eclipse/sirius/components/gantt/description/GanttDescription.java b/packages/gantt/backend/sirius-components-gantt/src/main/java/org/eclipse/sirius/components/gantt/description/GanttDescription.java index fc463afebd5..b57128258c0 100644 --- a/packages/gantt/backend/sirius-components-gantt/src/main/java/org/eclipse/sirius/components/gantt/description/GanttDescription.java +++ b/packages/gantt/backend/sirius-components-gantt/src/main/java/org/eclipse/sirius/components/gantt/description/GanttDescription.java @@ -32,7 +32,7 @@ public record GanttDescription(String id, String label, Function idProvider, Function labelProvider, Function targetObjectIdProvider, Predicate canCreatePredicate, List taskDescriptions, Consumer createTaskProvider, Consumer editTaskProvider, Consumer deleteTaskProvider, Consumer dropTaskProvider, Consumer createTaskDependencyProvider, - Function dateRoundingProvider) implements IRepresentationDescription { + Consumer deleteTaskDependencyProvider, Function dateRoundingProvider) implements IRepresentationDescription { public static final String LABEL = "label"; @@ -122,6 +122,8 @@ public static final class Builder { private Consumer createTaskDependencyProvider; + private Consumer deleteTaskDependencyProvider; + private List taskDescriptions; private Function dateRoundingProvider; @@ -175,6 +177,11 @@ public Builder createTaskDependencyProvider(Consumer createTask return this; } + public Builder deleteTaskDependencyProvider(Consumer deleteTaskDependencyProvider) { + this.deleteTaskDependencyProvider = deleteTaskDependencyProvider; + return this; + } + public Builder canCreatePredicate(Predicate canCreatePredicate) { this.canCreatePredicate = Objects.requireNonNull(canCreatePredicate); return this; @@ -192,7 +199,8 @@ public Builder dateRoundingProvider(Function dateRoundi public GanttDescription build() { GanttDescription ganttDescription = new GanttDescription(this.id, this.label, this.idProvider, this.labelProvider, this.targetObjectIdProvider, this.canCreatePredicate, - this.taskDescriptions, this.createTaskProvider, this.editTaskProvider, this.deleteTaskProvider, this.dropTaskProvider, this.createTaskDependencyProvider, this.dateRoundingProvider); + this.taskDescriptions, this.createTaskProvider, this.editTaskProvider, this.deleteTaskProvider, this.dropTaskProvider, this.createTaskDependencyProvider, + this.deleteTaskDependencyProvider, this.dateRoundingProvider); return ganttDescription; } } diff --git a/packages/gantt/frontend/sirius-components-gantt/package.json b/packages/gantt/frontend/sirius-components-gantt/package.json index 9e69bb19122..d2509bc0e6f 100644 --- a/packages/gantt/frontend/sirius-components-gantt/package.json +++ b/packages/gantt/frontend/sirius-components-gantt/package.json @@ -31,7 +31,7 @@ }, "peerDependencies": { "@apollo/client": "3.10.4", - "@ObeoNetwork/gantt-task-react": "0.4.17", + "@ObeoNetwork/gantt-task-react": "0.4.19", "@eclipse-sirius/sirius-components-core": "*", "@material-ui/core": "4.12.4", "@material-ui/icons": "4.11.3", @@ -47,7 +47,7 @@ "@eclipse-sirius/sirius-components-tsconfig": "*", "@material-ui/core": "4.12.4", "@material-ui/icons": "4.11.3", - "@ObeoNetwork/gantt-task-react": "0.4.17", + "@ObeoNetwork/gantt-task-react": "0.4.19", "@types/react": "17.0.37", "@vitejs/plugin-react": "4.3.0", "@xstate/react": "1.6.3", diff --git a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/GanttMutation.types.ts b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/GanttMutation.types.ts index 5339fd0b641..576b14f5dec 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/GanttMutation.types.ts +++ b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/GanttMutation.types.ts @@ -20,6 +20,7 @@ export interface UseGanttMutations { deleteTask: (tasks: readonly TaskOrEmpty[]) => void; dropTask: (droppedTask: TaskOrEmpty, targetTask: TaskOrEmpty | undefined, dropIndex: number) => void; createTaskDependency: (sourceTaskId: string, targetTaskId: string) => void; + deleteTaskDependency: (sourceTaskId: string, targetTaskId: string) => void; changeTaskCollapseState: (taskId: string, collapsed: boolean) => void; changeColumn: (columnId: string, displayed: boolean, width: number) => void; } @@ -111,6 +112,22 @@ export interface GQLCreateTaskDependencyData { export type GQLCreateGanttTaskDependencyPayload = GQLErrorPayload | GQLSuccessPayload; +export interface GQLDeleteTaskDependencyVariables { + input: GQLDeleteTaskDependencyInput; +} +export interface GQLDeleteTaskDependencyInput { + id: string; + editingContextId: string; + representationId: string; + sourceTaskId: string; + targetTaskId: string; +} +export interface GQLDeleteTaskDependencyData { + deleteGanttTaskDependency: GQLDeleteTaskDependencyPayload; +} + +export type GQLDeleteTaskDependencyPayload = GQLErrorPayload | GQLSuccessPayload; + export interface GQLChangeTaskCollapseStateVariables { input: GQLChangeTaskCollapseStateInput; } diff --git a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/ganttMutation.ts b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/ganttMutation.ts index 67b05787abb..15722b54e07 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/ganttMutation.ts +++ b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/ganttMutation.ts @@ -112,6 +112,26 @@ export const createTaskDependencyMutation = gql` } `; +export const deleteTaskDependencyMutation = gql` + mutation deleteTaskDependency($input: DeleteGanttTaskDependencyInput!) { + deleteGanttTaskDependency(input: $input) { + __typename + ... on ErrorPayload { + messages { + body + level + } + } + ... on SuccessPayload { + messages { + body + level + } + } + } + } +`; + export const changeTaskCollapseStateMutation = gql` mutation changeGanttTaskCollapseState($input: ChangeGanttTaskCollapseStateInput!) { changeGanttTaskCollapseState(input: $input) { diff --git a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/useGanttMutations.ts b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/useGanttMutations.ts index 8b8e8e6e895..7e2dc0a7b01 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/useGanttMutations.ts +++ b/packages/gantt/frontend/sirius-components-gantt/src/graphql/mutation/useGanttMutations.ts @@ -30,6 +30,9 @@ import { GQLCreateTaskVariables, GQLDeleteGanttTaskInput, GQLDeleteTaskData, + GQLDeleteTaskDependencyData, + GQLDeleteTaskDependencyInput, + GQLDeleteTaskDependencyVariables, GQLDeleteTaskVariables, GQLDropGanttTaskInput, GQLDropTaskData, @@ -44,6 +47,7 @@ import { changeTaskCollapseStateMutation, createTaskDependencyMutation, createTaskMutation, + deleteTaskDependencyMutation, deleteTaskMutation, dropTaskMutation, editTaskMutation, @@ -149,6 +153,27 @@ export const useGanttMutations = (editingContextId: string, representationId: st mutationCreateTaskDependency({ variables: { input } }); }; + const [mutationDeleteTaskDependency, mutationDeleteTaskDependencyResult] = useMutation< + GQLDeleteTaskDependencyData, + GQLDeleteTaskDependencyVariables + >(deleteTaskDependencyMutation); + useReporting( + mutationDeleteTaskDependencyResult, + (data: GQLDeleteTaskDependencyData) => data.deleteGanttTaskDependency + ); + + const deleteTaskDependency = (sourceTaskId: string, targetTaskId: string) => { + const input: GQLDeleteTaskDependencyInput = { + id: crypto.randomUUID(), + editingContextId, + representationId, + sourceTaskId, + targetTaskId, + }; + + mutationDeleteTaskDependency({ variables: { input } }); + }; + const [mutationChangeTaskCollapseState, mutationChangeTaskCollapseStateResult] = useMutation< GQLChangeTaskCollapseStateData, GQLChangeTaskCollapseStateVariables @@ -194,6 +219,7 @@ export const useGanttMutations = (editingContextId: string, representationId: st editTask, dropTask, createTaskDependency, + deleteTaskDependency, changeTaskCollapseState, changeColumn, }; diff --git a/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.tsx b/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.tsx index 35654868c23..d5c75c06ce2 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.tsx +++ b/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.tsx @@ -14,18 +14,29 @@ import IconButton from '@material-ui/core/IconButton'; import { makeStyles } from '@material-ui/core/styles'; import Delete from '@material-ui/icons/Delete'; import { TaskIcon } from '../icons/TaskIcon'; +import { TaskContextualPaletteProps, TaskDependencyContextualPaletteProps } from './ContextualPalette.types'; -import { TaskContextualPaletteProps } from '@ObeoNetwork/gantt-task-react'; -import { ContextualPaletteProps } from './ContextualPalette.types'; +import { + TaskContextualPaletteProps as GanttTaskContextualPaletteProps, + TaskDependencyContextualPaletteProps as GanttTaskDependencyContextualPaletteProps, + Task, +} from '@ObeoNetwork/gantt-task-react'; const useContextualPaletteStyle = makeStyles((theme) => ({ - buttonEntries: { + taskButtonEntries: { display: 'grid', gridTemplateColumns: `repeat(2, 28px)`, gridTemplateRows: '28px', gridAutoRows: '28px', placeItems: 'center', }, + taskDependencyButtonEntries: { + display: 'grid', + gridTemplateColumns: `repeat(1, 28px)`, + gridTemplateRows: '28px', + gridAutoRows: '28px', + placeItems: 'center', + }, toolIcon: { color: theme.palette.text.primary, }, @@ -37,17 +48,27 @@ const useContextualPaletteStyle = makeStyles((theme) => ({ }, })); -export const getContextalPalette = ({ onCreateTask, onDeleteTask }: ContextualPaletteProps) => { - const ContextualPalette: React.FC = ({ selectedTask }) => { +export const getTaskContextalPalette = ({ onCreateTask, onDeleteTask }: TaskContextualPaletteProps) => { + const TaskContextualPalette: React.FC = ({ selectedTask, onClosePalette }) => { const classes = useContextualPaletteStyle(); + + const handleCreateTask = (task: Task) => { + onClosePalette(); + onCreateTask(task); + }; + const handleDeleteTask = (task: Task) => { + onClosePalette(); + onDeleteTask(task); + }; + return ( -
+
onCreateTask(selectedTask)} + onClick={() => handleCreateTask(selectedTask)} data-testid="create-task"> @@ -56,7 +77,7 @@ export const getContextalPalette = ({ onCreateTask, onDeleteTask }: ContextualPa size="small" aria-label="Delete task" title="Delete task" - onClick={() => onDeleteTask(selectedTask)} + onClick={() => handleDeleteTask(selectedTask)} data-testid="delete-task"> @@ -64,5 +85,34 @@ export const getContextalPalette = ({ onCreateTask, onDeleteTask }: ContextualPa ); }; - return ContextualPalette; + return TaskContextualPalette; +}; + +export const getTaskDependencyContextalPalette = ({ onDeleteTaskDependency }: TaskDependencyContextualPaletteProps) => { + const handleTaskDependencyDelete = (taskFrom: Task, taskTo: Task, onClosePalette: () => any) => { + onClosePalette(); + onDeleteTaskDependency(taskFrom.id, taskTo.id); + }; + + const classes = useContextualPaletteStyle(); + + const DependencyContextualPalette: React.FC = ({ + taskFrom, + taskTo, + onClosePalette, + }) => { + return ( +
+ handleTaskDependencyDelete(taskFrom, taskTo, onClosePalette)} + data-testid="delete-task-dependency"> + + +
+ ); + }; + return DependencyContextualPalette; }; diff --git a/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.types.ts b/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.types.ts index 09832f969bc..29c1b7c469b 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.types.ts +++ b/packages/gantt/frontend/sirius-components-gantt/src/palette/ContextualPalette.types.ts @@ -12,8 +12,12 @@ *******************************************************************************/ import { Task } from '@ObeoNetwork/gantt-task-react'; -export interface ContextualPaletteProps { +export interface TaskContextualPaletteProps { onCreateTask: (task: Task) => void; onEditTask: (task: Task) => void; onDeleteTask: (task: Task) => void; } + +export interface TaskDependencyContextualPaletteProps { + onDeleteTaskDependency: (sourceTaskId: string, targetTaskId: string) => void; +} diff --git a/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.tsx b/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.tsx index 51a0ad14199..0369777a922 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.tsx +++ b/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.tsx @@ -37,7 +37,7 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { useEffect, useRef, useState } from 'react'; import { GQLGanttDateRoundingTimeUnit, SelectableTask } from '../graphql/subscription/GanttSubscription.types'; import { checkIsHoliday, getDisplayedColumns, getSelectedColumns, roundDate } from '../helper/helper'; -import { getContextalPalette } from '../palette/ContextualPalette'; +import { getTaskContextalPalette, getTaskDependencyContextalPalette } from '../palette/ContextualPalette'; import { Toolbar } from '../toolbar/Toolbar'; import { GanttProps, GanttState, TaskListColumnEnum } from './Gantt.types'; @@ -69,6 +69,7 @@ export const Gantt = ({ onDeleteTask, onDropTask, onCreateTaskDependency, + onDeleteTaskDependency, onChangeTaskCollapseState, onChangeColumn, }: GanttProps) => { @@ -129,10 +130,6 @@ export const Gantt = ({ }); }; - const handleDeleteTaskOnContextualPalette = (task: Task) => { - onDeleteTask([task]); - }; - const handleMoveTaskAfter: OnMoveTaskBeforeAfter = (task, taskForMove) => { const index = tasks.filter((t) => t.parent === task.parent).findIndex((t) => t.id === task.id); const parent = tasks.find((t) => t.id === task.parent); @@ -285,11 +282,14 @@ export const Gantt = ({ checkIsHoliday={checkIsHoliday} dateMoveStep={dateRounding} onWheel={onwheel} - ContextualPalette={getContextalPalette({ + ContextualPalette={getTaskContextalPalette({ onCreateTask, - onDeleteTask: handleDeleteTaskOnContextualPalette, + onDeleteTask: (task: Task) => onDeleteTask([task]), onEditTask, })} + TaskDependencyContextualPalette={getTaskDependencyContextalPalette({ + onDeleteTaskDependency, + })} isMoveChildsWithParent={false} onMoveTaskBefore={handleMoveTaskBefore} onMoveTaskAfter={handleMoveTaskAfter} diff --git a/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.types.ts b/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.types.ts index e0ea3baac74..f552f6eb1d9 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.types.ts +++ b/packages/gantt/frontend/sirius-components-gantt/src/representation/Gantt.types.ts @@ -42,6 +42,7 @@ export interface GanttProps { onExpandCollapse: (task: Task) => void; onDropTask: (droppedTask: TaskOrEmpty, targetTask: TaskOrEmpty | undefined, dropIndex: number) => void; onCreateTaskDependency: (sourceTaskId: string, targetTaskId: string) => void; + onDeleteTaskDependency: (sourceTaskId: string, targetTaskId: string) => void; onChangeTaskCollapseState: (taskId: string, collapsed: boolean) => void; onChangeColumn: (columnId: string, displayed: boolean, width: number) => void; } diff --git a/packages/gantt/frontend/sirius-components-gantt/src/representation/GanttRepresentation.tsx b/packages/gantt/frontend/sirius-components-gantt/src/representation/GanttRepresentation.tsx index 871d21586d2..ce90c1100b5 100644 --- a/packages/gantt/frontend/sirius-components-gantt/src/representation/GanttRepresentation.tsx +++ b/packages/gantt/frontend/sirius-components-gantt/src/representation/GanttRepresentation.tsx @@ -110,8 +110,16 @@ export const GanttRepresentation = ({ editingContextId, representationId }: Repr //--------------------------------- // Mutations - const { deleteTask, editTask, createTask, dropTask, createTaskDependency, changeTaskCollapseState, changeColumn } = - useGanttMutations(editingContextId, representationId); + const { + deleteTask, + editTask, + createTask, + dropTask, + createTaskDependency, + deleteTaskDependency, + changeTaskCollapseState, + changeColumn, + } = useGanttMutations(editingContextId, representationId); const handleEditTask = (task: TaskOrEmpty) => { const newDetail: GQLTaskDetail = { @@ -158,6 +166,7 @@ export const GanttRepresentation = ({ editingContextId, representationId }: Repr onCreateTaskDependency={createTaskDependency} onChangeTaskCollapseState={changeTaskCollapseState} onChangeColumn={changeColumn} + onDeleteTaskDependency={deleteTaskDependency} /> ); } diff --git a/packages/papaya/backend/sirius-components-papaya-edit/src/main/java/org/eclipse/sirius/components/papaya/provider/TaskItemProvider.java b/packages/papaya/backend/sirius-components-papaya-edit/src/main/java/org/eclipse/sirius/components/papaya/provider/TaskItemProvider.java index fb8a5ea1095..94679c08ad9 100644 --- a/packages/papaya/backend/sirius-components-papaya-edit/src/main/java/org/eclipse/sirius/components/papaya/provider/TaskItemProvider.java +++ b/packages/papaya/backend/sirius-components-papaya-edit/src/main/java/org/eclipse/sirius/components/papaya/provider/TaskItemProvider.java @@ -58,6 +58,7 @@ public List getPropertyDescriptors(Object object) { this.addStartDatePropertyDescriptor(object); this.addEndDatePropertyDescriptor(object); this.addDonePropertyDescriptor(object); + this.addDependenciesPropertyDescriptor(object); } return this.itemPropertyDescriptors; } @@ -128,6 +129,17 @@ protected void addDonePropertyDescriptor(Object object) { false, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null)); } + /** + * This adds a property descriptor for the Dependencies feature. + * + * @generated + */ + protected void addDependenciesPropertyDescriptor(Object object) { + this.itemPropertyDescriptors.add(this.createItemPropertyDescriptor(((ComposeableAdapterFactory) this.adapterFactory).getRootAdapterFactory(), this.getResourceLocator(), + this.getString("_UI_Task_dependencies_feature"), this.getString("_UI_PropertyDescriptor_description", "_UI_Task_dependencies_feature", "_UI_Task_type"), + PapayaPackage.Literals.TASK__DEPENDENCIES, true, false, true, null, null, null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or diff --git a/packages/papaya/backend/sirius-components-papaya-edit/src/main/resources/plugin.properties b/packages/papaya/backend/sirius-components-papaya-edit/src/main/resources/plugin.properties index 5d78964b540..71aa8451417 100644 --- a/packages/papaya/backend/sirius-components-papaya-edit/src/main/resources/plugin.properties +++ b/packages/papaya/backend/sirius-components-papaya-edit/src/main/resources/plugin.properties @@ -81,6 +81,7 @@ _UI_Task_tasks_feature = Tasks _UI_Task_startDate_feature = Start Date _UI_Task_endDate_feature = End Date _UI_Task_done_feature = Done +_UI_Task_dependencies_feature = Dependencies _UI_Contribution_relatedTasks_feature = Related Tasks _UI_Contribution_targets_feature = Targets _UI_Contribution_done_feature = Done diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/PapayaPackage.java b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/PapayaPackage.java index 77050f7fd2a..709e9142ad3 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/PapayaPackage.java +++ b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/PapayaPackage.java @@ -484,13 +484,22 @@ public interface PapayaPackage extends EPackage { */ int TASK__DONE = NAMED_ELEMENT_FEATURE_COUNT + 6; + /** + * The feature id for the 'Dependencies' reference list. + * + * @generated + * @ordered + */ + int TASK__DEPENDENCIES = NAMED_ELEMENT_FEATURE_COUNT + 7; + /** * The number of structural features of the 'Task' class. * * @generated * @ordered */ - int TASK_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 7; + int TASK_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 8; /** * The number of operations of the 'Task' class. @@ -3076,6 +3085,17 @@ public interface PapayaPackage extends EPackage { */ EAttribute getTask_Done(); + /** + * Returns the meta object for the reference list '{@link org.eclipse.sirius.components.papaya.Task#getDependencies + * Dependencies}'. + * + * @return the meta object for the reference list 'Dependencies'. + * @see org.eclipse.sirius.components.papaya.Task#getDependencies() + * @see #getTask() + * @generated + */ + EReference getTask_Dependencies(); + /** * Returns the meta object for class '{@link org.eclipse.sirius.components.papaya.Contribution * Contribution}'. @@ -4306,6 +4326,14 @@ interface Literals { */ EAttribute TASK__DONE = eINSTANCE.getTask_Done(); + /** + * The meta object literal for the 'Dependencies' reference list feature. + * + * @generated + */ + EReference TASK__DEPENDENCIES = eINSTANCE.getTask_Dependencies(); + /** * The meta object literal for the '{@link org.eclipse.sirius.components.papaya.impl.ContributionImpl * Contribution}' class. diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/Task.java b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/Task.java index 4c58eb094b6..09d6e959077 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/Task.java +++ b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/Task.java @@ -30,6 +30,7 @@ *
  • {@link org.eclipse.sirius.components.papaya.Task#getStartDate Start Date}
  • *
  • {@link org.eclipse.sirius.components.papaya.Task#getEndDate End Date}
  • *
  • {@link org.eclipse.sirius.components.papaya.Task#isDone Done}
  • + *
  • {@link org.eclipse.sirius.components.papaya.Task#getDependencies Dependencies}
  • * * * @see org.eclipse.sirius.components.papaya.PapayaPackage#getTask() @@ -172,4 +173,15 @@ public interface Task extends NamedElement { */ void setDone(boolean value); + /** + * Returns the value of the 'Dependencies' reference list. The list contents are of type + * {@link org.eclipse.sirius.components.papaya.Task}. + * + * @return the value of the 'Dependencies' reference list. + * @see org.eclipse.sirius.components.papaya.PapayaPackage#getTask_Dependencies() + * @model + * @generated + */ + EList getDependencies(); + } // Task diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/PapayaPackageImpl.java b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/PapayaPackageImpl.java index efd8611f726..e0e05804a20 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/PapayaPackageImpl.java +++ b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/PapayaPackageImpl.java @@ -666,6 +666,16 @@ public EAttribute getTask_Done() { return (EAttribute) this.taskEClass.getEStructuralFeatures().get(6); } + /** + * + * + * @generated + */ + @Override + public EReference getTask_Dependencies() { + return (EReference) this.taskEClass.getEStructuralFeatures().get(7); + } + /** * * @@ -1599,6 +1609,7 @@ public void createPackageContents() { this.createEAttribute(this.taskEClass, TASK__START_DATE); this.createEAttribute(this.taskEClass, TASK__END_DATE); this.createEAttribute(this.taskEClass, TASK__DONE); + this.createEReference(this.taskEClass, TASK__DEPENDENCIES); this.contributionEClass = this.createEClass(CONTRIBUTION); this.createEReference(this.contributionEClass, CONTRIBUTION__RELATED_TASKS); @@ -1842,6 +1853,8 @@ public void initializePackageContents() { IS_ORDERED); this.initEAttribute(this.getTask_Done(), this.ecorePackage.getEBoolean(), "done", null, 0, 1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEReference(this.getTask_Dependencies(), this.getTask(), null, "dependencies", null, 0, -1, Task.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEClass(this.contributionEClass, Contribution.class, "Contribution", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); this.initEReference(this.getContribution_RelatedTasks(), this.getTask(), null, "relatedTasks", null, 0, -1, Contribution.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/TaskImpl.java b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/TaskImpl.java index 1e084414e21..d470466e58a 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/TaskImpl.java +++ b/packages/papaya/backend/sirius-components-papaya/src/main/java/org/eclipse/sirius/components/papaya/impl/TaskImpl.java @@ -42,6 +42,7 @@ *
  • {@link org.eclipse.sirius.components.papaya.impl.TaskImpl#getStartDate Start Date}
  • *
  • {@link org.eclipse.sirius.components.papaya.impl.TaskImpl#getEndDate End Date}
  • *
  • {@link org.eclipse.sirius.components.papaya.impl.TaskImpl#isDone Done}
  • + *
  • {@link org.eclipse.sirius.components.papaya.impl.TaskImpl#getDependencies Dependencies}
  • * * * @generated @@ -167,6 +168,16 @@ public class TaskImpl extends NamedElementImpl implements Task { */ protected boolean done = DONE_EDEFAULT; + /** + * The cached value of the '{@link #getDependencies() Dependencies}' reference list. + * + * @see #getDependencies() + * @generated + * @ordered + */ + protected EList dependencies; + /** * * @@ -327,6 +338,19 @@ public void setDone(boolean newDone) { this.eNotify(new ENotificationImpl(this, Notification.SET, PapayaPackage.TASK__DONE, oldDone, this.done)); } + /** + * + * + * @generated + */ + @Override + public EList getDependencies() { + if (this.dependencies == null) { + this.dependencies = new EObjectResolvingEList<>(Task.class, this, PapayaPackage.TASK__DEPENDENCIES); + } + return this.dependencies; + } + /** * * @@ -363,6 +387,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return this.getEndDate(); case PapayaPackage.TASK__DONE: return this.isDone(); + case PapayaPackage.TASK__DEPENDENCIES: + return this.getDependencies(); } return super.eGet(featureID, resolve, coreType); } @@ -399,6 +425,10 @@ public void eSet(int featureID, Object newValue) { case PapayaPackage.TASK__DONE: this.setDone((Boolean) newValue); return; + case PapayaPackage.TASK__DEPENDENCIES: + this.getDependencies().clear(); + this.getDependencies().addAll((Collection) newValue); + return; } super.eSet(featureID, newValue); } @@ -432,6 +462,9 @@ public void eUnset(int featureID) { case PapayaPackage.TASK__DONE: this.setDone(DONE_EDEFAULT); return; + case PapayaPackage.TASK__DEPENDENCIES: + this.getDependencies().clear(); + return; } super.eUnset(featureID); } @@ -458,6 +491,8 @@ public boolean eIsSet(int featureID) { return END_DATE_EDEFAULT == null ? this.endDate != null : !END_DATE_EDEFAULT.equals(this.endDate); case PapayaPackage.TASK__DONE: return this.done != DONE_EDEFAULT; + case PapayaPackage.TASK__DEPENDENCIES: + return this.dependencies != null && !this.dependencies.isEmpty(); } return super.eIsSet(featureID); } diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.ecore b/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.ecore index 5eb4fcc7423..2b64a900e07 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.ecore +++ b/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.ecore @@ -48,6 +48,8 @@ + diff --git a/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.genmodel b/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.genmodel index b1ecfc89927..eef6a13acf9 100644 --- a/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.genmodel +++ b/packages/papaya/backend/sirius-components-papaya/src/main/resources/model/papaya.genmodel @@ -59,6 +59,7 @@ + diff --git a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/gantt/PapayaGanttControllerIntegrationTests.java b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/gantt/PapayaGanttControllerIntegrationTests.java index ea4d9f7a8b9..6d3fceaaf08 100644 --- a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/gantt/PapayaGanttControllerIntegrationTests.java +++ b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/application/controllers/gantt/PapayaGanttControllerIntegrationTests.java @@ -27,13 +27,17 @@ import org.eclipse.sirius.components.collaborative.gantt.dto.GanttRefreshedEventPayload; import org.eclipse.sirius.components.collaborative.gantt.dto.input.ChangeGanttColumnInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.ChangeTaskCollapseStateInput; +import org.eclipse.sirius.components.collaborative.gantt.dto.input.CreateGanttTaskDependencyInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.CreateGanttTaskInput; +import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskDependencyInput; import org.eclipse.sirius.components.collaborative.gantt.dto.input.DeleteGanttTaskInput; import org.eclipse.sirius.components.core.api.SuccessPayload; import org.eclipse.sirius.components.gantt.Gantt; import org.eclipse.sirius.components.gantt.tests.graphql.ChangeColumnMutationRunner; import org.eclipse.sirius.components.gantt.tests.graphql.ChangeTaskCollapseStateMutationRunner; +import org.eclipse.sirius.components.gantt.tests.graphql.CreateTaskDependencyMutationRunner; import org.eclipse.sirius.components.gantt.tests.graphql.CreateTaskMutationRunner; +import org.eclipse.sirius.components.gantt.tests.graphql.DeleteTaskDependencyMutationRunner; import org.eclipse.sirius.components.gantt.tests.graphql.DeleteTaskMutationRunner; import org.eclipse.sirius.components.gantt.tests.navigation.GanttNavigator; import org.eclipse.sirius.web.AbstractIntegrationTests; @@ -85,6 +89,11 @@ public class PapayaGanttControllerIntegrationTests extends AbstractIntegrationTe @Autowired private ChangeColumnMutationRunner changeColumnMutationRunner; + @Autowired + private CreateTaskDependencyMutationRunner createTaskDependencyMutationRunner; + + @Autowired + private DeleteTaskDependencyMutationRunner deleteTaskDependencyMutationRunner; @BeforeEach public void beforeEach() { @@ -318,4 +327,76 @@ public void givenGanttRepresentationWhenChangeColumnMutationIsPerformedThenItSuc .thenCancel() .verify(Duration.ofSeconds(10)); } + + @Test + @DisplayName("Given a gantt representation, when the task dependency creation and deletion mutations are invoked, then it succeeds") + @Sql(scripts = {"/scripts/papaya.sql"}, executionPhase = Sql.ExecutionPhase.BEFORE_TEST_METHOD) + @Sql(scripts = {"/scripts/cleanup.sql"}, executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD, config = @SqlConfig(transactionMode = SqlConfig.TransactionMode.ISOLATED)) + public void givenGanttWhenCreateAndDeleteTaskDependencyMutationArePerformedThenItSucceeds() { + + var flux = this.givenSubscriptionToGantt(); + + var ganttRef = new AtomicReference(); + var sourceTaskId = new AtomicReference(); + var targetTaskId = new AtomicReference(); + String taskName1 = "Improve some features of the deck"; + String taskName2 = "Improve some features of the gantt"; + Consumer initialGanttContentConsumer = payload -> Optional.of(payload) + .map(GanttRefreshedEventPayload::gantt) + .ifPresentOrElse(gantt -> { + ganttRef.set(gantt); + var task = new GanttNavigator(gantt).findTaskByName(taskName1); + sourceTaskId.set(task.id()); + task = new GanttNavigator(gantt).findTaskByName(taskName2); + assertThat(task.taskDependencyIds()).isEmpty(); + targetTaskId.set(task.id()); + }, () -> fail(MISSING_GANTT)); + + + Runnable createDependencyRunnable = () -> { + var createGanttTaskDependencyInput = new CreateGanttTaskDependencyInput( + UUID.randomUUID(), + PapayaIdentifiers.PAPAYA_PROJECT.toString(), + ganttRef.get().getId(), sourceTaskId.get(), targetTaskId.get()); + var result = this.createTaskDependencyMutationRunner.run(createGanttTaskDependencyInput); + + String typename = JsonPath.read(result, "$.data.createGanttTaskDependency.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer checkDependencyConsumer = payload -> Optional.of(payload) + .map(GanttRefreshedEventPayload::gantt) + .ifPresentOrElse(gantt -> { + var task = new GanttNavigator(gantt).findTaskByName(taskName2); + assertThat(task.taskDependencyIds()).contains(sourceTaskId.get()); + }, () -> fail(MISSING_GANTT)); + + Runnable deleteDependencyRunnable = () -> { + var deleteGanttTaskDependencyInput = new DeleteGanttTaskDependencyInput( + UUID.randomUUID(), + PapayaIdentifiers.PAPAYA_PROJECT.toString(), + ganttRef.get().getId(), sourceTaskId.get(), targetTaskId.get()); + var result = this.deleteTaskDependencyMutationRunner.run(deleteGanttTaskDependencyInput); + + String typename = JsonPath.read(result, "$.data.deleteGanttTaskDependency.__typename"); + assertThat(typename).isEqualTo(SuccessPayload.class.getSimpleName()); + }; + + Consumer checkDependencyAfterDeleteConsumer = payload -> Optional.of(payload) + .map(GanttRefreshedEventPayload::gantt) + .ifPresentOrElse(gantt -> { + var task = new GanttNavigator(gantt).findTaskByName(taskName2); + assertThat(task.taskDependencyIds()).isEmpty(); + }, () -> fail(MISSING_GANTT)); + + + StepVerifier.create(flux) + .consumeNextWith(initialGanttContentConsumer) + .then(createDependencyRunnable) + .consumeNextWith(checkDependencyConsumer) + .then(deleteDependencyRunnable) + .consumeNextWith(checkDependencyAfterDeleteConsumer) + .thenCancel() + .verify(Duration.ofSeconds(10)); + } } diff --git a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/services/gantt/PapayaGanttDescriptionProvider.java b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/services/gantt/PapayaGanttDescriptionProvider.java index 8e96205d6ac..ffb749f1259 100644 --- a/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/services/gantt/PapayaGanttDescriptionProvider.java +++ b/packages/sirius-web/backend/sirius-web/src/test/java/org/eclipse/sirius/web/services/gantt/PapayaGanttDescriptionProvider.java @@ -24,14 +24,19 @@ import org.eclipse.sirius.components.view.ChangeContext; import org.eclipse.sirius.components.view.SetValue; import org.eclipse.sirius.components.view.View; +import org.eclipse.sirius.components.view.builder.generated.ChangeContextBuilder; import org.eclipse.sirius.components.view.builder.generated.CreateInstanceBuilder; import org.eclipse.sirius.components.view.builder.generated.DeleteElementBuilder; import org.eclipse.sirius.components.view.builder.generated.GanttBuilders; import org.eclipse.sirius.components.view.builder.generated.GanttDescriptionBuilder; +import org.eclipse.sirius.components.view.builder.generated.SetValueBuilder; +import org.eclipse.sirius.components.view.builder.generated.UnsetValueBuilder; import org.eclipse.sirius.components.view.builder.generated.ViewBuilder; import org.eclipse.sirius.components.view.builder.generated.ViewBuilders; import org.eclipse.sirius.components.view.emf.gantt.IGanttIdProvider; +import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.GanttDescription; import org.eclipse.sirius.components.view.gantt.TaskDescription; @@ -92,6 +97,8 @@ private View createView() { private GanttDescription createGanttDescription() { CreateTaskTool createTaskTool = this.createCreateTaskTool(); DeleteTaskTool deleteTaskTool = this.createDeleteTaskTool(); + CreateTaskDependencyTool createTaskDependencyTool = this.createCreateTaskDependencyTool(); + DeleteTaskDependencyTool deleteTaskDependencyTool = this.createDeleteTaskDependencyTool(); this.ganttDescription = new GanttDescriptionBuilder() .name("Gantt") @@ -100,6 +107,8 @@ private GanttDescription createGanttDescription() { .taskElementDescriptions(this.createTaskDescriptionInProject()) .createTool(createTaskTool) .deleteTool(deleteTaskTool) + .createTaskDependencyTool(createTaskDependencyTool) + .deleteTaskDependencyTool(deleteTaskDependencyTool) .build(); return this.ganttDescription; @@ -129,6 +138,7 @@ private TaskDescription createTaskDescriptionInTask() { .startTimeExpression("aql:self.startTime") .endTimeExpression("aql:self.endTime") .progressExpression("aql:self.progress") + .taskDependenciesExpression("aql:self.dependencies") .build(); taskDescription.getReusedTaskElementDescriptions().add(taskDescription); @@ -166,4 +176,30 @@ private CreateTaskTool createCreateTaskTool() { .build()) .build(); } + + private CreateTaskDependencyTool createCreateTaskDependencyTool() { + return new GanttBuilders().newCreateTaskDependencyTool() + .name("Create Task Dependency") + .body(new ChangeContextBuilder() + .expression("aql:targetObject") + .children(new SetValueBuilder() + .featureName("dependencies") + .valueExpression("aql:sourceObject") + .build()) + .build()) + .build(); + } + + private DeleteTaskDependencyTool createDeleteTaskDependencyTool() { + return new GanttBuilders().newDeleteTaskDependencyTool() + .name("Delete Task Dependency") + .body(new ChangeContextBuilder() + .expression("aql:targetObject") + .children(new UnsetValueBuilder() + .featureName("dependencies") + .elementExpression("aql:sourceObject") + .build()) + .build()) + .build(); + } } diff --git a/packages/sirius-web/frontend/sirius-web/package.json b/packages/sirius-web/frontend/sirius-web/package.json index b191eab44db..4f827ade7c3 100644 --- a/packages/sirius-web/frontend/sirius-web/package.json +++ b/packages/sirius-web/frontend/sirius-web/package.json @@ -30,7 +30,7 @@ "@material-ui/core": "4.12.4", "@material-ui/icons": "4.11.3", "@material-ui/lab": "4.0.0-alpha.61", - "@ObeoNetwork/gantt-task-react": "0.4.17", + "@ObeoNetwork/gantt-task-react": "0.4.19", "@ObeoNetwork/react-trello": "2.4.11", "@types/react": "17.0.37", "@types/react-router-dom": "5.3.3", diff --git a/packages/starters/backend/sirius-components-task-starter/src/main/java/org/eclipse/sirius/components/task/starter/configuration/view/ViewGanttDescriptionBuilder.java b/packages/starters/backend/sirius-components-task-starter/src/main/java/org/eclipse/sirius/components/task/starter/configuration/view/ViewGanttDescriptionBuilder.java index 98bba45ac57..b20748a006c 100644 --- a/packages/starters/backend/sirius-components-task-starter/src/main/java/org/eclipse/sirius/components/task/starter/configuration/view/ViewGanttDescriptionBuilder.java +++ b/packages/starters/backend/sirius-components-task-starter/src/main/java/org/eclipse/sirius/components/task/starter/configuration/view/ViewGanttDescriptionBuilder.java @@ -17,8 +17,10 @@ import org.eclipse.sirius.components.view.builder.generated.DeleteElementBuilder; import org.eclipse.sirius.components.view.builder.generated.GanttBuilders; import org.eclipse.sirius.components.view.builder.generated.SetValueBuilder; +import org.eclipse.sirius.components.view.builder.generated.UnsetValueBuilder; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -54,6 +56,7 @@ private GanttDescription createGanttDescription() { DeleteTaskTool deleteTaskTool = this.createDeleteTaskTool(); DropTaskTool dropTaskTool = this.createDropTaskTool(); CreateTaskDependencyTool createTaskDependencyTool = this.createTaskDependencyTool(); + DeleteTaskDependencyTool deleteTaskDependencyTool = this.createDeleteTaskDependencyTool(); GanttDescription ganttDescription = new GanttBuilders().newGanttDescription() .name(GANTT_REP_DESC_NAME) @@ -65,6 +68,7 @@ private GanttDescription createGanttDescription() { .deleteTool(deleteTaskTool) .dropTool(dropTaskTool) .createTaskDependencyTool(createTaskDependencyTool) + .deleteTaskDependencyTool(deleteTaskDependencyTool) .build(); return ganttDescription; @@ -118,6 +122,19 @@ private CreateTaskDependencyTool createTaskDependencyTool() { .build(); } + private DeleteTaskDependencyTool createDeleteTaskDependencyTool() { + return new GanttBuilders().newDeleteTaskDependencyTool() + .name("Delete Task Dependency") + .body(new ChangeContextBuilder() + .expression("aql:targetObject") + .children(new UnsetValueBuilder() + .featureName("dependencies") + .elementExpression("aql:sourceObject") + .build()) + .build()) + .build(); + } + private TaskDescription createTaskDescriptionInProject() { TaskDescription taskDescriptionInTask = this.createTaskDescriptionInTask(); diff --git a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DeleteTaskDependencyToolBuilder.java b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DeleteTaskDependencyToolBuilder.java new file mode 100644 index 00000000000..2cd9d2b87ee --- /dev/null +++ b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/DeleteTaskDependencyToolBuilder.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2023, 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.view.builder.generated; + +/** + * Builder for DeleteTaskDependencyToolBuilder. + * + * @author BuilderGenerator + * @generated + */ +public class DeleteTaskDependencyToolBuilder { + + /** + * Create instance org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool. + * @generated + */ + private org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool deleteTaskDependencyTool = org.eclipse.sirius.components.view.gantt.GanttFactory.eINSTANCE.createDeleteTaskDependencyTool(); + + /** + * Return instance org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool. + * @generated + */ + protected org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool getDeleteTaskDependencyTool() { + return this.deleteTaskDependencyTool; + } + + /** + * Return instance org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool. + * @generated + */ + public org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool build() { + return this.getDeleteTaskDependencyTool(); + } + + /** + * Setter for Name. + * + * @generated + */ + public DeleteTaskDependencyToolBuilder name(java.lang.String value) { + this.getDeleteTaskDependencyTool().setName(value); + return this; + } + /** + * Setter for Body. + * + * @generated + */ + public DeleteTaskDependencyToolBuilder body(org.eclipse.sirius.components.view.Operation ... values) { + for (org.eclipse.sirius.components.view.Operation value : values) { + this.getDeleteTaskDependencyTool().getBody().add(value); + } + return this; + } + + +} + diff --git a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttBuilders.java b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttBuilders.java index 193db7ebf59..54f819bf364 100644 --- a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttBuilders.java +++ b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttBuilders.java @@ -89,5 +89,15 @@ public CreateTaskDependencyToolBuilder newCreateTaskDependencyTool() { return new CreateTaskDependencyToolBuilder(); } + /** + * Instantiate a DeleteTaskDependencyToolBuilder . + * + * @author BuilderGenerator + * @generated + */ + public DeleteTaskDependencyToolBuilder newDeleteTaskDependencyTool() { + return new DeleteTaskDependencyToolBuilder(); + } + } diff --git a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttDescriptionBuilder.java b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttDescriptionBuilder.java index ea649b2e60a..6775a8a995f 100644 --- a/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttDescriptionBuilder.java +++ b/packages/view/backend/sirius-components-view-builder/src/main/java/org/eclipse/sirius/components/view/builder/generated/GanttDescriptionBuilder.java @@ -138,6 +138,16 @@ public GanttDescriptionBuilder createTaskDependencyTool(org.eclipse.sirius.compo return this; } + /** + * Setter for DeleteTaskDependencyTool. + * + * @generated + */ + public GanttDescriptionBuilder deleteTaskDependencyTool(org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool value) { + this.getGanttDescription().setDeleteTaskDependencyTool(value); + return this; + } + /** * Setter for DateRoundingExpression. * diff --git a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/gantt/ViewGanttDescriptionConverter.java b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/gantt/ViewGanttDescriptionConverter.java index 39a31d244dc..cfd608c4f36 100644 --- a/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/gantt/ViewGanttDescriptionConverter.java +++ b/packages/view/backend/sirius-components-view-emf/src/main/java/org/eclipse/sirius/components/view/emf/gantt/ViewGanttDescriptionConverter.java @@ -108,6 +108,9 @@ public IRepresentationDescription convert(RepresentationDescription viewRepresen .createTaskDependencyProvider(Optional.ofNullable(viewGanttDescription.getCreateTaskDependencyTool()).map(tool -> this.getOperationsHandler(tool.getBody(), interpreter)) .orElse(variable -> { })) + .deleteTaskDependencyProvider(Optional.ofNullable(viewGanttDescription.getDeleteTaskDependencyTool()).map(tool -> this.getOperationsHandler(tool.getBody(), interpreter)) + .orElse(variable -> { + })) .taskDescriptions(taskDescriptions) .dateRoundingProvider(variableManager -> this.evaluateString(interpreter, variableManager, viewGanttDescription.getDateRoundingExpression())) .build(); diff --git a/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/DeleteTaskDependencyToolItemProvider.java b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/DeleteTaskDependencyToolItemProvider.java new file mode 100644 index 00000000000..719947d01a0 --- /dev/null +++ b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/DeleteTaskDependencyToolItemProvider.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.view.gantt.provider; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; + +/** + * This is the item provider adapter for a {@link org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool} + * object. + * + * @generated + */ +public class DeleteTaskDependencyToolItemProvider extends TaskToolItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * @generated + */ + public DeleteTaskDependencyToolItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (this.itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return this.itemPropertyDescriptors; + } + + /** + * This returns DeleteTaskDependencyTool.gif. + * + * @generated NOT + */ + @Override + public Object getImage(Object object) { + return this.overlayImage(object, this.getResourceLocator().getImage("full/obj16/DeleteTaskDependencyTool.svg")); + } + + /** + * + * + * @generated + */ + @Override + protected boolean shouldComposeCreationImage() { + return true; + } + + /** + * This returns the label text for the adapted class. + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((DeleteTaskDependencyTool) object).getName(); + return label == null || label.length() == 0 ? this.getString("_UI_DeleteTaskDependencyTool_type") : this.getString("_UI_DeleteTaskDependencyTool_type") + " " + label; + } + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached children and by creating + * a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + this.updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children that can be created + * under this object. + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttDescriptionItemProvider.java b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttDescriptionItemProvider.java index c69567d11cf..358df60ffeb 100644 --- a/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttDescriptionItemProvider.java +++ b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttDescriptionItemProvider.java @@ -89,6 +89,7 @@ public Collection getChildrenFeatures(Object objec this.childrenFeatures.add(GanttPackage.Literals.GANTT_DESCRIPTION__DELETE_TOOL); this.childrenFeatures.add(GanttPackage.Literals.GANTT_DESCRIPTION__DROP_TOOL); this.childrenFeatures.add(GanttPackage.Literals.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL); + this.childrenFeatures.add(GanttPackage.Literals.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL); } return this.childrenFeatures; } @@ -158,6 +159,7 @@ public void notifyChanged(Notification notification) { case GanttPackage.GANTT_DESCRIPTION__DELETE_TOOL: case GanttPackage.GANTT_DESCRIPTION__DROP_TOOL: case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: this.fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } @@ -185,6 +187,8 @@ protected void collectNewChildDescriptors(Collection newChildDescriptors newChildDescriptors.add(this.createChildParameter(GanttPackage.Literals.GANTT_DESCRIPTION__DROP_TOOL, GanttFactory.eINSTANCE.createDropTaskTool())); newChildDescriptors.add(this.createChildParameter(GanttPackage.Literals.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL, GanttFactory.eINSTANCE.createCreateTaskDependencyTool())); + + newChildDescriptors.add(this.createChildParameter(GanttPackage.Literals.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL, GanttFactory.eINSTANCE.createDeleteTaskDependencyTool())); } } diff --git a/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttItemProviderAdapterFactory.java b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttItemProviderAdapterFactory.java index caa06ead431..dfb503cc47e 100644 --- a/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttItemProviderAdapterFactory.java +++ b/packages/view/backend/sirius-components-view-gantt-edit/src/main/java/org/eclipse/sirius/components/view/gantt/provider/GanttItemProviderAdapterFactory.java @@ -260,6 +260,30 @@ public Adapter createCreateTaskDependencyToolAdapter() { return this.createTaskDependencyToolItemProvider; } + /** + * This keeps track of the one adapter used for all + * {@link org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool} instances. + * + * @generated + */ + protected DeleteTaskDependencyToolItemProvider deleteTaskDependencyToolItemProvider; + + /** + * This creates an adapter for a {@link org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool}. + * + * @generated + */ + @Override + public Adapter createDeleteTaskDependencyToolAdapter() { + if (this.deleteTaskDependencyToolItemProvider == null) { + this.deleteTaskDependencyToolItemProvider = new DeleteTaskDependencyToolItemProvider(this); + } + + return this.deleteTaskDependencyToolItemProvider; + } + /** * This returns the root adapter factory that contains this factory. * @@ -403,6 +427,8 @@ public void dispose() { this.dropTaskToolItemProvider.dispose(); if (this.createTaskDependencyToolItemProvider != null) this.createTaskDependencyToolItemProvider.dispose(); + if (this.deleteTaskDependencyToolItemProvider != null) + this.deleteTaskDependencyToolItemProvider.dispose(); } /** diff --git a/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/icons/full/obj16/DeleteTaskDependencyTool.svg b/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/icons/full/obj16/DeleteTaskDependencyTool.svg new file mode 100644 index 00000000000..d479aeeeeeb --- /dev/null +++ b/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/icons/full/obj16/DeleteTaskDependencyTool.svg @@ -0,0 +1,22 @@ + + + + + + diff --git a/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/plugin.properties b/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/plugin.properties index 87354a0bbd3..188a37d5173 100644 --- a/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/plugin.properties +++ b/packages/view/backend/sirius-components-view-gantt-edit/src/main/resources/plugin.properties @@ -29,6 +29,7 @@ _UI_EditTaskTool_type = Edit Task Tool _UI_DeleteTaskTool_type = Delete Task Tool _UI_DropTaskTool_type= Drop Task Tool _UI_CreateTaskDependencyTool_type = Create Task Dependency Tool +_UI_DeleteTaskDependencyTool_type = Delete Task Dependency Tool _UI_Unknown_type = Object _UI_Unknown_datatype= Value @@ -39,6 +40,7 @@ _UI_GanttDescription_editTool_feature = Edit Tool _UI_GanttDescription_deleteTool_feature = Delete Tool _UI_GanttDescription_dropTool_feature = Drop Tool _UI_GanttDescription_createTaskDependencyTool_feature = Create Task Dependency Tool +_UI_GanttDescription_deleteTaskDependencyTool_feature = Delete Task Dependency Tool _UI_GanttDescription_dateRoundingExpression_feature = Date Rounding Expression _UI_TaskDescription_name_feature = Name _UI_TaskDescription_domainType_feature = Domain Type diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/DeleteTaskDependencyTool.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/DeleteTaskDependencyTool.java new file mode 100644 index 00000000000..99a104344d0 --- /dev/null +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/DeleteTaskDependencyTool.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.view.gantt; + +/** + * A representation of the model object 'Delete Task Dependency Tool'. + * + * + * @see org.eclipse.sirius.components.view.gantt.GanttPackage#getDeleteTaskDependencyTool() + * @model + * @generated + */ +public interface DeleteTaskDependencyTool extends TaskTool { +} // DeleteTaskDependencyTool diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttDescription.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttDescription.java index f60b3d9a1e8..8a2d6ced889 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttDescription.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttDescription.java @@ -30,6 +30,8 @@ *
  • {@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDropTool Drop Tool}
  • *
  • {@link org.eclipse.sirius.components.view.gantt.GanttDescription#getCreateTaskDependencyTool Create Task * Dependency Tool}
  • + *
  • {@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDeleteTaskDependencyTool Delete Task + * Dependency Tool}
  • *
  • {@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDateRoundingExpression Date Rounding * Expression}
  • * @@ -167,6 +169,30 @@ public interface GanttDescription extends RepresentationDescription { */ void setCreateTaskDependencyTool(CreateTaskDependencyTool value); + /** + * Returns the value of the 'Delete Task Dependency Tool' containment reference. + * + * @return the value of the 'Delete Task Dependency Tool' containment reference. + * @see #setDeleteTaskDependencyTool(DeleteTaskDependencyTool) + * @see org.eclipse.sirius.components.view.gantt.GanttPackage#getGanttDescription_DeleteTaskDependencyTool() + * @model containment="true" + * @generated + */ + DeleteTaskDependencyTool getDeleteTaskDependencyTool(); + + /** + * Sets the value of the + * '{@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDeleteTaskDependencyTool Delete Task + * Dependency Tool}' containment reference. + * + * @param value + * the new value of the 'Delete Task Dependency Tool' containment reference. + * @see #getDeleteTaskDependencyTool() + * @generated + */ + void setDeleteTaskDependencyTool(DeleteTaskDependencyTool value); + /** * Returns the value of the 'Date Rounding Expression' attribute. The default value is * "12H". diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttFactory.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttFactory.java index cd2ea2bbbc2..9a0c91e8e1e 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttFactory.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttFactory.java @@ -86,6 +86,15 @@ public interface GanttFactory extends EFactory { */ CreateTaskDependencyTool createCreateTaskDependencyTool(); + /** + * Returns a new object of class 'Delete Task Dependency Tool'. + * + * @return a new object of class 'Delete Task Dependency Tool'. + * @generated + */ + DeleteTaskDependencyTool createDeleteTaskDependencyTool(); + /** * Returns the package supported by this factory. * diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttPackage.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttPackage.java index 864bbb923f8..34e090833ea 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttPackage.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/GanttPackage.java @@ -160,6 +160,15 @@ public interface GanttPackage extends EPackage { */ int GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 5; + /** + * The feature id for the 'Delete Task Dependency Tool' containment reference. + * + * @generated + * @ordered + */ + int GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 6; + /** * The feature id for the 'Date Rounding Expression' attribute. @@ -167,7 +176,7 @@ public interface GanttPackage extends EPackage { * @generated * @ordered */ - int GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 6; + int GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION = ViewPackage.REPRESENTATION_DESCRIPTION_FEATURE_COUNT + 7; /** * The number of structural features of the 'Description' class. @@ -583,6 +592,51 @@ public interface GanttPackage extends EPackage { */ int CREATE_TASK_DEPENDENCY_TOOL_OPERATION_COUNT = TASK_TOOL_OPERATION_COUNT + 0; + /** + * The meta object id for the '{@link org.eclipse.sirius.components.view.gantt.impl.DeleteTaskDependencyToolImpl + * Delete Task Dependency Tool}' class. + * + * @see org.eclipse.sirius.components.view.gantt.impl.DeleteTaskDependencyToolImpl + * @see org.eclipse.sirius.components.view.gantt.impl.GanttPackageImpl#getDeleteTaskDependencyTool() + * @generated + */ + int DELETE_TASK_DEPENDENCY_TOOL = 8; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int DELETE_TASK_DEPENDENCY_TOOL__NAME = TASK_TOOL__NAME; + + /** + * The feature id for the 'Body' containment reference list. + * + * @generated + * @ordered + */ + int DELETE_TASK_DEPENDENCY_TOOL__BODY = TASK_TOOL__BODY; + + /** + * The number of structural features of the 'Delete Task Dependency Tool' class. + * + * + * @generated + * @ordered + */ + int DELETE_TASK_DEPENDENCY_TOOL_FEATURE_COUNT = TASK_TOOL_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Delete Task Dependency Tool' class. + * + * @generated + * @ordered + */ + int DELETE_TASK_DEPENDENCY_TOOL_OPERATION_COUNT = TASK_TOOL_OPERATION_COUNT + 0; + /** * Returns the meta object for class '{@link org.eclipse.sirius.components.view.gantt.GanttDescription * Description}'. @@ -665,6 +719,18 @@ public interface GanttPackage extends EPackage { */ EReference getGanttDescription_CreateTaskDependencyTool(); + /** + * Returns the meta object for the containment reference + * '{@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDeleteTaskDependencyTool Delete Task + * Dependency Tool}'. + * + * @return the meta object for the containment reference 'Delete Task Dependency Tool'. + * @see org.eclipse.sirius.components.view.gantt.GanttDescription#getDeleteTaskDependencyTool() + * @see #getGanttDescription() + * @generated + */ + EReference getGanttDescription_DeleteTaskDependencyTool(); + /** * Returns the meta object for the attribute * '{@link org.eclipse.sirius.components.view.gantt.GanttDescription#getDateRoundingExpression Date Rounding @@ -914,6 +980,16 @@ public interface GanttPackage extends EPackage { */ EClass getCreateTaskDependencyTool(); + /** + * Returns the meta object for class '{@link org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool + * Delete Task Dependency Tool}'. + * + * @return the meta object for class 'Delete Task Dependency Tool'. + * @see org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool + * @generated + */ + EClass getDeleteTaskDependencyTool(); + /** * Returns the factory that creates the instances of the model. * @@ -994,6 +1070,14 @@ interface Literals { */ EReference GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL = eINSTANCE.getGanttDescription_CreateTaskDependencyTool(); + /** + * The meta object literal for the 'Delete Task Dependency Tool' containment reference feature. + * + * + * @generated + */ + EReference GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL = eINSTANCE.getGanttDescription_DeleteTaskDependencyTool(); + /** * The meta object literal for the 'Date Rounding Expression' attribute feature. @@ -1185,6 +1269,17 @@ interface Literals { */ EClass CREATE_TASK_DEPENDENCY_TOOL = eINSTANCE.getCreateTaskDependencyTool(); + /** + * The meta object literal for the + * '{@link org.eclipse.sirius.components.view.gantt.impl.DeleteTaskDependencyToolImpl Delete Task Dependency + * Tool}' class. + * + * @see org.eclipse.sirius.components.view.gantt.impl.DeleteTaskDependencyToolImpl + * @see org.eclipse.sirius.components.view.gantt.impl.GanttPackageImpl#getDeleteTaskDependencyTool() + * @generated + */ + EClass DELETE_TASK_DEPENDENCY_TOOL = eINSTANCE.getDeleteTaskDependencyTool(); + } } // GanttPackage diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/DeleteTaskDependencyToolImpl.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/DeleteTaskDependencyToolImpl.java new file mode 100644 index 00000000000..0ec5790b380 --- /dev/null +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/DeleteTaskDependencyToolImpl.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2024 Obeo. + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.components.view.gantt.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; +import org.eclipse.sirius.components.view.gantt.GanttPackage; + +/** + * An implementation of the model object 'Delete Task Dependency Tool'. + * + * @generated + */ +public class DeleteTaskDependencyToolImpl extends TaskToolImpl implements DeleteTaskDependencyTool { + /** + * + * + * @generated + */ + protected DeleteTaskDependencyToolImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return GanttPackage.Literals.DELETE_TASK_DEPENDENCY_TOOL; + } + +} // DeleteTaskDependencyToolImpl diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttDescriptionImpl.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttDescriptionImpl.java index 8a638ba313f..87a339e1585 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttDescriptionImpl.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttDescriptionImpl.java @@ -24,6 +24,7 @@ import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -48,6 +49,8 @@ *
  • {@link org.eclipse.sirius.components.view.gantt.impl.GanttDescriptionImpl#getDropTool Drop Tool}
  • *
  • {@link org.eclipse.sirius.components.view.gantt.impl.GanttDescriptionImpl#getCreateTaskDependencyTool Create * Task Dependency Tool}
  • + *
  • {@link org.eclipse.sirius.components.view.gantt.impl.GanttDescriptionImpl#getDeleteTaskDependencyTool Delete + * Task Dependency Tool}
  • *
  • {@link org.eclipse.sirius.components.view.gantt.impl.GanttDescriptionImpl#getDateRoundingExpression Date * Rounding Expression}
  • * @@ -115,6 +118,16 @@ public class GanttDescriptionImpl extends RepresentationDescriptionImpl implemen */ protected CreateTaskDependencyTool createTaskDependencyTool; + /** + * The cached value of the '{@link #getDeleteTaskDependencyTool() Delete Task Dependency Tool}' containment + * reference. + * + * @see #getDeleteTaskDependencyTool() + * @generated + * @ordered + */ + protected DeleteTaskDependencyTool deleteTaskDependencyTool; + /** * The default value of the '{@link #getDateRoundingExpression() Date Rounding Expression}' attribute. @@ -408,6 +421,55 @@ public void setCreateTaskDependencyTool(CreateTaskDependencyTool newCreateTaskDe this.eNotify(new ENotificationImpl(this, Notification.SET, GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL, newCreateTaskDependencyTool, newCreateTaskDependencyTool)); } + /** + * + * + * @generated + */ + @Override + public DeleteTaskDependencyTool getDeleteTaskDependencyTool() { + return this.deleteTaskDependencyTool; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDeleteTaskDependencyTool(DeleteTaskDependencyTool newDeleteTaskDependencyTool, NotificationChain msgs) { + DeleteTaskDependencyTool oldDeleteTaskDependencyTool = this.deleteTaskDependencyTool; + this.deleteTaskDependencyTool = newDeleteTaskDependencyTool; + if (this.eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL, oldDeleteTaskDependencyTool, + newDeleteTaskDependencyTool); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setDeleteTaskDependencyTool(DeleteTaskDependencyTool newDeleteTaskDependencyTool) { + if (newDeleteTaskDependencyTool != this.deleteTaskDependencyTool) { + NotificationChain msgs = null; + if (this.deleteTaskDependencyTool != null) + msgs = ((InternalEObject) this.deleteTaskDependencyTool).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL, null, msgs); + if (newDeleteTaskDependencyTool != null) + msgs = ((InternalEObject) newDeleteTaskDependencyTool).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL, null, msgs); + msgs = this.basicSetDeleteTaskDependencyTool(newDeleteTaskDependencyTool, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (this.eNotificationRequired()) + this.eNotify(new ENotificationImpl(this, Notification.SET, GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL, newDeleteTaskDependencyTool, newDeleteTaskDependencyTool)); + } + /** * * @@ -451,6 +513,8 @@ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, return this.basicSetDropTool(null, msgs); case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: return this.basicSetCreateTaskDependencyTool(null, msgs); + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: + return this.basicSetDeleteTaskDependencyTool(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -475,6 +539,8 @@ public Object eGet(int featureID, boolean resolve, boolean coreType) { return this.getDropTool(); case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: return this.getCreateTaskDependencyTool(); + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: + return this.getDeleteTaskDependencyTool(); case GanttPackage.GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION: return this.getDateRoundingExpression(); } @@ -509,6 +575,9 @@ public void eSet(int featureID, Object newValue) { case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: this.setCreateTaskDependencyTool((CreateTaskDependencyTool) newValue); return; + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: + this.setDeleteTaskDependencyTool((DeleteTaskDependencyTool) newValue); + return; case GanttPackage.GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION: this.setDateRoundingExpression((String) newValue); return; @@ -542,6 +611,9 @@ public void eUnset(int featureID) { case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: this.setCreateTaskDependencyTool((CreateTaskDependencyTool) null); return; + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: + this.setDeleteTaskDependencyTool((DeleteTaskDependencyTool) null); + return; case GanttPackage.GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION: this.setDateRoundingExpression(DATE_ROUNDING_EXPRESSION_EDEFAULT); return; @@ -569,6 +641,8 @@ public boolean eIsSet(int featureID) { return this.dropTool != null; case GanttPackage.GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL: return this.createTaskDependencyTool != null; + case GanttPackage.GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL: + return this.deleteTaskDependencyTool != null; case GanttPackage.GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION: return DATE_ROUNDING_EXPRESSION_EDEFAULT == null ? this.dateRoundingExpression != null : !DATE_ROUNDING_EXPRESSION_EDEFAULT.equals(this.dateRoundingExpression); } diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttFactoryImpl.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttFactoryImpl.java index 19cb3740664..e28d6dbeddb 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttFactoryImpl.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttFactoryImpl.java @@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -81,6 +82,8 @@ public EObject create(EClass eClass) { return this.createDropTaskTool(); case GanttPackage.CREATE_TASK_DEPENDENCY_TOOL: return this.createCreateTaskDependencyTool(); + case GanttPackage.DELETE_TASK_DEPENDENCY_TOOL: + return this.createDeleteTaskDependencyTool(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -163,6 +166,17 @@ public CreateTaskDependencyTool createCreateTaskDependencyTool() { return createTaskDependencyTool; } + /** + * + * + * @generated + */ + @Override + public DeleteTaskDependencyTool createDeleteTaskDependencyTool() { + DeleteTaskDependencyToolImpl deleteTaskDependencyTool = new DeleteTaskDependencyToolImpl(); + return deleteTaskDependencyTool; + } + /** * * diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttPackageImpl.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttPackageImpl.java index 41fe0d3fba7..6b476712809 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttPackageImpl.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/impl/GanttPackageImpl.java @@ -20,6 +20,7 @@ import org.eclipse.sirius.components.view.ViewPackage; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -91,6 +92,13 @@ public class GanttPackageImpl extends EPackageImpl implements GanttPackage { */ private EClass createTaskDependencyToolEClass = null; + /** + * + * + * @generated + */ + private EClass deleteTaskDependencyToolEClass = null; + /** * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry * EPackage.Registry} by the package package URI value. @@ -225,6 +233,16 @@ public EReference getGanttDescription_CreateTaskDependencyTool() { return (EReference) this.ganttDescriptionEClass.getEStructuralFeatures().get(5); } + /** + * + * + * @generated + */ + @Override + public EReference getGanttDescription_DeleteTaskDependencyTool() { + return (EReference) this.ganttDescriptionEClass.getEStructuralFeatures().get(6); + } + /** * * @@ -232,7 +250,7 @@ public EReference getGanttDescription_CreateTaskDependencyTool() { */ @Override public EAttribute getGanttDescription_DateRoundingExpression() { - return (EAttribute) this.ganttDescriptionEClass.getEStructuralFeatures().get(6); + return (EAttribute) this.ganttDescriptionEClass.getEStructuralFeatures().get(7); } /** @@ -445,6 +463,16 @@ public EClass getCreateTaskDependencyTool() { return this.createTaskDependencyToolEClass; } + /** + * + * + * @generated + */ + @Override + public EClass getDeleteTaskDependencyTool() { + return this.deleteTaskDependencyToolEClass; + } + /** * * @@ -481,6 +509,7 @@ public void createPackageContents() { this.createEReference(this.ganttDescriptionEClass, GANTT_DESCRIPTION__DELETE_TOOL); this.createEReference(this.ganttDescriptionEClass, GANTT_DESCRIPTION__DROP_TOOL); this.createEReference(this.ganttDescriptionEClass, GANTT_DESCRIPTION__CREATE_TASK_DEPENDENCY_TOOL); + this.createEReference(this.ganttDescriptionEClass, GANTT_DESCRIPTION__DELETE_TASK_DEPENDENCY_TOOL); this.createEAttribute(this.ganttDescriptionEClass, GANTT_DESCRIPTION__DATE_ROUNDING_EXPRESSION); this.taskDescriptionEClass = this.createEClass(TASK_DESCRIPTION); @@ -510,6 +539,8 @@ public void createPackageContents() { this.dropTaskToolEClass = this.createEClass(DROP_TASK_TOOL); this.createTaskDependencyToolEClass = this.createEClass(CREATE_TASK_DEPENDENCY_TOOL); + + this.deleteTaskDependencyToolEClass = this.createEClass(DELETE_TASK_DEPENDENCY_TOOL); } /** @@ -549,6 +580,7 @@ public void initializePackageContents() { this.deleteTaskToolEClass.getESuperTypes().add(this.getTaskTool()); this.dropTaskToolEClass.getESuperTypes().add(this.getTaskTool()); this.createTaskDependencyToolEClass.getESuperTypes().add(this.getTaskTool()); + this.deleteTaskDependencyToolEClass.getESuperTypes().add(this.getTaskTool()); // Initialize classes, features, and operations; add parameters this.initEClass(this.ganttDescriptionEClass, GanttDescription.class, "GanttDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -564,6 +596,8 @@ public void initializePackageContents() { !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEReference(this.getGanttDescription_CreateTaskDependencyTool(), this.getCreateTaskDependencyTool(), null, "createTaskDependencyTool", null, 0, 1, GanttDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + this.initEReference(this.getGanttDescription_DeleteTaskDependencyTool(), this.getDeleteTaskDependencyTool(), null, "deleteTaskDependencyTool", null, 0, 1, GanttDescription.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); this.initEAttribute(this.getGanttDescription_DateRoundingExpression(), theViewPackage.getInterpretedExpression(), "dateRoundingExpression", "12H", 0, 1, GanttDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -609,6 +643,8 @@ public void initializePackageContents() { this.initEClass(this.createTaskDependencyToolEClass, CreateTaskDependencyTool.class, "CreateTaskDependencyTool", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + this.initEClass(this.deleteTaskDependencyToolEClass, DeleteTaskDependencyTool.class, "DeleteTaskDependencyTool", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + // Create resource this.createResource(eNS_URI); } diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttAdapterFactory.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttAdapterFactory.java index 1687bddfea5..b194ec5cd88 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttAdapterFactory.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttAdapterFactory.java @@ -19,6 +19,7 @@ import org.eclipse.sirius.components.view.RepresentationDescription; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -118,6 +119,11 @@ public Adapter caseCreateTaskDependencyTool(CreateTaskDependencyTool object) { return GanttAdapterFactory.this.createCreateTaskDependencyToolAdapter(); } + @Override + public Adapter caseDeleteTaskDependencyTool(DeleteTaskDependencyTool object) { + return GanttAdapterFactory.this.createDeleteTaskDependencyToolAdapter(); + } + @Override public Adapter caseRepresentationDescription(RepresentationDescription object) { return GanttAdapterFactory.this.createRepresentationDescriptionAdapter(); @@ -253,6 +259,20 @@ public Adapter createCreateTaskDependencyToolAdapter() { return null; } + /** + * Creates a new adapter for an object of class + * '{@link org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool Delete Task Dependency Tool}'. + * This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool + * @generated + */ + public Adapter createDeleteTaskDependencyToolAdapter() { + return null; + } + /** * Creates a new adapter for an object of class '{@link org.eclipse.sirius.components.view.RepresentationDescription * Representation Description}'. This default implementation returns null so that diff --git a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttSwitch.java b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttSwitch.java index 37ee7a6b2fa..27f8cd86843 100644 --- a/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttSwitch.java +++ b/packages/view/backend/sirius-components-view-gantt/src/main/java/org/eclipse/sirius/components/view/gantt/util/GanttSwitch.java @@ -18,6 +18,7 @@ import org.eclipse.sirius.components.view.RepresentationDescription; import org.eclipse.sirius.components.view.gantt.CreateTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.CreateTaskTool; +import org.eclipse.sirius.components.view.gantt.DeleteTaskDependencyTool; import org.eclipse.sirius.components.view.gantt.DeleteTaskTool; import org.eclipse.sirius.components.view.gantt.DropTaskTool; import org.eclipse.sirius.components.view.gantt.EditTaskTool; @@ -145,6 +146,15 @@ protected T doSwitch(int classifierID, EObject theEObject) { result = this.defaultCase(theEObject); return result; } + case GanttPackage.DELETE_TASK_DEPENDENCY_TOOL: { + DeleteTaskDependencyTool deleteTaskDependencyTool = (DeleteTaskDependencyTool) theEObject; + T result = this.caseDeleteTaskDependencyTool(deleteTaskDependencyTool); + if (result == null) + result = this.caseTaskTool(deleteTaskDependencyTool); + if (result == null) + result = this.defaultCase(theEObject); + return result; + } default: return this.defaultCase(theEObject); } @@ -268,6 +278,21 @@ public T caseCreateTaskDependencyTool(CreateTaskDependencyTool object) { return null; } + /** + * Returns the result of interpreting the object as an instance of 'Delete Task Dependency Tool'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Delete Task Dependency Tool'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDeleteTaskDependencyTool(DeleteTaskDependencyTool object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'Representation Description'. This implementation returns null; returning a non-null result will terminate the switch.