author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 18 Apr 2012 21:29:40 +0100 | |
branch | jv |
changeset 12232 | 4d9b62c111fc |
parent 12202 | eaa1f6cb6ce8 |
child 12274 | 1e0599b8a007 |
permissions | -rw-r--r-- |
10192 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
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. |
|
25 |
" |
|
10217 | 26 |
"{ Package: 'stx:libtool' }" |
10192 | 27 |
|
28 |
"{ NameSpace: Tools }" |
|
29 |
||
12125 | 30 |
BrowserListWithFilter subclass:#ChangeSetDiffList |
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
31 |
instanceVariableNames:'listHolder listEntryLabelGenerator listEntryIconGenerator |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
32 |
showVersionMethodDiffsHolder' |
10192 | 33 |
classVariableNames:'' |
34 |
poolDictionaries:'' |
|
35 |
category:'Interface-Diff' |
|
36 |
! |
|
37 |
||
38 |
Object subclass:#ListEntry |
|
39 |
instanceVariableNames:'model application' |
|
40 |
classVariableNames:'' |
|
41 |
poolDictionaries:'' |
|
42 |
privateIn:ChangeSetDiffList |
|
43 |
! |
|
44 |
||
45 |
!ChangeSetDiffList class methodsFor:'documentation'! |
|
46 |
||
47 |
copyright |
|
48 |
" |
|
49 |
Copyright (c) 2007-2010 Jan Vrany |
|
50 |
Copyright (c) 2009-2010 eXept Software AG |
|
51 |
||
52 |
Permission is hereby granted, free of charge, to any person |
|
53 |
obtaining a copy of this software and associated documentation |
|
54 |
files (the 'Software'), to deal in the Software without |
|
55 |
restriction, including without limitation the rights to use, |
|
56 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
57 |
copies of the Software, and to permit persons to whom the |
|
58 |
Software is furnished to do so, subject to the following |
|
59 |
conditions: |
|
60 |
||
61 |
The above copyright notice and this permission notice shall be |
|
62 |
included in all copies or substantial portions of the Software. |
|
63 |
||
64 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
65 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
66 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
67 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
68 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
69 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
70 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
71 |
OTHER DEALINGS IN THE SOFTWARE. |
|
72 |
||
73 |
" |
|
74 |
! ! |
|
75 |
||
76 |
!ChangeSetDiffList class methodsFor:'interface specs'! |
|
77 |
||
78 |
windowSpec |
|
79 |
"This resource specification was automatically generated |
|
80 |
by the UIPainter of ST/X." |
|
81 |
||
82 |
"Do not manually edit this!! If it is corrupted, |
|
83 |
the UIPainter may not be able to read the specification." |
|
84 |
||
85 |
" |
|
12125 | 86 |
UIPainter new openOnClass:Tools::ChangeSetDiffList andSelector:#windowSpec |
87 |
Tools::ChangeSetDiffList new openInterface:#windowSpec |
|
88 |
Tools::ChangeSetDiffList open |
|
10192 | 89 |
" |
90 |
||
91 |
<resource: #canvas> |
|
92 |
||
93 |
^ |
|
94 |
#(FullSpec |
|
95 |
name: windowSpec |
|
96 |
window: |
|
97 |
(WindowSpec |
|
98 |
label: 'Diff List' |
|
99 |
name: 'Diff List' |
|
100 |
min: (Point 10 10) |
|
101 |
bounds: (Rectangle 0 0 300 300) |
|
102 |
) |
|
103 |
component: |
|
104 |
(SpecCollection |
|
105 |
collection: ( |
|
12125 | 106 |
(InputFieldSpec |
107 |
name: 'Filter' |
|
108 |
layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
|
109 |
initiallyInvisible: true |
|
110 |
model: filterPatternHolder |
|
111 |
immediateAccept: true |
|
112 |
acceptOnLeave: false |
|
113 |
acceptOnReturn: false |
|
114 |
acceptOnTab: false |
|
115 |
acceptOnPointerLeave: false |
|
116 |
emptyFieldReplacementText: 'Search Filter...' |
|
117 |
usePreferredHeight: true |
|
118 |
useDynamicPreferredHeight: true |
|
119 |
postBuildCallback: postBuildFilterView: |
|
120 |
) |
|
10192 | 121 |
(SelectionInListModelViewSpec |
122 |
name: 'List' |
|
123 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
124 |
model: selectionHolder |
|
12125 | 125 |
menu: menuHolderWithShowFilter |
10192 | 126 |
hasHorizontalScrollBar: true |
127 |
hasVerticalScrollBar: true |
|
128 |
listModel: listHolder |
|
129 |
multipleSelectOk: true |
|
130 |
useIndex: false |
|
131 |
highlightMode: line |
|
132 |
) |
|
133 |
) |
|
134 |
||
135 |
) |
|
136 |
) |
|
137 |
! ! |
|
138 |
||
139 |
!ChangeSetDiffList class methodsFor:'plugIn spec'! |
|
140 |
||
141 |
aspectSelectors |
|
142 |
"This resource specification was automatically generated |
|
143 |
by the UIPainter of ST/X." |
|
144 |
||
145 |
"Do not manually edit this. If it is corrupted, |
|
146 |
the UIPainter may not be able to read the specification." |
|
147 |
||
148 |
"Return a description of exported aspects; |
|
149 |
these can be connected to aspects of an embedding application |
|
150 |
(if this app is embedded in a subCanvas)." |
|
151 |
||
152 |
^ #( |
|
153 |
#inGeneratorHolder |
|
12125 | 154 |
#listEntryIconGenerator |
155 |
#listEntryLabelGenerator |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10938
diff
changeset
|
156 |
#menuHolder |
12125 | 157 |
#outGeneratorHolder |
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
158 |
#showVersionMethodDiffsHolder |
10192 | 159 |
). |
160 |
||
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
161 |
"Modified: / 18-04-2012 / 19:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10192 | 162 |
! ! |
163 |
||
164 |
!ChangeSetDiffList methodsFor:'accessing'! |
|
165 |
||
166 |
listEntryIconGenerator |
|
167 |
^ listEntryIconGenerator |
|
168 |
! |
|
169 |
||
170 |
listEntryIconGenerator:aBlock |
|
171 |
listEntryIconGenerator := aBlock. |
|
172 |
! |
|
173 |
||
174 |
listEntryLabelGenerator |
|
175 |
^ listEntryLabelGenerator |
|
176 |
! |
|
177 |
||
178 |
listEntryLabelGenerator:aBlock |
|
179 |
listEntryLabelGenerator := aBlock. |
|
180 |
! ! |
|
181 |
||
182 |
!ChangeSetDiffList methodsFor:'aspects'! |
|
183 |
||
184 |
listHolder |
|
185 |
"return/create the 'difflistHolder' value holder (automatically generated)" |
|
186 |
||
187 |
listHolder isNil ifTrue:[ |
|
188 |
listHolder := ValueHolder new. |
|
189 |
]. |
|
190 |
^ listHolder |
|
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
191 |
! |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
192 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
193 |
showVersionMethodDiffsHolder |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
194 |
"return/create the 'showVersionMethodDiffsHolder' value holder (automatically generated)" |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
195 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
196 |
showVersionMethodDiffsHolder isNil ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
197 |
showVersionMethodDiffsHolder := ValueHolder new. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
198 |
showVersionMethodDiffsHolder addDependent:self. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
199 |
]. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
200 |
^ showVersionMethodDiffsHolder |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
201 |
! |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
202 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
203 |
showVersionMethodDiffsHolder:something |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
204 |
"set the 'showVersionMethodDiffsHolder' value holder (automatically generated)" |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
205 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
206 |
|oldValue newValue| |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
207 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
208 |
showVersionMethodDiffsHolder notNil ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
209 |
oldValue := showVersionMethodDiffsHolder value. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
210 |
showVersionMethodDiffsHolder removeDependent:self. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
211 |
]. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
212 |
showVersionMethodDiffsHolder := something. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
213 |
showVersionMethodDiffsHolder notNil ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
214 |
showVersionMethodDiffsHolder addDependent:self. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
215 |
]. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
216 |
newValue := showVersionMethodDiffsHolder value. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
217 |
oldValue ~~ newValue ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
218 |
self update:#value with:newValue from:showVersionMethodDiffsHolder. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
219 |
]. |
10192 | 220 |
! ! |
221 |
||
222 |
!ChangeSetDiffList methodsFor:'change & update'! |
|
223 |
||
224 |
update: aspect with: param from: sender |
|
225 |
||
226 |
aspect == #resolution ifTrue:[^(self componentAt: #List) invalidateRepairNow: true]. |
|
227 |
||
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
228 |
sender == selectionHolder ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
229 |
self selectionChanged. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
230 |
^self. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
231 |
]. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
232 |
sender == showVersionMethodDiffsHolder ifTrue:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
233 |
^self updateList. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
234 |
self. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
235 |
|
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
236 |
]. |
10192 | 237 |
super update: aspect with: param from: sender. |
238 |
||
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
239 |
"Modified: / 18-04-2012 / 18:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10192 | 240 |
! ! |
241 |
||
242 |
!ChangeSetDiffList methodsFor:'generators'! |
|
243 |
||
244 |
makeGenerator |
|
245 |
||
246 |
^Iterator on: |
|
247 |
[:whatToDo| |
|
248 |
self selectionHolder value do: |
|
249 |
[:each|each model do: whatToDo]] |
|
250 |
||
251 |
"Modified: / 26-11-2009 / 17:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
252 |
! ! |
|
253 |
||
254 |
!ChangeSetDiffList methodsFor:'private'! |
|
255 |
||
256 |
listEntryIconFor:aDiffComponent |
|
257 |
|a hasA b hasB hasBase| |
|
258 |
||
259 |
aDiffComponent isDiffSet ifTrue:[ |
|
260 |
^ nil |
|
261 |
]. |
|
262 |
hasA := (a := aDiffComponent versionA) notNil and:[a isMethodRemoveChange not]. |
|
263 |
hasB := (b := aDiffComponent versionB) notNil and:[b isMethodRemoveChange not]. |
|
264 |
hasBase := aDiffComponent versionBase notNil. |
|
265 |
(hasA & hasB & hasBase) ifTrue:[ |
|
10217 | 266 |
^ ToolbarIconLibrary versionABBase12x12 |
10192 | 267 |
]. |
268 |
(hasA & hasB) ifTrue:[ |
|
10217 | 269 |
^ ToolbarIconLibrary versionAB12x12 |
10192 | 270 |
]. |
271 |
(hasA & hasBase) ifTrue:[ |
|
10217 | 272 |
^ ToolbarIconLibrary versionABase12x12 |
10192 | 273 |
]. |
274 |
(hasA) ifTrue:[ |
|
10217 | 275 |
^ ToolbarIconLibrary versionA12x12 |
10192 | 276 |
]. |
277 |
(hasB & hasBase) ifTrue:[ |
|
10217 | 278 |
^ ToolbarIconLibrary versionBBase12x12 |
10192 | 279 |
]. |
280 |
(hasB) ifTrue:[ |
|
10217 | 281 |
^ ToolbarIconLibrary versionB12x12 |
10192 | 282 |
]. |
283 |
^ nil |
|
284 |
||
285 |
"Created: / 21-11-2009 / 21:58:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
286 |
"Modified: / 09-06-2011 / 08:19:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
10217 | 287 |
"Modified: / 06-07-2011 / 16:38:33 / jv" |
10192 | 288 |
! |
289 |
||
290 |
listEntryLabelFor:diff |
|
291 |
||
292 |
^listEntryLabelGenerator |
|
293 |
ifNotNil: [listEntryLabelGenerator value: diff] |
|
294 |
ifNil:[diff name] |
|
295 |
||
296 |
"Modified: / 24-11-2009 / 10:00:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
297 |
! |
|
298 |
||
299 |
makeDependent |
|
300 |
||
301 |
"Nothing to do" |
|
302 |
! |
|
303 |
||
304 |
makeIndependent |
|
305 |
||
306 |
"Nothing to do" |
|
307 |
! |
|
308 |
||
309 |
updateList |
|
310 |
"Superclass Tools::BrowserList says that I am responsible to implement this method" |
|
311 |
||
312 |
| newDiffs newList | |
|
313 |
self listHolder value ? #() do: [:entry|entry model removeDependent: self]. |
|
314 |
||
315 |
newDiffs := self inGeneratorHolder value ? #(). |
|
10246 | 316 |
(newDiffs isKindOf: ChangeSetDiffComponent) ifTrue: |
10192 | 317 |
[newDiffs := newDiffs diffs]. |
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
318 |
showVersionMethodDiffsHolder value ifFalse:[ |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
319 |
newDiffs := newDiffs reject:[:diff|diff isForVersionMethod] |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
320 |
]. |
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
321 |
|
12125 | 322 |
newDiffs := self filterList: newDiffs. |
323 |
newList := OrderedCollection new:16. |
|
10192 | 324 |
newDiffs do: |
325 |
[:item| |
|
326 |
newList add:(ListEntry model: item application: self). |
|
327 |
item addDependent: self]. |
|
10251 | 328 |
|
329 |
newList sort:[:a :b|a label < b label]. |
|
10192 | 330 |
self listHolder value:newList |
331 |
||
10251 | 332 |
"Modified: / 07-07-2011 / 14:17:26 / jv" |
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
333 |
"Modified: / 18-04-2012 / 19:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10192 | 334 |
! ! |
335 |
||
336 |
!ChangeSetDiffList::ListEntry class methodsFor:'instance creation'! |
|
337 |
||
338 |
model: model application: application |
|
339 |
||
340 |
^self new |
|
341 |
model: model; |
|
342 |
application: application |
|
343 |
||
344 |
"Created: / 24-11-2009 / 18:29:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
345 |
! ! |
|
346 |
||
347 |
!ChangeSetDiffList::ListEntry methodsFor:'accessing'! |
|
348 |
||
349 |
application |
|
350 |
^ application |
|
351 |
! |
|
352 |
||
353 |
application:aDiffList |
|
354 |
application := aDiffList. |
|
355 |
! |
|
356 |
||
357 |
icon |
|
358 |
||
359 |
^application |
|
360 |
ifNotNil:[application listEntryIconFor: model] |
|
361 |
ifNil:[nil] |
|
362 |
||
363 |
"Created: / 24-11-2009 / 18:26:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
364 |
! |
|
365 |
||
366 |
label |
|
367 |
||
368 |
^application |
|
369 |
ifNotNil:[application listEntryLabelFor: model] |
|
370 |
ifNil:[model displayString] |
|
371 |
||
372 |
"Created: / 24-11-2009 / 18:26:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
373 |
"Modified: / 26-11-2009 / 17:33:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
374 |
! |
|
375 |
||
376 |
model |
|
377 |
^ model |
|
378 |
! |
|
379 |
||
380 |
model:aDiffComponent |
|
381 |
model := aDiffComponent. |
|
382 |
! ! |
|
383 |
||
384 |
!ChangeSetDiffList::ListEntry methodsFor:'displaying'! |
|
385 |
||
386 |
displayOn: aGC x: x y: y opaque: opaque |
|
387 |
||
12202
eaa1f6cb6ce8
Improvements in merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
388 |
| label icon oldPaint | |
eaa1f6cb6ce8
Improvements in merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
389 |
label := self label. |
12198
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
390 |
((application topApplication askFor:#isMerge) and:[model isMerged not]) ifTrue:[ |
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
391 |
oldPaint := aGC paint. |
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
392 |
aGC paint: TextDiff3Tool colorConflict. |
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
393 |
'!!' displayOn: aGC x: x y:y opaque: opaque. |
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
394 |
aGC paint: oldPaint. |
12202
eaa1f6cb6ce8
Improvements in merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
395 |
label := label asText allBold"/ colorizeAllWith: Color red darker |
12198
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
396 |
]. |
414e7b69ecda
Text/ChangeSet diff improved
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12128
diff
changeset
|
397 |
(icon := self icon) ifNotNil:[icon displayOn: aGC x: x + 10 y: y - icon height opaque: opaque]. |
12202
eaa1f6cb6ce8
Improvements in merge tool
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12198
diff
changeset
|
398 |
label displayOn: aGC x: x + 10 + 16 y:y opaque: opaque |
10192 | 399 |
|
400 |
"Created: / 24-11-2009 / 18:21:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
401 |
! ! |
|
402 |
||
403 |
!ChangeSetDiffList class methodsFor:'documentation'! |
|
404 |
||
405 |
version_CVS |
|
12125 | 406 |
^ '§Header: /cvs/stx/stx/libtool/Tools__ChangeSetDiffList.st,v 1.6 2011/11/30 11:14:53 vrany Exp §' |
10192 | 407 |
! |
408 |
||
409 |
version_SVN |
|
12232
4d9b62c111fc
- Tools::ChangeSetDiffList
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12202
diff
changeset
|
410 |
^ '$Id: Tools__ChangeSetDiffList.st 7981 2012-04-18 20:29:40Z vranyj1 $' |
12125 | 411 |
! ! |