60 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
60 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
61 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
61 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
62 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
62 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
63 OTHER DEALINGS IN THE SOFTWARE. |
63 OTHER DEALINGS IN THE SOFTWARE. |
64 " |
64 " |
|
65 ! ! |
|
66 |
|
67 !LintRuleDetail class methodsFor:'help specs'! |
|
68 |
|
69 flyByHelpSpec |
|
70 "This resource specification was automatically generated |
|
71 by the UIHelpTool of ST/X." |
|
72 |
|
73 "Do not manually edit this!! If it is corrupted, |
|
74 the UIHelpTool may not be able to read the specification." |
|
75 |
|
76 " |
|
77 UIHelpTool openOnClass:Tools::LintRuleDetail |
|
78 " |
|
79 |
|
80 <resource: #help> |
|
81 |
|
82 ^ super flyByHelpSpec addPairsFrom:#( |
|
83 |
|
84 #ruleName |
|
85 'Click to browse the lint rule' |
|
86 |
|
87 ) |
|
88 |
|
89 "Created: / 07-09-2011 / 04:08:11 / cg" |
65 ! ! |
90 ! ! |
66 |
91 |
67 !LintRuleDetail class methodsFor:'interface specs'! |
92 !LintRuleDetail class methodsFor:'interface specs'! |
68 |
93 |
69 windowSpec |
94 windowSpec |
108 (ViewSpec |
133 (ViewSpec |
109 name: 'Label' |
134 name: 'Label' |
110 component: |
135 component: |
111 (SpecCollection |
136 (SpecCollection |
112 collection: ( |
137 collection: ( |
113 (LabelSpec |
138 (LinkButtonSpec |
114 label: 'Name...' |
139 name: 'Button1' |
115 name: 'Name' |
140 layout: (LayoutFrame 0 0 0 0 -150 1 30 0) |
116 layout: (LayoutFrame 15 0 0 0 -150 1 30 0) |
141 activeHelpKey: ruleName |
117 translateLabel: true |
142 translateLabel: true |
118 labelChannel: ruleNameAspect |
143 labelChannel: ruleNameAspect |
119 adjust: left |
144 adjust: left |
|
145 model: browseLintRule |
120 ) |
146 ) |
121 (CheckBoxSpec |
147 (CheckBoxSpec |
122 label: 'Show Rationale' |
148 label: 'Show Rationale' |
123 name: 'CheckBox1' |
149 name: 'CheckBox1' |
124 layout: (LayoutFrame -150 1 0 0 0 1 30 0) |
150 layout: (LayoutFrame -150 1 0 0 0 1 30 0) |
168 #ruleHolder |
194 #ruleHolder |
169 ). |
195 ). |
170 |
196 |
171 ! ! |
197 ! ! |
172 |
198 |
|
199 !LintRuleDetail methodsFor:'actions'! |
|
200 |
|
201 browseLintRule |
|
202 |rule ruleClass sel| |
|
203 |
|
204 rule := self ruleHolder value. |
|
205 rule isNil ifTrue:[^ self]. |
|
206 ruleClass := rule class. |
|
207 (ruleClass implements:#rationale) ifTrue:[ |
|
208 sel := #rationale. |
|
209 ]. |
|
210 UserPreferences current systemBrowserClass |
|
211 openInClass:ruleClass selector:sel |
|
212 |
|
213 "Created: / 07-09-2011 / 04:09:38 / cg" |
|
214 ! ! |
|
215 |
173 !LintRuleDetail methodsFor:'aspects'! |
216 !LintRuleDetail methodsFor:'aspects'! |
174 |
217 |
175 rationaleVisibleHolder |
218 rationaleVisibleHolder |
176 "return/create the 'rationaleVisibleHolder' value holder (automatically generated)" |
219 "return/create the 'rationaleVisibleHolder' value holder (automatically generated)" |
177 |
220 |
235 <resource: #uiAspect> |
278 <resource: #uiAspect> |
236 |
279 |
237 |holder| |
280 |holder| |
238 |
281 |
239 (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[ |
282 (holder := builder bindingAt:#ruleNameAspect) isNil ifTrue:[ |
240 holder := (AspectAdaptor forAspect: #displayString) subjectChannel: self ruleHolder. |
283 holder := BlockValue |
241 builder aspectAt:#ruleNameAspect put:holder. |
284 with:[:h | h displayString , ' ' , (('[browse]' actionForAll:[ self browseLintRule]) colorizeAllWith:Color blue) ] |
242 "/ holder addDependent:self. |
285 argument: self ruleHolder. |
243 "/ holder onChangeSend:#ruleNameAspectChanged to:self. |
286 builder aspectAt:#ruleNameAspect put:holder. |
244 ]. |
287 ]. |
245 ^ holder. |
288 ^ holder. |
246 |
289 |
247 "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
290 "Modified: / 05-02-2010 / 12:51:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
291 "Modified: / 07-09-2011 / 04:49:20 / cg" |
248 ! |
292 ! |
249 |
293 |
250 ruleRationaleAspect |
294 ruleRationaleAspect |
251 <resource: #uiAspect> |
295 <resource: #uiAspect> |
252 |
296 |
253 |holder| |
297 |holder| |
254 |
298 |
255 (holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[ |
299 (holder := builder bindingAt:#ruleRationaleAspect) isNil ifTrue:[ |
256 holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder. |
300 holder := (AspectAdaptor forAspect: #rationale) subjectChannel: self ruleHolder. |
257 builder aspectAt:#ruleRationaleAspect put:holder. |
301 builder aspectAt:#ruleRationaleAspect put:holder. |
258 "/ holder addDependent:self. |
|
259 "/ holder onChangeSend:#ruleRationaleAspectChanged to:self. |
|
260 ]. |
302 ]. |
261 ^ holder. |
303 ^ holder. |
262 |
304 |
263 "Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
305 "Modified: / 05-02-2010 / 12:51:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
306 "Modified (comment): / 07-09-2011 / 04:12:16 / cg" |
264 ! ! |
307 ! ! |
265 |
308 |
266 !LintRuleDetail methodsFor:'change & update'! |
309 !LintRuleDetail methodsFor:'change & update'! |
267 |
310 |
268 update:something with:aParameter from:changedObject |
311 update:something with:aParameter from:changedObject |
358 "Modified: / 04-09-2011 / 20:15:40 / cg" |
401 "Modified: / 04-09-2011 / 20:15:40 / cg" |
359 ! ! |
402 ! ! |
360 |
403 |
361 !LintRuleDetail class methodsFor:'documentation'! |
404 !LintRuleDetail class methodsFor:'documentation'! |
362 |
405 |
|
406 version |
|
407 ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.9 2011-09-07 02:53:50 cg Exp $' |
|
408 ! |
|
409 |
363 version_CVS |
410 version_CVS |
364 ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.8 2011-09-07 02:04:16 cg Exp $' |
411 ^ '$Header: /cvs/stx/stx/libtool/Tools__LintRuleDetail.st,v 1.9 2011-09-07 02:53:50 cg Exp $' |
365 ! |
412 ! |
366 |
413 |
367 version_SVN |
414 version_SVN |
368 ^ '§Id: Tools__LintRuleDetail.st 7617 2010-08-25 12:56:19Z vranyj1 §' |
415 ^ '§Id: Tools__LintRuleDetail.st 7617 2010-08-25 12:56:19Z vranyj1 §' |
369 ! ! |
416 ! ! |