Skip to content

Commit

Permalink
Merge pull request magritte-metamodel#330 from seandenigris/bug_refer…
Browse files Browse the repository at this point in the history
…ence-display

[Bug]: Fix String Writer for References
  • Loading branch information
seandenigris authored Aug 1, 2023
2 parents c0a28b9 + 979fc51 commit 7748a0d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions source/Magritte-Model/MAStringWriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ MAStringWriter >> visitColorDescription: aDescription [

{ #category : #'visiting-description' }
MAStringWriter >> visitContainer: aDescription [
aDescription do: [ :each |
each isVisible ifTrue: [
each stringWriter
write: (self object readUsing: each)
description: each to: stream.
^ self ] ]
aDescription
do: [ :each |
each isVisible ifTrue: [
each stringWriter
write: (self object readUsing: each)
description: each to: stream ] ]
separatedBy: [ stream nextPut: $- ]
]

{ #category : #'visiting-description' }
Expand Down Expand Up @@ -77,13 +78,13 @@ MAStringWriter >> visitTimeStampDescription: aDescription [
{ #category : #'visiting-description' }
MAStringWriter >> visitToManyRelationDescription: aDescription [
self object
do: [ :each | self object: each during: [ self visit: each magritteDescription ] ]
do: [ :each | self stream nextPutAll: (aDescription reference toString: each) ]
separatedBy: [ self stream nextPutAll: ', ' ]
]

{ #category : #'visiting-description' }
MAStringWriter >> visitToOneRelationDescription: aDescription [
self visit: self object magritteDescription
self stream nextPutAll: (aDescription reference toString: self object)
]

{ #category : #'visiting-description' }
Expand Down

0 comments on commit 7748a0d

Please sign in to comment.