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

moosetechnology / MooseIDE / 18165837346

01 Oct 2025 02:39PM UTC coverage: 66.941% (+0.08%) from 66.86%
18165837346

push

github

web-flow
Merge pull request #1439 from moosetechnology/1421-tag-browser-tag-creation-should-open-a-popup

1421 tag browser tag creation should open a popup

fix #1421

237 of 263 new or added lines in 10 files covered. (90.11%)

33 existing lines in 4 files now uncovered.

20585 of 30751 relevant lines covered (66.94%)

1.34 hits per line

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

0.0
/src/MooseIDE-Tagging/MiTagEditionForm.class.st
1
Class {
2
        #name : 'MiTagEditionForm',
3
        #superclass : 'MiTagCreationForm',
4
        #category : 'MooseIDE-Tagging-Browser',
5
        #package : 'MooseIDE-Tagging',
6
        #tag : 'Browser'
7
}
8

9
{ #category : 'initialization' }
10
MiTagEditionForm >> checkFormInputs [
×
11

×
12
        nameField text ifEmpty: [ ^ false ].
×
NEW
13
        self specModel currentTag isIntent ifFalse: [
×
NEW
14
                (self specModel getTagNamed: nameField text) ifNotNil: [ :tag |
×
NEW
15
                        self specModel currentTag = tag ifFalse: [
×
16
                                | popup |
×
17
                                (popup := self newPopover)
×
18
                                        addStyle: 'error';
×
19
                                        relativeTo: nameField;
×
20
                                        bePositionRight;
×
21
                                        presenter: (SpPresenter new
×
22
                                                         layout: (SpBoxLayout newTopToBottom
×
23
                                                                          borderWidth: 2;
×
24
                                                                          spacing: 0;
×
25
                                                                          add: (self newLabel label: 'Name already exists');
×
26
                                                                          yourself);
×
27
                                                         yourself);
×
28
                                        popup.
×
29
                                ^ false ] ] ].
×
30

×
31

×
32
        ^ true
×
33
]
×
34

35
{ #category : 'initialization' }
UNCOV
36
MiTagEditionForm >> connectPresenters [
×
UNCOV
37

×
NEW
38
        "cancelButton action: [ 
×
UNCOV
39
                self reset.
×
UNCOV
40
                self owner closeTagEditionForm ].
×
NEW
41
        submitButton action: [ self submit ]"
×
UNCOV
42
]
×
43

44
{ #category : 'accessing' }
45
MiTagEditionForm >> fillFormWithTag: aTag [
×
46

×
47
        aTag ifNil: [ ^ self ].
×
48
        aTag isIntent
×
49
                ifTrue: [ self setDynamicTag: aTag ]
×
50
                ifFalse: [ self setTag: aTag ].
×
51
        
×
52
]
×
53

54
{ #category : 'accessing' }
55
MiTagEditionForm >> fillWithCurrentTag [
×
56

×
NEW
57
        self fillFormWithTag: self specModel currentTag
×
58
]
×
59

60
{ #category : 'initialization' }
61
MiTagEditionForm >> formLayout [
×
62

×
63
        ^ SpBoxLayout newTopToBottom
×
64
                  spacing: 10;
×
65
                  add: (SpBoxLayout newLeftToRight
×
66
                                   spacing: 5;
×
67
                                   add: (SpBoxLayout newTopToBottom
×
68
                                                    add: 'Name' asPresenter expand: false;
×
69
                                                    add: nameField expand: false;
×
70
                                                    yourself);
×
71
                                   add: (SpBoxLayout newTopToBottom
×
72
                                                    add: 'Category (optional)';
×
73
                                                    add: categorySelection;
×
74
                                                    yourself)
×
75
                                   width: 200;
×
76
                                   yourself)
×
77
                  expand: false;
×
78
                  add: (SpBoxLayout newTopToBottom
×
79
                                   add: 'Description (optional)' asPresenter expand: false;
×
80
                                   add: descriptionField height: 150;
×
81
                                   yourself)
×
82
                  expand: false;
×
83
                  add: (SpBoxLayout newLeftToRight
×
84
                                   vAlignEnd;
×
85
                                   spacing: 10;
×
86
                                   add: cancelButton;
×
87
                                   add: submitButton;
×
88
                                   yourself);
×
89
                  yourself
×
90
]
×
91

92
{ #category : 'initialization' }
UNCOV
93
MiTagEditionForm >> formTitle [
×
UNCOV
94

×
UNCOV
95
        ^ 'Edit tag'
×
UNCOV
96
]
×
97

98
{ #category : 'initialization' }
UNCOV
99
MiTagEditionForm >> initializePresenters [
×
UNCOV
100

×
UNCOV
101
        super initializePresenters.
×
NEW
102

×
NEW
103
        submitButton label: 'Save'.
×
UNCOV
104
        extentButton hide.
×
NEW
105
        intentButton hide.
×
UNCOV
106
]
×
107

108
{ #category : 'accessing' }
109
MiTagEditionForm >> setDynamicTag: aTag [
×
110

×
111
        self setIntentForm.
×
112
        aTag name ifNotNil: [ :name | nameField text: name ].
×
113
        aTag description ifNotNil: [ :desc | descriptionField text: desc ].
×
114
        aTag color ifNotNil: [ :color | colorPicker setColor: color ].
×
115
        aTag category ifNotNil: [
×
116
                categorySelection selectItem: aTag category ].
×
117
        aTag query ifNotNil: [
×
118
                (queryList items includes: aTag query) ifFalse: [
×
119
                        queryList items: queryList items , { aTag query } ].
×
120
                queryList startWithSelection selectItem: aTag query ]
×
121
]
×
122

123
{ #category : 'accessing' }
124
MiTagEditionForm >> setTag: aTag [
×
125

×
126
        self setExtentForm.
×
127
        aTag name ifNotNil: [ :name | nameField text: name ].
×
128
        aTag description ifNotNil: [ :desc | descriptionField text: desc ].
×
129
        aTag color ifNotNil: [ :color | colorPicker setColor: color ].
×
130
        aTag categories ifNotEmpty: [ 
×
131
                categorySelection selectItem: aTag categories first ]
×
132
]
×
133

134
{ #category : 'initialization' }
135
MiTagEditionForm >> submit [
×
136

×
137
        self checkFormInputs ifFalse: [ ^ self ].
×
NEW
138

×
NEW
139
        self specModel currentTag isIntent
×
140
                ifTrue: [ 
×
NEW
141
                        self specModel 
×
142
                                editCurrentDynamicTag: nameField text
×
143
                                description: descriptionField text
×
144
                                color: colorPicker color
×
145
                                category: categorySelection selectedItem
×
146
                                query: queryList selectedItem ]
×
147
                ifFalse: [ 
×
NEW
148
                        self specModel
×
149
                                editCurrentTag: nameField text
×
150
                                description: descriptionField text
×
151
                                color: colorPicker color
×
152
                                category: categorySelection selectedItem ].
×
153

×
NEW
154
        tagBrowser refreshTagList.
×
NEW
155
        self close
×
NEW
156
]
×
157

158
{ #category : 'accessing' }
NEW
159
MiTagEditionForm >> tagBrowser: aTagBrowser [
×
NEW
160

×
NEW
161
        super tagBrowser: aTagBrowser.
×
NEW
162

×
NEW
163
        self fillFormWithTag: self specModel currentTag
×
UNCOV
164
]
×
165

166
{ #category : 'accessing' }
167
MiTagEditionForm >> title [
×
168

×
169
        ^ 'Edit tag'
×
170
]
×
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