author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 13 Oct 2014 22:09:35 +0200 | |
changeset 14758 | 214db44dab86 |
parent 14753 | ed3aa84a71ed |
child 14760 | 928fe4cf43ff |
permissions | -rw-r--r-- |
10002 | 1 |
" |
10095 | 2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
10002 | 4 |
|
10095 | 5 |
Permission is hereby granted, free of charge, to any person |
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10002 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
SimpleDialog subclass:#LintRuleSelectionDialog |
|
13877 | 31 |
instanceVariableNames:'selectionHolder variablePanel relativeCorners detailsShown |
32 |
listSelection rulesetList rulesetHolder rulesetNameList |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
33 |
rulesetNameHolder canAcceptHolder' |
10002 | 34 |
classVariableNames:'' |
35 |
poolDictionaries:'' |
|
36 |
category:'Interface-Lint' |
|
37 |
! |
|
38 |
||
39 |
!LintRuleSelectionDialog class methodsFor:'documentation'! |
|
40 |
||
41 |
copyright |
|
42 |
" |
|
10095 | 43 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
44 |
Copyright (c) 2009-2010 eXept Software AG |
|
45 |
||
46 |
Permission is hereby granted, free of charge, to any person |
|
47 |
obtaining a copy of this software and associated documentation |
|
48 |
files (the 'Software'), to deal in the Software without |
|
49 |
restriction, including without limitation the rights to use, |
|
50 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
51 |
copies of the Software, and to permit persons to whom the |
|
52 |
Software is furnished to do so, subject to the following |
|
53 |
conditions: |
|
10002 | 54 |
|
10095 | 55 |
The above copyright notice and this permission notice shall be |
56 |
included in all copies or substantial portions of the Software. |
|
57 |
||
58 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
59 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
60 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
61 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
62 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
63 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
64 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
65 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10002 | 66 |
" |
67 |
! |
|
68 |
||
69 |
documentation |
|
70 |
" |
|
71 |
documentation to be added. |
|
72 |
||
73 |
[author:] |
|
74 |
Jan Vrany (jv@neso) |
|
75 |
||
76 |
[instance variables:] |
|
77 |
||
78 |
[class variables:] |
|
79 |
||
80 |
[see also:] |
|
81 |
||
82 |
" |
|
83 |
! |
|
84 |
||
85 |
examples |
|
86 |
" |
|
87 |
Starting the application: |
|
88 |
[exBegin] |
|
89 |
Tools::LintRuleSelectionDialog open |
|
90 |
||
91 |
[exEnd] |
|
92 |
||
93 |
more examples to be added: |
|
94 |
[exBegin] |
|
95 |
... add code fragment for |
|
96 |
... executable example here ... |
|
97 |
[exEnd] |
|
98 |
" |
|
99 |
! ! |
|
100 |
||
101 |
!LintRuleSelectionDialog class methodsFor:'interface specs'! |
|
102 |
||
103 |
windowSpec |
|
104 |
"This resource specification was automatically generated |
|
105 |
by the UIPainter of ST/X." |
|
106 |
||
107 |
"Do not manually edit this!! If it is corrupted, |
|
108 |
the UIPainter may not be able to read the specification." |
|
109 |
||
110 |
" |
|
111 |
UIPainter new openOnClass:Tools::LintRuleSelectionDialog andSelector:#windowSpec |
|
112 |
Tools::LintRuleSelectionDialog new openInterface:#windowSpec |
|
113 |
Tools::LintRuleSelectionDialog open |
|
114 |
" |
|
115 |
||
116 |
<resource: #canvas> |
|
117 |
||
118 |
^ |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
119 |
#(FullSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
120 |
name: windowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
121 |
window: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
122 |
(WindowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
123 |
label: 'Select Lint Rules' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
124 |
name: 'Select Lint Rules' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
125 |
min: (Point 10 10) |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
126 |
bounds: (Rectangle 0 0 466 403) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
127 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
128 |
component: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
129 |
(SpecCollection |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
130 |
collection: ( |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
131 |
(LinkButtonSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
132 |
label: 'Configure Rule Sets...' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
133 |
name: 'Button1' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
134 |
layout: (LayoutFrame -250 1 0 0 -3 1 24 0) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
135 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
136 |
labelChannel: configureRulesetsButtonLabel |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
137 |
adjust: right |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
138 |
model: doConfigureRulesets |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
139 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
140 |
(HorizontalPanelViewSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
141 |
name: 'BottonPanel' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
142 |
layout: (LayoutFrame 0 0.0 -40 1 0 1.0 0 1) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
143 |
horizontalLayout: right |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
144 |
verticalLayout: center |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
145 |
horizontalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
146 |
verticalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
147 |
reverseOrderIfOKAtLeft: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
148 |
component: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
149 |
(SpecCollection |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
150 |
collection: ( |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
151 |
(ActionButtonSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
152 |
label: 'Cancel' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
153 |
name: 'CancelButton' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
154 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
155 |
model: doCancel |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
156 |
extent: (Point 120 25) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
157 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
158 |
(ActionButtonSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
159 |
label: 'OK' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
160 |
name: 'OKButton' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
161 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
162 |
model: doAccept |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
163 |
enableChannel: canAcceptHolder |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
164 |
isDefault: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
165 |
defaultable: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
166 |
extent: (Point 120 25) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
167 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
168 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
169 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
170 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
171 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
172 |
(LabelSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
173 |
label: 'Select Ruleset' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
174 |
name: 'Label1' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
175 |
layout: (LayoutFrame 3 0 0 0 -250 1 24 0) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
176 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
177 |
adjust: left |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
178 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
179 |
(SelectionInListModelViewSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
180 |
name: 'SelectionInListModelView1' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
181 |
layout: (LayoutFrame 3 0 30 0 -3 1 -40 1) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
182 |
model: rulesetHolder |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
183 |
hasHorizontalScrollBar: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
184 |
hasVerticalScrollBar: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
185 |
listModel: rulesetList |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
186 |
useIndex: false |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
187 |
highlightMode: line |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
188 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
189 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
190 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
191 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
192 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
193 |
! |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
194 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
195 |
windowSpec_old |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
196 |
"This resource specification was automatically generated |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
197 |
by the UIPainter of ST/X." |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
198 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
199 |
"Do not manually edit this!! If it is corrupted, |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
200 |
the UIPainter may not be able to read the specification." |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
201 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
202 |
" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
203 |
UIPainter new openOnClass:Tools::LintRuleSelectionDialog andSelector:#windowSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
204 |
Tools::LintRuleSelectionDialog new openInterface:#windowSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
205 |
Tools::LintRuleSelectionDialog open |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
206 |
" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
207 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
208 |
<resource: #canvas> |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
209 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
210 |
^ |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
211 |
#(FullSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
212 |
name: windowSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
213 |
window: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
214 |
(WindowSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
215 |
label: 'Select Lint Rules' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
216 |
name: 'Select Lint Rules' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
217 |
min: (Point 10 10) |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
218 |
bounds: (Rectangle 0 0 600 400) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
219 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
220 |
component: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
221 |
(SpecCollection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
222 |
collection: ( |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
223 |
(ComboListSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
224 |
name: 'ComboBox1' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
225 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
226 |
model: rulesetNameHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
227 |
comboList: rulesetNameList |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
228 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
229 |
(VariableVerticalPanelSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
230 |
name: 'VariableVerticalPanel1' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
231 |
layout: (LayoutFrame 0 0 60 0 0 1 -30 1) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
232 |
component: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
233 |
(SpecCollection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
234 |
collection: ( |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
235 |
(SubCanvasSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
236 |
name: 'RuleList' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
237 |
hasHorizontalScrollBar: false |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
238 |
hasVerticalScrollBar: false |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
239 |
majorKey: #'Tools::HierarchicalLintRuleList' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
240 |
subAspectHolders: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
241 |
(Array |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
242 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
243 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
244 |
subAspect: inGeneratorHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
245 |
aspect: allRulesHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
246 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
247 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
248 |
subAspect: listSelection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
249 |
aspect: listSelection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
250 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
251 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
252 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
253 |
subAspect: modeHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
254 |
aspect: modeHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
255 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
256 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
257 |
subAspect: outGeneratorHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
258 |
aspect: selectedRulesHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
259 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
260 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
261 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
262 |
subAspect: selectionHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
263 |
aspect: selectionHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
264 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
265 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
266 |
createNewApplication: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
267 |
createNewBuilder: true |
10002 | 268 |
) |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
269 |
(SubCanvasSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
270 |
name: 'RuleDesc' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
271 |
hasHorizontalScrollBar: false |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
272 |
hasVerticalScrollBar: false |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
273 |
majorKey: #'Tools::LintRuleDetail' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
274 |
subAspectHolders: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
275 |
(Array |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
276 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
277 |
(SubChannelInfoSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
278 |
subAspect: ruleHolder |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
279 |
aspect: listSelection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
280 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
281 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
282 |
createNewApplication: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
283 |
createNewBuilder: true |
10002 | 284 |
) |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
285 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
286 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
287 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
288 |
handles: (Any 0.80810810810810796 1.0) |
10002 | 289 |
) |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
290 |
(HorizontalPanelViewSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
291 |
name: 'BottonPanel' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
292 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
293 |
horizontalLayout: fitSpace |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
294 |
verticalLayout: center |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
295 |
horizontalSpace: 3 |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
296 |
verticalSpace: 3 |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
297 |
reverseOrderIfOKAtLeft: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
298 |
component: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
299 |
(SpecCollection |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
300 |
collection: ( |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
301 |
(ActionButtonSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
302 |
label: 'Cancel' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
303 |
name: 'CancelButton' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
304 |
translateLabel: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
305 |
model: doCancel |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
306 |
extent: (Point 295 22) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
307 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
308 |
(ActionButtonSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
309 |
label: 'OK' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
310 |
name: 'OKButton' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
311 |
translateLabel: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
312 |
model: doAccept |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
313 |
isDefault: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
314 |
defaultable: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
315 |
extent: (Point 296 22) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
316 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
317 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
318 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
319 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
320 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
321 |
(LinkButtonSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
322 |
label: 'Configure Rule Sets...' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
323 |
name: 'Button1' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
324 |
layout: (LayoutFrame 0 0 26 0 0 1 50 0) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
325 |
translateLabel: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
326 |
labelChannel: configureRulesetsButtonLabel |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
327 |
adjust: right |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
328 |
model: doConfigureRulesets |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
329 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
330 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
331 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
332 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
333 |
) |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
334 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
335 |
"Created: / 13-10-2014 / 20:40:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10002 | 336 |
! ! |
337 |
||
338 |
!LintRuleSelectionDialog methodsFor:'accessing'! |
|
339 |
||
13877 | 340 |
ruleset: ruleset |
341 |
self rulesetHolder value: ruleset |
|
342 |
||
343 |
"Created: / 27-02-2013 / 23:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
344 |
! |
|
345 |
||
10002 | 346 |
selection |
347 |
||
348 |
^self selectionHolder value |
|
349 |
||
350 |
"Created: / 25-08-2010 / 14:10:03 / Jan Vrany <enter your email here>" |
|
351 |
! |
|
352 |
||
353 |
selection: anObject |
|
354 |
||
355 |
self selectionHolder value: anObject |
|
356 |
||
357 |
"Created: / 25-08-2010 / 14:09:40 / Jan Vrany <enter your email here>" |
|
358 |
! |
|
359 |
||
360 |
selectionAsRule |
|
361 |
||
13877 | 362 |
self rulesetHolder value rules: self selection. |
363 |
^self rulesetHolder value. |
|
10002 | 364 |
|
365 |
"Created: / 25-08-2010 / 14:10:58 / Jan Vrany <enter your email here>" |
|
13877 | 366 |
"Modified: / 27-02-2013 / 23:40:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10002 | 367 |
! ! |
368 |
||
369 |
!LintRuleSelectionDialog methodsFor:'actions'! |
|
370 |
||
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
371 |
doConfigureRulesets |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
372 |
"raise an error: this method should be implemented (TODO)" |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
373 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
374 |
^AbstractLauncherApplication openSettingsAndSelect: 'Tools/SmallLint' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
375 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
376 |
"Created: / 08-10-2014 / 23:10:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
377 |
! |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
378 |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
379 |
doEditRuleset |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
380 |
self doEditRuleset: self rulesetHolder value. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
381 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
382 |
"Created: / 13-10-2014 / 21:06:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
383 |
! |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
384 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
385 |
doEditRuleset: anRBCompositeLintRule |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
386 |
^ self shouldImplement |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
387 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
388 |
"Created: / 13-10-2014 / 21:07:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
389 |
! |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
390 |
|
10002 | 391 |
hideResultView |
392 |
||
393 |
detailsShown == true ifFalse:[^self]. |
|
394 |
||
395 |
variablePanel shown ifFalse:[^self]. |
|
396 |
||
397 |
relativeCorners := variablePanel relativeCorners. |
|
398 |
||
399 |
variablePanel |
|
400 |
relativeCorners:#( 0.99 1.0 ); |
|
401 |
resizeSubviews. |
|
402 |
detailsShown := false. |
|
403 |
||
404 |
"Created: / 10-02-2007 / 11:39:10 / janfrog" |
|
405 |
"Modified: / 24-07-2010 / 15:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
406 |
! |
|
407 |
||
408 |
showResultView |
|
409 |
detailsShown == true ifTrue:[^self]. |
|
410 |
variablePanel |
|
411 |
relativeCorners:relativeCorners ? #(0.5 1.0); |
|
412 |
resizeSubviews. |
|
413 |
detailsShown := true. |
|
414 |
||
415 |
"Created: / 10-02-2007 / 11:38:26 / janfrog" |
|
416 |
"Modified: / 24-07-2010 / 15:30:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
417 |
! ! |
|
418 |
||
419 |
!LintRuleSelectionDialog methodsFor:'aspects'! |
|
420 |
||
421 |
allRulesHolder |
|
422 |
||
423 |
^[(RBCompositeLintRule allRules) rules] |
|
424 |
||
425 |
"Created: / 15-04-2010 / 20:09:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
426 |
! |
|
427 |
||
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
428 |
canAcceptHolder |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
429 |
<resource: #uiAspect> |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
430 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
431 |
"automatically generated by UIPainter ..." |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
432 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
433 |
"*** the code below creates a default model when invoked." |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
434 |
"*** (which may not be the one you wanted)" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
435 |
"*** Please change as required and accept it in the browser." |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
436 |
"*** (and replace this comment by something more useful ;-)" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
437 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
438 |
canAcceptHolder isNil ifTrue:[ |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
439 |
canAcceptHolder := false asValue. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
440 |
"/ if your app needs to be notified of changes, uncomment one of the lines below: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
441 |
"/ canAcceptHolder addDependent:self. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
442 |
"/ canAcceptHolder onChangeSend:#canAcceptHolderChanged to:self. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
443 |
]. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
444 |
^ canAcceptHolder. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
445 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
446 |
"Modified: / 13-10-2014 / 21:05:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
447 |
! |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
448 |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
449 |
configureRulesetsButtonLabel |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
450 |
^'Configure...' asText |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
451 |
colorizeAllWith: Color blue; |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
452 |
actionForAll:[ self doConfigureRulesets ]; |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
453 |
yourself |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
454 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
455 |
"Created: / 08-10-2014 / 23:10:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
456 |
"Modified: / 13-10-2014 / 20:55:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
457 |
! |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
458 |
|
10002 | 459 |
listSelection |
460 |
"return/create the 'listSelection' value holder (automatically generated)" |
|
461 |
||
462 |
listSelection isNil ifTrue:[ |
|
463 |
listSelection := ValueHolder new. |
|
464 |
]. |
|
465 |
^ listSelection |
|
466 |
! |
|
467 |
||
468 |
listSelection:something |
|
469 |
"set the 'listSelection' value holder (automatically generated)" |
|
470 |
||
471 |
listSelection := something. |
|
472 |
! |
|
473 |
||
474 |
modeHolder |
|
475 |
||
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
476 |
^[#displaySelection] |
10002 | 477 |
|
478 |
"Created: / 15-04-2010 / 20:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
479 |
"Modified: / 08-10-2014 / 22:56:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10002 | 480 |
! |
481 |
||
13877 | 482 |
rulesetHolder |
483 |
"return/create the 'rulesetHolder' value holder (automatically generated)" |
|
484 |
||
485 |
rulesetHolder isNil ifTrue:[ |
|
486 |
rulesetHolder := ValueHolder new. |
|
487 |
rulesetHolder addDependent:self. |
|
488 |
]. |
|
489 |
^ rulesetHolder |
|
490 |
! |
|
491 |
||
492 |
rulesetHolder:something |
|
493 |
"set the 'rulesetHolder' value holder (automatically generated)" |
|
494 |
||
495 |
|oldValue newValue| |
|
496 |
||
497 |
rulesetHolder notNil ifTrue:[ |
|
498 |
oldValue := rulesetHolder value. |
|
499 |
rulesetHolder removeDependent:self. |
|
500 |
]. |
|
501 |
rulesetHolder := something. |
|
502 |
rulesetHolder notNil ifTrue:[ |
|
503 |
rulesetHolder addDependent:self. |
|
504 |
]. |
|
505 |
newValue := rulesetHolder value. |
|
506 |
oldValue ~~ newValue ifTrue:[ |
|
507 |
self update:#value with:newValue from:rulesetHolder. |
|
508 |
]. |
|
509 |
! |
|
510 |
||
511 |
rulesetList |
|
512 |
"return/create the 'rulesetList' value holder (automatically generated)" |
|
513 |
||
514 |
rulesetList isNil ifTrue:[ |
|
515 |
rulesetList := RBCompositeLintRule rulesets asList. |
|
516 |
rulesetList addDependent:self. |
|
517 |
]. |
|
518 |
^ rulesetList |
|
519 |
||
520 |
"Modified: / 27-02-2013 / 23:07:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
521 |
! |
|
522 |
||
523 |
rulesetList:something |
|
524 |
"set the 'rulesetList' value holder (automatically generated)" |
|
525 |
||
526 |
|oldValue newValue| |
|
527 |
||
528 |
rulesetList notNil ifTrue:[ |
|
529 |
oldValue := rulesetList value. |
|
530 |
rulesetList removeDependent:self. |
|
531 |
]. |
|
532 |
rulesetList := something. |
|
533 |
rulesetList notNil ifTrue:[ |
|
534 |
rulesetList addDependent:self. |
|
535 |
]. |
|
536 |
newValue := rulesetList value. |
|
537 |
oldValue ~~ newValue ifTrue:[ |
|
538 |
self update:#value with:newValue from:rulesetList. |
|
539 |
]. |
|
540 |
! |
|
541 |
||
542 |
rulesetNameHolder |
|
543 |
"return/create the 'rulesetNameHolder' value holder (automatically generated)" |
|
544 |
||
545 |
rulesetNameHolder isNil ifTrue:[ |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
546 |
| ruleset | |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
547 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
548 |
ruleset := self rulesetHolder value. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
549 |
rulesetNameHolder := ValueHolder with: (ruleset notNil ifTrue:[ ruleset displayString ] ifFalse:[ nil ]). |
13877 | 550 |
rulesetNameHolder addDependent:self. |
551 |
]. |
|
552 |
^ rulesetNameHolder |
|
553 |
||
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
554 |
"Modified: / 13-10-2014 / 20:49:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 555 |
! |
556 |
||
557 |
rulesetNameHolder:something |
|
558 |
"set the 'rulesetNameHolder' value holder (automatically generated)" |
|
559 |
||
560 |
|oldValue newValue| |
|
561 |
||
562 |
rulesetNameHolder notNil ifTrue:[ |
|
563 |
oldValue := rulesetNameHolder value. |
|
564 |
rulesetNameHolder removeDependent:self. |
|
565 |
]. |
|
566 |
rulesetNameHolder := something. |
|
567 |
rulesetNameHolder notNil ifTrue:[ |
|
568 |
rulesetNameHolder addDependent:self. |
|
569 |
]. |
|
570 |
newValue := rulesetNameHolder value. |
|
571 |
oldValue ~~ newValue ifTrue:[ |
|
572 |
self update:#value with:newValue from:rulesetNameHolder. |
|
573 |
]. |
|
574 |
! |
|
575 |
||
576 |
rulesetNameList |
|
577 |
"return/create the 'rulesetNameList' value holder (automatically generated)" |
|
578 |
||
579 |
rulesetNameList isNil ifTrue:[ |
|
580 |
rulesetNameList := ValueHolder new. |
|
581 |
]. |
|
582 |
^ rulesetNameList |
|
583 |
! |
|
584 |
||
585 |
rulesetNameList:something |
|
586 |
"set the 'rulesetNameList' value holder (automatically generated)" |
|
587 |
||
588 |
rulesetNameList := something. |
|
589 |
! |
|
590 |
||
10002 | 591 |
selectionHolder |
592 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
593 |
||
594 |
selectionHolder isNil ifTrue:[ |
|
595 |
selectionHolder := ValueHolder new. |
|
596 |
]. |
|
597 |
^ selectionHolder |
|
598 |
! ! |
|
599 |
||
600 |
!LintRuleSelectionDialog methodsFor:'callbacks - post build'! |
|
601 |
||
602 |
postBuildVariablePanel: aPanel |
|
603 |
||
604 |
variablePanel := aPanel. |
|
605 |
||
606 |
"Created: / 24-07-2010 / 15:05:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
607 |
! ! |
|
608 |
||
13877 | 609 |
!LintRuleSelectionDialog methodsFor:'change & update'! |
610 |
||
611 |
update:something with:aParameter from:changedObject |
|
612 |
"Invoked when an object that I depend upon sends a change notification." |
|
613 |
||
614 |
"stub code automatically generated - please change as required" |
|
615 |
||
616 |
changedObject == rulesetList ifTrue:[ |
|
617 |
self updateRulesetNameList. |
|
618 |
^ self. |
|
619 |
]. |
|
620 |
changedObject == rulesetHolder ifTrue:[ |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
621 |
| ruleset | |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
622 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
623 |
ruleset := self rulesetHolder value. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
624 |
ruleset notNil ifTrue:[ |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
625 |
self rulesetNameHolder value: ruleset value name withoutNotifying: self. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
626 |
self selection: ruleset value flattened. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
627 |
self canAcceptHolder value: true. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
628 |
] ifFalse:[ |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
629 |
self rulesetNameHolder value: nil withoutNotifying: self. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
630 |
self selection: nil. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
631 |
self canAcceptHolder value: false. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
632 |
]. |
13877 | 633 |
^ self. |
634 |
]. |
|
635 |
changedObject == rulesetNameHolder ifTrue:[ |
|
636 |
self updateRulesetHolder. |
|
637 |
^ self. |
|
638 |
]. |
|
639 |
super update:something with:aParameter from:changedObject |
|
640 |
||
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
641 |
"Modified: / 13-10-2014 / 21:05:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 642 |
! |
643 |
||
644 |
updateRulesetHolder |
|
645 |
| ruleset | |
|
646 |
||
647 |
self rulesetHolder value name == self rulesetNameHolder value ifTrue:[ |
|
648 |
^self. |
|
649 |
]. |
|
650 |
||
651 |
(self rulesetNameList value notNil and:[self rulesetNameHolder value asString = self rulesetNameList value last asString]) ifTrue:[ |
|
652 |
ruleset := RBCompositeLintRule new. |
|
653 |
ruleset name: ('New Rule Set ' , (self rulesetList size + 1) printString). |
|
654 |
self rulesetList add: ruleset. |
|
655 |
RBCompositeLintRule rulesets add: ruleset. |
|
656 |
self rulesetNameHolder value: ruleset name. |
|
657 |
] ifFalse:[ |
|
658 |
| idx | |
|
659 |
idx := self rulesetNameList value indexOf: self rulesetNameHolder value. |
|
660 |
ruleset := self rulesetList at: idx. |
|
661 |
]. |
|
662 |
self rulesetHolder value: ruleset. |
|
663 |
||
664 |
"Created: / 27-02-2013 / 23:15:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 |
! |
|
666 |
||
667 |
updateRulesetNameList |
|
668 |
||
669 |
self rulesetNameList value: |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
670 |
((self rulesetList collect:[:e|e displayString]) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
671 |
"/ add: 'New Ruleset...' asText allItalic; |
13877 | 672 |
yourself) |
673 |
||
674 |
"Created: / 27-02-2013 / 23:08:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
675 |
"Modified: / 13-10-2014 / 20:46:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 676 |
! ! |
677 |
||
678 |
!LintRuleSelectionDialog methodsFor:'hooks'! |
|
679 |
||
680 |
commonPostBuild |
|
681 |
self updateRulesetNameList. |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
682 |
self canAcceptHolder value: self rulesetHolder value notNil |
13877 | 683 |
|
684 |
"Created: / 27-02-2013 / 23:10:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
685 |
"Modified: / 13-10-2014 / 21:05:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 686 |
! ! |
687 |
||
10002 | 688 |
!LintRuleSelectionDialog class methodsFor:'documentation'! |
689 |
||
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
690 |
version |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
691 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSelectionDialog.st,v 1.8 2014-10-13 20:09:35 vrany Exp $' |
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
692 |
! |
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
693 |
|
10002 | 694 |
version_CVS |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
695 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSelectionDialog.st,v 1.8 2014-10-13 20:09:35 vrany Exp $' |
10002 | 696 |
! |
697 |
||
698 |
version_SVN |
|
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
699 |
^ '$Id: Tools__LintRuleSelectionDialog.st,v 1.8 2014-10-13 20:09:35 vrany Exp $' |
10002 | 700 |
! ! |
13280
90dde9790cfc
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
11298
diff
changeset
|
701 |