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

moosetechnology / MooseIDE / 19175123656

07 Nov 2025 04:49PM UTC coverage: 65.887% (+0.07%) from 65.821%
19175123656

Pull #1512

github

web-flow
Merge 4ab6a36f7 into 9bf2bf640
Pull Request #1512: Cousage refactor

189 of 203 new or added lines in 7 files covered. (93.1%)

40 existing lines in 3 files now uncovered.

21211 of 32193 relevant lines covered (65.89%)

1.32 hits per line

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

73.77
/src/MooseIDE-CoUsageMap/MiCoUsageMapBlockSettingsPresenter.class.st
1
"
2
Presenter created to edit the children block, outer boxes sort block, and inner boxes sort block.
3
This interacts directly with MiCoUsageMapSettings
4
"
5
Class {
6
        #name : 'MiCoUsageMapBlockSettingsPresenter',
7
        #superclass : 'SpPresenter',
8
        #instVars : [
9
                'childrenTextInput',
10
                'sortOuterBoxTextInput',
11
                'sortInnerBoxTextInput',
12
                'resetButton',
13
                'applyButton',
14
                'closeButton'
15
        ],
16
        #category : 'MooseIDE-CoUsageMap-Browser',
17
        #package : 'MooseIDE-CoUsageMap',
18
        #tag : 'Browser'
19
}
20

