From b047d9e09735593040675c456b790143dbee165d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20B=C3=A9gaudeau?= Date: Tue, 25 Jun 2024 08:34:19 +0200 Subject: [PATCH] [fix] Restore support for Gantt representation images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Bégaudeau --- .../gantt/service/GanttImagePathService.java | 31 +++++++++++++++++++ .../gantt/service/GanttImageProvider.java | 2 +- .../Gantt.svg => gantt-images/gantt.svg} | 0 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImagePathService.java rename packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/{images/Gantt.svg => gantt-images/gantt.svg} (100%) diff --git a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImagePathService.java b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImagePathService.java new file mode 100644 index 0000000000..1f25baad47 --- /dev/null +++ b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImagePathService.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * 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.collaborative.gantt.service; + +import java.util.List; + +import org.eclipse.sirius.components.core.api.IImagePathService; +import org.springframework.stereotype.Service; + +/** + * Register the gantt images folder. + * + * @author sbegaudeau + */ +@Service +public class GanttImagePathService implements IImagePathService { + @Override + public List getPaths() { + return List.of("/gantt-images/"); + } +} diff --git a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImageProvider.java b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImageProvider.java index 90c0e6ff93..6985a18d65 100644 --- a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImageProvider.java +++ b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/java/org/eclipse/sirius/components/collaborative/gantt/service/GanttImageProvider.java @@ -29,7 +29,7 @@ public class GanttImageProvider implements IRepresentationImageProvider { @Override public Optional getImageURL(String kind) { if (Gantt.KIND.equals(kind)) { - return Optional.of("/images/Gantt.svg"); + return Optional.of("/gantt-images/gantt.svg"); } return Optional.empty(); } diff --git a/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/images/Gantt.svg b/packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/gantt-images/gantt.svg similarity index 100% rename from packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/images/Gantt.svg rename to packages/gantt/backend/sirius-components-collaborative-gantt/src/main/resources/gantt-images/gantt.svg