Skip to content

Commit 8d5c60d

Browse files
committed
Better project
1 parent aca19c3 commit 8d5c60d

3 files changed

Lines changed: 166 additions & 21 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Extension { #name : 'ExReqRepository' }
2+
3+
{ #category : '*ExecutableRequirements-Impacts' }
4+
ExReqRepository >> allImpacts [
5+
6+
| impacts |
7+
impacts := self requirements copy collect: [ :each |
8+
ExReqRequirementImpact new
9+
requirement: each;
10+
yourself ].
11+
impacts withIndexDo: [ :impact :index |
12+
impact impactForCollection: (impacts allButFirst: index) ].
13+
^ impacts
14+
]

src/ExecutableRequirements-Impacts/ExReqRoassalGraphImpact.class.st

Lines changed: 152 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,158 @@ ExReqRoassalGraphImpact class >> example [
1313
pragmaSelector: #ExReqTest;
1414
yourself.
1515
{
16-
(ExReqRoassalGraphImpact requirementsViewForPackage:
17-
repositoryReport allImpacts).
18-
(ExReqRoassalGraphImpact requirementsViewForClass:
19-
repositoryReport allImpacts).
20-
(ExReqRoassalGraphImpact requirementsViewForMethod:
21-
repositoryReport allImpacts).
22-
(ExReqRoassalGraphImpact requirementsViewForNode:
23-
repositoryReport allImpacts) } inspect
16+
(ExReqRoassalGraphImpact requirementsViewForPackage:
17+
repositoryReport allImpacts).
18+
(ExReqRoassalGraphImpact requirementsViewForClass:
19+
repositoryReport allImpacts).
20+
(ExReqRoassalGraphImpact requirementsViewForMethod:
21+
repositoryReport allImpacts).
22+
(ExReqRoassalGraphImpact requirementsViewForNode:
23+
repositoryReport allImpacts).
24+
(ExReqRoassalGraphImpact repositoryGraphView: repositoryReport) }
25+
inspect
26+
]
27+
28+
{ #category : 'as yet unclassified' }
29+
ExReqRoassalGraphImpact class >> repositoryGraphView: aRepository [
30+
31+
| canvas requirements packages classes methods |
32+
canvas := RSCanvas new.
33+
requirements := aRepository requirements collect: [ :obj |
34+
RSBox new
35+
model: obj;
36+
@ (RSPopup text: [ :each | each title ]);
37+
@ RSDraggable yourself ].
38+
packages := (aRepository associatedPackages collect: [ :obj |
39+
RSCircle new
40+
model: obj;
41+
@ (RSPopup text: [ :each | each name ]);
42+
@ RSDraggable yourself ]) asArray.
43+
classes := (aRepository associatedClasses collect: [ :obj |
44+
RSCircle new
45+
model: obj;
46+
@ (RSPopup text: [ :each | each name ]);
47+
@ RSDraggable yourself ]) asArray.
48+
methods := (aRepository associatedMethods collect: [ :obj |
49+
RSCircle new
50+
model: obj;
51+
@ (RSPopup text: [ :each | each selector ]);
52+
@ RSDraggable yourself ]) asArray.
53+
canvas addAll: requirements.
54+
canvas addAll: packages.
55+
canvas addAll: classes.
56+
canvas addAll: methods.
57+
58+
"RSLineBuilder arrowedLine
59+
canvas: canvas;
60+
fromShapes: requirements;
61+
toShapes: packages;
62+
connectFrom: #yourself toAll: [ :each | each associatedPackages ].
63+
RSLineBuilder arrowedLine
64+
canvas: canvas;
65+
fromShapes: requirements;
66+
toShapes: classes;
67+
connectFrom: #yourself toAll: [ :each | each associatedClasses ]."
68+
RSLineBuilder arrowedLine
69+
canvas: canvas;
70+
fromShapes: requirements;
71+
toShapes: methods;
72+
connectFrom: #yourself toAll: [ :each | each associatedMethods ].
73+
74+
RSLineBuilder arrowedLine
75+
canvas: canvas;
76+
fromShapes: classes;
77+
toShapes: packages;
78+
connectFrom: #yourself to: [ :each | each package ].
79+
RSLineBuilder arrowedLine
80+
canvas: canvas;
81+
fromShapes: methods;
82+
toShapes: classes;
83+
connectFrom: #yourself to: [ :each | each methodClass ].
84+
85+
RSHorizontalTreeLayout on:
86+
packages , classes , methods , requirements.
87+
88+
canvas @ RSCanvasController.
89+
^ canvas
90+
]
91+
92+
{ #category : 'as yet unclassified' }
93+
ExReqRoassalGraphImpact class >> repositoryGraphViewWithAll: aRepository [
94+
95+
| canvas requirements packages classes methods nodes |
96+
canvas := RSCanvas new.
97+
requirements := aRepository requirements collect: [ :obj |
98+
RSBox new
99+
model: obj;
100+
@ (RSPopup text: [ :each | each title ]);
101+
@ RSDraggable yourself ].
102+
packages := (aRepository associatedPackages collect: [ :obj |
103+
RSCircle new
104+
model: obj;
105+
@ (RSPopup text: [ :each | each name ]);
106+
@ RSDraggable yourself ]) asArray.
107+
classes := (aRepository associatedClasses collect: [ :obj |
108+
RSCircle new
109+
model: obj;
110+
@ (RSPopup text: [ :each | each name ]);
111+
@ RSDraggable yourself ]) asArray.
112+
methods := (aRepository associatedMethods collect: [ :obj |
113+
RSCircle new
114+
model: obj;
115+
@ (RSPopup text: [ :each | each selector ]);
116+
@ RSDraggable yourself ]) asArray.
117+
nodes := (aRepository associatedMethods collect: [ :obj |
118+
RSCircle new
119+
model: obj;
120+
@ (RSPopup text: [ :each | each printString ]);
121+
@ RSDraggable yourself ]) asArray.
122+
canvas addAll: requirements.
123+
canvas addAll: packages.
124+
canvas addAll: classes.
125+
canvas addAll: methods.
126+
canvas addAll: nodes.
127+
128+
RSLineBuilder arrowedLine
129+
canvas: canvas;
130+
fromShapes: requirements;
131+
toShapes: packages;
132+
connectFrom: #yourself toAll: [ :each | each associatedPackages ].
133+
RSLineBuilder arrowedLine
134+
canvas: canvas;
135+
fromShapes: requirements;
136+
toShapes: classes;
137+
connectFrom: #yourself toAll: [ :each | each associatedClasses ].
138+
RSLineBuilder arrowedLine
139+
canvas: canvas;
140+
fromShapes: requirements;
141+
toShapes: methods;
142+
connectFrom: #yourself toAll: [ :each | each associatedMethods ].
143+
RSLineBuilder arrowedLine
144+
canvas: canvas;
145+
fromShapes: requirements;
146+
toShapes: nodes;
147+
connectFrom: #yourself toAll: [ :each | each associatedNodes ].
148+
RSLineBuilder arrowedLine
149+
canvas: canvas;
150+
fromShapes: classes;
151+
toShapes: packages;
152+
connectFrom: #yourself to: [ :each | each package ].
153+
RSLineBuilder arrowedLine
154+
canvas: canvas;
155+
fromShapes: methods;
156+
toShapes: classes;
157+
connectFrom: #yourself to: [ :each | each methodClass ].
158+
RSLineBuilder arrowedLine
159+
canvas: canvas;
160+
fromShapes: nodes;
161+
toShapes: methods;
162+
connectFrom: #yourself
163+
to: [ :each | each methodNode compiledMethod ].
164+
165+
RSTreeLayout on: packages , classes , methods , nodes.
166+
canvas @ RSCanvasController.
167+
^ canvas
24168
]
25169

26170
{ #category : 'as yet unclassified' }

src/ExecutableRequirements/ExReqRepository.class.st

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@ Class {
1010
#tag : 'Model-Static'
1111
}
1212

13-
{ #category : 'as yet unclassified' }
14-
ExReqRepository >> allImpacts [
15-
16-
| impacts |
17-
impacts := self requirements copy collect: [ :each |
18-
ExReqRequirementImpact new
19-
requirement: each;
20-
yourself ].
21-
impacts withIndexDo: [ :impact :index |
22-
impact impactForCollection: (impacts allButFirst: index) ].
23-
^ impacts
24-
]
25-
2613
{ #category : 'converting' }
2714
ExReqRepository >> asReport [
2815

0 commit comments

Comments
 (0)