author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 25 Feb 2014 11:42:31 +0100 | |
changeset 14035 | 3f81b0beff77 |
parent 13443 | 7533db07ff7a |
child 14668 | 2f6b48f6902a |
permissions | -rw-r--r-- |
10001 | 1 |
" |
10093 | 2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
10001 | 4 |
|
10093 | 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. |
|
10001 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
LintRuleList subclass:#HierarchicalLintRuleList |
|
31 |
instanceVariableNames:'' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'Interface-Lint' |
|
35 |
! |
|
36 |
||
37 |
!HierarchicalLintRuleList class methodsFor:'documentation'! |
|
38 |
||
39 |
copyright |
|
40 |
" |
|
10093 | 41 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, Czech Technical University in Prague |
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
10001 | 52 |
|
10093 | 53 |
The above copyright notice and this permission notice shall be |
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
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 |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
10001 | 64 |
" |
65 |
! ! |
|
66 |
||
67 |
!HierarchicalLintRuleList class methodsFor:'interface specs'! |
|
68 |
||
69 |
windowSpec |
|
70 |
"This resource specification was automatically generated |
|
71 |
by the UIPainter of ST/X." |
|
72 |
||
73 |
"Do not manually edit this!! If it is corrupted, |
|
74 |
the UIPainter may not be able to read the specification." |
|
75 |
||
76 |
" |
|
77 |
UIPainter new openOnClass:Tools::HierarchicalLintRuleList andSelector:#windowSpec |
|
78 |
Tools::HierarchicalLintRuleList new openInterface:#windowSpec |
|
79 |
Tools::HierarchicalLintRuleList open |
|
80 |
" |
|
81 |
||
82 |
<resource: #canvas> |
|
83 |
||
84 |
^ |
|
85 |
#(FullSpec |
|
86 |
name: windowSpec |
|
87 |
window: |
|
88 |
(WindowSpec |
|
89 |
label: 'SmallLintRuleList' |
|
90 |
name: 'SmallLintRuleList' |
|
91 |
min: (Point 10 10) |
|
92 |
bounds: (Rectangle 0 0 300 300) |
|
93 |
) |
|
94 |
component: |
|
95 |
(SpecCollection |
|
96 |
collection: ( |
|
97 |
(HierarchicalListViewSpec |
|
98 |
name: 'RuleList' |
|
99 |
layout: (LayoutFrame 0 0 23 0 0 1 0 1) |
|
100 |
model: listSelection |
|
101 |
hasHorizontalScrollBar: true |
|
102 |
hasVerticalScrollBar: true |
|
103 |
listModel: listHolder |
|
104 |
useIndex: false |
|
105 |
highlightMode: line |
|
106 |
showLines: false |
|
107 |
useDefaultIcons: false |
|
108 |
postBuildCallback: postBuildList: |
|
109 |
) |
|
110 |
(InputFieldSpec |
|
111 |
name: 'RuleFilter' |
|
112 |
layout: (LayoutFrame 0 0 0 0 0 1 22 0) |
|
113 |
model: filterHolder |
|
114 |
immediateAccept: true |
|
115 |
acceptOnReturn: true |
|
116 |
acceptOnTab: true |
|
117 |
acceptOnPointerLeave: true |
|
118 |
emptyFieldReplacementText: 'Rule Search' |
|
119 |
) |
|
120 |
) |
|
121 |
||
122 |
) |
|
123 |
) |
|
124 |
! ! |
|
125 |
||
126 |
!HierarchicalLintRuleList methodsFor:'aspects'! |
|
127 |
||
128 |
listHolder |
|
129 |
listHolder isNil ifTrue:[ |
|
130 |
listHolder := (HierarchicalList new) |
|
131 |
showRoot:false; |
|
132 |
application:self; |
|
133 |
yourself |
|
134 |
]. |
|
135 |
^ listHolder |
|
136 |
||
137 |
"Created: / 15-04-2010 / 20:32:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
138 |
! ! |
|
139 |
||
140 |
!HierarchicalLintRuleList methodsFor:'private'! |
|
141 |
||
142 |
updateList |
|
143 |
|inGenerator filterS inRules root| |
|
144 |
||
145 |
inGenerator := self inGeneratorHolder value. |
|
146 |
filterS := self filterHolder value. |
|
10457 | 147 |
filterS notEmptyOrNil ifTrue:[ |
148 |
(filterS startsWith: $*) ifFalse:[filterS := '*' , filterS]. |
|
149 |
(filterS endsWith: $*) ifFalse:[filterS := filterS , '*'] |
|
150 |
]. |
|
10001 | 151 |
(inGenerator isNil and: [self mode == #display]) |
152 |
ifTrue:[inGenerator := RBCompositeLintRule allRules rules ]. |
|
153 |
inRules := OrderedCollection new. |
|
10457 | 154 |
filterS isEmptyOrNil |
11392 | 155 |
ifTrue:[ |
156 |
inGenerator do:[:rule | inRules add:rule ]] |
|
157 |
ifFalse:[ |
|
158 |
inGenerator do:[:rule| |
|
159 |
rule flattened do:[:each| |
|
13443
7533db07ff7a
class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents:
11392
diff
changeset
|
160 |
(each name matches: filterS caseSensitive: false) |
11392 | 161 |
ifTrue: [inRules add: each]]]]. |
10001 | 162 |
root := (self |
163 |
listEntryFor:(RBCompositeLintRule rules:inRules name:'Rules')) |
|
164 |
parent:self listHolder; |
|
165 |
expand; |
|
166 |
yourself. |
|
167 |
root children do:[:e | |
|
168 |
e expand |
|
169 |
]. |
|
170 |
self listHolder root:root. |
|
171 |
listValid := true. |
|
172 |
||
173 |
"Created: / 15-04-2010 / 20:39:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
174 |
"Modified: / 16-04-2010 / 09:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
175 |
"Modified: / 25-08-2010 / 11:56:39 / Jan Vrany <enter your email here>" |
|
11392 | 176 |
"Modified: / 08-03-2012 / 03:11:19 / cg" |
10001 | 177 |
! ! |
178 |
||
179 |
!HierarchicalLintRuleList class methodsFor:'documentation'! |
|
180 |
||
181 |
version_CVS |
|
14035
3f81b0beff77
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13443
diff
changeset
|
182 |
^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalLintRuleList.st,v 1.6 2014-02-25 10:42:31 vrany Exp $' |
10001 | 183 |
! |
184 |
||
185 |
version_SVN |
|
14035
3f81b0beff77
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13443
diff
changeset
|
186 |
^ '$Id: Tools__HierarchicalLintRuleList.st,v 1.6 2014-02-25 10:42:31 vrany Exp $' |
10001 | 187 |
! ! |
13443
7533db07ff7a
class: Tools::HierarchicalLintRuleList
Claus Gittinger <cg@exept.de>
parents:
11392
diff
changeset
|
188 |