21
{ #category : 'accessing - private tests' }
UNCOV
22
MiCoUsageMapBlockSettingsPresenter >> applyButton [
×
UNCOV
23

×
UNCOV
24
        ^applyButton
×
UNCOV
25
]
×
26

27
{ #category : 'layout' }
28
MiCoUsageMapBlockSettingsPresenter >> buttonRowLayout [
2✔
29

2✔
30
        ^SpBoxLayout newLeftToRight
2✔
31
                hAlignCenter;
2✔
32
                borderWidth: 5;
2✔
33
                addLast: (SpBoxLayout newLeftToRight
2✔
34
                        add: applyButton ;
2✔
35
                        add: resetButton ;
2✔
36
                        add: closeButton ;
2✔
37
                        yourself)
2✔
38
                expand: false;
2✔
39
                yourself
2✔
40
]
2✔
41

42
{ #category : 'accessing - private tests' }
UNCOV
43
MiCoUsageMapBlockSettingsPresenter >> childrenTextInput [
×
UNCOV
44

×
UNCOV
45
        ^childrenTextInput
×
UNCOV
46
]
×
47

48
{ #category : 'accessing - private tests' }
UNCOV
49
MiCoUsageMapBlockSettingsPresenter >> closeButton [
×
UNCOV
50

×
UNCOV
51
        ^closeButton
×
UNCOV
52
]
×
53

54
{ #category : 'initialization' }
55
MiCoUsageMapBlockSettingsPresenter >> closeWindow [
2✔
56

2✔
57
        self delete
2✔
58
]
2✔
59

60
{ #category : 'initialization' }
61
MiCoUsageMapBlockSettingsPresenter >> connectPresenters [
2✔
62

2✔
63
        self settings ifNil: [ ^ self ].
2✔
64

2✔
65
        childrenTextInput
2✔
66
                text: self settings childrenBlockText ;
2✔
67
                whenSubmitDo: [ :text | self settings childrenBlockText: text ].
2✔
68

2✔
69
        sortOuterBoxTextInput
2✔
70
                text: self settings outerBoxSortBlockText ;
2✔
71
                whenSubmitDo: [ :text | self settings outerBoxSortBlockText: text ].
2✔
72

2✔
73
        sortInnerBoxTextInput
2✔
74
                text: self settings innerBoxSortBlockText ;
2✔
75
                whenSubmitDo: [ :text | self settings innerBoxSortBlockText: text ].
2✔
76

2✔
77
        applyButton action: [ 
2✔
78
                childrenTextInput triggerSubmitAction.
2✔
79
                sortOuterBoxTextInput triggerSubmitAction.
2✔
80
                sortInnerBoxTextInput triggerSubmitAction.
2✔
81
                self closeWindow 
2✔
82
        ].
2✔
83

2✔
84
        resetButton action: [ | set |
2✔
85
                set := self settings.
2✔
86
                set resetText.
2✔
87
                childrenTextInput text: set childrenBlockText.
2✔
88
                sortOuterBoxTextInput text: set outerBoxSortBlockText.
2✔
89
                sortInnerBoxTextInput text: set innerBoxSortBlockText.
2✔
90
        ].
2✔
91
        closeButton action: [
2✔
92
                self closeWindow 
2✔
93
        ].
2✔
94
]
2✔
95

96
{ #category : 'layout' }
97
MiCoUsageMapBlockSettingsPresenter >> defaultLayout [
2✔
98
        ^ SpBoxLayout newTopToBottom
2✔
99
                spacing: 3;
2✔
100

2✔
101
                add: 'Children block:' asPresenter expand: false ;
2✔
102
                add: childrenTextInput height: 200 ;
2✔
103

2✔
104
                add: 'Outer box sort block:' asPresenter expand: false ;
2✔
105
                add: sortOuterBoxTextInput height: 170 ;
2✔
106

2✔
107
                add: 'Inner box sort block:' asPresenter expand: false ;
2✔
108
                add: sortInnerBoxTextInput height: 170 ;
2✔
109

2✔
110
                add: self buttonRowLayout
2✔
111
                expand: false;
2✔
112

2✔
113
                yourself
2✔
114
]
2✔
115

116
{ #category : 'initialization' }
117
MiCoUsageMapBlockSettingsPresenter >> initializeButtons [
2✔
118

2✔
119
        applyButton := self newButton
2✔
120
                label: 'Apply all'.
2✔
121
        resetButton := self newButton
2✔
122
                label: 'Reset text fields'.
2✔
123
        closeButton := self newButton
2✔
124
                label: 'Close'.
2✔
125

2✔
126
]
2✔
127

128
{ #category : 'initialization' }
129
MiCoUsageMapBlockSettingsPresenter >> initializePresenters [
2✔
130

2✔
131
        childrenTextInput := self newCode.
2✔
132
        sortOuterBoxTextInput := self newCode.
2✔
133
        sortInnerBoxTextInput := self newCode.
2✔
134

2✔
135
        self initializeButtons
2✔
136
]
2✔
137

138
{ #category : 'initialization' }
UNCOV
139
MiCoUsageMapBlockSettingsPresenter >> initializeWindow: aWindowPresenter [
×
UNCOV
140
        aWindowPresenter 
×
UNCOV
141
                initialExtent: 500@700;
×
UNCOV
142
                title: 'Blocks Settings - Co Usage Map'
×
UNCOV
143
]
×
144

145
{ #category : 'accessing - private tests' }
UNCOV
146
MiCoUsageMapBlockSettingsPresenter >> resetButton [
×
UNCOV
147

×
UNCOV
148
        ^resetButton
×
UNCOV
149
]
×
150

151
{ #category : 'accessing' }
152
MiCoUsageMapBlockSettingsPresenter >> settings [
2✔
153
        ^ owner settings
2✔
154
]
2✔
155

156
{ #category : 'accessing' }
NEW
157
MiCoUsageMapBlockSettingsPresenter >> settings: anObject [
×
NEW
158
        owner settings: anObject
×
NEW
159
]
×
160

161
{ #category : 'accessing - private tests' }
UNCOV
162
MiCoUsageMapBlockSettingsPresenter >> sortInnerBoxTextInput [
×
UNCOV
163

×
UNCOV
164
        ^sortInnerBoxTextInput
×
UNCOV
165
]
×
166

167
{ #category : 'accessing - private tests' }
UNCOV
168
MiCoUsageMapBlockSettingsPresenter >> sortOuterBoxTextInput [
×
UNCOV
169

×
UNCOV
170
        ^sortOuterBoxTextInput
×
UNCOV
171
]
×
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