author | Claus Gittinger <cg@exept.de> |
Tue, 07 Feb 2017 13:29:00 +0100 | |
changeset 17359 | 400b65ecc983 |
parent 17287 | ab847ac24b33 |
child 17630 | e1ad4f5ac06e |
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 |
" |
|
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
|
71 |
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
|
72 |
|
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 |
[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
|
74 |
| 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
|
75 |
|
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 := 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
|
77 |
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
|
78 |
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
|
79 |
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
|
80 |
] ifFalse:[ |
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 |
Dialog warn: 'Cancelled...'. |
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 |
]. |
10002 | 83 |
|
84 |
[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
|
85 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
10002 | 86 |
|
87 |
[instance variables:] |
|
88 |
||
89 |
[class variables:] |
|
90 |
||
91 |
[see also:] |
|
92 |
||
93 |
" |
|
94 |
! |
|
95 |
||
96 |
examples |
|
97 |
" |
|
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
|
98 |
Ask user to select some SmallLint rules |
10002 | 99 |
[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
|
100 |
| 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
|
101 |
|
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 := 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
|
103 |
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
|
104 |
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
|
105 |
rules := dialog selectionAsRule |
17287 | 106 |
]. |
107 |
rules inspect. |
|
10002 | 108 |
|
109 |
[exEnd] |
|
110 |
||
111 |
more examples to be added: |
|
112 |
[exBegin] |
|
113 |
... add code fragment for |
|
114 |
... executable example here ... |
|
115 |
[exEnd] |
|
116 |
" |
|
117 |
! ! |
|
118 |
||
119 |
!LintRuleSelectionDialog class methodsFor:'interface specs'! |
|
120 |
||
121 |
windowSpec |
|
122 |
"This resource specification was automatically generated |
|
123 |
by the UIPainter of ST/X." |
|
124 |
||
125 |
"Do not manually edit this!! If it is corrupted, |
|
126 |
the UIPainter may not be able to read the specification." |
|
127 |
||
128 |
" |
|
129 |
UIPainter new openOnClass:Tools::LintRuleSelectionDialog andSelector:#windowSpec |
|
130 |
Tools::LintRuleSelectionDialog new openInterface:#windowSpec |
|
131 |
Tools::LintRuleSelectionDialog open |
|
132 |
" |
|
133 |
||
134 |
<resource: #canvas> |
|
135 |
||
136 |
^ |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
137 |
#(FullSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
138 |
name: windowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
139 |
window: |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
140 |
(WindowSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
141 |
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
|
142 |
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
|
143 |
min: (Point 10 10) |
16588 | 144 |
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
|
145 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
146 |
component: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
147 |
(SpecCollection |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
148 |
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
|
149 |
(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
|
150 |
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
|
151 |
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
|
152 |
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
|
153 |
(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
|
154 |
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
|
155 |
(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
|
156 |
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
|
157 |
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
|
158 |
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
|
159 |
(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
|
160 |
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
|
161 |
(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
|
162 |
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
|
163 |
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
|
164 |
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
|
165 |
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
|
166 |
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
|
167 |
(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
|
168 |
|
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 |
(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
|
170 |
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
|
171 |
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
|
172 |
) |
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 |
(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
|
174 |
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
|
175 |
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
|
176 |
) |
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 |
|
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 |
(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
|
179 |
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
|
180 |
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
|
181 |
) |
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 |
(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
|
183 |
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
|
184 |
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
|
185 |
) |
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 |
|
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 |
(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
|
188 |
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
|
189 |
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
|
190 |
) |
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 |
) |
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 |
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
|
193 |
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
|
194 |
) |
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 |
(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
|
196 |
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
|
197 |
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
|
198 |
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
|
199 |
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
|
200 |
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
|
201 |
(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
|
202 |
|
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 |
(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
|
204 |
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
|
205 |
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
|
206 |
) |
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 |
) |
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 |
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
|
209 |
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
|
210 |
) |
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 |
) |
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 |
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
|
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 |
) |
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 |
) |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
219 |
) |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
220 |
(HorizontalPanelViewSpec |
16588 | 221 |
name: 'ButtonPanel' |
222 |
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
|
223 |
horizontalLayout: okCancelBox |
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
224 |
verticalLayout: center |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
225 |
horizontalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
226 |
verticalSpace: 3 |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
227 |
reverseOrderIfOKAtLeft: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
228 |
component: |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
229 |
(SpecCollection |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
230 |
collection: ( |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
231 |
(ActionButtonSpec |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
232 |
label: 'Cancel' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
233 |
name: 'CancelButton' |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
234 |
translateLabel: true |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
235 |
model: doCancel |
16588 | 236 |
extent: (Point 282 25) |
237 |
usePreferredHeight: true |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
238 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
239 |
(ActionButtonSpec |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
240 |
label: 'OK' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
241 |
name: 'OKButton' |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
242 |
translateLabel: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
243 |
model: doAccept |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
244 |
isDefault: true |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
245 |
defaultable: true |
16588 | 246 |
extent: (Point 283 22) |
247 |
usePreferredHeight: true |
|
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
248 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
249 |
) |
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 |
) |
14982
4ffaf520cfcd
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
14922
diff
changeset
|
252 |
keepSpaceForOSXResizeHandleH: true |
14753
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
253 |
) |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
254 |
) |
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 |
) |
10002 | 258 |
! ! |
259 |
||
260 |
!LintRuleSelectionDialog methodsFor:'accessing'! |
|
261 |
||
262 |
selection |
|
263 |
||
264 |
^self selectionHolder value |
|
265 |
||
17359 | 266 |
"Created: / 25-08-2010 / 14:10:03 / Jan Vrany" |
10002 | 267 |
! |
268 |
||
269 |
selection: anObject |
|
270 |
||
271 |
self selectionHolder value: anObject |
|
272 |
||
17359 | 273 |
"Created: / 25-08-2010 / 14:09:40 / Jan Vrany" |
10002 | 274 |
! |
275 |
||
276 |
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
|
277 |
^ RBCompositeLintRule rules: self selection name: (resources string: 'Selected Rules') |
10002 | 278 |
|
17359 | 279 |
"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
|
280 |
"Modified: / 27-11-2014 / 09:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10002 | 281 |
! ! |
282 |
||
283 |
!LintRuleSelectionDialog methodsFor:'actions'! |
|
284 |
||
285 |
hideResultView |
|
286 |
||
287 |
detailsShown == true ifFalse:[^self]. |
|
288 |
||
289 |
variablePanel shown ifFalse:[^self]. |
|
290 |
||
291 |
relativeCorners := variablePanel relativeCorners. |
|
292 |
||
293 |
variablePanel |
|
294 |
relativeCorners:#( 0.99 1.0 ); |
|
295 |
resizeSubviews. |
|
296 |
detailsShown := false. |
|
297 |
||
298 |
"Created: / 10-02-2007 / 11:39:10 / janfrog" |
|
299 |
"Modified: / 24-07-2010 / 15:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
300 |
! |
|
301 |
||
302 |
showResultView |
|
303 |
detailsShown == true ifTrue:[^self]. |
|
304 |
variablePanel |
|
305 |
relativeCorners:relativeCorners ? #(0.5 1.0); |
|
306 |
resizeSubviews. |
|
307 |
detailsShown := true. |
|
308 |
||
309 |
"Created: / 10-02-2007 / 11:38:26 / janfrog" |
|
310 |
"Modified: / 24-07-2010 / 15:30:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
311 |
! ! |
|
312 |
||
313 |
!LintRuleSelectionDialog methodsFor:'aspects'! |
|
314 |
||
315 |
allRulesHolder |
|
316 |
||
317 |
^[(RBCompositeLintRule allRules) rules] |
|
318 |
||
319 |
"Created: / 15-04-2010 / 20:09:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
320 |
! |
|
321 |
||
14758
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
322 |
canAcceptHolder |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
323 |
<resource: #uiAspect> |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
324 |
|
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
325 |
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
|
326 |
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
|
327 |
]. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
328 |
^ canAcceptHolder. |
214db44dab86
LintRuleSelectionDialog refactored to show a list of configured rulesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14753
diff
changeset
|
329 |
|
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
|
330 |
"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
|
331 |
! |
ed3aa84a71ed
Do now allow ruleset editing in ruleset selection dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13877
diff
changeset
|
332 |
|
10002 | 333 |
listSelection |
334 |
"return/create the 'listSelection' value holder (automatically generated)" |
|
335 |
||
336 |
listSelection isNil ifTrue:[ |
|
337 |
listSelection := ValueHolder new. |
|
338 |
]. |
|
339 |
^ listSelection |
|
340 |
! |
|
341 |
||
342 |
listSelection:something |
|
343 |
"set the 'listSelection' value holder (automatically generated)" |
|
344 |
||
345 |
listSelection := something. |
|
346 |
! |
|
347 |
||
348 |
modeHolder |
|
349 |
||
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
|
350 |
^ [ #select ] |
10002 | 351 |
|
352 |
"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
|
353 |
"Modified (format): / 27-11-2014 / 09:19:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13877 | 354 |
! |
355 |
||
10002 | 356 |
selectionHolder |
357 |
"return/create the 'selectionHolder' value holder (automatically generated)" |
|
358 |
||
359 |
selectionHolder isNil ifTrue:[ |
|
360 |
selectionHolder := ValueHolder new. |
|
361 |
]. |
|
362 |
^ selectionHolder |
|
363 |
! ! |
|
364 |
||
365 |
!LintRuleSelectionDialog methodsFor:'callbacks - post build'! |
|
366 |
||
367 |
postBuildVariablePanel: aPanel |
|
368 |
||
369 |
variablePanel := aPanel. |
|
370 |
||
371 |
"Created: / 24-07-2010 / 15:05:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
372 |
! ! |
|
373 |
||
374 |
!LintRuleSelectionDialog class methodsFor:'documentation'! |
|
375 |
||
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
376 |
version |
16588 | 377 |
^ '$Header$' |
13282
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
378 |
! |
2e628ff0e590
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
13280
diff
changeset
|
379 |
|
10002 | 380 |
version_CVS |
16588 | 381 |
^ '$Header$' |
10002 | 382 |
! |
383 |
||
384 |
version_SVN |
|
16588 | 385 |
^ '$Id$' |
10002 | 386 |
! ! |
13280
90dde9790cfc
class: Tools::LintRuleSelectionDialog
Claus Gittinger <cg@exept.de>
parents:
11298
diff
changeset
|
387 |