Skip to content

Commit

Permalink
use placeholder model element if diagram references non-existent one
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 22, 2024
1 parent d6e92c8 commit 231d511
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion repository/OpenPonk-Core/OPDiagramElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ OPDiagramElement >> attachedShapesDo: aBlock [
thenDo: aBlock
]

{ #category : 'serialization' }
OPDiagramElement >> backupModelElementFor: aModelReference [

^ nil
]

{ #category : 'accessing' }
OPDiagramElement >> canvas [

Expand Down Expand Up @@ -512,7 +518,12 @@ OPDiagramElement >> resolveAllModelElements: aCollection [
OPDiagramElement >> resolveModelElements: aCollection [

self modelElements: (self modelElements collect: [ :each |
each modelObjectFrom: aCollection ])
[ each modelObjectFrom: aCollection ]
on: NotFound
do: [ :e |
OPModelInvalid signal:
'Diagram references non-existent model element. Try using Proceed to use placeholder model object'.
self backupModelElementFor: each ] ])
]

{ #category : 'rendering' }
Expand Down

0 comments on commit 231d511

Please sign in to comment.