@@ -12,103 +12,103 @@ OPUMLExtensionEnd >> notationMultiplicityRange [
1212
1313{ #category : #' *OpenPonk-ClassEditor' }
1414OPUMLExtensionEnd >> notationString [
15- ^ String
16- streamContents: [ :stream |
17- (OPUMLVisibilityKind notationFor: self visibility)
18- ifNotEmpty: [ :v |
19- stream
20- nextPutAll: v;
21- nextPutAll: ' ' ].
22- self isDerived
23- ifTrue : [ stream << ' / ' ].
24- self name ifNotNil: [ stream < < self name ].
25- self type
26- ifNotNil: [ stream
27- << ' : ' ;
28- < < self type name ].
29- self notationMultiplicityRange
30- ifNotEmpty: [ :range | stream nextPutAll: ' [ ' , range , ' ] ' ].
31- ( self defaultValue isKindOf: OPUMLOpaqueExpression )
32- ifTrue: [ stream
33- << ' = ' ;
34- << self defaultValue bodies first ].
35- true
36- ifTrue: [ | props |
37- props := OrderedCollection new .
38- self isReadOnly
39- ifTrue: [ props add: #readOnly ].
40- self isOrdered
41- ifTrue: [ props add: #ordered ].
42- self isMultivalued & self isUnique not
43- ifTrue: [ props add: #nonunique ] .
44- props
45- ifNotEmpty : [ stream << ' { ' .
46- props do: [ :each | stream < < each ] separatedBy: [ stream << ' , ' ].
47- stream << ' }' ] ] ]
15+
16+ ^ String streamContents: [ :stream |
17+ (OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
18+ :v |
19+ stream
20+ nextPutAll: v;
21+ nextPutAll: ' ' ].
22+ self isDerived ifTrue: [ stream < < ' / ' ].
23+ self name ifNotNil : [ stream << self name ].
24+ self type ifNotNil: [
25+ stream
26+ < < ' : ' ;
27+ << self type name ].
28+ self notationMultiplicityRange ifNotEmpty: [ :range |
29+ stream nextPutAll: ' [ ' , range , ' ] ' ].
30+ (( self defaultValue isKindOf: OPUMLOpaqueExpression ) and : [
31+ self defaultValue bodies isNotEmpty ]) ifTrue: [
32+ stream
33+ << ' = ' ;
34+ << self defaultValue bodies first ].
35+ true ifTrue: [
36+ | props |
37+ props := OrderedCollection new .
38+ self isReadOnly ifTrue: [ props add: #readOnly ].
39+ self isOrdered ifTrue: [ props add: #ordered ].
40+ self isMultivalued & self isUnique not ifTrue: [
41+ props add: #nonunique ].
42+ props ifNotEmpty: [
43+ stream < < ' { ' .
44+ props
45+ do : [ :each | stream << each ]
46+ separatedBy: [ stream << ' , ' ].
47+ stream << ' }' ] ] ]
4848]
4949
5050{ #category : #' *OpenPonk-ClassEditor' }
5151OPUMLExtensionEnd >> notationStringAsRoleName [
52- ^ String
53- streamContents: [ :stream |
54- (OPUMLVisibilityKind notationFor: self visibility)
55- ifNotEmpty: [ :v |
56- stream
57- nextPutAll: v;
58- nextPutAll: ' ' ].
59- self isDerived
60- ifTrue : [ stream << ' / ' ].
61- self name ifNotNil : [ stream < < self name ].
62- self notationMultiplicityRange
63- ifNotEmpty: [ :range | stream nextPutAll: ' [ ' , range , ' ] ' ].
64- ( self defaultValue isKindOf: OPUMLOpaqueExpression )
65- ifTrue: [ stream
66- << ' = ' ;
67- << self defaultValue bodies first ].
68- true
69- ifTrue: [ | props |
70- props := OrderedCollection new .
71- self isReadOnly
72- ifTrue: [ props add: #readOnly ].
73- self isOrdered
74- ifTrue: [ props add: #ordered ].
75- self isMultivalued & self isUnique not
76- ifTrue: [ props add: #nonunique ] .
77- props
78- ifNotEmpty : [ stream << ' { ' .
79- props do: [ :each | stream < < each ] separatedBy: [ stream << ' , ' ].
80- stream << ' }' ] ] ]
52+
53+ ^ String streamContents: [ :stream |
54+ (OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
55+ :v |
56+ stream
57+ nextPutAll: v;
58+ nextPutAll: ' ' ].
59+ self isDerived ifTrue: [ stream < < ' / ' ].
60+ self name ifNotNil : [ stream << self name ].
61+ self notationMultiplicityRange ifNotEmpty : [ :range |
62+ stream nextPutAll: ' [ ' , range , ' ] ' ].
63+ (( self defaultValue isKindOf: OPUMLOpaqueExpression ) and : [
64+ self defaultValue bodies isNotEmpty ]) ifTrue: [
65+ stream
66+ << ' = ' ;
67+ << self defaultValue bodies first ].
68+ true ifTrue: [
69+ | props |
70+ props := OrderedCollection new .
71+ self isReadOnly ifTrue: [ props add: #readOnly ].
72+ self isOrdered ifTrue: [ props add: #ordered ].
73+ self isMultivalued & self isUnique not ifTrue: [
74+ props add: #nonunique ].
75+ props ifNotEmpty: [
76+ stream < < ' { ' .
77+ props
78+ do : [ :each | stream << each ]
79+ separatedBy: [ stream << ' , ' ].
80+ stream << ' }' ] ] ]
8181]
8282
8383{ #category : #' *OpenPonk-ClassEditor' }
8484OPUMLExtensionEnd >> notationStringWithoutType [
85- ^ String
86- streamContents: [ :stream |
87- (OPUMLVisibilityKind notationFor: self visibility)
88- ifNotEmpty: [ :v |
89- stream
90- nextPutAll: v;
91- nextPutAll: ' ' ].
92- self isDerived
93- ifTrue : [ stream << ' / ' ].
94- self name ifNotNil : [ stream < < self name ].
95- self notationMultiplicityRange
96- ifNotEmpty: [ :range | stream nextPutAll: ' [ ' , range , ' ] ' ].
97- ( self defaultValue isKindOf: OPUMLOpaqueExpression )
98- ifTrue: [ stream
99- << ' = ' ;
100- << self defaultValue bodies first ].
101- true
102- ifTrue: [ | props |
103- props := OrderedCollection new .
104- self isReadOnly
105- ifTrue: [ props add: #readOnly ].
106- self isOrdered
107- ifTrue: [ props add: #ordered ].
108- self isMultivalued & self isUnique not
109- ifTrue: [ props add: #nonunique ] .
110- props
111- ifNotEmpty : [ stream << ' { ' .
112- props do: [ :each | stream < < each ] separatedBy: [ stream << ' , ' ].
113- stream << ' }' ] ] ]
85+
86+ ^ String streamContents: [ :stream |
87+ (OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
88+ :v |
89+ stream
90+ nextPutAll: v;
91+ nextPutAll: ' ' ].
92+ self isDerived ifTrue: [ stream < < ' / ' ].
93+ self name ifNotNil : [ stream << self name ].
94+ self notationMultiplicityRange ifNotEmpty : [ :range |
95+ stream nextPutAll: ' [ ' , range , ' ] ' ].
96+ (( self defaultValue isKindOf: OPUMLOpaqueExpression ) and : [
97+ self defaultValue bodies isNotEmpty ]) ifTrue: [
98+ stream
99+ << ' = ' ;
100+ << self defaultValue bodies first ].
101+ true ifTrue: [
102+ | props |
103+ props := OrderedCollection new .
104+ self isReadOnly ifTrue: [ props add: #readOnly ].
105+ self isOrdered ifTrue: [ props add: #ordered ].
106+ self isMultivalued & self isUnique not ifTrue: [
107+ props add: #nonunique ].
108+ props ifNotEmpty: [
109+ stream < < ' { ' .
110+ props
111+ do : [ :each | stream << each ]
112+ separatedBy: [ stream << ' , ' ].
113+ stream << ' }' ] ] ]
114114]
0 commit comments