Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jul 25, 2024
1 parent 75b03c6 commit 18733a1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions repository/OpenPonk-Core/OPMementoDirectorySerializer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ OPMementoDirectorySerializer >> loadMementoFrom: aFolder [
modelDir := aFolder ].
model := self loadModelFrom: modelDir.
(OPNavigatorAdapters new allChildrenFor: model) do: [ :each |
SystemNotification signal: 'Loaded UUID from slot: ' , (each class
slotNamed: 'uuid'
ifFound: [ :slot | slot read: each ]
ifNone: [ 'No such slot' ]) asString.
SystemNotification signal:
'Loaded UUID: ' , (each instVarNamed: 'uuid') asString ].
'Loaded UUID from method: ' , each uuid asString ].
^ OPMemento
model: model
diagrams: (self loadDiagramsOf: model from: aFolder / 'diagrams')
Expand Down Expand Up @@ -121,12 +125,16 @@ OPMementoDirectorySerializer >> saveModelOf: aMemento to: aFolder [

| modelSerializer |
(OPNavigatorAdapters new allChildrenFor: aMemento model) do: [ :each |
SystemNotification signal: 'Saving UUID from slot: ' , (each class
slotNamed: 'uuid'
ifFound: [ :slot | slot read: each ]
ifNone: [ 'No such slot' ]) asString.
SystemNotification signal:
'Saving UUID: ' , (each instVarNamed: 'uuid') asString ].
'Saving UUID from method: ' , each uuid asString ].
modelSerializer := plugin modelSerializerClass new.
modelSerializer class saveExportInfoTo: aFolder.
(aFolder / 'model' , modelSerializer formatName)
ensureDelete;
writeStreamDo: [ :stream |
writeStreamDo: [ :stream |
stream nextPutAll: (modelSerializer serializeModel: aMemento model) ]
]

0 comments on commit 18733a1

Please sign in to comment.