File tree Expand file tree Collapse file tree 4 files changed +61
-0
lines changed
repository/OP-UML-Metamodel Expand file tree Collapse file tree 4 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -373,6 +373,29 @@ OPUMLAssociation >> powertypeExtents: aGeneralizationSet [
373
373
(sharedGeneralizations at: #Classifier ) powertypeExtents: aGeneralizationSet
374
374
]
375
375
376
+ { #category : ' printing' }
377
+ OPUMLAssociation >> printOn: aStream [
378
+
379
+ | ends |
380
+ aStream << ' an ' << self class name << ' (' .
381
+ self name ifNotNil: [ :existingName |
382
+ existingName ifNotEmpty: [
383
+ existingName printOn: aStream.
384
+ aStream << ' : ' ] ].
385
+ ends := self memberEnds asOrderedCollection.
386
+ ends addAll: self ownedEnds.
387
+ ends
388
+ ifEmpty: [ aStream << ' nil -> nil' ]
389
+ ifNotEmpty: [ :properties |
390
+ properties
391
+ do: [ :each |
392
+ each type
393
+ ifNil: [ aStream << ' nil' ]
394
+ ifNotNil: [ :type | type printAsClassifierNameOn: aStream ] ]
395
+ separatedBy: [ aStream << ' -> ' ] ].
396
+ aStream << ' )'
397
+ ]
398
+
376
399
{ #category : ' accessing - NamedElement' }
377
400
OPUMLAssociation >> qualifiedName [
378
401
^ (sharedGeneralizations at: #NamedElement ) qualifiedName
Original file line number Diff line number Diff line change @@ -67,6 +67,21 @@ OPUMLGeneralization >> isSubstitutable: aBoolean [
67
67
isSubstitutable := aBoolean
68
68
]
69
69
70
+ { #category : ' printing' }
71
+ OPUMLGeneralization >> printOn: aStream [
72
+
73
+ super printOn: aStream.
74
+ aStream << ' (' .
75
+ self specific
76
+ ifNil: [ aStream << ' nil' ]
77
+ ifNotNil: [ :element | element printAsClassifierNameOn: aStream ].
78
+ aStream << ' -> ' .
79
+ self general
80
+ ifNil: [ aStream << ' nil' ]
81
+ ifNotNil: [ :element | element printAsClassifierNameOn: aStream ].
82
+ aStream << ' )'
83
+ ]
84
+
70
85
{ #category : ' accessing - Relationship' }
71
86
OPUMLGeneralization >> relatedElements [
72
87
^ (sharedGeneralizations at: #Relationship ) relatedElements
Original file line number Diff line number Diff line change @@ -264,6 +264,17 @@ OPUMLMetaElement >> oclIsTypeOf: aClassifier [
264
264
^ sharedGeneralizations keys last = (self oclClassifierNameFrom: aClassifier)
265
265
]
266
266
267
+ { #category : ' printing' }
268
+ OPUMLMetaElement >> printAsClassifierNameOn: aStream [
269
+
270
+ aStream << (self oclClassifierNameFrom: self class ).
271
+ (self class selectors includes: #name ) ifTrue: [
272
+ aStream
273
+ << ' (' ;
274
+ << self name printString;
275
+ << ' )' ]
276
+ ]
277
+
267
278
{ #category : ' printing' }
268
279
OPUMLMetaElement >> printOn: aStream [
269
280
super printOn: aStream.
Original file line number Diff line number Diff line change @@ -496,6 +496,18 @@ OPUMLProperty >> owningTemplateParameter: aTemplateParameter [
496
496
(sharedGeneralizations at: #ParameterableElement ) owningTemplateParameter: aTemplateParameter
497
497
]
498
498
499
+ { #category : ' printing' }
500
+ OPUMLProperty >> printOn: aStream [
501
+
502
+ aStream << ' an ' << self class name << ' (' .
503
+ self name ifNotNil: [ :existingName |
504
+ existingName ifNotEmpty: [
505
+ aStream << existingName.
506
+ self type ifNotNil: [ aStream << ' : ' ] ] ].
507
+ self type ifNotNil: [ :type | type printAsClassifierNameOn: aStream ].
508
+ aStream << ' )'
509
+ ]
510
+
499
511
{ #category : ' accessing - NamedElement' }
500
512
OPUMLProperty >> qualifiedName [
501
513
^ (sharedGeneralizations at: #NamedElement ) qualifiedName
You can’t perform that action at this time.
0 commit comments