author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 27 Mar 2013 12:24:47 +0000 | |
branch | jv |
changeset 12571 | b2e5fdb702cb |
parent 12431 | 9f0c59c742d5 |
parent 12512 | 072f76033d49 |
child 12650 | e0f607754b9a |
permissions | -rw-r--r-- |
2626 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
11453 | 3 |
All Rights Reserved |
2626 | 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 |
" |
|
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
13 |
|
2221 | 14 |
ApplicationModel subclass:#VersionDiffBrowser |
2856 | 15 |
instanceVariableNames:'classChangeSet diffTextView boxAVisible boxBVisible boxMVisible |
16 |
classIfSingleClassDiff versionAIfSingleClassDiff |
|
3147 | 17 |
versionBIfSingleClassDiff changedLabelHolder diffTextLabelA |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
18 |
diffTextLabelB methodText methodsChanged methodsChangedFiltered |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
19 |
methodsChangedSelection methodsOnlyInA methodsOnlyInAFiltered |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
20 |
methodsOnlyInASelection methodsOnlyInB methodsOnlyInBFiltered |
5182 | 21 |
methodsOnlyInBSelection onlyInALabelHolder onlyInBLabelHolder |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
22 |
classHolder versionAHolder versionBHolder infoHolder |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
23 |
includeExtensionsHolder canIncludeExtensionsHolder |
11958 | 24 |
includeCategoryChangesHolder includeVersionMethodsHolder' |
2221 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
27 |
category:'Interface-Browsers' |
|
28 |
! |
|
29 |
||
2497 | 30 |
HierarchicalItem subclass:#ClassChangeSet |
8891 | 31 |
instanceVariableNames:'classBeingCompared labelA labelB diffSet versionA versionB' |
2497 | 32 |
classVariableNames:'' |
33 |
poolDictionaries:'' |
|
34 |
privateIn:VersionDiffBrowser |
|
35 |
! |
|
36 |
||
2626 | 37 |
!VersionDiffBrowser class methodsFor:'documentation'! |
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
11453 | 42 |
All Rights Reserved |
2626 | 43 |
|
44 |
This software is furnished under a license and may be used |
|
45 |
only in accordance with the terms of that license and with the |
|
46 |
inclusion of the above copyright notice. This software may not |
|
47 |
be provided or otherwise made available to, or used by, any |
|
48 |
other person. No title to or ownership of the software is |
|
49 |
hereby transferred. |
|
50 |
" |
|
51 |
||
52 |
! |
|
53 |
||
54 |
documentation |
|
55 |
" |
|
56 |
This is not yet finished (work in progress). |
|
57 |
||
58 |
A browser to show differences between class versions, |
|
59 |
allowing easy comparison; will also eventually add capabilities |
|
60 |
to checkIn / load classes into / from the repository. |
|
61 |
||
62 |
[see also:] |
|
63 |
||
64 |
[instance variables:] |
|
65 |
||
66 |
[class variables:] |
|
67 |
" |
|
68 |
||
69 |
||
70 |
! ! |
|
2221 | 71 |
|
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
72 |
|
2221 | 73 |
!VersionDiffBrowser class methodsFor:'interface specs'! |
74 |
||
75 |
windowSpec |
|
76 |
"This resource specification was automatically generated |
|
77 |
by the UIPainter of ST/X." |
|
78 |
||
79 |
"Do not manually edit this!! If it is corrupted, |
|
80 |
the UIPainter may not be able to read the specification." |
|
81 |
||
82 |
" |
|
83 |
UIPainter new openOnClass:VersionDiffBrowser andSelector:#windowSpec |
|
84 |
VersionDiffBrowser new openInterface:#windowSpec |
|
85 |
VersionDiffBrowser open |
|
86 |
" |
|
87 |
||
88 |
<resource: #canvas> |
|
89 |
||
11453 | 90 |
^ |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
91 |
#(FullSpec |
11453 | 92 |
name: windowSpec |
93 |
window: |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
94 |
(WindowSpec |
11453 | 95 |
label: 'Version DiffBrowser' |
96 |
name: 'Version DiffBrowser' |
|
97 |
min: (Point 10 10) |
|
98 |
bounds: (Rectangle 0 0 865 504) |
|
99 |
menu: mainMenu |
|
100 |
) |
|
101 |
component: |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
102 |
(SpecCollection |
11453 | 103 |
collection: ( |
104 |
(VariableVerticalPanelSpec |
|
105 |
name: 'VariableVerticalPanel1' |
|
106 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -25 1.0) |
|
107 |
component: |
|
108 |
(SpecCollection |
|
109 |
collection: ( |
|
110 |
(HorizontalPanelViewSpec |
|
111 |
name: 'TopHorizontalPanel' |
|
112 |
horizontalLayout: fit |
|
113 |
verticalLayout: fit |
|
114 |
horizontalSpace: 3 |
|
115 |
verticalSpace: 3 |
|
116 |
component: |
|
117 |
(SpecCollection |
|
118 |
collection: ( |
|
119 |
(ViewSpec |
|
120 |
name: 'BoxA' |
|
121 |
level: 0 |
|
122 |
visibilityChannel: boxAVisible |
|
123 |
component: |
|
124 |
(SpecCollection |
|
125 |
collection: ( |
|
126 |
(LabelSpec |
|
127 |
label: 'Only in A' |
|
128 |
name: 'OnlyInALabel' |
|
129 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
|
130 |
translateLabel: true |
|
131 |
labelChannel: onlyInALabelHolder |
|
132 |
) |
|
133 |
(SequenceViewSpec |
|
134 |
name: 'ListA' |
|
135 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
136 |
model: methodsOnlyInASelection |
|
137 |
menu: menuA |
|
138 |
hasHorizontalScrollBar: true |
|
139 |
hasVerticalScrollBar: true |
|
140 |
miniScrollerHorizontal: true |
|
141 |
doubleClickSelector: methodInADoubleClicked: |
|
142 |
valueChangeSelector: methodsOnlyInASelectionChanged |
|
143 |
useIndex: true |
|
144 |
sequenceList: methodsOnlyInA |
|
145 |
) |
|
146 |
) |
|
147 |
||
148 |
) |
|
149 |
extent: (Point 286 199) |
|
150 |
) |
|
151 |
(ViewSpec |
|
152 |
name: 'BoxM' |
|
153 |
visibilityChannel: boxMVisible |
|
154 |
component: |
|
155 |
(SpecCollection |
|
156 |
collection: ( |
|
157 |
(LabelSpec |
|
158 |
label: 'Changed' |
|
159 |
name: 'ChangedLabel' |
|
160 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
|
161 |
translateLabel: true |
|
162 |
labelChannel: changedLabelHolder |
|
163 |
) |
|
164 |
(SequenceViewSpec |
|
165 |
name: 'ListM' |
|
166 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
167 |
model: methodsChangedSelection |
|
168 |
menu: menuM |
|
169 |
hasHorizontalScrollBar: true |
|
170 |
hasVerticalScrollBar: true |
|
171 |
miniScrollerHorizontal: true |
|
172 |
doubleClickSelector: methodInChangedDoubleClicked: |
|
173 |
valueChangeSelector: methodsChangedSelectionChanged |
|
174 |
useIndex: true |
|
175 |
sequenceList: methodsChanged |
|
176 |
) |
|
177 |
) |
|
178 |
||
179 |
) |
|
180 |
extent: (Point 286 199) |
|
181 |
) |
|
182 |
(ViewSpec |
|
183 |
name: 'BoxB' |
|
184 |
visibilityChannel: boxBVisible |
|
185 |
component: |
|
186 |
(SpecCollection |
|
187 |
collection: ( |
|
188 |
(LabelSpec |
|
189 |
label: 'Only in B' |
|
190 |
name: 'OnlyInBLabel' |
|
191 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
|
192 |
translateLabel: true |
|
193 |
labelChannel: onlyInBLabelHolder |
|
194 |
) |
|
195 |
(SequenceViewSpec |
|
196 |
name: 'ListB' |
|
197 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
|
198 |
model: methodsOnlyInBSelection |
|
199 |
menu: menuB |
|
200 |
hasHorizontalScrollBar: true |
|
201 |
hasVerticalScrollBar: true |
|
202 |
miniScrollerHorizontal: true |
|
203 |
doubleClickSelector: methodInBDoubleClicked: |
|
204 |
valueChangeSelector: methodsOnlyInBSelectionChanged |
|
205 |
useIndex: true |
|
206 |
sequenceList: methodsOnlyInB |
|
207 |
) |
|
208 |
) |
|
209 |
||
210 |
) |
|
211 |
extent: (Point 287 199) |
|
212 |
) |
|
213 |
) |
|
214 |
||
215 |
) |
|
216 |
) |
|
217 |
(ViewSpec |
|
218 |
name: 'Box4' |
|
219 |
component: |
|
220 |
(SpecCollection |
|
221 |
collection: ( |
|
222 |
(ViewSpec |
|
223 |
name: 'diffTextViewBox' |
|
224 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
225 |
initiallyInvisible: true |
|
226 |
component: |
|
227 |
(SpecCollection |
|
228 |
collection: ( |
|
229 |
(LabelSpec |
|
230 |
label: 'A' |
|
231 |
name: 'DiffTextLabelA' |
|
232 |
layout: (LayoutFrame 0 0 0 0 0 0.5 20 0) |
|
233 |
translateLabel: true |
|
234 |
labelChannel: diffTextLabelA |
|
235 |
) |
|
236 |
(LabelSpec |
|
237 |
label: 'B' |
|
238 |
name: 'DiffTextLabelB' |
|
239 |
layout: (LayoutFrame 0 0.5 0 0 0 1 20 0) |
|
240 |
translateLabel: true |
|
241 |
labelChannel: diffTextLabelB |
|
242 |
) |
|
243 |
(ArbitraryComponentSpec |
|
244 |
name: 'diffTextView' |
|
245 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0) |
|
246 |
hasBorder: false |
|
247 |
component: diffTextView |
|
248 |
) |
|
249 |
) |
|
250 |
||
251 |
) |
|
252 |
) |
|
253 |
(CodeViewSpec |
|
254 |
name: 'singleTextView' |
|
255 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
256 |
model: methodText |
|
257 |
hasHorizontalScrollBar: true |
|
258 |
hasVerticalScrollBar: true |
|
259 |
miniScrollerHorizontal: true |
|
260 |
isReadOnly: true |
|
261 |
hasKeyboardFocusInitially: false |
|
262 |
) |
|
263 |
) |
|
264 |
||
265 |
) |
|
266 |
) |
|
267 |
) |
|
268 |
||
269 |
) |
|
270 |
handles: (Any 0.42379958246347 1.0) |
|
271 |
) |
|
272 |
(LabelSpec |
|
273 |
name: 'InfoLabel' |
|
274 |
layout: (LayoutFrame 0 0 -25 1 0 1 0 1) |
|
275 |
level: -1 |
|
276 |
translateLabel: true |
|
277 |
labelChannel: infoHolder |
|
278 |
adjust: left |
|
279 |
) |
|
280 |
) |
|
281 |
||
282 |
) |
|
2221 | 283 |
) |
284 |
! ! |
|
285 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
286 |
|
2221 | 287 |
!VersionDiffBrowser class methodsFor:'menu specs'! |
288 |
||
289 |
mainMenu |
|
290 |
"This resource specification was automatically generated |
|
291 |
by the MenuEditor of ST/X." |
|
292 |
||
293 |
"Do not manually edit this!! If it is corrupted, |
|
294 |
the MenuEditor may not be able to read the specification." |
|
295 |
||
10703 | 296 |
|
2221 | 297 |
" |
298 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#mainMenu |
|
299 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser mainMenu)) startUp |
|
300 |
" |
|
301 |
||
302 |
<resource: #menu> |
|
303 |
||
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
304 |
^ |
7419
e4e108674fe6
conditionalRight in startGroup
Claus Gittinger <cg@exept.de>
parents:
7396
diff
changeset
|
305 |
#(Menu |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
306 |
( |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
307 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
308 |
label: 'File' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
309 |
submenu: |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
310 |
(Menu |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
311 |
( |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
312 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
313 |
label: 'Create PatchFile...' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
314 |
itemValue: createPatchFile |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
315 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
316 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
317 |
label: '-' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
318 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
319 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
320 |
label: 'Exit' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
321 |
itemValue: closeRequest |
11853
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
322 |
) |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
323 |
) |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
324 |
nil |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
325 |
nil |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
326 |
) |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
327 |
) |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
328 |
(MenuItem |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
329 |
label: 'Class' |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
330 |
submenu: |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
331 |
(Menu |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
332 |
( |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
333 |
(MenuItem |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
334 |
label: 'Remove from Changeset' |
fe611dbb05ca
added: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11596
diff
changeset
|
335 |
itemValue: removeClassFromChangeSet |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
336 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
337 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
338 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
339 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
340 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
341 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
342 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
343 |
label: 'View' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
344 |
submenu: |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
345 |
(Menu |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
346 |
( |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
347 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
348 |
enabled: canIncludeExtensionsHolder |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
349 |
label: 'Include Extensions' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
350 |
itemValue: includeExtensions: |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
351 |
indication: includeExtensionsHolder |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
352 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
353 |
(MenuItem |
11958 | 354 |
enabled: canIncludeExtensionsHolder |
355 |
label: 'Include Version Methods' |
|
356 |
itemValue: includeVersionMethods: |
|
357 |
indication: includeVersionMethodsHolder |
|
358 |
) |
|
359 |
(MenuItem |
|
360 |
label: '-' |
|
361 |
) |
|
362 |
(MenuItem |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
363 |
label: 'Include Category Changes' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
364 |
itemValue: includeCategoryChanges: |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
365 |
indication: includeCategoryChangesHolder |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
366 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
367 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
368 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
369 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
370 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
371 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
372 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
373 |
label: 'Help' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
374 |
startGroup: conditionalRight |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
375 |
submenu: |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
376 |
(Menu |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
377 |
( |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
378 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
379 |
label: 'Documentation' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
380 |
itemValue: openDocumentation |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
381 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
382 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
383 |
label: '-' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
384 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
385 |
(MenuItem |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
386 |
label: 'About this Application...' |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
387 |
itemValue: openAboutThisApplication |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
388 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
389 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
390 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
391 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
392 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
393 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
394 |
) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
395 |
nil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
396 |
nil |
2221 | 397 |
) |
398 |
! |
|
399 |
||
400 |
menuA |
|
401 |
"This resource specification was automatically generated |
|
402 |
by the MenuEditor of ST/X." |
|
403 |
||
404 |
"Do not manually edit this!! If it is corrupted, |
|
405 |
the MenuEditor may not be able to read the specification." |
|
406 |
||
407 |
" |
|
408 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
409 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
410 |
" |
|
411 |
||
412 |
<resource: #menu> |
|
413 |
||
11453 | 414 |
^ |
2221 | 415 |
#(#Menu |
11453 | 416 |
#( |
417 |
#(#MenuItem |
|
418 |
#label: 'Apply' |
|
419 |
#translateLabel: true |
|
420 |
#value: #applySelectedChangeInA |
|
421 |
#enabled: #hasChangeSelectedInA |
|
422 |
) |
|
423 |
#(#MenuItem |
|
424 |
#label: 'Browse' |
|
425 |
#translateLabel: true |
|
426 |
#value: #browseClassInA |
|
427 |
#enabled: #hasChangeSelectedInA |
|
428 |
) |
|
429 |
#(#MenuItem |
|
430 |
#label: '-' |
|
431 |
) |
|
432 |
#(#MenuItem |
|
433 |
#label: 'Inspect' |
|
434 |
#translateLabel: true |
|
435 |
#value: #inspectSelectedChangeInA |
|
436 |
#choiceValue: 'nil "UndefinedObject" ' |
|
437 |
#enabled: #hasChangeSelectedInA |
|
438 |
) |
|
439 |
) |
|
440 |
nil |
|
441 |
nil |
|
2221 | 442 |
) |
443 |
! |
|
444 |
||
445 |
menuB |
|
446 |
"This resource specification was automatically generated |
|
447 |
by the MenuEditor of ST/X." |
|
448 |
||
449 |
"Do not manually edit this!! If it is corrupted, |
|
450 |
the MenuEditor may not be able to read the specification." |
|
451 |
||
452 |
" |
|
453 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menuB |
|
454 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menuB)) startUp |
|
455 |
" |
|
456 |
||
457 |
<resource: #menu> |
|
458 |
||
11453 | 459 |
^ |
2221 | 460 |
#(#Menu |
11453 | 461 |
#( |
462 |
#(#MenuItem |
|
463 |
#label: 'Apply' |
|
464 |
#translateLabel: true |
|
465 |
#value: #applySelectedChangeInB |
|
466 |
#enabled: #hasChangeSelectedInB |
|
467 |
) |
|
468 |
#(#MenuItem |
|
469 |
#label: 'Browse' |
|
470 |
#translateLabel: true |
|
471 |
#value: #browseClassInB |
|
472 |
#enabled: #hasChangeSelectedInB |
|
473 |
) |
|
474 |
#(#MenuItem |
|
475 |
#label: '-' |
|
476 |
) |
|
477 |
#(#MenuItem |
|
478 |
#label: 'Remove in Image' |
|
479 |
#translateLabel: true |
|
480 |
#value: #removeSelectedChangeInBFromImage |
|
481 |
#enabled: #hasChangeSelectedInB |
|
482 |
) |
|
483 |
#(#MenuItem |
|
484 |
#label: '-' |
|
485 |
) |
|
486 |
#(#MenuItem |
|
487 |
#label: 'Inspect' |
|
488 |
#translateLabel: true |
|
489 |
#value: #inspectSelectedChangeInB |
|
490 |
#choiceValue: 'nil "UndefinedObject" ' |
|
491 |
#enabled: #hasChangeSelectedInB |
|
492 |
) |
|
493 |
) |
|
494 |
nil |
|
495 |
nil |
|
2221 | 496 |
) |
9550
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
497 |
|
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
498 |
"Modified: / 15-08-2010 / 21:24:49 / cg" |
2221 | 499 |
! |
500 |
||
501 |
menuM |
|
502 |
"This resource specification was automatically generated |
|
503 |
by the MenuEditor of ST/X." |
|
504 |
||
505 |
"Do not manually edit this!! If it is corrupted, |
|
506 |
the MenuEditor may not be able to read the specification." |
|
507 |
||
508 |
" |
|
509 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
510 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
511 |
" |
|
512 |
||
513 |
<resource: #menu> |
|
514 |
||
11453 | 515 |
^ |
2221 | 516 |
#(#Menu |
11453 | 517 |
#( |
518 |
#(#MenuItem |
|
519 |
#label: 'Browse' |
|
520 |
#translateLabel: true |
|
521 |
#value: #browseClassInM |
|
522 |
#enabled: #hasChangeSelectedInM |
|
523 |
) |
|
524 |
#(#MenuItem |
|
525 |
#label: '-' |
|
526 |
) |
|
527 |
#(#MenuItem |
|
528 |
#label: 'Apply Left Version' |
|
529 |
#translateLabel: true |
|
530 |
#value: #acceptInLeftView |
|
531 |
#enabled: #hasChangeSelectedInM |
|
532 |
) |
|
533 |
#(#MenuItem |
|
534 |
#label: 'Apply Right Version' |
|
535 |
#translateLabel: true |
|
536 |
#value: #acceptInRightView |
|
537 |
#enabled: #hasChangeSelectedInM |
|
538 |
) |
|
539 |
#(#MenuItem |
|
540 |
#label: '-' |
|
541 |
) |
|
542 |
#(#MenuItem |
|
543 |
#label: 'Inspect both' |
|
544 |
#translateLabel: true |
|
545 |
#value: #inspectSelectedChangeInM |
|
546 |
#choiceValue: 'nil "UndefinedObject" ' |
|
547 |
#enabled: #hasChangeSelectedInM |
|
548 |
) |
|
549 |
) |
|
550 |
nil |
|
551 |
nil |
|
2221 | 552 |
) |
7833 | 553 |
|
554 |
"Modified: / 31-08-2007 / 14:16:39 / cg" |
|
2221 | 555 |
! ! |
556 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
557 |
|
2695 | 558 |
!VersionDiffBrowser class methodsFor:'plugIn spec'! |
559 |
||
560 |
aspectSelectors |
|
561 |
"This resource specification was automatically generated |
|
562 |
by the UIPainter of ST/X." |
|
563 |
||
564 |
"Do not manually edit this. If it is corrupted, |
|
565 |
the UIPainter may not be able to read the specification." |
|
566 |
||
567 |
"Return a description of exported aspects; |
|
568 |
these can be connected to aspects of an embedding application |
|
569 |
(if this app is embedded in a subCanvas)." |
|
570 |
||
571 |
^ #( |
|
11453 | 572 |
#changedLabelHolder |
573 |
#onlyInALabelHolder |
|
574 |
#onlyInBLabelHolder |
|
2695 | 575 |
). |
576 |
||
577 |
! ! |
|
578 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
579 |
|
2221 | 580 |
!VersionDiffBrowser class methodsFor:'startup'! |
581 |
||
11453 | 582 |
openOnClass:aClass againstVersion:aVersionA |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
583 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
584 |
browser. The class diff set is generated from aClasses current against some version |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
585 |
via the source code manager." |
2507 | 586 |
|
2497 | 587 |
|theBrowser| |
2224 | 588 |
|
2497 | 589 |
theBrowser := self new. |
590 |
theBrowser allButOpen. |
|
2695 | 591 |
theBrowser setupForClass:aClass againstVersion:aVersionA. |
2497 | 592 |
theBrowser openWindow. |
593 |
^ theBrowser. |
|
2224 | 594 |
|
2695 | 595 |
" |
596 |
self openOnClass:Array againstVersion:'1.116' |
|
597 |
self openOnClass:Array againstVersion:nil - against the version on which Array is based upon |
|
598 |
self openOnClass:Array againstVersion:#newest - against the newest repository version |
|
599 |
||
600 |
self openOnClass:VersionDiffBrowser againstVersion:nil |
|
601 |
self openOnClass:VersionDiffBrowser againstVersion:#newest |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
602 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
603 |
(self openOnClass:ByteArray againstVersion:'1.116') includeExtensionsHolder value:true |
2695 | 604 |
" |
605 |
! |
|
606 |
||
11453 | 607 |
openOnClass:classA labelA:aLabelA andClass:classB labelB:aLabelB title:ignoredTitle |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
608 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
609 |
browser. The class diff set is generated from two classes." |
2949 | 610 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
611 |
^ self |
11453 | 612 |
openOnClass:classA labelA:aLabelA |
613 |
andClass:classB labelB:aLabelB |
|
614 |
title:ignoredTitle ifSame:nil |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
615 |
|
3147 | 616 |
" |
11453 | 617 |
self |
618 |
openOnClass:Array labelA:'Array' |
|
619 |
andClass:Collection labelB:'Collection' |
|
620 |
title:'Array vs. Collection' |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
621 |
" |
2949 | 622 |
! |
623 |
||
624 |
openOnClass:classA labelA:aLabelA andClass:classB labelB:aLabelB title:ignoredTitle ifSame:sameAction |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
625 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
626 |
browser. The class diff set is generated from two classes." |
2949 | 627 |
|
8891 | 628 |
|classChangeSet| |
2949 | 629 |
|
8891 | 630 |
classChangeSet := ClassChangeSet newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB. |
631 |
classChangeSet removeAllVersionMethods. |
|
2949 | 632 |
sameAction notNil ifTrue:[ |
11453 | 633 |
"/ check if same ... |
634 |
(classChangeSet methodsOnlyInA isEmpty |
|
635 |
and:[classChangeSet methodsOnlyInB isEmpty |
|
636 |
and:[classChangeSet diffSet isEmpty]]) ifTrue:[ |
|
637 |
sameAction value. |
|
638 |
^ self "/ do not open |
|
639 |
] |
|
2949 | 640 |
]. |
8891 | 641 |
|
642 |
^ self openOnClassChangeSet:classChangeSet title:ignoredTitle |
|
2949 | 643 |
! |
644 |
||
11453 | 645 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
646 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
647 |
browser. The class diff set is generated from two source files." |
2695 | 648 |
|
2716
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
649 |
^ self |
11453 | 650 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
651 |
title:nil |
|
2716
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
652 |
! |
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
653 |
|
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
654 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB title:ignoredTitle |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
655 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
656 |
browser. The class diff set is generated from two source files." |
2716
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
657 |
|
11453 | 658 |
^ self |
659 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA |
|
660 |
labelB:aLabelB sourceB:aSourceB |
|
661 |
title:ignoredTitle ifSame:nil |
|
2849 | 662 |
! |
663 |
||
664 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB title:ignoredTitle ifSame:sameAction |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
665 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
666 |
browser. The class diff set is generated from two source files." |
8891 | 667 |
|
668 |
|diffs hasChangedMethods classChangeSet versionMethodChanges| |
|
2695 | 669 |
|
8891 | 670 |
classChangeSet := ClassChangeSet newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB. |
671 |
classChangeSet removeAllVersionMethods. |
|
2849 | 672 |
sameAction notNil ifTrue:[ |
11453 | 673 |
"/ check if same ... |
674 |
(classChangeSet methodsOnlyInA isEmpty |
|
675 |
and:[classChangeSet methodsOnlyInB isEmpty]) ifTrue:[ |
|
676 |
diffs := classChangeSet diffSet. |
|
3853
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
677 |
|
11453 | 678 |
hasChangedMethods := diffs changed notEmpty. |
679 |
hasChangedMethods ifTrue:[ |
|
680 |
versionMethodChanges := diffs changed select:[:eachDifference | |
|
681 |
|eachChange| |
|
682 |
eachChange := eachDifference first. |
|
683 |
(eachChange isMethodChange |
|
684 |
and:[ (AbstractSourceCodeManager isVersionMethodSelector:eachChange selector) |
|
685 |
and:[ eachChange changeClass isMeta ]]). |
|
686 |
]. |
|
687 |
diffs changed size == versionMethodChanges size ifTrue: [ |
|
688 |
hasChangedMethods := false. |
|
689 |
]. |
|
8811
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
690 |
"/ diffs changed size == 1 ifTrue:[ |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
691 |
"/ theOnlyDifference := diffs changed first. |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
692 |
"/ theOnlyChange := theOnlyDifference first. |
11453 | 693 |
"/ (theOnlyChange isMethodChange |
8811
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
694 |
"/ and:[ ((theOnlyChange selector == #version) or:[theOnlyChange selector startsWith:'version_']) |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
695 |
"/ and:[ theOnlyChange changeClass isMeta ]]) ifTrue:[ |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
696 |
"/ hasChangedMethods := false |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
697 |
"/ ] |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
698 |
"/ ] |
11453 | 699 |
]. |
3853
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
700 |
|
11453 | 701 |
(hasChangedMethods not |
702 |
and:[diffs onlyInArg isEmpty |
|
703 |
and:[diffs onlyInReceiver isEmpty]]) ifTrue:[ |
|
704 |
sameAction value. |
|
705 |
^ self "/ do not open |
|
706 |
]. |
|
707 |
] |
|
2849 | 708 |
]. |
8891 | 709 |
|
710 |
^ self openOnClassChangeSet:classChangeSet title:ignoredTitle |
|
7396 | 711 |
|
712 |
"Modified: / 13-10-2006 / 01:01:05 / cg" |
|
2224 | 713 |
! |
714 |
||
2497 | 715 |
openOnClass:aClass versionA:aVersionA versionB:aVersionB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
716 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
717 |
browser. The class diff set is generated from two versions of aClass via |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
718 |
the source code manager." |
2507 | 719 |
|
2497 | 720 |
|theBrowser| |
2221 | 721 |
|
2497 | 722 |
theBrowser := self new. |
723 |
theBrowser allButOpen. |
|
2695 | 724 |
theBrowser setupForClass:aClass versionA:aVersionA versionB:aVersionB. |
2497 | 725 |
theBrowser openWindow. |
726 |
^ theBrowser. |
|
2221 | 727 |
|
728 |
" |
|
729 |
self openOnClass:Array versionA:'1.116' versionB:'1.113' |
|
730 |
" |
|
3678 | 731 |
! |
732 |
||
8891 | 733 |
openOnClassChangeSet:classChangeSet title:ignoredTitle |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
734 |
"create a VersionDiffBrowser instance and set the class change set of the |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
735 |
browser. The class diff set is generated from two classes." |
8891 | 736 |
|
737 |
|theBrowser| |
|
738 |
||
739 |
theBrowser := self new. |
|
740 |
theBrowser allButOpen. |
|
741 |
theBrowser classChangeSet:classChangeSet. |
|
742 |
theBrowser openWindow. |
|
743 |
^ theBrowser. |
|
744 |
! |
|
745 |
||
3678 | 746 |
openOnDiffSet:diffSet labelA:aLabelA labelB:aLabelB title:ignoredTitle |
10691 | 747 |
^ self |
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
748 |
openOnDiffSet:diffSet |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
749 |
labelA:aLabelA labelB:aLabelB |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
750 |
title:ignoredTitle |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
751 |
ignoreExtensions:false |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
752 |
ignoreVersionMethods:false |
10691 | 753 |
|
754 |
"Modified: / 12-09-2011 / 11:52:44 / cg" |
|
755 |
! |
|
756 |
||
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
757 |
openOnDiffSet:diffSet labelA:aLabelA labelB:aLabelB title:ignoredTitle ignoreExtensions:ignoreExtensionsBoolean |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
758 |
^ self |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
759 |
openOnDiffSet:diffSet |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
760 |
labelA:aLabelA labelB:aLabelB |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
761 |
title:ignoredTitle |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
762 |
ignoreExtensions:ignoreExtensionsBoolean |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
763 |
ignoreVersionMethods:false |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
764 |
! |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
765 |
|
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
766 |
openOnDiffSet:diffSet labelA:aLabelA labelB:aLabelB title:ignoredTitle ignoreExtensions:ignoreExtensionsBoolean ignoreVersionMethods:ignoreVersionMethodsBoolean |
3678 | 767 |
|theBrowser| |
768 |
||
769 |
theBrowser := self new. |
|
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
770 |
theBrowser ignoreExtensions:ignoreExtensionsBoolean. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
771 |
theBrowser ignoreVersionMethods:ignoreVersionMethodsBoolean. |
3678 | 772 |
theBrowser allButOpen. |
773 |
theBrowser setupForDiffSet:diffSet labelA:aLabelA labelB:aLabelB. |
|
774 |
theBrowser window label:ignoredTitle. |
|
775 |
theBrowser openWindow. |
|
776 |
^ theBrowser. |
|
10691 | 777 |
|
778 |
"Created: / 12-09-2011 / 11:50:18 / cg" |
|
5520 | 779 |
! |
780 |
||
781 |
openOnDiffsBetweenFile:file1 and:file2 |
|
782 |
|set1 set2 diffset theBrowser| |
|
783 |
||
784 |
set1 := ChangeSet fromFile:file1. |
|
785 |
set2 := ChangeSet fromFile:file2. |
|
786 |
diffset := set1 diffSetsAgainst:set2. |
|
787 |
||
788 |
theBrowser := self new. |
|
789 |
theBrowser allButOpen. |
|
790 |
theBrowser setupForDiffSet:diffset labelA:file1 asFilename baseName labelB:file2 asFilename baseName. |
|
791 |
theBrowser window label:('%1 vs. %2' bindWith:file1 asFilename baseName with:file2 asFilename baseName). |
|
792 |
theBrowser openWindow. |
|
793 |
^ theBrowser. |
|
794 |
||
795 |
" |
|
11453 | 796 |
VersionDiffBrowser |
797 |
openOnDiffsBetweenFile:'/phys/exept/tmp/ws/Workflow::BlockDescription.st' |
|
798 |
and:'/phys/exept/tmp/workflowClasses/Workflow::BlockDescription.st' |
|
5520 | 799 |
" |
2221 | 800 |
! ! |
801 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
802 |
|
2221 | 803 |
!VersionDiffBrowser methodsFor:'accessing'! |
804 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
805 |
canIncludeExtensions:something |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
806 |
self canIncludeExtensionsHolder value:something. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
807 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
808 |
|
2497 | 809 |
changeSetA |
3147 | 810 |
" |
811 |
gets the change set which contains only the new methods |
|
812 |
in versionA of the class |
|
2221 | 813 |
|
3147 | 814 |
<return: ChangeSet> |
815 |
" |
|
2221 | 816 |
|
2497 | 817 |
^ self classChangeSet methodsOnlyInA |
2221 | 818 |
! |
819 |
||
2497 | 820 |
changeSetB |
3147 | 821 |
" |
822 |
gets the change set which contains only the new methods |
|
823 |
in versionB of the class |
|
2497 | 824 |
|
3147 | 825 |
<return: ChangeSet> |
826 |
" |
|
2497 | 827 |
|
828 |
^ self classChangeSet methodsOnlyInB |
|
829 |
! |
|
830 |
||
2856 | 831 |
class:aClass versionA:revA versionB:revB |
832 |
classIfSingleClassDiff := aClass. |
|
833 |
versionAIfSingleClassDiff := revA. |
|
834 |
versionBIfSingleClassDiff := revB. |
|
835 |
! |
|
836 |
||
2497 | 837 |
classBeingCompared |
3147 | 838 |
" |
839 |
gets the class from the change set which is compared. |
|
2224 | 840 |
|
3147 | 841 |
<return: Class> |
11453 | 842 |
" |
2497 | 843 |
^ self classChangeSet classBeingCompared |
844 |
! |
|
845 |
||
846 |
classChangeSet |
|
11453 | 847 |
"returns the class change set which is the model of the version diff browser." |
2224 | 848 |
|
2507 | 849 |
^ classChangeSet |
850 |
! |
|
2497 | 851 |
|
2507 | 852 |
classChangeSet:aClassChangeSet |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
853 |
"sets the class change set which is the model of the version diff browser. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
854 |
The labels, the lists, the visibility and the selection of the lists must be reseted |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
855 |
when a new change set is given." |
2497 | 856 |
|
2507 | 857 |
classChangeSet := aClassChangeSet. |
2501 | 858 |
self updateLabels. |
859 |
self updateLists. |
|
860 |
self resetSelectionHolders. |
|
861 |
! |
|
2224 | 862 |
|
10691 | 863 |
ignoreExtensions |
864 |
"if true, extension methods are suppressed. |
|
865 |
Ignoring is useful when comparing for baseClass checkin, |
|
866 |
as opposed to extension-checking, where extensions should not be ignored. |
|
867 |
the default is false" |
|
868 |
||
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
869 |
^ self includeExtensions not |
10691 | 870 |
|
871 |
"Created: / 12-09-2011 / 11:54:11 / cg" |
|
872 |
! |
|
873 |
||
874 |
ignoreExtensions:aBoolean |
|
875 |
"if true, extension methods are suppressed. |
|
876 |
Ignoring is useful when comparing for baseClass checkin, |
|
877 |
as opposed to extension-checking, where extensions should not be ignored. |
|
878 |
the default is false" |
|
879 |
||
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
880 |
self includeExtensions:aBoolean not |
10691 | 881 |
|
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
882 |
"Modified: / 06-03-2012 / 15:37:32 / cg" |
10691 | 883 |
! |
884 |
||
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
885 |
ignoreVersionMethods:aBoolean |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
886 |
"if true, version methods (version and version_XXX) are suppressed. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
887 |
Ignoring is useful when comparing for real code changes. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
888 |
the default is false" |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
889 |
|
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
890 |
self includeVersionMethods:aBoolean not |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
891 |
|
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
892 |
"Modified: / 06-03-2012 / 15:37:32 / cg" |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
893 |
! |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
894 |
|
2507 | 895 |
selectedChangeInA |
3147 | 896 |
" |
897 |
gets the selected method change for the 'method only in version A'. |
|
2507 | 898 |
|
3147 | 899 |
<return: MethodChange | nil> |
900 |
" |
|
11962 | 901 |
|selIndex change| |
902 |
||
903 |
selIndex := self methodsOnlyInASelection value. |
|
904 |
selIndex notNil ifTrue:[ |
|
905 |
change := methodsOnlyInAFiltered "self changeSetA" at:selIndex. |
|
2507 | 906 |
]. |
3753 | 907 |
^ change |
2507 | 908 |
! |
909 |
||
910 |
selectedChangeInB |
|
3147 | 911 |
" |
912 |
gets the selected method change for the 'method only in version B'. |
|
2507 | 913 |
|
3147 | 914 |
<return: MethodChange | nil> |
915 |
" |
|
11962 | 916 |
|selIndex change| |
917 |
||
918 |
selIndex := self methodsOnlyInBSelection value. |
|
919 |
selIndex notNil ifTrue:[ |
|
920 |
change := methodsOnlyInBFiltered "self changeSetB" at:selIndex. |
|
2507 | 921 |
]. |
3753 | 922 |
^ change |
2507 | 923 |
! |
924 |
||
925 |
selectedChangesInM |
|
3147 | 926 |
" |
927 |
get the two method changes for the selected 'changed method'. |
|
2507 | 928 |
|
3147 | 929 |
<return: <Array with:MethodChange with:MethodChange | nil>> |
930 |
" |
|
11962 | 931 |
|selIndex theTwoChanges| |
932 |
||
933 |
selIndex := self methodsChangedSelection value. |
|
934 |
selIndex notNil ifTrue:[ |
|
935 |
theTwoChanges := methodsChangedFiltered "self classChangeSet methodsChanged" at:selIndex. |
|
936 |
^ theTwoChanges. |
|
2507 | 937 |
]. |
3753 | 938 |
^ #(nil nil) |
2507 | 939 |
! |
940 |
||
2221 | 941 |
versionA |
3147 | 942 |
" |
943 |
gets the first class version to be compared |
|
2221 | 944 |
|
3147 | 945 |
<return: String> |
946 |
" |
|
2731 | 947 |
classChangeSet isNil ifTrue:[^ 'A']. |
948 |
^ classChangeSet labelA |
|
2221 | 949 |
! |
950 |
||
951 |
versionB |
|
3147 | 952 |
" |
953 |
gets the second class version to be compared |
|
2221 | 954 |
|
3147 | 955 |
<return: String> |
956 |
" |
|
2731 | 957 |
classChangeSet isNil ifTrue:[^ 'B']. |
958 |
^ classChangeSet labelB |
|
2221 | 959 |
! ! |
960 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
961 |
|
2221 | 962 |
!VersionDiffBrowser methodsFor:'actions'! |
963 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
964 |
acceptInLeftView |
11453 | 965 |
|change| |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
966 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
967 |
change := self selectedChangesInM first. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
968 |
self applyChange:change |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
969 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
970 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
971 |
acceptInRightView |
11453 | 972 |
|change| |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
973 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
974 |
change := self selectedChangesInM second. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
975 |
self applyChange:change |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
976 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
977 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
978 |
acceptInSingleView |
11453 | 979 |
|change| |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
980 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
981 |
change := self selectedChangeInA. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
982 |
change isNil ifTrue:[ |
11453 | 983 |
change := self selectedChangeInB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
984 |
]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
985 |
self applyChange:change |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
986 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
987 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
988 |
applySelectedChangeInA |
11453 | 989 |
self applyChange:(self selectedChangeInA) |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
990 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
991 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
992 |
applySelectedChangeInB |
11453 | 993 |
self applyChange:(self selectedChangeInB) |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
994 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
995 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
996 |
methodInADoubleClicked:index |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
997 |
"/ |change| |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
998 |
"/ |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
999 |
"/ change := self changeSetA at:index. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1000 |
"/ self browseChange:change |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1001 |
self browseClassInA |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1002 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1003 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1004 |
methodInBDoubleClicked:index |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1005 |
"/ |change| |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1006 |
"/ |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1007 |
"/ change := self changeSetB at:index. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1008 |
"/ self browseChange:change |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1009 |
self browseClassInB |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1010 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1011 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1012 |
methodInChangedDoubleClicked:index |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1013 |
self browseClassInM. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1014 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1015 |
|
2221 | 1016 |
methodsChangedSelectionChanged |
3147 | 1017 |
" |
1018 |
the selection in the list of the 'changed methods' changed. |
|
1019 |
Reset the selection of the two other lists and calc the method change. |
|
2507 | 1020 |
|
3147 | 1021 |
<return: self> |
1022 |
" |
|
8602 | 1023 |
|sel changeA changeB methodsChanged parseError treeA treeB| |
1024 |
||
1025 |
self infoHolder value:''. |
|
2221 | 1026 |
|
1027 |
sel := self methodsChangedSelection value. |
|
1028 |
sel notNil ifTrue:[ |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1029 |
self methodsOnlyInASelection value:nil. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1030 |
self methodsOnlyInBSelection value:nil. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1031 |
methodsChanged := self classChangeSet methodsChanged. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1032 |
changeA := (methodsChangedFiltered at:sel) first. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1033 |
changeB := (methodsChangedFiltered at:sel) second. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1034 |
self withReadCursorDo:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1035 |
"/ see if the semantics have changed (or only prettyPrinted) |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1036 |
RBParser notNil ifTrue:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1037 |
(classChangeSet notNil |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1038 |
and:[ classChangeSet classBeingCompared notNil ]) ifTrue:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1039 |
parseError := false. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1040 |
treeA := RBParser parseMethod:changeA source onError: [:str :pos | parseError := true]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1041 |
treeB := RBParser parseMethod:changeB source onError: [:str :pos | parseError := true]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1042 |
parseError ifFalse:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1043 |
(treeA equalTo:treeB withMapping:(Dictionary new)) ifTrue:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1044 |
self infoHolder value:'Methods only differ in formatting / comments.'. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1045 |
] |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1046 |
] |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1047 |
]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1048 |
]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1049 |
self diffTextView |
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1050 |
text1:(changeA prettyPrintedSource) |
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1051 |
text2:(changeB prettyPrintedSource) |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1052 |
]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1053 |
self showDiffTextView. |
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1054 |
self diffTextView moveToNextChanged |
2221 | 1055 |
] |
2377 | 1056 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1057 |
"Modified: / 03-09-1999 / 15:01:30 / ps" |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1058 |
"Modified: / 17-07-2012 / 18:27:06 / cg" |
2221 | 1059 |
! |
1060 |
||
9550
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1061 |
removeSelectedChangeInBFromImage |
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1062 |
|change cls sel op| |
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1063 |
|
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1064 |
change := self selectedChangeInB. |
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1065 |
change isMethodChange ifTrue:[ |
11453 | 1066 |
(cls := change changeClass) notNil ifTrue:[ |
1067 |
(sel := change selector) notNil ifTrue:[ |
|
1068 |
RefactoryChangeManager notNil ifTrue:[ |
|
1069 |
op := RemoveMethodChange remove:sel from:cls. |
|
1070 |
RefactoryChangeManager performChange: op. |
|
1071 |
] ifFalse:[ |
|
1072 |
cls removeSelector:sel |
|
1073 |
] |
|
1074 |
] |
|
1075 |
] |
|
9550
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1076 |
] |
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1077 |
|
531c77d5d3e3
added: #removeSelectedChangeInBFromImage
Claus Gittinger <cg@exept.de>
parents:
9383
diff
changeset
|
1078 |
"Modified: / 15-08-2010 / 21:35:00 / cg" |
2221 | 1079 |
! ! |
1080 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1081 |
|
2221 | 1082 |
!VersionDiffBrowser methodsFor:'aspects'! |
1083 |
||
2585 | 1084 |
boxAVisible |
2745 | 1085 |
boxAVisible isNil ifTrue:[ |
11453 | 1086 |
boxAVisible := true asValue. |
2585 | 1087 |
]. |
2745 | 1088 |
^ boxAVisible. |
2585 | 1089 |
! |
1090 |
||
1091 |
boxBVisible |
|
2745 | 1092 |
boxBVisible isNil ifTrue:[ |
11453 | 1093 |
boxBVisible := true asValue. |
2585 | 1094 |
]. |
2745 | 1095 |
^ boxBVisible. |
2585 | 1096 |
! |
1097 |
||
1098 |
boxMVisible |
|
2745 | 1099 |
boxMVisible isNil ifTrue:[ |
11453 | 1100 |
boxMVisible := true asValue. |
2585 | 1101 |
]. |
2745 | 1102 |
^ boxMVisible. |
2585 | 1103 |
! |
1104 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1105 |
canIncludeExtensionsHolder |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1106 |
"can include extensions ? (menu item enabler)" |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1107 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1108 |
canIncludeExtensionsHolder isNil ifTrue:[ |
11453 | 1109 |
canIncludeExtensionsHolder := true asValue. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1110 |
]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1111 |
^ canIncludeExtensionsHolder. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1112 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1113 |
|
2221 | 1114 |
changedLabelHolder |
3147 | 1115 |
" |
1116 |
aspect for the label of the changed method box. |
|
2221 | 1117 |
|
3147 | 1118 |
<return: ValueHolder on: nil> |
1119 |
" |
|
2221 | 1120 |
|
3147 | 1121 |
changedLabelHolder isNil ifTrue:[ |
11453 | 1122 |
changedLabelHolder := ValueHolder new. |
2221 | 1123 |
]. |
3147 | 1124 |
^ changedLabelHolder. |
2221 | 1125 |
! |
1126 |
||
1127 |
diffTextLabelA |
|
3147 | 1128 |
" |
1129 |
aspect for the label for version A. |
|
2221 | 1130 |
|
3147 | 1131 |
<return: ValueHolder on: nil> |
1132 |
" |
|
2221 | 1133 |
|
3147 | 1134 |
diffTextLabelA isNil ifTrue:[ |
11453 | 1135 |
diffTextLabelA := ValueHolder new. |
2221 | 1136 |
]. |
3147 | 1137 |
^ diffTextLabelA. |
2221 | 1138 |
! |
1139 |
||
1140 |
diffTextLabelB |
|
3147 | 1141 |
" |
1142 |
aspect for the label for version B. |
|
2221 | 1143 |
|
3147 | 1144 |
<return: ValueHolder on: nil> |
1145 |
" |
|
2221 | 1146 |
|
3147 | 1147 |
diffTextLabelB isNil ifTrue:[ |
11453 | 1148 |
diffTextLabelB := ValueHolder new. |
2221 | 1149 |
]. |
3147 | 1150 |
^ diffTextLabelB. |
2221 | 1151 |
! |
1152 |
||
2497 | 1153 |
diffTextView |
3147 | 1154 |
" |
1155 |
return the component for the diff text view. |
|
2497 | 1156 |
|
3147 | 1157 |
<return: HVScrollableView> |
1158 |
" |
|
7364
e7613aec8035
use codeViews (instead of TextViews)
Claus Gittinger <cg@exept.de>
parents:
7108
diff
changeset
|
1159 |
|v| |
e7613aec8035
use codeViews (instead of TextViews)
Claus Gittinger <cg@exept.de>
parents:
7108
diff
changeset
|
1160 |
|
2497 | 1161 |
diffTextView isNil ifTrue:[ |
11453 | 1162 |
v := DiffCodeView basicNew. |
1163 |
v textViewClass:CodeView. |
|
1164 |
v initialize. |
|
1165 |
diffTextView := HVScrollableView |
|
1166 |
forView:v |
|
1167 |
miniScrollerH:true miniScrollerV:false. |
|
1168 |
diffTextView addNextPreviousButtons. |
|
2497 | 1169 |
]. |
1170 |
^ diffTextView |
|
7364
e7613aec8035
use codeViews (instead of TextViews)
Claus Gittinger <cg@exept.de>
parents:
7108
diff
changeset
|
1171 |
|
e7613aec8035
use codeViews (instead of TextViews)
Claus Gittinger <cg@exept.de>
parents:
7108
diff
changeset
|
1172 |
"Modified: / 06-10-2006 / 14:30:42 / cg" |
2497 | 1173 |
! |
1174 |
||
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1175 |
includeCategoryChanges |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1176 |
^ self includeCategoryChangesHolder value |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1177 |
|
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1178 |
"Created: / 17-07-2012 / 18:22:34 / cg" |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1179 |
! |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1180 |
|
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1181 |
includeCategoryChanges:aBoolean |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1182 |
self includeCategoryChangesHolder value:aBoolean |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1183 |
|
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1184 |
"Created: / 17-07-2012 / 17:50:41 / cg" |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1185 |
! |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1186 |
|
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1187 |
includeCategoryChangesHolder |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1188 |
includeCategoryChangesHolder isNil ifTrue:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1189 |
includeCategoryChangesHolder := true asValue. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1190 |
includeCategoryChangesHolder addDependent:self. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1191 |
]. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1192 |
^ includeCategoryChangesHolder. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1193 |
|
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1194 |
"Modified: / 06-03-2012 / 15:36:52 / cg" |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1195 |
"Created: / 17-07-2012 / 16:47:58 / cg" |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1196 |
! |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1197 |
|
10703 | 1198 |
includeExtensions |
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1199 |
^ self includeExtensionsHolder value |
10703 | 1200 |
|
1201 |
"Created: / 13-09-2011 / 11:48:51 / cg" |
|
1202 |
! |
|
1203 |
||
1204 |
includeExtensions:aBoolean |
|
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1205 |
self includeExtensionsHolder value:aBoolean |
10703 | 1206 |
|
1207 |
"Created: / 13-09-2011 / 11:48:41 / cg" |
|
1208 |
! |
|
1209 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1210 |
includeExtensionsHolder |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1211 |
"only compare base-methods or include extensions ?" |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1212 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1213 |
includeExtensionsHolder isNil ifTrue:[ |
11453 | 1214 |
includeExtensionsHolder := false asValue. |
1215 |
includeExtensionsHolder addDependent:self. |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1216 |
]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1217 |
^ includeExtensionsHolder. |
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1218 |
|
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1219 |
"Modified: / 06-03-2012 / 15:36:52 / cg" |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1220 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1221 |
|
11958 | 1222 |
includeVersionMethods |
1223 |
^ self includeVersionMethodsHolder value |
|
1224 |
||
1225 |
"Created: / 13-09-2011 / 11:48:51 / cg" |
|
1226 |
! |
|
1227 |
||
1228 |
includeVersionMethods:aBoolean |
|
1229 |
self includeVersionMethodsHolder value:aBoolean |
|
1230 |
||
1231 |
"Created: / 13-09-2011 / 11:48:41 / cg" |
|
1232 |
! |
|
1233 |
||
1234 |
includeVersionMethodsHolder |
|
1235 |
includeVersionMethodsHolder isNil ifTrue:[ |
|
1236 |
includeVersionMethodsHolder := true asValue. |
|
1237 |
includeVersionMethodsHolder addDependent:self. |
|
1238 |
]. |
|
1239 |
^ includeVersionMethodsHolder. |
|
1240 |
||
1241 |
"Modified: / 06-03-2012 / 15:36:52 / cg" |
|
1242 |
"Created: / 17-07-2012 / 16:47:58 / cg" |
|
1243 |
! |
|
1244 |
||
8602 | 1245 |
infoHolder |
1246 |
infoHolder isNil ifTrue:[ |
|
11453 | 1247 |
infoHolder := ValueHolder new. |
8602 | 1248 |
]. |
1249 |
^ infoHolder. |
|
1250 |
! |
|
1251 |
||
2221 | 1252 |
methodText |
3147 | 1253 |
" |
1254 |
aspect for the text in the method text view. |
|
2221 | 1255 |
|
3147 | 1256 |
<return: ValueHolder on: nil> |
1257 |
" |
|
2221 | 1258 |
|
3147 | 1259 |
methodText isNil ifTrue:[ |
11453 | 1260 |
methodText := ValueHolder new. |
2221 | 1261 |
]. |
3147 | 1262 |
^ methodText. |
2221 | 1263 |
! |
1264 |
||
1265 |
methodsChanged |
|
3147 | 1266 |
" |
1267 |
aspect for the 'changed method' list. |
|
2221 | 1268 |
|
3147 | 1269 |
<return: List> |
1270 |
" |
|
2221 | 1271 |
|
3147 | 1272 |
methodsChanged isNil ifTrue:[ |
11453 | 1273 |
methodsChanged := List new. |
2221 | 1274 |
]. |
3147 | 1275 |
^ methodsChanged. |
2221 | 1276 |
! |
1277 |
||
1278 |
methodsChangedSelection |
|
3147 | 1279 |
" |
1280 |
aspect for the selection holder of 'changed method'-list. |
|
2221 | 1281 |
|
3147 | 1282 |
<return: ValueHolder on: nil> |
1283 |
" |
|
2221 | 1284 |
|
3147 | 1285 |
methodsChangedSelection isNil ifTrue:[ |
11453 | 1286 |
methodsChangedSelection := ValueHolder new. |
2221 | 1287 |
]. |
3147 | 1288 |
^ methodsChangedSelection. |
2221 | 1289 |
! |
1290 |
||
1291 |
methodsOnlyInA |
|
6828 | 1292 |
"aspect for the 'method only in version A' list." |
2221 | 1293 |
|
3147 | 1294 |
methodsOnlyInA isNil ifTrue:[ |
11453 | 1295 |
methodsOnlyInA := List new. |
2221 | 1296 |
]. |
3147 | 1297 |
^ methodsOnlyInA. |
6828 | 1298 |
|
1299 |
"Modified: / 25-07-2006 / 11:14:43 / cg" |
|
2221 | 1300 |
! |
1301 |
||
1302 |
methodsOnlyInASelection |
|
6828 | 1303 |
"aspect for the selection holder of 'method only in version A'-list." |
2221 | 1304 |
|
3147 | 1305 |
methodsOnlyInASelection isNil ifTrue:[ |
11453 | 1306 |
methodsOnlyInASelection := ValueHolder new. |
2221 | 1307 |
]. |
3147 | 1308 |
^ methodsOnlyInASelection. |
6828 | 1309 |
|
1310 |
"Modified: / 25-07-2006 / 11:14:53 / cg" |
|
2221 | 1311 |
! |
1312 |
||
1313 |
methodsOnlyInB |
|
6828 | 1314 |
"aspect for the 'method only in version B' list" |
2221 | 1315 |
|
3147 | 1316 |
methodsOnlyInB isNil ifTrue:[ |
11453 | 1317 |
methodsOnlyInB := List new. |
2221 | 1318 |
]. |
3147 | 1319 |
^ methodsOnlyInB. |
6828 | 1320 |
|
1321 |
"Modified: / 25-07-2006 / 11:14:48 / cg" |
|
2221 | 1322 |
! |
1323 |
||
1324 |
methodsOnlyInBSelection |
|
6828 | 1325 |
"aspect for the selection holder of 'method only in version B'-list." |
2221 | 1326 |
|
3147 | 1327 |
methodsOnlyInBSelection isNil ifTrue:[ |
11453 | 1328 |
methodsOnlyInBSelection := ValueHolder new. |
2221 | 1329 |
]. |
3147 | 1330 |
^ methodsOnlyInBSelection. |
6828 | 1331 |
|
1332 |
"Modified: / 25-07-2006 / 11:15:00 / cg" |
|
2221 | 1333 |
! |
1334 |
||
1335 |
onlyInALabelHolder |
|
6828 | 1336 |
"aspect for the label for 'method only in version A'." |
2221 | 1337 |
|
3147 | 1338 |
onlyInALabelHolder isNil ifTrue:[ |
11453 | 1339 |
onlyInALabelHolder := ValueHolder new. |
2221 | 1340 |
]. |
3147 | 1341 |
^ onlyInALabelHolder. |
6828 | 1342 |
|
1343 |
"Modified: / 25-07-2006 / 11:15:12 / cg" |
|
2221 | 1344 |
! |
1345 |
||
1346 |
onlyInBLabelHolder |
|
6828 | 1347 |
"aspect for the label for 'method only in version B'." |
2221 | 1348 |
|
3147 | 1349 |
onlyInBLabelHolder isNil ifTrue:[ |
11453 | 1350 |
onlyInBLabelHolder := ValueHolder new. |
2221 | 1351 |
]. |
3147 | 1352 |
^ onlyInBLabelHolder. |
6828 | 1353 |
|
1354 |
"Modified: / 25-07-2006 / 11:15:07 / cg" |
|
2221 | 1355 |
! ! |
1356 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1357 |
|
2725 | 1358 |
!VersionDiffBrowser methodsFor:'aspects-exported'! |
2695 | 1359 |
|
1360 |
changedLabelHolder:aValueHolder |
|
1361 |
builder aspectAt:#changedLabelHolder put:aValueHolder. |
|
1362 |
||
1363 |
! |
|
1364 |
||
1365 |
classHolder:aValueHolder |
|
5182 | 1366 |
classHolder notNil ifTrue:[ |
11453 | 1367 |
classHolder removeDependent:self |
2695 | 1368 |
]. |
5182 | 1369 |
classHolder := aValueHolder. |
1370 |
classHolder notNil ifTrue:[ |
|
11453 | 1371 |
classHolder addDependent:self |
2695 | 1372 |
] |
1373 |
! |
|
1374 |
||
1375 |
onlyInALabelHolder:aValueHolder |
|
1376 |
builder aspectAt:#onlyInALabelHolder put:aValueHolder. |
|
1377 |
! |
|
1378 |
||
1379 |
onlyInBLabelHolder:aValueHolder |
|
1380 |
builder aspectAt:#onlyInBLabelHolder put:aValueHolder. |
|
1381 |
! |
|
1382 |
||
1383 |
versionAHolder:aValueHolder |
|
5182 | 1384 |
versionAHolder notNil ifTrue:[ |
11453 | 1385 |
versionAHolder removeDependent:self |
2695 | 1386 |
]. |
5182 | 1387 |
versionAHolder := aValueHolder. |
1388 |
versionAHolder notNil ifTrue:[ |
|
11453 | 1389 |
versionAHolder addDependent:self |
2695 | 1390 |
] |
1391 |
! |
|
1392 |
||
1393 |
versionBHolder:aValueHolder |
|
5182 | 1394 |
versionBHolder notNil ifTrue:[ |
11453 | 1395 |
versionBHolder removeDependent:self |
2695 | 1396 |
]. |
5182 | 1397 |
versionBHolder := aValueHolder. |
1398 |
versionBHolder notNil ifTrue:[ |
|
11453 | 1399 |
versionBHolder addDependent:self |
2695 | 1400 |
] |
1401 |
! ! |
|
1402 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1403 |
|
4359 | 1404 |
!VersionDiffBrowser methodsFor:'aspects-menu'! |
1405 |
||
1406 |
canAcceptInCodeView |
|
1407 |
^ self hasChangeSelectedInA |
|
1408 |
or:[self hasChangeSelectedInB |
|
1409 |
or:[self hasChangeSelectedInM]] |
|
1410 |
! |
|
1411 |
||
1412 |
hasChangeSelectedInA |
|
1413 |
^ self selectedChangeInA notNil |
|
1414 |
! |
|
1415 |
||
1416 |
hasChangeSelectedInB |
|
1417 |
^ self selectedChangeInB notNil |
|
1418 |
! |
|
1419 |
||
1420 |
hasChangeSelectedInM |
|
1421 |
^ self methodsChangedSelection value notNil |
|
1422 |
! ! |
|
1423 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1424 |
|
2695 | 1425 |
!VersionDiffBrowser methodsFor:'change & update'! |
1426 |
||
12512 | 1427 |
methodsOnlyInASelectionChanged |
1428 |
" |
|
1429 |
the selection in the list of the 'method only in version A' changed. |
|
1430 |
Reset the selection of the two other lists and show the method in |
|
1431 |
the text view. |
|
1432 |
||
1433 |
<return: self> |
|
1434 |
" |
|
1435 |
|change sel| |
|
1436 |
||
1437 |
self infoHolder value:''. |
|
1438 |
||
1439 |
sel := self methodsOnlyInASelection value. |
|
1440 |
sel notNil ifTrue:[ |
|
1441 |
self methodsOnlyInBSelection value:nil. |
|
1442 |
self methodsChangedSelection value:nil. |
|
1443 |
change := methodsOnlyInAFiltered "self changeSetA" at:sel. |
|
1444 |
self methodText value:(change prettyPrintedSource). |
|
1445 |
self showSingleTextView. |
|
1446 |
] |
|
1447 |
||
1448 |
"Modified: / 17-07-2012 / 18:31:22 / cg" |
|
1449 |
! |
|
1450 |
||
1451 |
methodsOnlyInBSelectionChanged |
|
1452 |
" |
|
1453 |
the selection in the list of the 'method only in version B' changed. |
|
1454 |
Reset the selection of the two other lists and show the method in |
|
1455 |
the text view. |
|
1456 |
||
1457 |
<return: self> |
|
1458 |
" |
|
1459 |
|change sel| |
|
1460 |
||
1461 |
self infoHolder value:''. |
|
1462 |
||
1463 |
sel := self methodsOnlyInBSelection value. |
|
1464 |
sel notNil ifTrue:[ |
|
1465 |
self methodsOnlyInASelection value:nil. |
|
1466 |
self methodsChangedSelection value:nil. |
|
1467 |
change := methodsOnlyInBFiltered "self changeSetB" at:sel. |
|
1468 |
self methodText value:(change prettyPrintedSource). |
|
1469 |
self showSingleTextView. |
|
1470 |
] |
|
1471 |
||
1472 |
"Modified: / 17-07-2012 / 18:31:32 / cg" |
|
1473 |
! |
|
1474 |
||
2695 | 1475 |
update:something with:parameter from:changedObject |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1476 |
((changedObject == includeExtensionsHolder) |
11958 | 1477 |
or:[ changedObject == includeCategoryChangesHolder |
1478 |
or:[ changedObject == includeVersionMethodsHolder ]]) ifTrue:[ |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1479 |
self updateLists. |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1480 |
^ self |
11371
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1481 |
]. |
920084723b9c
exclude extension stuff fixed
Claus Gittinger <cg@exept.de>
parents:
10892
diff
changeset
|
1482 |
|
11453 | 1483 |
(changedObject == classHolder |
2695 | 1484 |
or:[changedObject == versionAHolder |
11453 | 1485 |
or:[changedObject == versionBHolder]]) ifTrue:[ |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1486 |
self setupForClass:(classHolder value) versionA:(versionAHolder value) versionB:(versionBHolder value). |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1487 |
^ self |
2695 | 1488 |
]. |
1489 |
super update:something with:parameter from:changedObject |
|
10703 | 1490 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1491 |
"Modified: / 17-07-2012 / 17:48:58 / cg" |
2695 | 1492 |
! ! |
1493 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1494 |
|
2221 | 1495 |
!VersionDiffBrowser methodsFor:'initialization & release'! |
1496 |
||
1497 |
postBuildWith:aBuilder |
|
3147 | 1498 |
" |
1499 |
components which are invisible should be ignored by the panel. |
|
1500 |
Cannot be set via the interface builder. |
|
2221 | 1501 |
|
3147 | 1502 |
<return: self> |
1503 |
" |
|
1504 |
||
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1505 |
(self componentAt:#TopHorizontalPanel) ignoreInvisibleComponents:true. |
6642 | 1506 |
super postBuildWith:aBuilder |
2221 | 1507 |
! ! |
1508 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1509 |
|
2221 | 1510 |
!VersionDiffBrowser methodsFor:'menu action'! |
1511 |
||
2465 | 1512 |
browseChange:aChange |
6828 | 1513 |
"browse the change in aChange" |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1514 |
|
7396 | 1515 |
|cls sel m browserClass| |
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1516 |
|
2578
29264fb3847e
avoid debugger in browse-menu
Claus Gittinger <cg@exept.de>
parents:
2536
diff
changeset
|
1517 |
aChange isNil ifTrue:[^ self]. |
7396 | 1518 |
browserClass := UserPreferences systemBrowserClass. |
1519 |
||
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1520 |
cls := aChange changeClass. |
11962 | 1521 |
cls isNil ifTrue:[ |
1522 |
Dialog information:'The class is not present in the image'. |
|
1523 |
^ self |
|
1524 |
]. |
|
7396 | 1525 |
aChange isMethodChange ifTrue:[ |
11962 | 1526 |
sel := aChange changeSelector. |
7396 | 1527 |
"/ (cls compiledMethodAt:sel) isNil ifTrue:[ |
1528 |
"/ (self confirm:'Method does not exist.\\Browse Class ?' withCRs) ifTrue:[ |
|
1529 |
"/ browserClass openInClass:cls |
|
1530 |
"/ ]. |
|
1531 |
"/ sel := nil. |
|
1532 |
"/ ] |
|
1533 |
]. |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1534 |
self withWaitCursorDo:[ |
11962 | 1535 |
browserClass openInClass:cls selector:sel. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1536 |
] |
6828 | 1537 |
|
7396 | 1538 |
"Modified: / 12-10-2006 / 23:58:40 / cg" |
2465 | 1539 |
! |
1540 |
||
1541 |
browseClassInA |
|
6828 | 1542 |
"browse the selected method." |
1543 |
self browseChange:(self selectedChangeInA). |
|
2507 | 1544 |
|
6828 | 1545 |
"Modified: / 25-07-2006 / 11:14:02 / cg" |
2465 | 1546 |
! |
2221 | 1547 |
|
2465 | 1548 |
browseClassInB |
6828 | 1549 |
"browse the selected method." |
1550 |
self browseChange:(self selectedChangeInB). |
|
2507 | 1551 |
|
6828 | 1552 |
"Modified: / 25-07-2006 / 11:13:58 / cg" |
2465 | 1553 |
! |
1554 |
||
1555 |
browseClassInM |
|
6828 | 1556 |
"browse the selected method." |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1557 |
|
6828 | 1558 |
self browseChange:(self selectedChangesInM first). |
2507 | 1559 |
|
6828 | 1560 |
"Modified: / 25-07-2006 / 11:13:54 / cg" |
2465 | 1561 |
! |
1562 |
||
2469 | 1563 |
createPatchFile |
2856 | 1564 |
"create a patchFile, to patch the old version (versionB) into the new version (versionA). |
1565 |
I.e. a little changeFile to transport those changes." |
|
1566 |
||
6828 | 1567 |
|defaultName f oldVersion newVersion vsnMthdA vsnMthdB vsnA vsnB info classBeingCompared| |
2856 | 1568 |
|
1569 |
defaultName := 'patchFile.chg'. |
|
2469 | 1570 |
|
6828 | 1571 |
classBeingCompared := classChangeSet classBeingCompared. |
1572 |
classBeingCompared notNil ifTrue:[ |
|
11453 | 1573 |
defaultName := classBeingCompared nameWithoutPrefix. |
1574 |
classChangeSet versionA notNil ifTrue:[ |
|
1575 |
defaultName := defaultName , '-'. |
|
1576 |
defaultName := defaultName , classChangeSet versionA. |
|
1577 |
classChangeSet versionB notNil ifTrue:[ |
|
1578 |
defaultName := defaultName , '-'. |
|
1579 |
defaultName := defaultName , classChangeSet versionB. |
|
1580 |
]. |
|
1581 |
]. |
|
1582 |
defaultName := defaultName , '.chg'. |
|
2856 | 1583 |
]. |
11453 | 1584 |
f := Dialog |
1585 |
requestFileNameForSave:'Name of patchFile:' |
|
1586 |
default:defaultName. |
|
2856 | 1587 |
self warn:'Sorry: This function is not yet implemented'. |
2730 | 1588 |
^ self. |
1589 |
||
11453 | 1590 |
"/ vsnMthdA := self changeSetA |
3103 | 1591 |
"/ detect:[:ch | ch isMethodChange |
1592 |
"/ and:[ch changeClass isMeta |
|
1593 |
"/ and:[ch changeSelector = #version]]] |
|
1594 |
"/ ifNone:nil. |
|
11453 | 1595 |
"/ vsnMthdB := self changeSetA |
3103 | 1596 |
"/ detect:[:ch | ch isMethodChange |
1597 |
"/ and:[ch changeClass isMeta |
|
1598 |
"/ and:[ch changeSelector = #version]]] |
|
1599 |
"/ ifNone:nil. |
|
1600 |
"/ |
|
1601 |
"/ vsnMthdA notNil ifTrue:[ |
|
11453 | 1602 |
"/ "/ extract the version |
3103 | 1603 |
"/ vsnA := Class revisionStringFromSource:vsnMthdA source. |
1604 |
"/ vsnA notNil ifTrue:[ |
|
1605 |
"/ info := Class revisionInfoFromString:vsnA. |
|
1606 |
"/ info notNil ifTrue:[ |
|
1607 |
"/ vsnA := info at:#revision ifAbsent:nil. |
|
1608 |
"/ ] ifFalse:[ |
|
1609 |
"/ vsnA := nil. |
|
1610 |
"/ ]. |
|
1611 |
"/ ]. |
|
1612 |
"/ ]. |
|
1613 |
"/ vsnMthdB notNil ifTrue:[ |
|
11453 | 1614 |
"/ "/ extract the version |
3103 | 1615 |
"/ vsnB := Class revisionStringFromSource:vsnMthdB source. |
1616 |
"/ vsnB notNil ifTrue:[ |
|
1617 |
"/ info := Class revisionInfoFromString:vsnB. |
|
1618 |
"/ info notNil ifTrue:[ |
|
1619 |
"/ vsnB := info at:#revision ifAbsent:nil. |
|
1620 |
"/ ] ifFalse:[ |
|
1621 |
"/ vsnB := nil. |
|
1622 |
"/ ]. |
|
1623 |
"/ ]. |
|
1624 |
"/ ]. |
|
1625 |
"/ |
|
1626 |
"/ (vsnA isNil or:[vsnB isNil or:[vsnA = vsnB]]) ifTrue:[ |
|
1627 |
"/ self warn:'The generated patch file will not be able to validate/update the class version'. |
|
1628 |
"/ ]. |
|
1629 |
"/ |
|
1630 |
"/self halt:'not yet finished'. |
|
6828 | 1631 |
|
9602 | 1632 |
"Modified: / 27-10-2010 / 11:34:58 / cg" |
2469 | 1633 |
! |
1634 |
||
2465 | 1635 |
inspectSelectedChangeInA |
6828 | 1636 |
"inspect the selected method change for the 'method only in version A'." |
2507 | 1637 |
|
2465 | 1638 |
self selectedChangeInA inspect. |
6828 | 1639 |
|
1640 |
"Modified: / 25-07-2006 / 11:13:30 / cg" |
|
2221 | 1641 |
! |
1642 |
||
1643 |
inspectSelectedChangeInB |
|
6828 | 1644 |
"inspect the selected method change for the 'method only in version B'." |
2507 | 1645 |
|
2465 | 1646 |
self selectedChangeInB inspect. |
6828 | 1647 |
|
1648 |
"Modified: / 25-07-2006 / 11:13:22 / cg" |
|
2465 | 1649 |
! |
1650 |
||
1651 |
inspectSelectedChangeInM |
|
6828 | 1652 |
"inspect the two method changes for the selected 'changed method'." |
2507 | 1653 |
|
2465 | 1654 |
|changes| |
1655 |
||
1656 |
changes := self selectedChangesInM. |
|
1657 |
changes do:[:change | |
|
11453 | 1658 |
change inspect |
2465 | 1659 |
]. |
6828 | 1660 |
|
1661 |
"Modified: / 25-07-2006 / 11:13:13 / cg" |
|
2465 | 1662 |
! |
1663 |
||
2501 | 1664 |
mainMenu |
6828 | 1665 |
"if this application runs as an subapplication, |
1666 |
the menu bar should not be used." |
|
2507 | 1667 |
|
2501 | 1668 |
self masterApplication isNil ifTrue:[ |
11453 | 1669 |
^ self class mainMenu |
2501 | 1670 |
]. |
1671 |
^ nil |
|
6828 | 1672 |
|
1673 |
"Modified: / 25-07-2006 / 11:13:44 / cg" |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1674 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1675 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1676 |
openDocumentation |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1677 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#VERSIONDIFF' |
11855
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1678 |
! |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1679 |
|
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1680 |
removeClassFromChangeSet |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1681 |
|cls ok changedClasses| |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1682 |
|
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1683 |
classChangeSet notNil ifTrue:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1684 |
"/ only do if we compare a single class |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1685 |
(cls := classChangeSet classBeingCompared) notNil ifTrue:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1686 |
ok := classChangeSet diffSet isEmptyOrNil. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1687 |
ok ifFalse:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1688 |
changedClasses := classChangeSet diffSet changedClasses. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1689 |
(changedClasses size == 1 |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1690 |
and:[ changedClasses anElement theNonMetaclass == cls theNonMetaclass]) ifTrue:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1691 |
(methodsChangedFiltered isEmptyOrNil |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1692 |
and:[ methodsOnlyInAFiltered isEmptyOrNil |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1693 |
and:[ methodsOnlyInBFiltered isEmptyOrNil ]]) ifTrue:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1694 |
ok := true. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1695 |
] |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1696 |
] |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1697 |
]. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1698 |
ok ifTrue:[ |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1699 |
ChangeSet current condenseChangesForClass:cls |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1700 |
]. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1701 |
]. |
52fd36ba842f
changed: #removeClassFromChangeSet
Claus Gittinger <cg@exept.de>
parents:
11853
diff
changeset
|
1702 |
]. |
2221 | 1703 |
! ! |
1704 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
1705 |
|
2221 | 1706 |
!VersionDiffBrowser methodsFor:'private'! |
1707 |
||
2745 | 1708 |
addAcceptToTextViewMenus |
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1709 |
"add to the standard diff text view or single text views menu an accept entry. |
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1710 |
The acceptAction will fetch the corresponding change and apply it |
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1711 |
(not the shown text) |
2745 | 1712 |
|
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1713 |
<return: self> |
3147 | 1714 |
" |
2745 | 1715 |
|
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1716 |
|diffTextView leftView rightView singleView| |
2745 | 1717 |
|
1718 |
diffTextView := self diffTextView. |
|
1719 |
leftView := diffTextView leftTextView. |
|
1720 |
rightView := diffTextView rightTextView. |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1721 |
singleView := self componentAt:#singleTextView. |
2745 | 1722 |
|
11453 | 1723 |
(Array |
1724 |
with:leftView |
|
1725 |
with:rightView |
|
1726 |
with:singleView) |
|
2745 | 1727 |
do:[:v | |
11453 | 1728 |
|mGen| |
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1729 |
|
11453 | 1730 |
mGen := [ |
1731 |
|m| |
|
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1732 |
|
11453 | 1733 |
m := v editMenu. |
8657
4a54180313b5
enable/disable of edit-menu items
Claus Gittinger <cg@exept.de>
parents:
8629
diff
changeset
|
1734 |
|
11453 | 1735 |
(m selectorAt:#accept) isNil ifTrue:[ |
1736 |
m addLabels:(resources array:#('-' 'Accept')) |
|
1737 |
selectors:(Array with:nil with:#accept) |
|
1738 |
after:#copySelection. |
|
1739 |
]. |
|
1740 |
m |
|
1741 |
actionAt:#accept |
|
1742 |
put:[ |
|
1743 |
v == singleView ifTrue:[ |
|
1744 |
self acceptInSingleView |
|
1745 |
] ifFalse:[ |
|
1746 |
v == leftView ifTrue:[ |
|
1747 |
self acceptInLeftView |
|
1748 |
] ifFalse:[ |
|
1749 |
self acceptInRightView |
|
1750 |
]. |
|
1751 |
]. |
|
1752 |
]. |
|
1753 |
m selectorAt:#accept put:nil. |
|
1754 |
m enable:#copySelection. |
|
1755 |
m setEnable:#accept to:[self canAcceptInCodeView]. |
|
1756 |
m |
|
1757 |
]. |
|
1758 |
v menuHolder:mGen. |
|
1759 |
v menuMessage:#value. |
|
2745 | 1760 |
] |
1761 |
! |
|
1762 |
||
3753 | 1763 |
applyChange:change |
1764 |
change notNil ifTrue:[ |
|
11453 | 1765 |
change apply |
3753 | 1766 |
] |
1767 |
! |
|
1768 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1769 |
printStringForChange:aChange |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1770 |
"generate a print string for a change." |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1771 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1772 |
|m changeClassName classOrMetaString useChangesString selectorString |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1773 |
singleComparedClass singleComparedClassesName singleComparedMetaclassesName |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1774 |
printString| |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1775 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1776 |
(singleComparedClass := self classBeingCompared) notNil ifTrue:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1777 |
singleComparedClassesName := singleComparedClass name. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1778 |
singleComparedMetaclassesName := singleComparedClass theMetaclass name. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1779 |
]. |
2497 | 1780 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1781 |
aChange isClassDefinitionChange ifTrue:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1782 |
^ aChange printStringWithoutClassName |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1783 |
]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1784 |
aChange isDoIt ifTrue:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1785 |
^ aChange source , ' (doIt)' |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1786 |
]. |
10892
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1787 |
aChange isNameSpaceCreationChange ifTrue:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1788 |
^ aChange source |
10892
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1789 |
]. |
3678 | 1790 |
|
10892
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1791 |
changeClassName := aChange className. |
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1792 |
changeClassName isNil ifTrue:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1793 |
^ aChange source |
10892
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1794 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1795 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1796 |
useChangesString := false. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1797 |
classOrMetaString := ''. |
10892
98a427ae867b
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
10829
diff
changeset
|
1798 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1799 |
(changeClassName = singleComparedClassesName) ifTrue:[ |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1800 |
"/ changeClassName := ''. |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1801 |
useChangesString := true. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1802 |
] ifFalse:[ |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1803 |
(changeClassName = singleComparedMetaclassesName) ifTrue:[ |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1804 |
"/ classOrMetaString := ' class'. |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1805 |
useChangesString := true. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1806 |
] ifFalse:[ |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1807 |
((changeClassName includes:$:) and:[ changeClassName startsWith:((singleComparedClassesName ? ''),'::') ]) ifTrue:[ |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1808 |
changeClassName := changeClassName copyFrom:(singleComparedClassesName,'::') size+1. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1809 |
]. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1810 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1811 |
]. |
6272 | 1812 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1813 |
selectorString := ''. |
11533
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1814 |
(aChange isMethodChange) ifTrue:[ |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1815 |
selectorString := aChange selector. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1816 |
aChange changeClass notNil ifTrue:[ |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1817 |
m := aChange changeMethod. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1818 |
m notNil ifTrue:[ |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1819 |
m := m originalMethodIfWrapped. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1820 |
selectorString := m printStringForBrowserWithSelector:aChange selector inClass:aChange changeClass. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1821 |
]. |
106faef31ef5
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
11453
diff
changeset
|
1822 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1823 |
changeClassName notEmptyOrNil ifTrue:[ |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1824 |
selectorString := ' >> ',selectorString |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1825 |
] |
2497 | 1826 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1827 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1828 |
printString := changeClassName,classOrMetaString,selectorString. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1829 |
aChange isMethodCategoryChange ifTrue:[ |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1830 |
^ printString, ' (category)' |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1831 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1832 |
^ printString |
9587
9f33d5c62efa
changed: #printStringForChange:
Claus Gittinger <cg@exept.de>
parents:
9550
diff
changeset
|
1833 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1834 |
"Modified: / 17-07-2012 / 18:43:27 / cg" |
2497 | 1835 |
! |
1836 |
||
2501 | 1837 |
resetSelectionHolders |
3147 | 1838 |
" |
1839 |
reset all selection holders when a new change set is given. |
|
11453 | 1840 |
First set the selection to nil. |
2507 | 1841 |
|
3147 | 1842 |
<return: self> |
1843 |
" |
|
2501 | 1844 |
|
1845 |
self methodsChangedSelection value:nil. |
|
1846 |
self methodsOnlyInASelection value:nil. |
|
1847 |
self methodsOnlyInBSelection value:nil. |
|
2507 | 1848 |
self diffTextView text1:'' text2:''. |
1849 |
self methodText value:''. |
|
1850 |
||
1851 |
"/ self methodsChangedSelectionChanged. |
|
1852 |
"/ self methodsOnlyInASelectionChanged. |
|
1853 |
"/ self methodsOnlyInBSelectionChanged. |
|
2501 | 1854 |
! |
1855 |
||
2221 | 1856 |
showDiffTextView |
3147 | 1857 |
" |
1858 |
if a method change is selected, then show the diff text view. |
|
1859 |
Add an accept entry to the popup menu. |
|
2507 | 1860 |
|
3147 | 1861 |
<return: self> |
1862 |
" |
|
2694 | 1863 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1864 |
(self componentAt:#diffTextViewBox) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1865 |
(self componentAt:#singleTextView) beInvisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1866 |
(self componentAt:#diffTextView) realizeAllSubViews. |
2694 | 1867 |
|
2465 | 1868 |
self addAcceptToTextViewMenus. |
2221 | 1869 |
! |
1870 |
||
1871 |
showSingleTextView |
|
3147 | 1872 |
" |
1873 |
if a method is selected which is only in version A or B of the class, |
|
1874 |
then show the text view. |
|
1875 |
Add an accept entry to the popup menu. |
|
2507 | 1876 |
|
3147 | 1877 |
<return: self> |
1878 |
" |
|
2507 | 1879 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1880 |
(self componentAt:#singleTextView) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1881 |
(self componentAt:#diffTextViewBox) beInvisible. |
2501 | 1882 |
self addAcceptToTextViewMenus. |
2221 | 1883 |
! |
1884 |
||
2497 | 1885 |
updateLabels |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1886 |
"update the labels of the diff text view. Show the version numbers |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1887 |
of the class." |
2221 | 1888 |
|
2694 | 1889 |
|theVersionA theVersionB builder| |
2224 | 1890 |
|
2694 | 1891 |
builder := self builder. |
2497 | 1892 |
(theVersionA := self versionA) notNil ifTrue:[ |
11453 | 1893 |
self diffTextLabelA value:theVersionA. |
1894 |
self onlyInALabelHolder value:('Only in ' , theVersionA). |
|
1895 |
(self componentAt:#OnlyInALabel) |
|
1896 |
foregroundColor:Color white; |
|
1897 |
backgroundColor:Color green darkened. |
|
2224 | 1898 |
]. |
2497 | 1899 |
(theVersionB :=self versionB) notNil ifTrue:[ |
11453 | 1900 |
self diffTextLabelB value:theVersionB. |
1901 |
self onlyInBLabelHolder value:('Only in ' , theVersionB). |
|
1902 |
(self componentAt:#OnlyInBLabel) |
|
1903 |
foregroundColor:Color white; |
|
1904 |
backgroundColor:Color red darkened. |
|
2224 | 1905 |
]. |
7396 | 1906 |
|
1907 |
self changedLabelHolder value:('Different'). |
|
1908 |
||
1909 |
"Modified: / 13-10-2006 / 01:07:08 / cg" |
|
2224 | 1910 |
! |
1911 |
||
1912 |
updateLists |
|
11453 | 1913 |
|classChangeSet listOnlyInA listOnlyInB listChanged |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1914 |
printStringGenerator sortBlockForChangeLists filteredList |
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1915 |
isIgnoredChange numIgnoredExtensions numIgnoredVersionMethods |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1916 |
info needFilter| |
2230
5e10eebb1de2
move change-compare code to where it belongs (Change-hierarchy)
Claus Gittinger <cg@exept.de>
parents:
2229
diff
changeset
|
1917 |
|
2585 | 1918 |
classChangeSet := self classChangeSet. |
1919 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1920 |
printStringGenerator := [:aChange | self printStringForChange:aChange]. |
3839 | 1921 |
sortBlockForChangeLists := [:a :b | (printStringGenerator value:a) < (printStringGenerator value:b)]. |
1922 |
||
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1923 |
numIgnoredExtensions := numIgnoredVersionMethods := 0. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1924 |
needFilter := self includeExtensions not |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1925 |
or:[self includeCategoryChanges not |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1926 |
or:[self includeVersionMethods not]]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1927 |
|
11962 | 1928 |
needFilter ifTrue:[ |
1929 |
isIgnoredChange := |
|
1930 |
[:change | |
|
1931 |
|packageOfMethodInChange packageOfMethodInImage changeMethod ignored| |
|
1932 |
||
1933 |
ignored := false. |
|
1934 |
change isMethodCodeChange ifTrue:[ |
|
1935 |
self includeExtensions ifFalse:[ |
|
1936 |
packageOfMethodInChange := change package. |
|
1937 |
(packageOfMethodInChange notNil |
|
1938 |
and:[ packageOfMethodInChange ~= PackageId noProjectID |
|
1939 |
and:[ packageOfMethodInChange ~= change changeClass package ]]) ifTrue:[ |
|
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1940 |
ignored := true |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1941 |
]. |
11962 | 1942 |
|
1943 |
changeMethod := change changeMethod. |
|
1944 |
changeMethod notNil ifTrue:[ |
|
1945 |
packageOfMethodInImage := changeMethod package. |
|
1946 |
(true "packageOfMethodInImage notNil" |
|
1947 |
and:[ packageOfMethodInImage ~= PackageId noProjectID |
|
1948 |
and:[ packageOfMethodInImage ~= changeMethod mclass package ]]) ifTrue:[ |
|
1949 |
ignored := true |
|
1950 |
]. |
|
1951 |
]. |
|
1952 |
numIgnoredExtensions := numIgnoredExtensions + (ignored ifTrue:[1] ifFalse:[0]). |
|
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1953 |
]. |
11962 | 1954 |
self includeVersionMethods ifFalse:[ |
1955 |
(change isMethodChangeForVersionMethod |
|
1956 |
or:[ change isMethodChangeForExtensionsVersionMethod ]) ifTrue:[ |
|
1957 |
ignored := true. |
|
1958 |
numIgnoredVersionMethods := numIgnoredVersionMethods + 1 |
|
1959 |
]. |
|
1960 |
]. |
|
1961 |
] ifFalse:[ |
|
1962 |
change isMethodCategoryChange ifTrue:[ |
|
1963 |
self includeCategoryChanges ifFalse:[ |
|
1964 |
ignored := true |
|
1965 |
] |
|
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1966 |
]. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
1967 |
]. |
11962 | 1968 |
ignored. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1969 |
]. |
11962 | 1970 |
] ifFalse:[ |
1971 |
isIgnoredChange := [:change | false]. |
|
1972 |
]. |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
1973 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1974 |
listOnlyInA := filteredList := self methodsOnlyInA. |
2731 | 1975 |
listOnlyInA removeAll. |
1976 |
classChangeSet notNil ifTrue:[ |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1977 |
"/ classChangeSet methodsOnlyInA sort:sortBlockForChangeLists. |
11962 | 1978 |
filteredList := classChangeSet methodsOnlyInA reject:isIgnoredChange. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1979 |
listOnlyInA addAll: (filteredList collect:printStringGenerator). |
2731 | 1980 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1981 |
methodsOnlyInAFiltered := filteredList. |
2585 | 1982 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1983 |
listOnlyInB := filteredList := self methodsOnlyInB. |
2731 | 1984 |
listOnlyInB removeAll. |
1985 |
classChangeSet notNil ifTrue:[ |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1986 |
"/ classChangeSet methodsOnlyInB sort:sortBlockForChangeLists. |
11962 | 1987 |
filteredList := classChangeSet methodsOnlyInB reject:isIgnoredChange. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1988 |
listOnlyInB addAll: (filteredList collect:printStringGenerator). |
2731 | 1989 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1990 |
methodsOnlyInBFiltered := filteredList. |
2221 | 1991 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1992 |
listChanged := filteredList := self methodsChanged. |
2731 | 1993 |
listChanged removeAll. |
1994 |
classChangeSet notNil ifTrue:[ |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1995 |
"/ classChangeSet methodsChanged sort:[:a :b | sortBlockForChangeLists value:a first value:b first]. |
11962 | 1996 |
filteredList := classChangeSet methodsChanged reject:[:entry | isIgnoredChange value:entry first]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1997 |
listChanged addAll: (filteredList collect:[:entry| printStringGenerator value:(entry first)]). |
2731 | 1998 |
]. |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
1999 |
methodsChangedFiltered := filteredList. |
2221 | 2000 |
|
2731 | 2001 |
self boxAVisible value:(listOnlyInA notEmpty). |
2002 |
self boxBVisible value:(listOnlyInB notEmpty). |
|
2221 | 2003 |
|
11453 | 2004 |
self boxMVisible value:(listChanged isEmpty |
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
2005 |
and: [(listOnlyInA notEmpty |
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
2006 |
or:[listOnlyInB notEmpty])]) not. |
11453 | 2007 |
|
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2008 |
info := ''. |
11453 | 2009 |
numIgnoredExtensions ~~ 0 ifTrue:[ |
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2010 |
info := info , ('%1 extension methods ignored. ' bindWith:numIgnoredExtensions). |
11453 | 2011 |
]. |
11961
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2012 |
numIgnoredVersionMethods ~~ 0 ifTrue:[ |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2013 |
info := info , ('%1 version methods ignored.' bindWith:numIgnoredVersionMethods). |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2014 |
]. |
094f448dc1f0
added ignoreVersionMethods option
Claus Gittinger <cg@exept.de>
parents:
11958
diff
changeset
|
2015 |
self infoHolder value:info |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2016 |
|
11596
a82461d12ced
selection fixes (when filtering)
Claus Gittinger <cg@exept.de>
parents:
11533
diff
changeset
|
2017 |
"Modified: / 17-07-2012 / 18:34:36 / cg" |
2221 | 2018 |
! ! |
2019 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2020 |
|
2501 | 2021 |
!VersionDiffBrowser methodsFor:'setup'! |
2022 |
||
2695 | 2023 |
setupForClass:aClass againstVersion:aVersionA |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2024 |
"compute the class change set for the class aClass of its current version against the repository version A. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2025 |
When setting the class change set, the labels, list etc. of the receiver |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2026 |
are updated." |
2695 | 2027 |
|
2731 | 2028 |
|changeSet| |
2029 |
||
2745 | 2030 |
aClass isNil ifTrue:[ |
11453 | 2031 |
changeSet := nil |
2745 | 2032 |
] ifFalse:[ |
11453 | 2033 |
aClass isNameSpace ifFalse:[ |
2034 |
aClass isLoaded ifTrue:[ |
|
2035 |
changeSet := (ClassChangeSet newForClass:aClass againstVersion:aVersionA). |
|
2036 |
] |
|
2037 |
]. |
|
2731 | 2038 |
]. |
2856 | 2039 |
self classChangeSet:changeSet. |
2857
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
2040 |
aVersionA isNil ifTrue:[ |
11453 | 2041 |
self class:aClass versionA:'Repository' versionB:'Current'. |
2857
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
2042 |
] ifFalse:[ |
11453 | 2043 |
self class:aClass versionA:aVersionA versionB:(aVersionA , 'm'). |
2857
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
2044 |
] |
2695 | 2045 |
! |
2046 |
||
2949 | 2047 |
setupForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2048 |
"generate the class change set from the two classes A and B. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2049 |
When setting the class change set, the labels, list etc. of the receiver |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2050 |
are updated." |
2949 | 2051 |
|
2052 |
|changeSet| |
|
2053 |
||
2054 |
changeSet := (ClassChangeSet newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB). |
|
2055 |
self classChangeSet:changeSet |
|
2056 |
! |
|
2057 |
||
2510 | 2058 |
setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2059 |
"generate the class change set from the two source files A and B. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2060 |
When setting the class change set, the labels, list etc. of the receiver |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2061 |
are updated." |
2510 | 2062 |
|
2731 | 2063 |
|changeSet| |
2064 |
||
9383 | 2065 |
aClass isRealNameSpace ifFalse:[ |
11453 | 2066 |
aClass isLoaded ifTrue:[ |
2067 |
changeSet := (ClassChangeSet newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB). |
|
2068 |
] |
|
2731 | 2069 |
]. |
2070 |
self classChangeSet:changeSet |
|
7499 | 2071 |
|
2072 |
"Modified: / 10-11-2006 / 17:15:26 / cg" |
|
2510 | 2073 |
! |
2074 |
||
2501 | 2075 |
setupForClass:aClass versionA:aVersionA versionB:aVersionB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2076 |
"compute the class change set for the class aClass and the versions A and B. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2077 |
When setting the class change set, the labels, list etc. of the receiver |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2078 |
are updated." |
2501 | 2079 |
|
2731 | 2080 |
|changeSet| |
2081 |
||
2082 |
aClass isNameSpace ifFalse:[ |
|
11453 | 2083 |
aClass isLoaded ifTrue:[ |
2084 |
changeSet := (ClassChangeSet newForClass:aClass versionA:aVersionA versionB:aVersionB). |
|
2085 |
] |
|
2731 | 2086 |
]. |
2856 | 2087 |
self classChangeSet:changeSet. |
2088 |
self class:aClass versionA:aVersionA versionB:aVersionB. |
|
3678 | 2089 |
! |
2090 |
||
2091 |
setupForDiffSet:diffSet labelA:aLabelA labelB:aLabelB |
|
2092 |
|changeSet| |
|
2093 |
||
2094 |
changeSet := (ClassChangeSet new diffSet:diffSet; labelA:aLabelA; labelB:aLabelB). |
|
2095 |
self classChangeSet:changeSet |
|
2501 | 2096 |
! ! |
2097 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2098 |
|
2497 | 2099 |
!VersionDiffBrowser::ClassChangeSet class methodsFor:'instance creation'! |
2100 |
||
11453 | 2101 |
changeSetForClass:aClass |
3756 | 2102 |
"return a ChangeSet for the class aClass and its current source. |
2103 |
The source is generated into a stream and then the change set is generated |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2104 |
from the source stream." |
2695 | 2105 |
|
3756 | 2106 |
^ ChangeSet forExistingClass:aClass. |
2695 | 2107 |
! |
2108 |
||
2497 | 2109 |
changeSetForClass:aClass andRevision:aVersion |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2110 |
"return a ChangeSet for the class aClass and version aVersion. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2111 |
The version from the class source stream is checked out from the repositiory |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2112 |
into a source stream. Then the change set is generated from the source stream." |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2113 |
|
2497 | 2114 |
|theSourceCodeManager theSourceStream theChangeSet| |
2115 |
||
10829
e57c6dc35f3c
Do not call obsolete methods in SourceCodeManager class
Stefan Vogel <sv@exept.de>
parents:
10703
diff
changeset
|
2116 |
theSourceCodeManager := SourceCodeManagerUtilities default sourceCodeManagerFor:aClass. |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2117 |
[ |
11453 | 2118 |
theSourceStream := theSourceCodeManager getSourceStreamFor:aClass revision:aVersion. |
2119 |
theSourceStream notNil |
|
2120 |
ifTrue:[theChangeSet := ChangeSet fromStream:theSourceStream] |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2121 |
] ensure:[ |
11453 | 2122 |
theSourceStream notNil ifTrue:[theSourceStream close] |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2123 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2124 |
self sortChangeSet:theChangeSet. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2125 |
^ theChangeSet |
7108 | 2126 |
|
2127 |
"Modified: / 12-09-2006 / 14:24:51 / cg" |
|
2497 | 2128 |
! |
2129 |
||
11453 | 2130 |
changeSetForClass:aClass andSource:aSource |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2131 |
"return a ChangeSet for the class aClass and source aSource. |
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4359
diff
changeset
|
2132 |
The source is converted to a stream and then the change set is generated |
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4359
diff
changeset
|
2133 |
from the source stream. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2134 |
Raise an error if the source stream cannot be opened." |
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4359
diff
changeset
|
2135 |
|
2497 | 2136 |
|theChangeSet theSourceStream| |
2137 |
||
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2138 |
[ |
11453 | 2139 |
theSourceStream := aSource readStream. |
2140 |
theChangeSet := ChangeSet fromStream:(theSourceStream := aSource readStream) |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2141 |
] ensure:[ |
11453 | 2142 |
theSourceStream notNil ifTrue:[ |
2143 |
theSourceStream close |
|
2144 |
] |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
2145 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2146 |
self sortChangeSet:theChangeSet. |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
2147 |
^ theChangeSet |
2497 | 2148 |
! |
2149 |
||
2695 | 2150 |
newForClass:aClass againstVersion:aVersionA |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2151 |
"return a ClassChangeSet for the class aClass against some verson in the repository. |
11453 | 2152 |
A new instance of ClassChangeSet is generated containing |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2153 |
the correspondenting changes." |
2695 | 2154 |
|
8891 | 2155 |
|theClassChangeSet| |
2695 | 2156 |
|
2157 |
theClassChangeSet := self new. |
|
8891 | 2158 |
theClassChangeSet setupForClass:aClass againstVersion:aVersionA. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2159 |
^ theClassChangeSet |
2695 | 2160 |
! |
2161 |
||
2949 | 2162 |
newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2163 |
"return a ClassChangeSet for two classes. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2164 |
A new instance of ClassChangeSet is generated containing the correspondenting changes." |
2949 | 2165 |
|
2166 |
|aStream sourceA sourceB theChangeSetA theChangeSetB theClassChangeSet| |
|
2167 |
||
2168 |
theClassChangeSet := self new. |
|
2169 |
theClassChangeSet classBeingCompared:classA. |
|
2170 |
theClassChangeSet labelA:aLabelA. |
|
2171 |
theClassChangeSet labelB:aLabelB. |
|
2172 |
||
2173 |
aStream := '' writeStream. |
|
2174 |
Method flushSourceStreamCache. |
|
2175 |
classA fileOutOn:aStream withTimeStamp:false. |
|
2176 |
sourceA := aStream contents asString. |
|
2177 |
||
2178 |
aStream := '' writeStream. |
|
2179 |
Method flushSourceStreamCache. |
|
2180 |
classB fileOutOn:aStream withTimeStamp:false. |
|
2181 |
sourceB := aStream contents asString. |
|
2182 |
||
11453 | 2183 |
theChangeSetA:=self changeSetForClass:classA andSource:sourceA. |
2949 | 2184 |
theChangeSetB:=self changeSetForClass:classB andSource:sourceB. |
2185 |
theChangeSetA isNil |
|
11453 | 2186 |
ifTrue: [theChangeSetA := ChangeSet new]. |
2949 | 2187 |
theChangeSetB isNil |
11453 | 2188 |
ifTrue: [theChangeSetB := ChangeSet new]. |
2949 | 2189 |
|
2190 |
"/ just in case (if comparing a class against another), |
|
2191 |
"/ unify the classes of the changes (to avoid that all changes are detected as different) |
|
2192 |
||
2193 |
theChangeSetB do:[:eachChange | |
|
11453 | 2194 |
eachChange isMethodChange ifTrue:[ |
2195 |
eachChange changeClass isMeta ifTrue:[ |
|
2196 |
eachChange changeClass ~~ classA theMetaclass ifTrue:[ |
|
2197 |
eachChange changeClass:classA theMetaclass. |
|
2198 |
] |
|
2199 |
] ifFalse:[ |
|
2200 |
eachChange changeClass ~~ classA theNonMetaclass ifTrue:[ |
|
2201 |
eachChange changeClass:classA theNonMetaclass. |
|
2202 |
] |
|
2203 |
]. |
|
2204 |
]. |
|
2949 | 2205 |
]. |
2206 |
"/ remove all #initialize doIts |
|
2207 |
theChangeSetA := theChangeSetA select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
2208 |
theChangeSetB := theChangeSetB select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
2209 |
||
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2210 |
theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2211 |
^ theClassChangeSet |
2949 | 2212 |
! |
2213 |
||
2497 | 2214 |
newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2215 |
"return a ClassChangeSet for the class aClass and the two sources. |
11453 | 2216 |
The two classes are compared via the source files. A new instance of |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2217 |
ClassChangeSet is generated containing the correspondenting changes." |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2218 |
|
4128 | 2219 |
|theChangeSetA theChangeSetB theClassChangeSet className metaClassName| |
2497 | 2220 |
|
2221 |
theClassChangeSet := self new. |
|
2222 |
theClassChangeSet classBeingCompared:aClass. |
|
2223 |
theClassChangeSet labelA:aLabelA. |
|
2224 |
theClassChangeSet labelB:aLabelB. |
|
11453 | 2225 |
theChangeSetA:=self changeSetForClass:aClass andSource:aSourceA. |
2497 | 2226 |
theChangeSetB:=self changeSetForClass:aClass andSource:aSourceB. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2227 |
|
4128 | 2228 |
className := aClass name. |
2229 |
metaClassName := aClass class name. |
|
2230 |
||
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2231 |
aClass isPrivate ifTrue:[ |
11453 | 2232 |
theChangeSetA := theChangeSetA select:[:change | change isMethodChange not |
2233 |
or:[change className = className or:[change className = metaClassName]]]. |
|
2234 |
theChangeSetA := theChangeSetA select:[:change | change isClassDefinitionChange not |
|
2235 |
or:[change className = className or:[change className = metaClassName]]]. |
|
2236 |
theChangeSetA := theChangeSetA select:[:change | change isDoIt not |
|
2237 |
or:[change receiverClassName = className or:[change receiverClassName = metaClassName]]]. |
|
2238 |
theChangeSetB := theChangeSetB select:[:change | change isMethodChange not |
|
2239 |
or:[change className = className or:[change className = metaClassName]]]. |
|
2240 |
theChangeSetB := theChangeSetB select:[:change | change isClassDefinitionChange not |
|
2241 |
or:[change className = className or:[change className = metaClassName]]]. |
|
2242 |
theChangeSetB := theChangeSetB select:[:change | change isDoIt not |
|
2243 |
or:[change receiverClassName = className or:[change receiverClassName = metaClassName]]]. |
|
2244 |
"/ there might be more needed... |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2245 |
]. |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
2246 |
|
2497 | 2247 |
theChangeSetA isNil |
11453 | 2248 |
ifTrue: [theChangeSetA := ChangeSet new]. |
2497 | 2249 |
theChangeSetB isNil |
11453 | 2250 |
ifTrue: [theChangeSetB := ChangeSet new]. |
2947 | 2251 |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2252 |
theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2253 |
^ theClassChangeSet |
2465 | 2254 |
! |
2255 |
||
2497 | 2256 |
newForClass:aClass versionA:aVersionA versionB:aVersionB |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2257 |
"return a ClassChangeSet for the class aClass and the two versions. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2258 |
The two class version are checked out from the repository and then being |
11453 | 2259 |
compared. A new instance of ClassChangeSet is generated containing |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2260 |
the correspondenting changes." |
2497 | 2261 |
|
2262 |
|theChangeSetA theChangeSetB theClassChangeSet| |
|
2263 |
||
2264 |
theClassChangeSet := self new. |
|
2265 |
theClassChangeSet classBeingCompared:aClass. |
|
2856 | 2266 |
theClassChangeSet versionA:aVersionA. |
2267 |
theClassChangeSet versionB:aVersionB. |
|
2497 | 2268 |
theClassChangeSet labelA:aVersionA. |
2269 |
theClassChangeSet labelB:aVersionB. |
|
2270 |
theChangeSetA := self changeSetForClass: aClass andRevision: aVersionA. |
|
2271 |
theChangeSetB := self changeSetForClass: aClass andRevision: aVersionB. |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2272 |
theChangeSetA isNil ifTrue: [theChangeSetA := ChangeSet new]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2273 |
theChangeSetB isNil ifTrue: [theChangeSetB := ChangeSet new]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2274 |
theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2275 |
^ theClassChangeSet |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2276 |
! |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2277 |
|
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2278 |
sortChangeSet:aChangeSet |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2279 |
"/ sort by meta and selector |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2280 |
|
11453 | 2281 |
aChangeSet |
2282 |
sort:[:a :b | |
|
2283 |
a == b ifTrue:[ |
|
2284 |
false |
|
2285 |
] ifFalse:[ |
|
2286 |
a isClassDefinitionChange == b isClassDefinitionChange ifTrue:[ |
|
2287 |
a isClassChange == b isClassChange ifTrue:[ |
|
2288 |
a isClassChange ifTrue:[ |
|
2289 |
a isForMeta == b isForMeta ifTrue:[ |
|
2290 |
a isMethodChange == b isMethodChange ifTrue:[ |
|
2291 |
a className < b className |
|
2292 |
or:[ a className = b className |
|
2293 |
and:[ a isPrimitiveChange not |
|
2294 |
and:[ b isPrimitiveChange not |
|
2295 |
and:[ a selector < b selector ]]]] |
|
2296 |
] ifFalse:[ |
|
2297 |
a isMethodChange not |
|
2298 |
]. |
|
2299 |
] ifFalse:[ |
|
2300 |
a isForMeta |
|
2301 |
]. |
|
2302 |
] ifFalse:[ |
|
2303 |
a printString < b printString |
|
2304 |
]. |
|
2305 |
] ifFalse:[ |
|
2306 |
a isClassChange |
|
2307 |
]. |
|
2308 |
] ifFalse:[ |
|
2309 |
a isClassDefinitionChange |
|
2310 |
]. |
|
2311 |
] |
|
2312 |
]. |
|
2497 | 2313 |
! ! |
2314 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2315 |
|
2497 | 2316 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'accessing'! |
2317 |
||
2318 |
classBeingCompared |
|
3756 | 2319 |
"returns the value of the class which is compared" |
2497 | 2320 |
|
2321 |
^ classBeingCompared |
|
2322 |
! |
|
2221 | 2323 |
|
2497 | 2324 |
classBeingCompared:something |
3756 | 2325 |
"set the value of the class which is compared" |
2497 | 2326 |
|
2327 |
classBeingCompared := something. |
|
2328 |
! |
|
2329 |
||
2695 | 2330 |
diffSet |
3756 | 2331 |
"returns a diffSet containing the different changes. |
2332 |
it responds to: |
|
2695 | 2333 |
|
11453 | 2334 |
changed OrderedCollection of arrays containing ChangeSets for methods |
2335 |
which are changed and exists in the class versionA and versionB |
|
3756 | 2336 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
2337 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
11453 | 2338 |
" |
3756 | 2339 |
|
2695 | 2340 |
^ diffSet |
2341 |
! |
|
2342 |
||
2343 |
diffSet:something |
|
3756 | 2344 |
"sets the diffSet containing the different changes. |
2345 |
it responds to: |
|
2695 | 2346 |
|
11453 | 2347 |
changed OrderedCollection of arrays containing ChangeSets for methods |
2348 |
which are changed and exists in the class versionA and versionB |
|
3756 | 2349 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
2350 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
11453 | 2351 |
" |
2695 | 2352 |
|
2353 |
diffSet := something. |
|
2354 |
! |
|
2355 |
||
2497 | 2356 |
labelA |
3756 | 2357 |
"returns the label for the class versionA" |
2497 | 2358 |
|
2359 |
^ labelA |
|
2360 |
! |
|
2361 |
||
2362 |
labelA:something |
|
3756 | 2363 |
"sets the label for the class versionA" |
2497 | 2364 |
|
2365 |
labelA := something. |
|
2366 |
! |
|
2367 |
||
2368 |
labelB |
|
3756 | 2369 |
"returns the label for the class versionB" |
2497 | 2370 |
|
2371 |
^ labelB |
|
2372 |
! |
|
2465 | 2373 |
|
2497 | 2374 |
labelB:something |
3756 | 2375 |
"sets the label for the class versionB" |
2497 | 2376 |
|
2377 |
labelB := something. |
|
2378 |
! |
|
2379 |
||
2380 |
methodsChanged |
|
11453 | 2381 |
"returns an OrderedCollection of arrays containing ChangeSets for methods |
3756 | 2382 |
which are changed and exists in the class versionA and versionB |
2497 | 2383 |
|
3756 | 2384 |
<return: OrderedCollection of Array(2)> |
2385 |
" |
|
2386 |
||
2387 |
^ self diffSet changed |
|
2497 | 2388 |
! |
2389 |
||
2390 |
methodsOnlyInA |
|
11453 | 2391 |
"returns a ChangeSet for the methods which exists only in the class versionA" |
2497 | 2392 |
|
3756 | 2393 |
^ self diffSet onlyInReceiver |
2497 | 2394 |
! |
2395 |
||
2396 |
methodsOnlyInB |
|
11453 | 2397 |
"returns a ChangeSet for the methods which exists only in the class versionB" |
2497 | 2398 |
|
3756 | 2399 |
^ self diffSet onlyInArg |
2856 | 2400 |
! |
2401 |
||
2402 |
versionA |
|
2403 |
^ versionA |
|
2404 |
! |
|
2405 |
||
2406 |
versionA:something |
|
2407 |
versionA := something. |
|
2408 |
! |
|
2409 |
||
2410 |
versionB |
|
2411 |
^ versionB |
|
2412 |
! |
|
2413 |
||
2414 |
versionB:something |
|
2415 |
versionB := something. |
|
2221 | 2416 |
! ! |
2417 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2418 |
|
8891 | 2419 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'misc'! |
2420 |
||
2421 |
removeAllVersionMethods |
|
2422 |
diffSet removeAllVersionMethods. |
|
2423 |
! ! |
|
2424 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2425 |
|
8891 | 2426 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'setup'! |
2427 |
||
2428 |
setupForClass:aClass againstVersion:aVersionA |
|
2429 |
"return a ClassChangeSet for the class aClass against some verison in the repository. |
|
11453 | 2430 |
A new instance of ClassChangeSet is generated containing |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2431 |
the correspondenting changes." |
8891 | 2432 |
|
2433 |
|theChangeSetA theChangeSetB versionCompared| |
|
2434 |
||
2435 |
self classBeingCompared:aClass. |
|
2436 |
versionCompared := aVersionA. |
|
2437 |
aVersionA isNil ifTrue:[ |
|
11453 | 2438 |
self labelA:(versionCompared := aClass revision). |
2439 |
self versionA:versionCompared. |
|
8891 | 2440 |
] ifFalse:[ |
11453 | 2441 |
aVersionA == #newest ifTrue:[ |
2442 |
self labelA:(VersionDiffBrowser resources string:'Newest'). |
|
2443 |
] ifFalse:[ |
|
2444 |
self labelA:versionCompared. |
|
2445 |
self versionA:versionCompared. |
|
2446 |
] |
|
8891 | 2447 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2448 |
self labelB:(VersionDiffBrowser resources string:'Current'). |
8891 | 2449 |
theChangeSetA := self class changeSetForClass: aClass andRevision: versionCompared. |
2450 |
theChangeSetB := self class changeSetForClass: aClass. |
|
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2451 |
theChangeSetA isNil ifTrue: [theChangeSetA := ChangeSet new]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2452 |
theChangeSetB isNil ifTrue: [theChangeSetB := ChangeSet new]. |
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2453 |
|
8891 | 2454 |
"/ if we are comparing a private class, prune out other changes |
2455 |
aClass isPrivate ifTrue:[ |
|
11453 | 2456 |
theChangeSetA removeAllSuchThat:[:aChange | aChange className ~= aClass name ]. |
2457 |
theChangeSetB removeAllSuchThat:[:aChange | aChange className ~= aClass name ]. |
|
8891 | 2458 |
]. |
9239
1cfdf9dae50b
double click; extensions-filter; better printStrings
Claus Gittinger <cg@exept.de>
parents:
8891
diff
changeset
|
2459 |
self activityNotification:'Generating diff-set...'. |
8891 | 2460 |
self diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
2461 |
self activityNotification:nil. |
|
2462 |
^ diffSet |
|
2463 |
! ! |
|
2464 |
||
12571
b2e5fdb702cb
Merged 4af2effeeb06 and b9d8a19b796c (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
2465 |
|
2221 | 2466 |
!VersionDiffBrowser class methodsFor:'documentation'! |
2467 |
||
2468 |
version |
|
12512 | 2469 |
^ '$Header: /cvs/stx/stx/libtool/VersionDiffBrowser.st,v 1.112 2013-03-23 11:37:08 cg Exp $' |
8811
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
2470 |
! |
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
2471 |
|
65e08571a2f3
changed: #openOnClass:labelA:sourceA:labelB:sourceB:title:ifSame:
fm
parents:
8657
diff
changeset
|
2472 |
version_CVS |
12512 | 2473 |
^ '$Header: /cvs/stx/stx/libtool/VersionDiffBrowser.st,v 1.112 2013-03-23 11:37:08 cg Exp $' |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2474 |
! |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2475 |
|
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
2476 |
version_HG |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
2477 |
|
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
2478 |
^ '$Changeset: <not expanded> $' |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
2479 |
! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12401
diff
changeset
|
2480 |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2481 |
version_SVN |
12308 | 2482 |
^ '$Id: VersionDiffBrowser.st 8074 2012-11-30 17:23:39Z vranyj1 $' |
2221 | 2483 |
! ! |
12512 | 2484 |