|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2024, 2025 Obeo. |
| 2 | + * Copyright (c) 2024, 2026 Obeo. |
3 | 3 | * This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v2.0 |
5 | 5 | * which accompanies this distribution, and is available at |
|
12 | 12 | *******************************************************************************/ |
13 | 13 | package org.eclipse.sirius.web.application.editingcontext.services; |
14 | 14 |
|
15 | | -import com.google.gson.Gson; |
16 | | -import com.google.gson.JsonObject; |
17 | | -import com.google.gson.JsonParser; |
18 | | - |
19 | 15 | import java.io.ByteArrayInputStream; |
20 | 16 | import java.io.IOException; |
21 | 17 | import java.nio.charset.StandardCharsets; |
|
28 | 24 | import org.eclipse.sirius.components.emf.ResourceMetadataAdapter; |
29 | 25 | import org.eclipse.sirius.components.emf.migration.MigrationService; |
30 | 26 | import org.eclipse.sirius.components.emf.migration.api.IMigrationParticipant; |
31 | | -import org.eclipse.sirius.components.emf.migration.api.MigrationData; |
32 | 27 | import org.eclipse.sirius.components.emf.services.JSONResourceFactory; |
33 | 28 | import org.eclipse.sirius.emfjson.resource.JsonResource; |
34 | 29 | import org.eclipse.sirius.web.application.editingcontext.services.api.IResourceLoader; |
@@ -78,10 +73,4 @@ public Optional<Resource> toResource(ResourceSet resourceSet, String id, String |
78 | 73 |
|
79 | 74 | return optionalResource; |
80 | 75 | } |
81 | | - |
82 | | - public Optional<MigrationData> getMigrationDataFromDocumentContent(String content) { |
83 | | - JsonObject jsonObject = JsonParser.parseString(content).getAsJsonObject(); |
84 | | - return Optional.ofNullable(jsonObject.getAsJsonObject(MigrationData.JSON_OBJECT_ROOT)) |
85 | | - .map(migrationRootElement -> new Gson().fromJson(migrationRootElement, MigrationData.class)).stream().findFirst(); |
86 | | - } |
87 | 76 | } |
0 commit comments