• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / MooseIDE / 17938860495

23 Sep 2025 07:28AM UTC coverage: 66.75% (+0.4%) from 66.37%
17938860495

push

github

web-flow
Merge pull request #1423 from moosetechnology/a-good-cleaning

New settings implementation

2683 of 3100 new or added lines in 117 files covered. (86.55%)

105 existing lines in 29 files now uncovered.

20400 of 30562 relevant lines covered (66.75%)

1.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.22
/src/MooseIDE-Visualization/MiSystemComplexityModel.class.st
1
Class {
2
        #name : 'MiSystemComplexityModel',
3
        #superclass : 'MiAbstractModel',
4
        #instVars : [
5
                'entities',
6
                'startColor',
7
                'endColor',
8
                'heightMetric',
9
                'widthMetric',
10
                'colorMetric',
11
                'displayedName',
12
                'colorMetricThreshold',
13
                'widthMetricThreshold',
14
                'heightMetricThreshold'
15
        ],
16
        #category : 'MooseIDE-Visualization-System Complexity',
17
        #package : 'MooseIDE-Visualization',
18
        #tag : 'System Complexity'
19
}
20

21
{ #category : 'default' }
22
MiSystemComplexityModel class >> defaultAvailableMetrics [
2✔
23

2✔
24
        ^ OrderedCollection withAll: {
2✔
25
                          self defaultHeightMetric.
2✔
26
                          self defaultWidthMetric.
2✔
27
                          self defaultColorMetric }
2✔
28
]
2✔
29

30
{ #category : 'default' }
31
MiSystemComplexityModel class >> defaultColorMetric [
2✔
32

2✔
33
        ^ #numberOfLinesOfCode
2✔
34
]
2✔
35

36
{ #category : 'default' }
37
MiSystemComplexityModel class >> defaultColorMetricThreshold [
2✔
38

2✔
39
        ^ 100
2✔
40
]
2✔
41

42
{ #category : 'settings management' }
43
MiSystemComplexityModel class >> defaultConfiguration [
2✔
44

2✔
45
        ^ MiSystemComplexitySettingsConfiguration new
2✔
46
                  heightMetric: self defaultHeightMetric;
2✔
47
                  heightMetricThreshold: self defaultHeightMetricThreshold;
2✔
48
                  widthMetric: self defaultWidthMetric;
2✔
49
                  widthMetricThreshold: self defaultWidthMetricThreshold;
2✔
50
                  colorMetric: self defaultColorMetric;
2✔
51
                  colorMetricThreshold: self defaultColorMetricThreshold;
2✔
52
                  startColor: self defaultStartColor;
2✔
53
                  endColor: self defaultEndColor;
2✔
54
                  displayedName: self defaultDisplayedName;
2✔
55
                  yourself
2✔
56
]
2✔
57

58
{ #category : 'default' }
59
MiSystemComplexityModel class >> defaultDisplayedName [
2✔
60

2✔
61
        ^ #name
2✔
62
]
2✔
63

64
{ #category : 'default' }
65
MiSystemComplexityModel class >> defaultEndColor [
2✔
66

2✔
67
        ^ Color black
2✔
68
]
2✔
69

70
{ #category : 'default' }
71
MiSystemComplexityModel class >> defaultHeightMetric [
2✔
72

2✔
73
        ^ #numberOfMethods
2✔
74
]
2✔
75

76
{ #category : 'default' }
77
MiSystemComplexityModel class >> defaultHeightMetricThreshold [
2✔
78

2✔
79
        ^ 10
2✔
80
]
2✔
81

82
{ #category : 'default' }
83
MiSystemComplexityModel class >> defaultStartColor [
2✔
84

2✔
85
        ^ Color white
2✔
86
]
2✔
87

88
{ #category : 'default' }
89
MiSystemComplexityModel class >> defaultWidthMetric [
2✔
90

2✔
91
        ^ #numberOfAttributes
2✔
92
]
2✔
93

94
{ #category : 'default' }
95
MiSystemComplexityModel class >> defaultWidthMetricThreshold [
2✔
96

2✔
97
        ^ 10
2✔
98
]
2✔
99

100
{ #category : 'accessing' }
101
MiSystemComplexityModel >> availableMetrics [
2✔
102

2✔
103
        entities ifEmpty: [ ^ self class defaultAvailableMetrics ].
2✔
104

2✔
105
        ^ self availableMetricsForEntities
2✔
106
]
2✔
107

108
{ #category : 'accessing' }
NEW
109
MiSystemComplexityModel >> availableMetricsForEntities [
×
NEW
110
        "entities are 
×
NEW
111
                - MooseObjects (See MiSystemComplexityBrowser>>#canFollowEntity:) 
×
NEW
112
                - returning true to #isClass (See MiSystemComplexityBrowser>>#followEntity:) 
×
NEW
113
        i.e. instances of FamixXYZClass.
×
NEW
114
        We still have to take an entity to get the correct metamodel for the metadescription"
×
NEW
115

×
NEW
116
        ^ ((entities anyOne famePropertiesOfType: FM3Number) collect:
×
NEW
117
                   #implementingSelector) sorted: #yourself ascending
×
NEW
118
]
×
119

120
{ #category : 'accessing' }
121
MiSystemComplexityModel >> colorMetric [
2✔
122

2✔
123
        ^ colorMetric
2✔
124
]
2✔
125

126
{ #category : 'accessing' }
127
MiSystemComplexityModel >> colorMetricThreshold [
2✔
128

2✔
129
        ^ colorMetricThreshold
2✔
130
]
2✔
131

132
{ #category : 'settings management' }
133
MiSystemComplexityModel >> currentConfiguration [
2✔
134

2✔
135
        ^ MiSystemComplexitySettingsConfiguration new
2✔
136
                  availableMetrics: self availableMetrics;
2✔
137
                  heightMetric: heightMetric;
2✔
138
                  heightMetricThreshold: heightMetricThreshold;
2✔
139
                  widthMetric: widthMetric;
2✔
140
                  widthMetricThreshold: widthMetricThreshold;
2✔
141
                  colorMetric: colorMetric;
2✔
142
                  colorMetricThreshold: colorMetricThreshold;
2✔
143
                  startColor: startColor;
2✔
144
                  endColor: endColor;
2✔
145
                  displayedName: displayedName
2✔
146
]
2✔
147

148
{ #category : 'settings management' }
149
MiSystemComplexityModel >> defaultConfiguration [
2✔
150

2✔
151
        ^ self class defaultConfiguration
2✔
152
                  availableMetrics: self availableMetrics;
2✔
153
                  yourself
2✔
154
]
2✔
155

156
{ #category : 'accessing' }
157
MiSystemComplexityModel >> displayedName [
2✔
158

2✔
159
        ^ displayedName
2✔
160
]
2✔
161

162
{ #category : 'accessing' }
163
MiSystemComplexityModel >> endColor [
2✔
164

2✔
165
        ^ endColor
2✔
166
]
2✔
167

168
{ #category : 'accessing' }
169
MiSystemComplexityModel >> entities [
2✔
170

2✔
171
        ^ entities
2✔
172
]
2✔
173

174
{ #category : 'accessing' }
175
MiSystemComplexityModel >> entities: aMooseGroup [
2✔
176

2✔
177
        entities := aMooseGroup
2✔
178
]
2✔
179

180
{ #category : 'testing' }
181
MiSystemComplexityModel >> hasSettings [
2✔
182

2✔
183
        ^ true
2✔
184
]
2✔
185

186
{ #category : 'accessing' }
187
MiSystemComplexityModel >> heightMetric [
2✔
188

2✔
189
        ^ heightMetric
2✔
190
]
2✔
191

192
{ #category : 'accessing' }
193
MiSystemComplexityModel >> heightMetricThreshold [
2✔
194

2✔
195
        ^ heightMetricThreshold
2✔
196
]
2✔
197

198
{ #category : 'initialization' }
199
MiSystemComplexityModel >> initialize [
2✔
200

2✔
201
        super initialize.
2✔
202
        entities := MooseGroup new
2✔
203
]
2✔
204

205
{ #category : 'initialization' }
206
MiSystemComplexityModel >> initializeSettings [
2✔
207

2✔
208
        startColor := self class defaultStartColor.
2✔
209
        endColor := self class defaultEndColor.
2✔
210
        heightMetric := self class defaultHeightMetric.
2✔
211
        heightMetricThreshold := self class defaultHeightMetricThreshold.
2✔
212
        widthMetric := self class defaultWidthMetric.
2✔
213
        widthMetricThreshold := self class defaultWidthMetricThreshold.
2✔
214
        colorMetric := self class defaultColorMetric.
2✔
215
        colorMetricThreshold := self class defaultColorMetricThreshold.
2✔
216
        displayedName := self class defaultDisplayedName
2✔
217
]
2✔
218

219
{ #category : 'accessing' }
NEW
220
MiSystemComplexityModel >> miSelectedItem [
×
UNCOV
221

×
NEW
222
        ^ entities
×
UNCOV
223
]
×
224

225
{ #category : 'settings management' }
226
MiSystemComplexityModel >> settingsPresenterExtent [
2✔
227

2✔
228
        ^ 380 @ 400
2✔
229
]
2✔
230

231
{ #category : 'accessing' }
232
MiSystemComplexityModel >> startColor [
2✔
233

2✔
234
        ^ startColor
2✔
235
]
2✔
236

237
{ #category : 'settings management' }
238
MiSystemComplexityModel >> updateFromConfiguration: aConfiguration [
2✔
239

2✔
240
        heightMetric := aConfiguration heightMetric.
2✔
241
        heightMetricThreshold := aConfiguration heightMetricThreshold.
2✔
242
        widthMetric := aConfiguration widthMetric.
2✔
243
        widthMetricThreshold := aConfiguration widthMetricThreshold.
2✔
244
        colorMetric := aConfiguration colorMetric.
2✔
245
        colorMetricThreshold := aConfiguration colorMetricThreshold.
2✔
246
        startColor := aConfiguration startColor.
2✔
247
        endColor := aConfiguration endColor.
2✔
248
        displayedName := aConfiguration displayedName.
2✔
249

2✔
250
        browser runVisualization
2✔
251
]
2✔
252

253
{ #category : 'accessing' }
254
MiSystemComplexityModel >> widthMetric [
2✔
255

2✔
256
        ^ widthMetric
2✔
257
]
2✔
258

259
{ #category : 'accessing' }
260
MiSystemComplexityModel >> widthMetricThreshold [
2✔
261

2✔
262
        ^ widthMetricThreshold
2✔
263
]
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc