author | Claus Gittinger <cg@exept.de> |
Mon, 15 Jul 2019 18:47:18 +0200 | |
changeset 18902 | c2dea21fb224 |
parent 17993 | 8dfe5608dcac |
permissions | -rw-r--r-- |
17993 | 1 |
"{ Encoding: utf8 }" |
2 |
||
10002 | 3 |
" |
10095 | 4 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
5 |
Copyright (c) 2009-2010 eXept Software AG |
|
10002 | 6 |
|
10095 | 7 |
Permission is hereby granted, free of charge, to any person |
8 |
obtaining a copy of this software and associated documentation |
|
9 |
files (the 'Software'), to deal in the Software without |
|
10 |
restriction, including without limitation the rights to use, |
|
11 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12 |
copies of the Software, and to permit persons to whom the |
|
13 |
Software is furnished to do so, subject to the following |
|
14 |
conditions: |
|
15 |
||
16 |
The above copyright notice and this permission notice shall be |
|
17 |
included in all copies or substantial portions of the Software. |
|
18 |
||
19 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
20 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
21 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
22 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
23 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
24 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
25 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
26 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10002 | 27 |
" |
28 |
"{ Package: 'stx:libtool' }" |
|
29 |
||
30 |
"{ NameSpace: Tools }" |
|
31 |
||
32 |
SimpleDialog subclass:#LintRuleSelectionDialog |
|
13877 | 33 |
instanceVariableNames:'selectionHolder variablePanel relativeCorners detailsShown |
34 |
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
|
35 |
rulesetNameHolder canAcceptHolder' |
10002 | 36 |
classVariableNames:'' |
37 |
poolDictionaries:'' |
|
38 |
category:'Interface-Lint' |
|
39 |
! |
|
40 |
||
41 |
!LintRuleSelectionDialog class methodsFor:'documentation'! |
|
42 |
||
43 |
copyright |
|
44 |
" |
|
10095 | 45 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
46 |
Copyright (c) 2009-2010 eXept Software AG |
|
47 |
||
48 |
Permission is hereby granted, free of charge, to any person |
|
49 |
obtaining a copy of this software and associated documentation |
|
50 |
files (the 'Software'), to deal in the Software without |
|
51 |
restriction, including without limitation the rights to use, |
|
52 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
53 |
copies of the Software, and to permit persons to whom the |
|
54 |
Software is furnished to do so, subject to the following |
|
55 |
conditions: |
|
10002 | 56 |
|
10095 | 57 |
The above copyright notice and this permission notice shall be |
58 |
included in all copies or substantial portions of the Software. |
|
59 |
||
60 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
61 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
62 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
63 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
64 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
65 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
66 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
67 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10002 | 68 |
" |
69 |
! |
|
70 |
||
71 |
documentation |
|
72 |
" |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
73 |
A dialog to select SmallLint rules. |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
74 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
75 |
[example:] |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
76 |
| dialog rules | |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
77 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
78 |
dialog := Tools::LintRuleSelectionDialog new. |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
79 |
dialog open. |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
80 |
dialog accepted ifTrue:[ |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
81 |
rules := dialog selectionAsRule |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
82 |
] ifFalse:[ |
17630 | 83 |
Dialog warn: 'Canceled...'. |
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
84 |
]. |
10002 | 85 |
|
86 |
[author:] |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
87 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
10002 | 88 |
|
89 |
[instance variables:] |
|
90 |
||
91 |
[class variables:] |
|
92 |
||
93 |
[see also:] |
|
94 |
||
95 |
" |
|
96 |
! |
|
97 |
||
98 |
examples |
|
99 |
" |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
100 |
Ask user to select some SmallLint rules |
10002 | 101 |
[exBegin] |
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
102 |
| dialog rules | |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
103 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
104 |
dialog := Tools::LintRuleSelectionDialog new. |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
105 |
dialog open. |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
106 |
dialog accepted ifTrue:[ |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
107 |
rules := dialog selectionAsRule |
17287 | 108 |
]. |
109 |
rules inspect. |
|
10002 | 110 |
|
111 |
[exEnd] |
|
112 |
||
113 |
more examples to be added: |
|
114 |
[exBegin] |
|
115 |
... add code fragment for |
|
116 |
... executable example here ... |
|
117 |
[exEnd] |
|
118 |
" |
|
119 |
! ! |
|
120 |
||
121 |
!LintRuleSelectionDialog class methodsFor:'interface specs'! |
|
122 |
||
123 |
windowSpec |
|
124 |
"This resource specification was automatically generated |
|
125 |
by the UIPainter of ST/X." |
|
126 |
||
127 |
"Do not manually edit this!! If it is corrupted, |
|
128 |
the UIPainter may not be able to read the specification." |
|
129 |
||
130 |
" |
|
131 |
UIPainter new openOnClass:Tools::LintRuleSelectionDialog andSelector:#windowSpec |
|
132 |
Tools::LintRuleSelectionDialog new openInterface:#windowSpec |
|
133 |
Tools::LintRuleSelectionDialog open |
|
134 |
" |
|
135 |
||
136 |
<resource: #canvas> |
|
137 |
||
138 |
^ |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
139 |
#(FullSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
140 |
name: windowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
141 |
window: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
142 |
(WindowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
143 |
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
|
144 |
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
|
145 |
min: (Point 10 10) |
16588 | 146 |
bounds: (Rectangle 0 0 603 569) |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
147 |
) |
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: ( |
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
151 |
(ViewSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
152 |
name: 'ContentPanel' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
153 |
layout: (LayoutFrame 10 0 0 0 -10 1 -40 1) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
154 |
component: |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
155 |
(SpecCollection |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
156 |
collection: ( |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
157 |
(VariableVerticalPanelSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
158 |
name: 'VariableVerticalPanel1' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
159 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
160 |
component: |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
161 |
(SpecCollection |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
162 |
collection: ( |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
163 |
(SubCanvasSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
164 |
name: 'RuleList' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
165 |
hasHorizontalScrollBar: false |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
166 |
hasVerticalScrollBar: false |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
167 |
majorKey: #'Tools::HierarchicalLintRuleList' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
168 |
subAspectHolders: |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
169 |
(Array |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
170 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
171 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
172 |
subAspect: inGeneratorHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
173 |
aspect: allRulesHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
174 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
175 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
176 |
subAspect: listSelection |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
177 |
aspect: listSelection |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
178 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
179 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
180 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
181 |
subAspect: modeHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
182 |
aspect: modeHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
183 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
184 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
185 |
subAspect: outGeneratorHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
186 |
aspect: selectedRulesHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
187 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
188 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
189 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
190 |
subAspect: selectionHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
191 |
aspect: selectionHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
192 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
193 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
194 |
createNewApplication: true |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
195 |
createNewBuilder: true |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
196 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
197 |
(SubCanvasSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
198 |
name: 'RuleDesc' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
199 |
hasHorizontalScrollBar: false |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
200 |
hasVerticalScrollBar: false |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
201 |
majorKey: #'Tools::LintRuleDetail' |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
202 |
subAspectHolders: |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
203 |
(Array |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
204 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
205 |
(SubChannelInfoSpec |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
206 |
subAspect: ruleHolder |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
207 |
aspect: listSelection |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
208 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
209 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
210 |
createNewApplication: true |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
211 |
createNewBuilder: true |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
212 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
213 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
214 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
215 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
216 |
handles: (Any 0.5 1.0) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
217 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
218 |
) |
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
219 |
|
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
220 |
) |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
221 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
222 |
(HorizontalPanelViewSpec |
16588 | 223 |
name: 'ButtonPanel' |
224 |
layout: (LayoutFrame 10 0 -40 1 -16 1 0 1) |
|
15439
0f06730a5d7d
Fixed button layout to follow St/X UI Coding Guideline
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14982
diff
changeset
|
225 |
horizontalLayout: okCancelBox |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
226 |
verticalLayout: center |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
227 |
horizontalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
228 |
verticalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
229 |
reverseOrderIfOKAtLeft: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
230 |
component: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
231 |
(SpecCollection |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
232 |
collection: ( |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
233 |
(ActionButtonSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
234 |
label: 'Cancel' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
235 |
name: 'CancelButton' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
236 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
237 |
model: doCancel |
16588 | 238 |
extent: (Point 282 25) |
239 |
usePreferredHeight: true |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
240 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
241 |
(ActionButtonSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
242 |
label: 'OK' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
243 |
name: 'OKButton' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
244 |
translateLabel: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
245 |
model: doAccept |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
246 |
isDefault: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
247 |
defaultable: true |
16588 | 248 |
extent: (Point 283 22) |
249 |
usePreferredHeight: true |
|
14753
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 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
253 |
) |
14982
4ffaf520cfcd
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
14922
diff
changeset
|
254 |
keepSpaceForOSXResizeHandleH: true |
14753
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 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
257 |
|
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
258 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
259 |
) |
10002 | 260 |
! ! |
261 |
||
262 |
!LintRuleSelectionDialog methodsFor:'accessing'! |
|
263 |
||
264 |
selection |
|
265 |
||
266 |
^self selectionHolder value |
|
267 |
||
17359 | 268 |
"Created: / 25-08-2010 / 14:10:03 / Jan Vrany" |
10002 | 269 |
! |
270 |
||
271 |
selection: anObject |
|
272 |
||
273 |
self selectionHolder value: anObject |
|
274 |
||
17359 | 275 |
"Created: / 25-08-2010 / 14:09:40 / Jan Vrany" |
10002 | 276 |
! |
277 |
||
278 |
selectionAsRule |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
279 |
^ RBCompositeLintRule rules: self selection name: (resources string: 'Selected Rules') |
10002 | 280 |
|
17359 | 281 |
"Created: / 25-08-2010 / 14:10:58 / Jan Vrany" |
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
282 |
"Modified: / 27-11-2014 / 09:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10002 | 283 |
! ! |
284 |
||
285 |
!LintRuleSelectionDialog methodsFor:'actions'! |
|
286 |
||
287 |
hideResultView |
|
288 |
||
289 |
detailsShown == true ifFalse:[^self]. |
|
290 |
||
291 |
variablePanel shown ifFalse:[^self]. |
|
292 |
||
293 |
relativeCorners := variablePanel relativeCorners. |
|
294 |
||
295 |
variablePanel |
|
296 |
relativeCorners:#( 0.99 1.0 ); |
|
297 |
resizeSubviews. |
|
298 |
detailsShown := false. |
|
299 |
||
300 |
"Created: / 10-02-2007 / 11:39:10 / janfrog" |
|
301 |
"Modified: / 24-07-2010 / 15:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302 |
! |
|
303 |
||
304 |
showResultView |
|
305 |
detailsShown == true ifTrue:[^self]. |
|
306 |
variablePanel |
|
307 |
relativeCorners:relativeCorners ? #(0.5 1.0); |
|
308 |
resizeSubviews. |
|
309 |
detailsShown := true. |
|
310 |
||
311 |
"Created: / 10-02-2007 / 11:38:26 / janfrog" |
|
312 |
"Modified: / 24-07-2010 / 15:30:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
313 |
! ! |
|
314 |
||
315 |
!LintRuleSelectionDialog methodsFor:'aspects'! |
|
316 |
||
317 |
allRulesHolder |
|
17993 | 318 |
RBCompositeLintRule isNil ifTrue:[ |
319 |
^ #(). |
|
320 |
]. |
|
10002 | 321 |
|
322 |
^[(RBCompositeLintRule allRules) rules] |
|
323 |
! |
|
324 |
||
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
325 |
canAcceptHolder |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
326 |
<resource: #uiAspect> |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
327 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
328 |
canAcceptHolder isNil ifTrue:[ |
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
329 |
canAcceptHolder := true asValue. |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
330 |
]. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
331 |
^ canAcceptHolder. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
332 |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
333 |
"Modified (comment): / 27-11-2014 / 09:17:11 / 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
|
334 |
! |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
335 |
|
10002 | 336 |
listSelection |
337 |
"return/create the 'listSelection' value holder (automatically generated)" |
|
338 |
||
339 |
listSelection isNil ifTrue:[ |
|
340 |
listSelection := ValueHolder new. |
|
341 |
]. |
|
342 |
^ listSelection |
|
343 |
! |
|
344 |
||
345 |
listSelection:something |
|
346 |
"set the 'listSelection' value holder (automatically generated)" |
|
347 |
||
348 |
listSelection := something. |
|
349 |
! |
|
350 |
||
351 |
modeHolder |
|
352 |
||
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
353 |
^ [ #select ] |
10002 | 354 |
|
355 |
"Created: / 15-04-2010 / 20:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
14922
fc6066810758
Reverted back to plain rule selection dialog showing rule tree and description.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14879
diff
changeset
|
356 |
"Modified (format): / 27-11-2014 / 09:19:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 357 |
! |
358 |
||
10002 | 359 |
selectionHolder |
360 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
361 |
||
362 |
selectionHolder isNil ifTrue:[ |
|
363 |
selectionHolder := ValueHolder new. |
|
364 |
]. |
|
365 |
^ selectionHolder |
|
366 |
! ! |
|
367 |
||
368 |
!LintRuleSelectionDialog methodsFor:'callbacks - post build'! |
|
369 |
||
370 |
postBuildVariablePanel: aPanel |
|
371 |
||
372 |
variablePanel := aPanel. |
|
373 |
||
374 |
"Created: / 24-07-2010 / 15:05:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
375 |
! ! |
|
376 |
||
377 |
!LintRuleSelectionDialog class methodsFor:'documentation'! |
|
378 |
||
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
379 |
version |
16588 | 380 |
^ '$Header$' |
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
381 |
! |
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
382 |
|
10002 | 383 |
version_CVS |
16588 | 384 |
^ '$Header$' |
10002 | 385 |
! |
386 |
||
387 |
version_SVN |
|
16588 | 388 |
^ '$Id$' |
10002 | 389 |
! ! |
13280
90dde9790cfc
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
11298
diff
changeset
|
390 |