From 27b3c375b398fa1ec7a1744b47f66063ae5053d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Blizni=C4=8Denko?= Date: Thu, 25 Jul 2024 18:28:18 +0200 Subject: [PATCH] experiment with loading --- repository/OpenPonk-Core/OPExamplePersistenceTest.class.st | 2 +- repository/OpenPonk-Core/OPStonDiagramSerializer.class.st | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/OpenPonk-Core/OPExamplePersistenceTest.class.st b/repository/OpenPonk-Core/OPExamplePersistenceTest.class.st index 623b1bc3..a0993e89 100644 --- a/repository/OpenPonk-Core/OPExamplePersistenceTest.class.st +++ b/repository/OpenPonk-Core/OPExamplePersistenceTest.class.st @@ -27,7 +27,7 @@ OPExamplePersistenceTest >> createExampleModel [ OPExamplePersistenceTest >> setUp [ super setUp. - file := FileSystem workingDirectory / 'example-persistence-test.opp'. + file := FileSystem memory root / 'example-persistence-test.opp'. file ensureDelete ] diff --git a/repository/OpenPonk-Core/OPStonDiagramSerializer.class.st b/repository/OpenPonk-Core/OPStonDiagramSerializer.class.st index ed98be11..a77ba671 100644 --- a/repository/OpenPonk-Core/OPStonDiagramSerializer.class.st +++ b/repository/OpenPonk-Core/OPStonDiagramSerializer.class.st @@ -39,13 +39,13 @@ OPStonDiagramSerializer >> materializeDiagramOf: aModel from: aStream [ elementsById := Dictionary new: innerElements size + 1. elementsById at: aModel uuid put: aModel. innerElements do: [ :each | - elementsById + "elementsById at: each uuid ifPresent: [ :existing | self error: 'There are two elements with same ID ' , each uuid asString , ': ' , existing asString , ' and: ' , each asString ] - ifAbsentPut: each ]. + ifAbsentPut: each" ]. diagram resolveAllModelElements: elementsById. ^ diagram ]