Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding aggregations in the Roassal backend of UMLDocumentor #681

Merged
merged 2 commits into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions src/Famix-UMLDocumentor/FamixUMLRoassalDescriptor.class.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"
The Roassal part of the Roassal backend exporter
Used by Roassal (`RSUMLClassBuilder`) to get informations about classes to put in the visualization
"
Class {
#name : #FamixUMLRoassalDescriptor,
Expand All @@ -10,20 +10,36 @@ Class {
#category : #'Famix-UMLDocumentor-Backend'
}

{ #category : #accessing }
FamixUMLRoassalDescriptor >> aggregations [

^(umlModel
select: [ :umlEntity |
(umlEntity class = FamixUMLAssociation) and:
[ umlEntity aggregation = #source ] ]
thenCollect: [ :aggreg |
(self umlClassNamed: aggreg target) -> (self umlClassNamed: aggreg source) ])
,
(umlModel
select: [ :umlEntity |
(umlEntity class = FamixUMLAssociation) and:
[ umlEntity aggregation = #target ] ]
thenCollect: [ :aggreg |
(self umlClassNamed: aggreg source) -> (self umlClassNamed: aggreg target) ])
]

{ #category : #initialization }
FamixUMLRoassalDescriptor >> initialize [

super initialize.


self
classname: #name;
superclass: [ :famixUMLClass | self superClassOf: famixUMLClass ];
instVars: [ :famixUMLClass | famixUMLClass properties ] ;
methods: [ :famixUMLClass | #() ];
methodSelector: #name;
instVarSelector: #name;
methodsLimit: SmallInteger maxVal;
classname: #name ;
superclass: [ :famixUMLClass | self superClassOf: famixUMLClass ] ;
instVars: [ :famixUMLClass | famixUMLClass properties sorted: #name ascending ] ;
methods: [ :famixUMLClass | #() ] ;
instVarSelector: #name ;
methodsLimit: SmallInteger maxVal ;
isAbstract: [ :famixUMLClass | famixUMLClass isStub ]
]

Expand Down