44 #instVars : [
55 ' requirementReports' ,
66 ' repository' ,
7- ' tracingPoints ' ,
8- ' announcer '
7+ ' announcer ' ,
8+ ' builder '
99 ],
1010 #category : ' ExecutableRequirements-Model-Report' ,
1111 #package : ' ExecutableRequirements' ,
@@ -73,6 +73,12 @@ ExReqRepositoryReport >> associatedPackages [
7373 ^ self repository associatedPackages.
7474]
7575
76+ { #category : ' as yet unclassified' }
77+ ExReqRepositoryReport >> builder [
78+
79+ ^ builder
80+ ]
81+
7682{ #category : ' as yet unclassified' }
7783ExReqRepositoryReport >> closeReport [
7884
@@ -81,40 +87,6 @@ ExReqRepositoryReport >> closeReport [
8187 requirementReports := { }
8288]
8389
84- { #category : ' as yet unclassified' }
85- ExReqRepositoryReport >> createTracingPoints [
86-
87- | stepReports preconditionNodeDictionary postconditionNodeDictionary |
88- "
89- - Step1: Get all step reports.
90- - Step2: Create a dictionary with all ast -> step reports.
91- - Step3: Create all PreconditionTracingPoint.
92- - Step4: Create a dictionary with all ast & ast methodNode -> step reports.
93- - Step5: Create all PostconditionTracingPoint.
94- "
95- stepReports := self requirementReports flatCollect: [ :req |
96- req verificationReports flatCollect: #stepReports ].
97- preconditionNodeDictionary := Dictionary new .
98- postconditionNodeDictionary := Dictionary new .
99- stepReports do: [ :stepReport |
100- preconditionNodeDictionary
101- at: stepReport step node
102- ifPresent: [ :col | col add: stepReport ]
103- ifAbsentPut: [ OrderedCollection with: stepReport ].
104- postconditionNodeDictionary
105- at: stepReport step node
106- ifPresent: [ :col | col add: stepReport ]
107- ifAbsentPut: [ Set with: stepReport ].
108- postconditionNodeDictionary
109- at: stepReport step node methodNode
110- ifPresent: [ :col | col add: stepReport ]
111- ifAbsentPut: [ Set with: stepReport ].
112- ].
113- self tracingPoints: OrderedCollection new .
114- self tracingPoints addAll: (preconditionNodeDictionary associations collect: [ :asso | ExReqTracingPoint installPreconditionOn: asso key withStepReports: asso value ]).
115- self tracingPoints addAll: (postconditionNodeDictionary associations collect: [ :asso | ExReqTracingPoint installPostconditionOn: asso key withStepReports: asso value ]).
116- ]
117-
11890{ #category : ' as yet unclassified' }
11991ExReqRepositoryReport >> findRequirementReport: anExReqRequirement [
12092 | result |
@@ -128,15 +100,17 @@ ExReqRepositoryReport >> findRequirementReport: anExReqRequirement [
128100ExReqRepositoryReport >> initialize [
129101
130102 super initialize.
131- tracingPoints := OrderedCollection new .
132- announcer := Announcer new
103+ announcer := Announcer new .
104+ builder := NeoExReqInstrumentationBuilder new .
133105]
134106
135107{ #category : ' as yet unclassified' }
136108ExReqRepositoryReport >> installTracingPoints [
137109
138- self createTracingPoints.
139- self tracingPoints do: [ :each | each install ].
110+ | stepReports |
111+ stepReports := self requirementReports flatCollect: [ :req |
112+ req verificationReports flatCollect: #stepReports ].
113+ self builder installAllStepReports: stepReports.
140114 self isInstalled: true .
141115 self isRunning: true .
142116 self annouceTracingPointInstalled
@@ -157,8 +131,7 @@ ExReqRepositoryReport >> isValid [
157131{ #category : ' as yet unclassified' }
158132ExReqRepositoryReport >> removeTracingPoints [
159133
160- self tracingPoints do: [ :each | each remove ].
161- self tracingPoints: { }.
134+ self builder uninstallAllStepReports.
162135 self isRunning: false .
163136 self annouceTracingPointRemoved
164137]
@@ -189,15 +162,3 @@ ExReqRepositoryReport >> subReports [
189162
190163 ^ self requirementReports
191164]
192-
193- { #category : ' accessing' }
194- ExReqRepositoryReport >> tracingPoints [
195-
196- ^ tracingPoints
197- ]
198-
199- { #category : ' accessing' }
200- ExReqRepositoryReport >> tracingPoints: aCollection [
201-
202- tracingPoints := aCollection
203- ]
0 commit comments