10002
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
SimpleDialog subclass:#LintRuleSelectionDialog
|
|
17 |
instanceVariableNames:'selectedRulesHolder selectionHolder variablePanel relativeCorners
|
|
18 |
detailsShown listSelection'
|
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
|
21 |
category:'Interface-Lint'
|
|
22 |
!
|
|
23 |
|
|
24 |
!LintRuleSelectionDialog class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 2006 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
!
|
|
39 |
|
|
40 |
documentation
|
|
41 |
"
|
|
42 |
documentation to be added.
|
|
43 |
|
|
44 |
[author:]
|
|
45 |
Jan Vrany (jv@neso)
|
|
46 |
|
|
47 |
[instance variables:]
|
|
48 |
|
|
49 |
[class variables:]
|
|
50 |
|
|
51 |
[see also:]
|
|
52 |
|
|
53 |
"
|
|
54 |
!
|
|
55 |
|
|
56 |
examples
|
|
57 |
"
|
|
58 |
Starting the application:
|
|
59 |
[exBegin]
|
|
60 |
Tools::LintRuleSelectionDialog open
|
|
61 |
|
|
62 |
[exEnd]
|
|
63 |
|
|
64 |
more examples to be added:
|
|
65 |
[exBegin]
|
|
66 |
... add code fragment for
|
|
67 |
... executable example here ...
|
|
68 |
[exEnd]
|
|
69 |
"
|
|
70 |
! !
|
|
71 |
|
|
72 |
!LintRuleSelectionDialog class methodsFor:'interface specs'!
|
|
73 |
|
|
74 |
windowSpec
|
|
75 |
"This resource specification was automatically generated
|
|
76 |
by the UIPainter of ST/X."
|
|
77 |
|
|
78 |
"Do not manually edit this!! If it is corrupted,
|
|
79 |
the UIPainter may not be able to read the specification."
|
|
80 |
|
|
81 |
"
|
|
82 |
UIPainter new openOnClass:Tools::LintRuleSelectionDialog andSelector:#windowSpec
|
|
83 |
Tools::LintRuleSelectionDialog new openInterface:#windowSpec
|
|
84 |
Tools::LintRuleSelectionDialog open
|
|
85 |
"
|
|
86 |
|
|
87 |
<resource: #canvas>
|
|
88 |
|
|
89 |
^
|
|
90 |
#(FullSpec
|
|
91 |
name: windowSpec
|
|
92 |
window:
|
|
93 |
(WindowSpec
|
|
94 |
label: 'Select Lint Rules'
|
|
95 |
name: 'Select Lint Rules'
|
|
96 |
min: (Point 10 10)
|
|
97 |
bounds: (Rectangle 0 0 600 400)
|
|
98 |
)
|
|
99 |
component:
|
|
100 |
(SpecCollection
|
|
101 |
collection: (
|
|
102 |
(VariableHorizontalPanelSpec
|
|
103 |
name: 'RulesAndDescriptions'
|
|
104 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1)
|
|
105 |
showHandle: true
|
|
106 |
snapMode: both
|
|
107 |
handlePosition: right
|
|
108 |
component:
|
|
109 |
(SpecCollection
|
|
110 |
collection: (
|
|
111 |
(SubCanvasSpec
|
|
112 |
name: 'RuleList'
|
|
113 |
hasHorizontalScrollBar: false
|
|
114 |
hasVerticalScrollBar: false
|
|
115 |
majorKey: #'Tools::HierarchicalLintRuleList'
|
|
116 |
subAspectHolders:
|
|
117 |
(Array
|
|
118 |
|
|
119 |
(SubChannelInfoSpec
|
|
120 |
subAspect: inGeneratorHolder
|
|
121 |
aspect: allRulesHolder
|
|
122 |
)
|
|
123 |
(SubChannelInfoSpec
|
|
124 |
subAspect: listSelection
|
|
125 |
aspect: listSelection
|
|
126 |
)
|
|
127 |
|
|
128 |
(SubChannelInfoSpec
|
|
129 |
subAspect: modeHolder
|
|
130 |
aspect: modeHolder
|
|
131 |
)
|
|
132 |
(SubChannelInfoSpec
|
|
133 |
subAspect: outGeneratorHolder
|
|
134 |
aspect: selectedRulesHolder
|
|
135 |
)
|
|
136 |
|
|
137 |
(SubChannelInfoSpec
|
|
138 |
subAspect: selectionHolder
|
|
139 |
aspect: selectionHolder
|
|
140 |
)
|
|
141 |
)
|
|
142 |
createNewApplication: true
|
|
143 |
createNewBuilder: true
|
|
144 |
)
|
|
145 |
(SubCanvasSpec
|
|
146 |
name: 'RuleDesc'
|
|
147 |
hasHorizontalScrollBar: false
|
|
148 |
hasVerticalScrollBar: false
|
|
149 |
majorKey: #'Tools::LintRuleDetail'
|
|
150 |
subAspectHolders:
|
|
151 |
(Array
|
|
152 |
|
|
153 |
(SubChannelInfoSpec
|
|
154 |
subAspect: ruleHolder
|
|
155 |
aspect: selectedRuleHolder
|
|
156 |
)
|
|
157 |
)
|
|
158 |
createNewApplication: true
|
|
159 |
createNewBuilder: true
|
|
160 |
)
|
|
161 |
)
|
|
162 |
|
|
163 |
)
|
|
164 |
handles: (Any 0.99 1.0)
|
|
165 |
postBuildCallback: postBuildVariablePanel:
|
|
166 |
)
|
|
167 |
(HorizontalPanelViewSpec
|
|
168 |
name: 'BottonPanel'
|
|
169 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
|
|
170 |
horizontalLayout: fitSpace
|
|
171 |
verticalLayout: center
|
|
172 |
horizontalSpace: 3
|
|
173 |
verticalSpace: 3
|
|
174 |
reverseOrderIfOKAtLeft: true
|
|
175 |
component:
|
|
176 |
(SpecCollection
|
|
177 |
collection: (
|
|
178 |
(ActionButtonSpec
|
|
179 |
label: 'Cancel'
|
|
180 |
name: 'CancelButton'
|
|
181 |
translateLabel: true
|
|
182 |
model: doCancel
|
|
183 |
extent: (Point 295 22)
|
|
184 |
)
|
|
185 |
(ActionButtonSpec
|
|
186 |
label: 'OK'
|
|
187 |
name: 'OKButton'
|
|
188 |
translateLabel: true
|
|
189 |
model: doAccept
|
|
190 |
extent: (Point 296 22)
|
|
191 |
)
|
|
192 |
)
|
|
193 |
|
|
194 |
)
|
|
195 |
)
|
|
196 |
)
|
|
197 |
|
|
198 |
)
|
|
199 |
)
|
|
200 |
! !
|
|
201 |
|
|
202 |
!LintRuleSelectionDialog methodsFor:'accessing'!
|
|
203 |
|
|
204 |
selection
|
|
205 |
|
|
206 |
^self selectionHolder value
|
|
207 |
|
|
208 |
"Created: / 25-08-2010 / 14:10:03 / Jan Vrany <enter your email here>"
|
|
209 |
!
|
|
210 |
|
|
211 |
selection: anObject
|
|
212 |
|
|
213 |
self selectionHolder value: anObject
|
|
214 |
|
|
215 |
"Created: / 25-08-2010 / 14:09:40 / Jan Vrany <enter your email here>"
|
|
216 |
!
|
|
217 |
|
|
218 |
selectionAsRule
|
|
219 |
|
|
220 |
^RBCompositeLintRule rules: self selection name: 'Selected rules'
|
|
221 |
|
|
222 |
"Created: / 25-08-2010 / 14:10:58 / Jan Vrany <enter your email here>"
|
|
223 |
! !
|
|
224 |
|
|
225 |
!LintRuleSelectionDialog methodsFor:'actions'!
|
|
226 |
|
|
227 |
hideResultView
|
|
228 |
|
|
229 |
detailsShown == true ifFalse:[^self].
|
|
230 |
|
|
231 |
variablePanel shown ifFalse:[^self].
|
|
232 |
|
|
233 |
relativeCorners := variablePanel relativeCorners.
|
|
234 |
|
|
235 |
variablePanel
|
|
236 |
relativeCorners:#( 0.99 1.0 );
|
|
237 |
resizeSubviews.
|
|
238 |
detailsShown := false.
|
|
239 |
|
|
240 |
"Created: / 10-02-2007 / 11:39:10 / janfrog"
|
|
241 |
"Modified: / 24-07-2010 / 15:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
242 |
!
|
|
243 |
|
|
244 |
showResultView
|
|
245 |
detailsShown == true ifTrue:[^self].
|
|
246 |
variablePanel
|
|
247 |
relativeCorners:relativeCorners ? #(0.5 1.0);
|
|
248 |
resizeSubviews.
|
|
249 |
detailsShown := true.
|
|
250 |
|
|
251 |
"Created: / 10-02-2007 / 11:38:26 / janfrog"
|
|
252 |
"Modified: / 24-07-2010 / 15:30:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
253 |
! !
|
|
254 |
|
|
255 |
!LintRuleSelectionDialog methodsFor:'aspects'!
|
|
256 |
|
|
257 |
allRulesHolder
|
|
258 |
|
|
259 |
^[(RBCompositeLintRule allRules) rules]
|
|
260 |
|
|
261 |
"Created: / 15-04-2010 / 20:09:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
262 |
!
|
|
263 |
|
|
264 |
listSelection
|
|
265 |
"return/create the 'listSelection' value holder (automatically generated)"
|
|
266 |
|
|
267 |
listSelection isNil ifTrue:[
|
|
268 |
listSelection := ValueHolder new.
|
|
269 |
].
|
|
270 |
^ listSelection
|
|
271 |
!
|
|
272 |
|
|
273 |
listSelection:something
|
|
274 |
"set the 'listSelection' value holder (automatically generated)"
|
|
275 |
|
|
276 |
listSelection := something.
|
|
277 |
!
|
|
278 |
|
|
279 |
modeHolder
|
|
280 |
|
|
281 |
^[#select]
|
|
282 |
|
|
283 |
"Created: / 15-04-2010 / 20:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
284 |
!
|
|
285 |
|
|
286 |
selectionHolder
|
|
287 |
"return/create the 'selectionHolder' value holder (automatically generated)"
|
|
288 |
|
|
289 |
selectionHolder isNil ifTrue:[
|
|
290 |
selectionHolder := ValueHolder new.
|
|
291 |
].
|
|
292 |
^ selectionHolder
|
|
293 |
! !
|
|
294 |
|
|
295 |
!LintRuleSelectionDialog methodsFor:'callbacks - post build'!
|
|
296 |
|
|
297 |
postBuildVariablePanel: aPanel
|
|
298 |
|
|
299 |
variablePanel := aPanel.
|
|
300 |
|
|
301 |
"Created: / 24-07-2010 / 15:05:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
302 |
! !
|
|
303 |
|
|
304 |
!LintRuleSelectionDialog class methodsFor:'documentation'!
|
|
305 |
|
|
306 |
version_CVS
|
|
307 |
^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleSelectionDialog.st,v 1.1 2011-07-01 13:31:46 cg Exp $'
|
|
308 |
!
|
|
309 |
|
|
310 |
version_SVN
|
|
311 |
^ '§Id: Tools__LintRuleSelectionDialog.st 7617 2010-08-25 12:56:19Z vranyj1 §'
|
|
312 |
! !
|