10008
|
1 |
"
|
10063
|
2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
|
|
3 |
All Rights Reserved
|
10008
|
4 |
|
10063
|
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.
|
10008
|
25 |
"
|
|
26 |
"{ Package: 'stx:libtool' }"
|
|
27 |
|
|
28 |
"{ NameSpace: Tools }"
|
|
29 |
|
|
30 |
ChangeList subclass:#HierarchicalChangeList
|
|
31 |
instanceVariableNames:''
|
|
32 |
classVariableNames:''
|
|
33 |
poolDictionaries:''
|
|
34 |
category:'Interface-Browsers-ChangeSet'
|
|
35 |
!
|
|
36 |
|
|
37 |
!HierarchicalChangeList class methodsFor:'documentation'!
|
|
38 |
|
|
39 |
copyright
|
|
40 |
"
|
10063
|
41 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague
|
|
42 |
All Rights Reserved
|
|
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:
|
10008
|
52 |
|
10063
|
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.
|
10008
|
64 |
"
|
|
65 |
! !
|
|
66 |
|
|
67 |
!HierarchicalChangeList class methodsFor:'interface specs'!
|
|
68 |
|
|
69 |
windowSpec
|
|
70 |
"This resource specification was automatically generated
|
|
71 |
by the UIPainter of ST/X."
|
|
72 |
|
10976
|
73 |
|
10008
|
74 |
"Do not manually edit this!! If it is corrupted,
|
|
75 |
the UIPainter may not be able to read the specification."
|
|
76 |
|
|
77 |
"
|
|
78 |
UIPainter new openOnClass:Tools::HierarchicalChangeList andSelector:#windowSpec
|
|
79 |
Tools::HierarchicalChangeList new openInterface:#windowSpec
|
|
80 |
Tools::HierarchicalChangeList open
|
|
81 |
"
|
|
82 |
|
|
83 |
<resource: #canvas>
|
|
84 |
|
|
85 |
^
|
|
86 |
#(FullSpec
|
|
87 |
name: windowSpec
|
|
88 |
window:
|
|
89 |
(WindowSpec
|
|
90 |
label: 'ChangeList'
|
|
91 |
name: 'ChangeList'
|
|
92 |
min: (Point 10 10)
|
|
93 |
bounds: (Rectangle 0 0 300 300)
|
|
94 |
)
|
|
95 |
component:
|
|
96 |
(SpecCollection
|
|
97 |
collection: (
|
|
98 |
(HierarchicalListViewSpec
|
10447
|
99 |
name: 'List'
|
10008
|
100 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1)
|
|
101 |
model: selectionHolder
|
10447
|
102 |
menu: menuHolder
|
10008
|
103 |
hasHorizontalScrollBar: true
|
|
104 |
hasVerticalScrollBar: true
|
|
105 |
listModel: listHolder
|
|
106 |
multipleSelectOk: true
|
|
107 |
useIndex: false
|
|
108 |
highlightMode: line
|
|
109 |
showLines: false
|
|
110 |
useDefaultIcons: false
|
10940
|
111 |
postBuildCallback: postBuildListView:
|
10008
|
112 |
)
|
10976
|
113 |
(InputFieldSpec
|
|
114 |
name: 'Filter'
|
|
115 |
layout: (LayoutFrame 0 0 0 0 0 1 26 0)
|
|
116 |
initiallyInvisible: true
|
|
117 |
model: filterPatternHolder
|
|
118 |
immediateAccept: true
|
|
119 |
acceptOnLeave: false
|
|
120 |
acceptOnReturn: false
|
|
121 |
acceptOnTab: false
|
|
122 |
acceptOnPointerLeave: false
|
|
123 |
emptyFieldReplacementText: 'Search Filter...'
|
|
124 |
usePreferredHeight: true
|
|
125 |
useDynamicPreferredHeight: true
|
|
126 |
postBuildCallback: postBuildFilterView:
|
|
127 |
)
|
10008
|
128 |
)
|
|
129 |
|
|
130 |
)
|
|
131 |
)
|
10940
|
132 |
|
10976
|
133 |
"Modified: / 20-12-2011 / 10:31:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
134 |
"Modified (format): / 20-12-2011 / 16:20:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10008
|
135 |
! !
|
|
136 |
|
|
137 |
!HierarchicalChangeList methodsFor:'aspects'!
|
|
138 |
|
|
139 |
listHolder
|
|
140 |
"return/create the 'changeList' value holder (automatically generated)"
|
|
141 |
|
|
142 |
listHolder isNil ifTrue:[
|
|
143 |
listHolder := (HierarchicalList new)
|
|
144 |
showRoot:false;
|
|
145 |
application: self;
|
|
146 |
yourself
|
|
147 |
].
|
|
148 |
^ listHolder
|
|
149 |
|
|
150 |
"Created: / 25-07-2009 / 23:34:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
151 |
! !
|
|
152 |
|
13868
|
153 |
!HierarchicalChangeList methodsFor:'event processing'!
|
|
154 |
|
|
155 |
buttonPress:button x:x y:y view:aView
|
|
156 |
|
|
157 |
| itemIndex item |
|
|
158 |
|
|
159 |
button ~= 1 ifTrue:[^aView buttonPress:button x:x y:y].
|
|
160 |
|
|
161 |
itemIndex := aView yVisibleToLineNr:y.
|
|
162 |
itemIndex isNil ifTrue:[^self].
|
|
163 |
itemIndex == 0 ifTrue:[^self].
|
|
164 |
itemIndex > aView list size ifTrue:[^self].
|
|
165 |
item := aView list at: itemIndex.
|
|
166 |
|
|
167 |
((aView left + x) between: (item x) and: ((item x ? 0) + 16))
|
|
168 |
ifFalse:[^aView buttonPress:button x:x y:y].
|
|
169 |
|
|
170 |
item removed: item removed not.
|
|
171 |
aView invalidate
|
|
172 |
|
|
173 |
"Created: / 08-12-2009 / 14:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
174 |
"Modified: / 18-11-2011 / 14:55:41 / cg"
|
|
175 |
"Modified: / 26-07-2012 / 18:21:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
176 |
!
|
|
177 |
|
|
178 |
handlesButtonPress:button inView:aView
|
|
179 |
|
|
180 |
^listView scrolledView == aView
|
|
181 |
|
|
182 |
"Created: / 08-12-2009 / 14:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
183 |
! !
|
|
184 |
|
10008
|
185 |
!HierarchicalChangeList methodsFor:'private'!
|
|
186 |
|
13868
|
187 |
listColumn: columnId visible: visible
|
|
188 |
"Nothing to do here"
|
|
189 |
|
|
190 |
"Created: / 26-07-2012 / 18:42:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
191 |
!
|
|
192 |
|
|
193 |
listColumnHide: columnId
|
|
194 |
"Nothing to do here"
|
|
195 |
|
|
196 |
"Created: / 26-07-2012 / 18:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
197 |
!
|
|
198 |
|
|
199 |
listColumnShow: columnId
|
|
200 |
"Nothing to do here"
|
|
201 |
|
|
202 |
"Created: / 26-07-2012 / 18:43:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
203 |
!
|
|
204 |
|
10008
|
205 |
updateList
|
|
206 |
|inGenerator changeset root|
|
|
207 |
|
|
208 |
inGenerator := self inGeneratorHolder value.
|
|
209 |
changeset := inGenerator ifNil:[ #() ] ifNotNil:[ inGenerator ].
|
10958
|
210 |
root := self listEntryFor: (CompositeChange name:'Change set' changes:changeset).
|
10008
|
211 |
root children do:[:e|e expand].
|
|
212 |
|
|
213 |
self listHolder root:root
|
10958
|
214 |
|
|
215 |
"Modified: / 04-12-2011 / 15:13:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
10008
|
216 |
! !
|
|
217 |
|
|
218 |
!HierarchicalChangeList class methodsFor:'documentation'!
|
|
219 |
|
|
220 |
version_CVS
|
13868
|
221 |
^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalChangeList.st,v 1.8 2014-02-05 19:08:29 cg Exp $'
|
10008
|
222 |
!
|
|
223 |
|
|
224 |
version_SVN
|
13868
|
225 |
^ '$Id: Tools__HierarchicalChangeList.st,v 1.8 2014-02-05 19:08:29 cg Exp $'
|
10008
|
226 |
! !
|
13868
|
227 |
|