• 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

95.18
/src/MooseIDE-Core/MiAbstractSelectableSettingPresenter.class.st
1
Class {
2
        #name : 'MiAbstractSelectableSettingPresenter',
3
        #superclass : 'MiAbstractSettingPresenter',
4
        #instVars : [
5
                'allItemsButton',
6
                'customItemsButton',
7
                'table',
8
                'noItemsButton'
9
        ],
10
        #category : 'MooseIDE-Core-Settings',
11
        #package : 'MooseIDE-Core',
12
        #tag : 'Settings'
13
}
14

15
{ #category : 'initialization' }
16
MiAbstractSelectableSettingPresenter >> allItems [
17

18
        self subclassResponsibility
19
]
20

21
{ #category : 'layout' }
22
MiAbstractSelectableSettingPresenter >> defaultLayout [
2✔
23

2✔
24
        ^ self newBoxLayoutLeftToRight
2✔
25
                  add: (self newBoxLayoutTopToBottom
2✔
26
                                   add: allItemsButton;
2✔
27
                                   add: customItemsButton;
2✔
28
                                   add: noItemsButton;
2✔
29
                                   yourself);
2✔
30
                  add: table;
2✔
31
                  yourself
2✔
32
]
2✔
33

34
{ #category : 'initialization' }
NEW
35
MiAbstractSelectableSettingPresenter >> displayItem: anItem [
×
NEW
36

×
NEW
37
        ^ anItem printString
×
NEW
38
]
×
39

40
{ #category : 'initialization' }
41
MiAbstractSelectableSettingPresenter >> iconColumn [
2✔
42
        "Do nothing by default. Add an icon column if necessary"
2✔
43

2✔
44
        ^ nil
2✔
45
]
2✔
46

47
{ #category : 'initialization' }
48
MiAbstractSelectableSettingPresenter >> initializePresenters [
2✔
49

2✔
50
        super initializePresenters.
2✔
51

2✔
52
        table := self newTable.
2✔
53
        table
2✔
54
                hideColumnHeaders;
2✔
55
                addColumn: self tableColumns;
2✔
56
                items: self allItems;
2✔
57
                hide.
2✔
58

2✔
59
        self initializeRadioButtons
2✔
60
]
2✔
61

62
{ #category : 'initialization' }
63
MiAbstractSelectableSettingPresenter >> initializeRadioButtons [
2✔
64

2✔
65
        allItemsButton := self newRadioButton
2✔
66
                                  label: 'All';
2✔
67
                                  help: self help;
2✔
68
                                  yourself.
2✔
69
        customItemsButton := self newRadioButton
2✔
70
                                     label: 'Custom';
2✔
71
                                     help: self help;
2✔
72
                                     yourself.
2✔
73
        noItemsButton := self newRadioButton
2✔
74
                                 label: 'None';
2✔
75
                                 help: self help;
2✔
76
                                 yourself.
2✔
77

2✔
78
        customItemsButton whenActivatedDo: [ table show ].
2✔
79
        allItemsButton whenActivatedDo: [
2✔
80
                        table hide.
2✔
81
                        self selectAll ].
2✔
82
        noItemsButton whenActivatedDo: [
2✔
83
                        table hide.
2✔
84
                        self selectNone ].
2✔
85
        allItemsButton associatedRadioButtons: {
2✔
86
                        customItemsButton.
2✔
87
                        noItemsButton }.
2✔
88

2✔
89
        (self selectedItems equalsTo: self allItems) ifFalse: [
2✔
90
                        self selectedItems
2✔
91
                                ifEmpty: [ noItemsButton toggleState ]
2✔
92
                                ifNotEmpty: [ customItemsButton toggleState ] ]
2✔
93
]
2✔
94

95
{ #category : 'initialization' }
96
MiAbstractSelectableSettingPresenter >> selectAll [
97

98
        self subclassResponsibility
99
]
100

101
{ #category : 'api - selection' }
102
MiAbstractSelectableSettingPresenter >> selectItem: anObject [
103

104
        self subclassResponsibility
105
]
106

107
{ #category : 'initialization' }
108
MiAbstractSelectableSettingPresenter >> selectNone [
109

110
        self subclassResponsibility
111
]
112

113
{ #category : 'initialization' }
114
MiAbstractSelectableSettingPresenter >> selectedItems [
115

116
        self subclassResponsibility
117
]
118

119
{ #category : 'initialization' }
120
MiAbstractSelectableSettingPresenter >> tableColumns [
2✔
121

2✔
122
        | column |
2✔
123
        column := SpCompositeTableColumn new.
2✔
124

2✔
125
        column addColumn: (SpCheckBoxTableColumn new
2✔
126
                         evaluated: [ :anObject | self selectedItems includes: anObject ];
2✔
127
                         onActivation: [ :anObject | self selectItem: anObject ];
2✔
128
                         onDeactivation: [ :anObject | self unselectItem: anObject ];
2✔
129
                         beNotExpandable).
2✔
130

2✔
131
        self iconColumn ifNotNil: [ :iconColumn |
2✔
132
                column addColumn: iconColumn ].
2✔
133

2✔
134
        column addColumn:
2✔
135
                (SpStringTableColumn evaluated: [ :item | self displayItem: item ]).
2✔
136

2✔
137
        ^ column
2✔
138
]
2✔
139

140
{ #category : 'api - selection' }
141
MiAbstractSelectableSettingPresenter >> unselectItem: anObject [
142

143
        self subclassResponsibility
144
]
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