author | Claus Gittinger <cg@exept.de> |
Tue, 12 Sep 2006 14:27:23 +0200 | |
changeset 7108 | e22911bfd36b |
parent 6828 | 034ea2c4c22a |
child 7364 | e7613aec8035 |
permissions | -rw-r--r-- |
2626 | 1 |
" |
2 |
COPYRIGHT (c) 2000 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
" |
|
12 |
||
13 |
||
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
14 |
"{ Package: 'stx:libtool' }" |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
15 |
|
2221 | 16 |
ApplicationModel subclass:#VersionDiffBrowser |
2856 | 17 |
instanceVariableNames:'classChangeSet diffTextView boxAVisible boxBVisible boxMVisible |
18 |
classIfSingleClassDiff versionAIfSingleClassDiff |
|
3147 | 19 |
versionBIfSingleClassDiff changedLabelHolder diffTextLabelA |
20 |
diffTextLabelB methodText methodsChanged methodsChangedSelection |
|
21 |
methodsOnlyInA methodsOnlyInASelection methodsOnlyInB |
|
5182 | 22 |
methodsOnlyInBSelection onlyInALabelHolder onlyInBLabelHolder |
23 |
classHolder versionAHolder versionBHolder' |
|
2221 | 24 |
classVariableNames:'' |
25 |
poolDictionaries:'' |
|
26 |
category:'Interface-Browsers' |
|
27 |
! |
|
28 |
||
2497 | 29 |
HierarchicalItem subclass:#ClassChangeSet |
2695 | 30 |
instanceVariableNames:'classBeingCompared labelA labelB diffSet onlyInA onlyInB |
2856 | 31 |
changedMethods 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 |
|
42 |
All Rights Reserved |
|
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 |
|
72 |
!VersionDiffBrowser class methodsFor:'interface specs'! |
|
73 |
||
74 |
windowSpec |
|
75 |
"This resource specification was automatically generated |
|
76 |
by the UIPainter of ST/X." |
|
77 |
||
78 |
"Do not manually edit this!! If it is corrupted, |
|
79 |
the UIPainter may not be able to read the specification." |
|
80 |
||
81 |
" |
|
82 |
UIPainter new openOnClass:VersionDiffBrowser andSelector:#windowSpec |
|
83 |
VersionDiffBrowser new openInterface:#windowSpec |
|
84 |
VersionDiffBrowser open |
|
85 |
" |
|
86 |
||
87 |
<resource: #canvas> |
|
88 |
||
89 |
^ |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
90 |
#(FullSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
91 |
name: windowSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
92 |
window: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
93 |
(WindowSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
94 |
label: 'Version DiffBrowser' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
95 |
name: 'Version DiffBrowser' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
96 |
min: (Point 10 10) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
97 |
bounds: (Rectangle 14 46 879 550) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
98 |
menu: mainMenu |
2221 | 99 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
100 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
101 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
102 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
103 |
(VariableVerticalPanelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
104 |
name: 'VariableVerticalPanel1' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
105 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
106 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
107 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
108 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
109 |
(HorizontalPanelViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
110 |
name: 'TopHorizontalPanel' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
111 |
horizontalLayout: fit |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
112 |
verticalLayout: fit |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
113 |
horizontalSpace: 3 |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
114 |
verticalSpace: 3 |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
115 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
116 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
117 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
118 |
(ViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
119 |
name: 'BoxA' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
120 |
level: 0 |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
121 |
visibilityChannel: boxAVisible |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
122 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
123 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
124 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
125 |
(LabelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
126 |
label: 'Only in A' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
127 |
name: 'OnlyInALabel' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
128 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
129 |
translateLabel: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
130 |
labelChannel: onlyInALabelHolder |
2221 | 131 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
132 |
(SequenceViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
133 |
name: 'ListA' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
134 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
135 |
model: methodsOnlyInASelection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
136 |
menu: menuA |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
137 |
hasHorizontalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
138 |
hasVerticalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
139 |
miniScrollerHorizontal: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
140 |
valueChangeSelector: methodsOnlyInASelectionChanged |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
141 |
useIndex: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
142 |
sequenceList: methodsOnlyInA |
2221 | 143 |
) |
144 |
) |
|
145 |
||
146 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
147 |
extent: (Point 286 252) |
2221 | 148 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
149 |
(ViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
150 |
name: 'BoxM' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
151 |
visibilityChannel: boxMVisible |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
152 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
153 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
154 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
155 |
(LabelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
156 |
label: 'Changed' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
157 |
name: 'Label2' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
158 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
159 |
translateLabel: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
160 |
labelChannel: changedLabelHolder |
2221 | 161 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
162 |
(SequenceViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
163 |
name: 'ListM' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
164 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
165 |
model: methodsChangedSelection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
166 |
menu: menuM |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
167 |
hasHorizontalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
168 |
hasVerticalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
169 |
miniScrollerHorizontal: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
170 |
valueChangeSelector: methodsChangedSelectionChanged |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
171 |
useIndex: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
172 |
sequenceList: methodsChanged |
2221 | 173 |
) |
174 |
) |
|
175 |
||
176 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
177 |
extent: (Point 286 252) |
2221 | 178 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
179 |
(ViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
180 |
name: 'BoxB' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
181 |
visibilityChannel: boxBVisible |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
182 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
183 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
184 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
185 |
(LabelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
186 |
label: 'Only in B' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
187 |
name: 'OnlyInBLabel' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
188 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 20 0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
189 |
translateLabel: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
190 |
labelChannel: onlyInBLabelHolder |
2221 | 191 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
192 |
(SequenceViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
193 |
name: 'ListB' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
194 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 -3 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
195 |
model: methodsOnlyInBSelection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
196 |
menu: menuB |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
197 |
hasHorizontalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
198 |
hasVerticalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
199 |
miniScrollerHorizontal: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
200 |
valueChangeSelector: methodsOnlyInBSelectionChanged |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
201 |
useIndex: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
202 |
sequenceList: methodsOnlyInB |
2221 | 203 |
) |
204 |
) |
|
205 |
||
206 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
207 |
extent: (Point 287 252) |
2221 | 208 |
) |
209 |
) |
|
210 |
||
211 |
) |
|
212 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
213 |
(ViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
214 |
name: 'Box4' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
215 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
216 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
217 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
218 |
(ViewSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
219 |
name: 'diffTextViewBox' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
220 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
221 |
initiallyInvisible: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
222 |
component: |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
223 |
(SpecCollection |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
224 |
collection: ( |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
225 |
(LabelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
226 |
label: 'A' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
227 |
name: 'DiffTextLabelA' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
228 |
layout: (LayoutFrame 0 0 0 0 0 0.5 20 0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
229 |
translateLabel: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
230 |
labelChannel: diffTextLabelA |
2221 | 231 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
232 |
(LabelSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
233 |
label: 'B' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
234 |
name: 'DiffTextLabelB' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
235 |
layout: (LayoutFrame 0 0.5 0 0 0 1 20 0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
236 |
translateLabel: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
237 |
labelChannel: diffTextLabelB |
2221 | 238 |
) |
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
239 |
(ArbitraryComponentSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
240 |
name: 'diffTextView' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
241 |
layout: (LayoutFrame 0 0.0 20 0.0 0 1.0 0 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
242 |
hasBorder: false |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
243 |
component: diffTextView |
2221 | 244 |
) |
245 |
) |
|
246 |
||
247 |
) |
|
248 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
249 |
(TextEditorSpec |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
250 |
name: 'singleTextView' |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
251 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
252 |
model: methodText |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
253 |
hasHorizontalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
254 |
hasVerticalScrollBar: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
255 |
miniScrollerHorizontal: true |
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
256 |
isReadOnly: true |
2221 | 257 |
) |
258 |
) |
|
259 |
||
260 |
) |
|
261 |
) |
|
262 |
) |
|
263 |
||
264 |
) |
|
5150
4a469455c4b4
Remove max windowsize constraint from windowSpecs.
Stefan Vogel <sv@exept.de>
parents:
4653
diff
changeset
|
265 |
handles: (Any 0.5 1.0) |
2221 | 266 |
) |
267 |
) |
|
268 |
||
269 |
) |
|
270 |
) |
|
271 |
! ! |
|
272 |
||
273 |
!VersionDiffBrowser class methodsFor:'menu specs'! |
|
274 |
||
275 |
mainMenu |
|
276 |
"This resource specification was automatically generated |
|
277 |
by the MenuEditor of ST/X." |
|
278 |
||
279 |
"Do not manually edit this!! If it is corrupted, |
|
280 |
the MenuEditor may not be able to read the specification." |
|
281 |
||
282 |
" |
|
283 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#mainMenu |
|
284 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser mainMenu)) startUp |
|
285 |
" |
|
286 |
||
287 |
<resource: #menu> |
|
288 |
||
289 |
^ |
|
290 |
#(#Menu |
|
291 |
#( |
|
292 |
#(#MenuItem |
|
293 |
#label: 'File' |
|
294 |
#translateLabel: true |
|
295 |
#submenu: |
|
296 |
#(#Menu |
|
297 |
#( |
|
298 |
#(#MenuItem |
|
2856 | 299 |
#label: 'Create PatchFile...' |
2469 | 300 |
#translateLabel: true |
301 |
#value: #createPatchFile |
|
302 |
) |
|
303 |
#(#MenuItem |
|
304 |
#label: '-' |
|
305 |
) |
|
306 |
#(#MenuItem |
|
2221 | 307 |
#label: 'Exit' |
308 |
#translateLabel: true |
|
309 |
#value: #closeRequest |
|
310 |
) |
|
311 |
) |
|
312 |
nil |
|
313 |
nil |
|
314 |
) |
|
315 |
) |
|
316 |
#(#MenuItem |
|
317 |
#label: 'Help' |
|
318 |
#translateLabel: true |
|
319 |
#startGroup: #right |
|
320 |
#submenu: |
|
321 |
#(#Menu |
|
322 |
#( |
|
323 |
#(#MenuItem |
|
324 |
#label: 'Documentation' |
|
325 |
#translateLabel: true |
|
326 |
#value: #openDocumentation |
|
327 |
) |
|
328 |
#(#MenuItem |
|
329 |
#label: '-' |
|
330 |
) |
|
331 |
#(#MenuItem |
|
6642 | 332 |
#label: 'About this Application...' |
2221 | 333 |
#translateLabel: true |
334 |
#value: #openAboutThisApplication |
|
335 |
) |
|
336 |
) |
|
337 |
nil |
|
338 |
nil |
|
339 |
) |
|
340 |
) |
|
341 |
) |
|
342 |
nil |
|
343 |
nil |
|
344 |
) |
|
345 |
! |
|
346 |
||
347 |
menuA |
|
348 |
"This resource specification was automatically generated |
|
349 |
by the MenuEditor of ST/X." |
|
350 |
||
351 |
"Do not manually edit this!! If it is corrupted, |
|
352 |
the MenuEditor may not be able to read the specification." |
|
353 |
||
354 |
" |
|
355 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
356 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
357 |
" |
|
358 |
||
359 |
<resource: #menu> |
|
360 |
||
361 |
^ |
|
362 |
#(#Menu |
|
363 |
#( |
|
364 |
#(#MenuItem |
|
3322 | 365 |
#label: 'Apply' |
2221 | 366 |
#translateLabel: true |
3322 | 367 |
#value: #applySelectedChangeInA |
3753 | 368 |
#enabled: #hasChangeSelectedInA |
3322 | 369 |
) |
370 |
#(#MenuItem |
|
371 |
#label: 'Browse' |
|
372 |
#translateLabel: true |
|
373 |
#value: #browseClassInA |
|
3753 | 374 |
#enabled: #hasChangeSelectedInA |
2221 | 375 |
) |
2465 | 376 |
#(#MenuItem |
377 |
#label: '-' |
|
378 |
) |
|
379 |
#(#MenuItem |
|
3322 | 380 |
#label: 'Inspect' |
2465 | 381 |
#translateLabel: true |
3322 | 382 |
#value: #inspectSelectedChangeInA |
383 |
#choiceValue: 'nil "UndefinedObject" ' |
|
3753 | 384 |
#enabled: #hasChangeSelectedInA |
2465 | 385 |
) |
2221 | 386 |
) |
387 |
nil |
|
388 |
nil |
|
389 |
) |
|
390 |
! |
|
391 |
||
392 |
menuB |
|
393 |
"This resource specification was automatically generated |
|
394 |
by the MenuEditor of ST/X." |
|
395 |
||
396 |
"Do not manually edit this!! If it is corrupted, |
|
397 |
the MenuEditor may not be able to read the specification." |
|
398 |
||
399 |
" |
|
400 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menuB |
|
401 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menuB)) startUp |
|
402 |
" |
|
403 |
||
404 |
<resource: #menu> |
|
405 |
||
406 |
^ |
|
407 |
#(#Menu |
|
408 |
#( |
|
409 |
#(#MenuItem |
|
3322 | 410 |
#label: 'Apply' |
2221 | 411 |
#translateLabel: true |
3322 | 412 |
#value: #applySelectedChangeInB |
3753 | 413 |
#enabled: #hasChangeSelectedInB |
3322 | 414 |
) |
415 |
#(#MenuItem |
|
416 |
#label: 'Browse' |
|
417 |
#translateLabel: true |
|
418 |
#value: #browseClassInB |
|
3753 | 419 |
#enabled: #hasChangeSelectedInB |
2221 | 420 |
) |
2465 | 421 |
#(#MenuItem |
422 |
#label: '-' |
|
423 |
) |
|
424 |
#(#MenuItem |
|
3322 | 425 |
#label: 'Inspect' |
2465 | 426 |
#translateLabel: true |
3322 | 427 |
#value: #inspectSelectedChangeInB |
428 |
#choiceValue: 'nil "UndefinedObject" ' |
|
3753 | 429 |
#enabled: #hasChangeSelectedInA |
2465 | 430 |
) |
2221 | 431 |
) |
432 |
nil |
|
433 |
nil |
|
434 |
) |
|
435 |
! |
|
436 |
||
437 |
menuM |
|
438 |
"This resource specification was automatically generated |
|
439 |
by the MenuEditor of ST/X." |
|
440 |
||
441 |
"Do not manually edit this!! If it is corrupted, |
|
442 |
the MenuEditor may not be able to read the specification." |
|
443 |
||
444 |
" |
|
445 |
MenuEditor new openOnClass:VersionDiffBrowser andSelector:#menu1 |
|
446 |
(Menu new fromLiteralArrayEncoding:(VersionDiffBrowser menu1)) startUp |
|
447 |
" |
|
448 |
||
449 |
<resource: #menu> |
|
450 |
||
451 |
^ |
|
452 |
#(#Menu |
|
453 |
#( |
|
454 |
#(#MenuItem |
|
3322 | 455 |
#label: 'Browse' |
2221 | 456 |
#translateLabel: true |
3322 | 457 |
#value: #browseClassInM |
3753 | 458 |
#enabled: #hasChangeSelectedInM |
2221 | 459 |
) |
2465 | 460 |
#(#MenuItem |
461 |
#label: '-' |
|
462 |
) |
|
463 |
#(#MenuItem |
|
3322 | 464 |
#label: 'Inspect both' |
2465 | 465 |
#translateLabel: true |
3322 | 466 |
#value: #inspectSelectedChangeInM |
467 |
#choiceValue: 'nil "UndefinedObject" ' |
|
3753 | 468 |
#enabled: #hasChangeSelectedInM |
2465 | 469 |
) |
2221 | 470 |
) |
471 |
nil |
|
472 |
nil |
|
473 |
) |
|
474 |
! ! |
|
475 |
||
2695 | 476 |
!VersionDiffBrowser class methodsFor:'plugIn spec'! |
477 |
||
478 |
aspectSelectors |
|
479 |
"This resource specification was automatically generated |
|
480 |
by the UIPainter of ST/X." |
|
481 |
||
482 |
"Do not manually edit this. If it is corrupted, |
|
483 |
the UIPainter may not be able to read the specification." |
|
484 |
||
485 |
"Return a description of exported aspects; |
|
486 |
these can be connected to aspects of an embedding application |
|
487 |
(if this app is embedded in a subCanvas)." |
|
488 |
||
489 |
^ #( |
|
490 |
#changedLabelHolder |
|
491 |
#onlyInALabelHolder |
|
492 |
#onlyInBLabelHolder |
|
493 |
). |
|
494 |
||
495 |
! ! |
|
496 |
||
2221 | 497 |
!VersionDiffBrowser class methodsFor:'startup'! |
498 |
||
2695 | 499 |
openOnClass:aClass againstVersion:aVersionA |
3147 | 500 |
" |
501 |
create an VersionDiffBrowser instance and set the class change set of the |
|
502 |
browser. The class diff set is generated from classes current against some version |
|
503 |
via the source code manager . |
|
2507 | 504 |
|
3147 | 505 |
<return: VersionDiffBrowser> |
506 |
" |
|
2497 | 507 |
|theBrowser| |
2224 | 508 |
|
2497 | 509 |
theBrowser := self new. |
510 |
theBrowser allButOpen. |
|
2695 | 511 |
theBrowser setupForClass:aClass againstVersion:aVersionA. |
2497 | 512 |
theBrowser openWindow. |
513 |
^ theBrowser. |
|
2224 | 514 |
|
2695 | 515 |
" |
516 |
self openOnClass:Array againstVersion:'1.116' |
|
517 |
self openOnClass:Array againstVersion:nil - against the version on which Array is based upon |
|
518 |
self openOnClass:Array againstVersion:#newest - against the newest repository version |
|
519 |
||
520 |
self openOnClass:VersionDiffBrowser againstVersion:nil |
|
521 |
self openOnClass:VersionDiffBrowser againstVersion:#newest |
|
522 |
" |
|
523 |
! |
|
524 |
||
2949 | 525 |
openOnClass:classA labelA:aLabelA andClass:classB labelB:aLabelB title:ignoredTitle |
3147 | 526 |
" |
527 |
create an VersionDiffBrowser instance and set the class change set of the |
|
528 |
browser. The class diff set is generated from two classes. |
|
2949 | 529 |
|
3147 | 530 |
<return: VersionDiffBrowser> |
531 |
" |
|
2949 | 532 |
^ self |
533 |
openOnClass:classA labelA:aLabelA andClass:classB labelB:aLabelB title:ignoredTitle ifSame:nil |
|
534 |
! |
|
535 |
||
536 |
openOnClass:classA labelA:aLabelA andClass:classB labelB:aLabelB title:ignoredTitle ifSame:sameAction |
|
3147 | 537 |
" |
538 |
create an VersionDiffBrowser instance and set the class change set of the |
|
539 |
browser. The class diff set is generated from two classes. |
|
2949 | 540 |
|
3147 | 541 |
<return: VersionDiffBrowser> |
542 |
" |
|
2949 | 543 |
|theBrowser| |
544 |
||
545 |
theBrowser := self new. |
|
546 |
theBrowser allButOpen. |
|
547 |
theBrowser setupForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB. |
|
548 |
||
549 |
sameAction notNil ifTrue:[ |
|
550 |
"/ check if same ... |
|
551 |
(theBrowser classChangeSet methodsOnlyInA isEmpty |
|
552 |
and:[theBrowser classChangeSet methodsOnlyInB isEmpty |
|
553 |
and:[theBrowser classChangeSet diffSet isEmpty]]) ifTrue:[ |
|
554 |
sameAction value. |
|
555 |
^ self "/ do not open |
|
556 |
] |
|
557 |
]. |
|
558 |
theBrowser openWindow. |
|
559 |
^ theBrowser. |
|
560 |
! |
|
561 |
||
2695 | 562 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
3147 | 563 |
" |
564 |
create an VersionDiffBrowser instance and set the class change set of the |
|
565 |
browser. The class diff set is generated from two source files. |
|
2695 | 566 |
|
3147 | 567 |
<return: VersionDiffBrowser> |
568 |
" |
|
2716
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
569 |
^ self |
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
570 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
571 |
title:nil |
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
572 |
! |
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
573 |
|
8451e7057f00
some common startup protocol between DiffViewer and VersionDiffBrowser
Claus Gittinger <cg@exept.de>
parents:
2714
diff
changeset
|
574 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB title:ignoredTitle |
3147 | 575 |
" |
576 |
create an VersionDiffBrowser instance and set the class change set of the |
|
577 |
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
|
578 |
|
3147 | 579 |
<return: VersionDiffBrowser> |
580 |
" |
|
2849 | 581 |
^ self openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB title:ignoredTitle ifSame:nil |
582 |
! |
|
583 |
||
584 |
openOnClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB title:ignoredTitle ifSame:sameAction |
|
3147 | 585 |
" |
586 |
create an VersionDiffBrowser instance and set the class change set of the |
|
587 |
browser. The class diff set is generated from two source files. |
|
2849 | 588 |
|
3147 | 589 |
<return: VersionDiffBrowser> |
590 |
" |
|
3853
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
591 |
|theBrowser diffs theOnlyDifference theOnlyChange noChangedMethods| |
2695 | 592 |
|
593 |
theBrowser := self new. |
|
594 |
theBrowser allButOpen. |
|
595 |
theBrowser setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB. |
|
2849 | 596 |
sameAction notNil ifTrue:[ |
2853 | 597 |
"/ check if same ... |
598 |
(theBrowser classChangeSet methodsOnlyInA isEmpty |
|
3682
a17c1e10caa5
fixed versions-are-the-same check
Claus Gittinger <cg@exept.de>
parents:
3678
diff
changeset
|
599 |
and:[theBrowser classChangeSet methodsOnlyInB isEmpty]) ifTrue:[ |
a17c1e10caa5
fixed versions-are-the-same check
Claus Gittinger <cg@exept.de>
parents:
3678
diff
changeset
|
600 |
diffs := theBrowser classChangeSet diffSet. |
3853
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
601 |
|
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
602 |
noChangedMethods := diffs changed isEmpty. |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
603 |
noChangedMethods ifFalse:[ |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
604 |
diffs changed size == 1 ifTrue:[ |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
605 |
theOnlyDifference := diffs changed first. |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
606 |
theOnlyChange := theOnlyDifference first. |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
607 |
(theOnlyChange isMethodChange |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
608 |
and:[ (theOnlyChange selector == #version) |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
609 |
and:[ theOnlyChange changeClass isMeta ]]) ifTrue:[ |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
610 |
noChangedMethods := true |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
611 |
] |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
612 |
] |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
613 |
]. |
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
614 |
|
f3ce00da9b68
ignore any changes in the version method, when compating
Claus Gittinger <cg@exept.de>
parents:
3843
diff
changeset
|
615 |
(noChangedMethods |
3756 | 616 |
and:[diffs onlyInArg isEmpty |
617 |
and:[diffs onlyInReceiver isEmpty]]) ifTrue:[ |
|
618 |
sameAction value. |
|
619 |
^ self "/ do not open |
|
3682
a17c1e10caa5
fixed versions-are-the-same check
Claus Gittinger <cg@exept.de>
parents:
3678
diff
changeset
|
620 |
]. |
2853 | 621 |
] |
2849 | 622 |
]. |
2695 | 623 |
theBrowser openWindow. |
624 |
^ theBrowser. |
|
2224 | 625 |
! |
626 |
||
2497 | 627 |
openOnClass:aClass versionA:aVersionA versionB:aVersionB |
3147 | 628 |
" |
629 |
create an VersionDiffBrowser instance and set the class change set of the |
|
630 |
browser. The class diff set is generated from two class versions via |
|
631 |
the source code manager . |
|
2507 | 632 |
|
3147 | 633 |
<return: VersionDiffBrowser> |
634 |
" |
|
2497 | 635 |
|theBrowser| |
2221 | 636 |
|
2497 | 637 |
theBrowser := self new. |
638 |
theBrowser allButOpen. |
|
2695 | 639 |
theBrowser setupForClass:aClass versionA:aVersionA versionB:aVersionB. |
2497 | 640 |
theBrowser openWindow. |
641 |
^ theBrowser. |
|
2221 | 642 |
|
643 |
" |
|
644 |
self openOnClass:Array versionA:'1.116' versionB:'1.113' |
|
645 |
" |
|
3678 | 646 |
! |
647 |
||
648 |
openOnDiffSet:diffSet labelA:aLabelA labelB:aLabelB title:ignoredTitle |
|
649 |
|theBrowser| |
|
650 |
||
651 |
theBrowser := self new. |
|
652 |
theBrowser allButOpen. |
|
653 |
theBrowser setupForDiffSet:diffSet labelA:aLabelA labelB:aLabelB. |
|
654 |
theBrowser window label:ignoredTitle. |
|
655 |
theBrowser openWindow. |
|
656 |
^ theBrowser. |
|
5520 | 657 |
! |
658 |
||
659 |
openOnDiffsBetweenFile:file1 and:file2 |
|
660 |
|set1 set2 diffset theBrowser| |
|
661 |
||
662 |
set1 := ChangeSet fromFile:file1. |
|
663 |
set2 := ChangeSet fromFile:file2. |
|
664 |
diffset := set1 diffSetsAgainst:set2. |
|
665 |
||
666 |
theBrowser := self new. |
|
667 |
theBrowser allButOpen. |
|
668 |
theBrowser setupForDiffSet:diffset labelA:file1 asFilename baseName labelB:file2 asFilename baseName. |
|
669 |
theBrowser window label:('%1 vs. %2' bindWith:file1 asFilename baseName with:file2 asFilename baseName). |
|
670 |
theBrowser openWindow. |
|
671 |
^ theBrowser. |
|
672 |
||
673 |
" |
|
674 |
VersionDiffBrowser |
|
675 |
openOnDiffsBetweenFile:'/phys/exept/tmp/ws/Workflow::BlockDescription.st' |
|
676 |
and:'/phys/exept/tmp/workflowClasses/Workflow::BlockDescription.st' |
|
677 |
" |
|
2221 | 678 |
! ! |
679 |
||
680 |
!VersionDiffBrowser methodsFor:'accessing'! |
|
681 |
||
2497 | 682 |
changeSetA |
3147 | 683 |
" |
684 |
gets the change set which contains only the new methods |
|
685 |
in versionA of the class |
|
2221 | 686 |
|
3147 | 687 |
<return: ChangeSet> |
688 |
" |
|
2221 | 689 |
|
2497 | 690 |
^ self classChangeSet methodsOnlyInA |
2221 | 691 |
! |
692 |
||
2497 | 693 |
changeSetB |
3147 | 694 |
" |
695 |
gets the change set which contains only the new methods |
|
696 |
in versionB of the class |
|
2497 | 697 |
|
3147 | 698 |
<return: ChangeSet> |
699 |
" |
|
2497 | 700 |
|
701 |
^ self classChangeSet methodsOnlyInB |
|
702 |
! |
|
703 |
||
2856 | 704 |
class:aClass versionA:revA versionB:revB |
705 |
classIfSingleClassDiff := aClass. |
|
706 |
versionAIfSingleClassDiff := revA. |
|
707 |
versionBIfSingleClassDiff := revB. |
|
708 |
! |
|
709 |
||
2497 | 710 |
classBeingCompared |
3147 | 711 |
" |
712 |
gets the class from the change set which is compared. |
|
2224 | 713 |
|
3147 | 714 |
<return: Class> |
715 |
" |
|
2497 | 716 |
^ self classChangeSet classBeingCompared |
717 |
! |
|
718 |
||
719 |
classChangeSet |
|
3147 | 720 |
" |
721 |
returns the class change set which is the model of the version diff browser. |
|
2224 | 722 |
|
3147 | 723 |
<return: ClassChangeSet> |
724 |
" |
|
2507 | 725 |
^ classChangeSet |
726 |
! |
|
2497 | 727 |
|
2507 | 728 |
classChangeSet:aClassChangeSet |
3147 | 729 |
" |
730 |
sets the class change set which is the model of the version diff browser. |
|
731 |
The labels, the lists, the visibility and the selection of the lists must be reseted |
|
732 |
when a new change set is given. |
|
2497 | 733 |
|
3147 | 734 |
<return: self> |
735 |
" |
|
2507 | 736 |
classChangeSet := aClassChangeSet. |
2501 | 737 |
self updateLabels. |
738 |
self updateLists. |
|
739 |
self resetSelectionHolders. |
|
740 |
! |
|
2224 | 741 |
|
2507 | 742 |
selectedChangeInA |
3147 | 743 |
" |
744 |
gets the selected method change for the 'method only in version A'. |
|
2507 | 745 |
|
3147 | 746 |
<return: MethodChange | nil> |
747 |
" |
|
2507 | 748 |
|sel change| |
749 |
||
750 |
sel := self methodsOnlyInASelection value. |
|
751 |
sel notNil ifTrue:[ |
|
3753 | 752 |
change := self changeSetA at:sel. |
2507 | 753 |
]. |
3753 | 754 |
^ change |
2507 | 755 |
! |
756 |
||
757 |
selectedChangeInB |
|
3147 | 758 |
" |
759 |
gets the selected method change for the 'method only in version B'. |
|
2507 | 760 |
|
3147 | 761 |
<return: MethodChange | nil> |
762 |
" |
|
2507 | 763 |
|sel change| |
764 |
||
765 |
sel := self methodsOnlyInBSelection value. |
|
766 |
sel notNil ifTrue:[ |
|
767 |
change := (self changeSetB at:sel). |
|
768 |
]. |
|
3753 | 769 |
^ change |
2507 | 770 |
! |
771 |
||
772 |
selectedChangesInM |
|
3147 | 773 |
" |
774 |
get the two method changes for the selected 'changed method'. |
|
2507 | 775 |
|
3147 | 776 |
<return: <Array with:MethodChange with:MethodChange | nil>> |
777 |
" |
|
2745 | 778 |
|sel changeA changeB theTwoChanges| |
2507 | 779 |
|
780 |
sel := self methodsChangedSelection value. |
|
781 |
sel notNil ifTrue:[ |
|
2745 | 782 |
theTwoChanges := self classChangeSet methodsChanged at:sel. |
3753 | 783 |
"/ changeA := theTwoChanges first. |
784 |
"/ changeB := theTwoChanges second. |
|
785 |
"/ ^ Array with:changeA with:changeB. |
|
786 |
^ theTwoChanges. |
|
2507 | 787 |
]. |
3753 | 788 |
^ #(nil nil) |
2507 | 789 |
! |
790 |
||
2221 | 791 |
versionA |
3147 | 792 |
" |
793 |
gets the first class version to be compared |
|
2221 | 794 |
|
3147 | 795 |
<return: String> |
796 |
" |
|
2731 | 797 |
classChangeSet isNil ifTrue:[^ 'A']. |
798 |
^ classChangeSet labelA |
|
2221 | 799 |
! |
800 |
||
801 |
versionB |
|
3147 | 802 |
" |
803 |
gets the second class version to be compared |
|
2221 | 804 |
|
3147 | 805 |
<return: String> |
806 |
" |
|
2731 | 807 |
classChangeSet isNil ifTrue:[^ 'B']. |
808 |
^ classChangeSet labelB |
|
2221 | 809 |
! ! |
810 |
||
811 |
!VersionDiffBrowser methodsFor:'actions'! |
|
812 |
||
813 |
methodsChangedSelectionChanged |
|
3147 | 814 |
" |
815 |
the selection in the list of the 'changed methods' changed. |
|
816 |
Reset the selection of the two other lists and calc the method change. |
|
2507 | 817 |
|
3147 | 818 |
<return: self> |
819 |
" |
|
2695 | 820 |
|sel idxA idxB changeA changeB methodsChanged| |
2221 | 821 |
|
822 |
sel := self methodsChangedSelection value. |
|
823 |
sel notNil ifTrue:[ |
|
824 |
self methodsOnlyInASelection value:nil. |
|
825 |
self methodsOnlyInBSelection value:nil. |
|
2695 | 826 |
methodsChanged := self classChangeSet methodsChanged. |
827 |
changeA := (methodsChanged at:sel) first. |
|
828 |
changeB := (methodsChanged at:sel) second. |
|
2501 | 829 |
self withReadCursorDo:[ |
3051 | 830 |
self diffTextView text1:changeA prettyPrintedSource text2:changeB prettyPrintedSource. |
2501 | 831 |
self diffTextView moveToNextChanged |
2377 | 832 |
]. |
2221 | 833 |
self showDiffTextView. |
834 |
] |
|
2377 | 835 |
|
836 |
"Modified: / 3.9.1999 / 15:01:30 / ps" |
|
2221 | 837 |
! |
838 |
||
839 |
methodsOnlyInASelectionChanged |
|
3147 | 840 |
" |
841 |
the selection in the list of the 'method only in version A' changed. |
|
842 |
Reset the selection of the two other lists and show the method in |
|
843 |
the text view. |
|
2507 | 844 |
|
3147 | 845 |
<return: self> |
846 |
" |
|
2221 | 847 |
|change sel| |
848 |
||
849 |
sel := self methodsOnlyInASelection value. |
|
850 |
sel notNil ifTrue:[ |
|
851 |
self methodsOnlyInBSelection value:nil. |
|
852 |
self methodsChangedSelection value:nil. |
|
2497 | 853 |
change := self changeSetA at:sel. |
3051 | 854 |
self methodText value:(change prettyPrintedSource). |
2221 | 855 |
self showSingleTextView. |
856 |
] |
|
857 |
! |
|
858 |
||
859 |
methodsOnlyInBSelectionChanged |
|
3147 | 860 |
" |
861 |
the selection in the list of the 'method only in version B' changed. |
|
862 |
Reset the selection of the two other lists and show the method in |
|
863 |
the text view. |
|
2507 | 864 |
|
3147 | 865 |
<return: self> |
866 |
" |
|
2221 | 867 |
|change sel| |
868 |
||
869 |
sel := self methodsOnlyInBSelection value. |
|
870 |
sel notNil ifTrue:[ |
|
871 |
self methodsOnlyInASelection value:nil. |
|
872 |
self methodsChangedSelection value:nil. |
|
2497 | 873 |
change := self changeSetB at:sel. |
3051 | 874 |
self methodText value:(change prettyPrintedSource). |
2221 | 875 |
self showSingleTextView. |
876 |
] |
|
877 |
! ! |
|
878 |
||
879 |
!VersionDiffBrowser methodsFor:'aspects'! |
|
880 |
||
2585 | 881 |
boxAVisible |
2745 | 882 |
boxAVisible isNil ifTrue:[ |
883 |
boxAVisible := true asValue. |
|
2585 | 884 |
]. |
2745 | 885 |
^ boxAVisible. |
2585 | 886 |
! |
887 |
||
888 |
boxBVisible |
|
2745 | 889 |
boxBVisible isNil ifTrue:[ |
890 |
boxBVisible := true asValue. |
|
2585 | 891 |
]. |
2745 | 892 |
^ boxBVisible. |
2585 | 893 |
! |
894 |
||
895 |
boxMVisible |
|
2745 | 896 |
boxMVisible isNil ifTrue:[ |
897 |
boxMVisible := true asValue. |
|
2585 | 898 |
]. |
2745 | 899 |
^ boxMVisible. |
2585 | 900 |
! |
901 |
||
2221 | 902 |
changedLabelHolder |
3147 | 903 |
" |
904 |
aspect for the label of the changed method box. |
|
2221 | 905 |
|
3147 | 906 |
<return: ValueHolder on: nil> |
907 |
" |
|
2221 | 908 |
|
3147 | 909 |
changedLabelHolder isNil ifTrue:[ |
910 |
changedLabelHolder := ValueHolder new. |
|
2221 | 911 |
]. |
3147 | 912 |
^ changedLabelHolder. |
2221 | 913 |
! |
914 |
||
915 |
diffTextLabelA |
|
3147 | 916 |
" |
917 |
aspect for the label for version A. |
|
2221 | 918 |
|
3147 | 919 |
<return: ValueHolder on: nil> |
920 |
" |
|
2221 | 921 |
|
3147 | 922 |
diffTextLabelA isNil ifTrue:[ |
923 |
diffTextLabelA := ValueHolder new. |
|
2221 | 924 |
]. |
3147 | 925 |
^ diffTextLabelA. |
2221 | 926 |
! |
927 |
||
928 |
diffTextLabelB |
|
3147 | 929 |
" |
930 |
aspect for the label for version B. |
|
2221 | 931 |
|
3147 | 932 |
<return: ValueHolder on: nil> |
933 |
" |
|
2221 | 934 |
|
3147 | 935 |
diffTextLabelB isNil ifTrue:[ |
936 |
diffTextLabelB := ValueHolder new. |
|
2221 | 937 |
]. |
3147 | 938 |
^ diffTextLabelB. |
2221 | 939 |
! |
940 |
||
2497 | 941 |
diffTextView |
3147 | 942 |
" |
943 |
return the component for the diff text view. |
|
2497 | 944 |
|
3147 | 945 |
<return: HVScrollableView> |
946 |
" |
|
2497 | 947 |
diffTextView isNil ifTrue:[ |
948 |
diffTextView := HVScrollableView |
|
949 |
for:DiffTextView |
|
950 |
miniScrollerH:true miniScrollerV:false. |
|
951 |
diffTextView addNextPreviousButtons. |
|
952 |
]. |
|
953 |
^ diffTextView |
|
954 |
! |
|
955 |
||
2221 | 956 |
methodText |
3147 | 957 |
" |
958 |
aspect for the text in the method text view. |
|
2221 | 959 |
|
3147 | 960 |
<return: ValueHolder on: nil> |
961 |
" |
|
2221 | 962 |
|
3147 | 963 |
methodText isNil ifTrue:[ |
964 |
methodText := ValueHolder new. |
|
2221 | 965 |
]. |
3147 | 966 |
^ methodText. |
2221 | 967 |
! |
968 |
||
969 |
methodsChanged |
|
3147 | 970 |
" |
971 |
aspect for the 'changed method' list. |
|
2221 | 972 |
|
3147 | 973 |
<return: List> |
974 |
" |
|
2221 | 975 |
|
3147 | 976 |
methodsChanged isNil ifTrue:[ |
977 |
methodsChanged := List new. |
|
2221 | 978 |
]. |
3147 | 979 |
^ methodsChanged. |
2221 | 980 |
! |
981 |
||
982 |
methodsChangedSelection |
|
3147 | 983 |
" |
984 |
aspect for the selection holder of 'changed method'-list. |
|
2221 | 985 |
|
3147 | 986 |
<return: ValueHolder on: nil> |
987 |
" |
|
2221 | 988 |
|
3147 | 989 |
methodsChangedSelection isNil ifTrue:[ |
990 |
methodsChangedSelection := ValueHolder new. |
|
2221 | 991 |
]. |
3147 | 992 |
^ methodsChangedSelection. |
2221 | 993 |
! |
994 |
||
995 |
methodsOnlyInA |
|
6828 | 996 |
"aspect for the 'method only in version A' list." |
2221 | 997 |
|
3147 | 998 |
methodsOnlyInA isNil ifTrue:[ |
999 |
methodsOnlyInA := List new. |
|
2221 | 1000 |
]. |
3147 | 1001 |
^ methodsOnlyInA. |
6828 | 1002 |
|
1003 |
"Modified: / 25-07-2006 / 11:14:43 / cg" |
|
2221 | 1004 |
! |
1005 |
||
1006 |
methodsOnlyInASelection |
|
6828 | 1007 |
"aspect for the selection holder of 'method only in version A'-list." |
2221 | 1008 |
|
3147 | 1009 |
methodsOnlyInASelection isNil ifTrue:[ |
1010 |
methodsOnlyInASelection := ValueHolder new. |
|
2221 | 1011 |
]. |
3147 | 1012 |
^ methodsOnlyInASelection. |
6828 | 1013 |
|
1014 |
"Modified: / 25-07-2006 / 11:14:53 / cg" |
|
2221 | 1015 |
! |
1016 |
||
1017 |
methodsOnlyInB |
|
6828 | 1018 |
"aspect for the 'method only in version B' list" |
2221 | 1019 |
|
3147 | 1020 |
methodsOnlyInB isNil ifTrue:[ |
1021 |
methodsOnlyInB := List new. |
|
2221 | 1022 |
]. |
3147 | 1023 |
^ methodsOnlyInB. |
6828 | 1024 |
|
1025 |
"Modified: / 25-07-2006 / 11:14:48 / cg" |
|
2221 | 1026 |
! |
1027 |
||
1028 |
methodsOnlyInBSelection |
|
6828 | 1029 |
"aspect for the selection holder of 'method only in version B'-list." |
2221 | 1030 |
|
3147 | 1031 |
methodsOnlyInBSelection isNil ifTrue:[ |
1032 |
methodsOnlyInBSelection := ValueHolder new. |
|
2221 | 1033 |
]. |
3147 | 1034 |
^ methodsOnlyInBSelection. |
6828 | 1035 |
|
1036 |
"Modified: / 25-07-2006 / 11:15:00 / cg" |
|
2221 | 1037 |
! |
1038 |
||
1039 |
onlyInALabelHolder |
|
6828 | 1040 |
"aspect for the label for 'method only in version A'." |
2221 | 1041 |
|
3147 | 1042 |
onlyInALabelHolder isNil ifTrue:[ |
1043 |
onlyInALabelHolder := ValueHolder new. |
|
2221 | 1044 |
]. |
3147 | 1045 |
^ onlyInALabelHolder. |
6828 | 1046 |
|
1047 |
"Modified: / 25-07-2006 / 11:15:12 / cg" |
|
2221 | 1048 |
! |
1049 |
||
1050 |
onlyInBLabelHolder |
|
6828 | 1051 |
"aspect for the label for 'method only in version B'." |
2221 | 1052 |
|
3147 | 1053 |
onlyInBLabelHolder isNil ifTrue:[ |
1054 |
onlyInBLabelHolder := ValueHolder new. |
|
2221 | 1055 |
]. |
3147 | 1056 |
^ onlyInBLabelHolder. |
6828 | 1057 |
|
1058 |
"Modified: / 25-07-2006 / 11:15:07 / cg" |
|
2221 | 1059 |
! ! |
1060 |
||
2725 | 1061 |
!VersionDiffBrowser methodsFor:'aspects-exported'! |
2695 | 1062 |
|
1063 |
changedLabelHolder:aValueHolder |
|
1064 |
builder aspectAt:#changedLabelHolder put:aValueHolder. |
|
1065 |
||
1066 |
! |
|
1067 |
||
1068 |
classHolder:aValueHolder |
|
5182 | 1069 |
classHolder notNil ifTrue:[ |
1070 |
classHolder removeDependent:self |
|
2695 | 1071 |
]. |
5182 | 1072 |
classHolder := aValueHolder. |
1073 |
classHolder notNil ifTrue:[ |
|
1074 |
classHolder addDependent:self |
|
2695 | 1075 |
] |
1076 |
! |
|
1077 |
||
1078 |
onlyInALabelHolder:aValueHolder |
|
1079 |
builder aspectAt:#onlyInALabelHolder put:aValueHolder. |
|
1080 |
! |
|
1081 |
||
1082 |
onlyInBLabelHolder:aValueHolder |
|
1083 |
builder aspectAt:#onlyInBLabelHolder put:aValueHolder. |
|
1084 |
! |
|
1085 |
||
1086 |
versionAHolder:aValueHolder |
|
5182 | 1087 |
versionAHolder notNil ifTrue:[ |
1088 |
versionAHolder removeDependent:self |
|
2695 | 1089 |
]. |
5182 | 1090 |
versionAHolder := aValueHolder. |
1091 |
versionAHolder notNil ifTrue:[ |
|
1092 |
versionAHolder addDependent:self |
|
2695 | 1093 |
] |
1094 |
! |
|
1095 |
||
1096 |
versionBHolder:aValueHolder |
|
5182 | 1097 |
versionBHolder notNil ifTrue:[ |
1098 |
versionBHolder removeDependent:self |
|
2695 | 1099 |
]. |
5182 | 1100 |
versionBHolder := aValueHolder. |
1101 |
versionBHolder notNil ifTrue:[ |
|
1102 |
versionBHolder addDependent:self |
|
2695 | 1103 |
] |
1104 |
! ! |
|
1105 |
||
4359 | 1106 |
!VersionDiffBrowser methodsFor:'aspects-menu'! |
1107 |
||
1108 |
canAcceptInCodeView |
|
1109 |
^ self hasChangeSelectedInA |
|
1110 |
or:[self hasChangeSelectedInB |
|
1111 |
or:[self hasChangeSelectedInM]] |
|
1112 |
! |
|
1113 |
||
1114 |
hasChangeSelectedInA |
|
1115 |
^ self selectedChangeInA notNil |
|
1116 |
! |
|
1117 |
||
1118 |
hasChangeSelectedInB |
|
1119 |
^ self selectedChangeInB notNil |
|
1120 |
! |
|
1121 |
||
1122 |
hasChangeSelectedInM |
|
1123 |
^ self methodsChangedSelection value notNil |
|
1124 |
! ! |
|
1125 |
||
2695 | 1126 |
!VersionDiffBrowser methodsFor:'change & update'! |
1127 |
||
1128 |
update:something with:parameter from:changedObject |
|
1129 |
(changedObject == classHolder |
|
1130 |
or:[changedObject == versionAHolder |
|
1131 |
or:[changedObject == versionBHolder]]) ifTrue:[ |
|
1132 |
self setupForClass:(classHolder value) versionA:(versionAHolder value) versionB:(versionBHolder value) |
|
1133 |
. ^ self |
|
1134 |
]. |
|
1135 |
super update:something with:parameter from:changedObject |
|
1136 |
! ! |
|
1137 |
||
2221 | 1138 |
!VersionDiffBrowser methodsFor:'initialization & release'! |
1139 |
||
1140 |
postBuildWith:aBuilder |
|
3147 | 1141 |
" |
1142 |
components which are invisible should be ignored by the panel. |
|
1143 |
Cannot be set via the interface builder. |
|
2221 | 1144 |
|
3147 | 1145 |
<return: self> |
1146 |
" |
|
1147 |
||
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1148 |
(self componentAt:#TopHorizontalPanel) ignoreInvisibleComponents:true. |
6642 | 1149 |
super postBuildWith:aBuilder |
2221 | 1150 |
! ! |
1151 |
||
1152 |
!VersionDiffBrowser methodsFor:'menu action'! |
|
1153 |
||
3344 | 1154 |
applySelectedChangeInA |
3753 | 1155 |
self applyChange:(self selectedChangeInA) |
3344 | 1156 |
! |
1157 |
||
1158 |
applySelectedChangeInB |
|
3753 | 1159 |
self applyChange:(self selectedChangeInB) |
3344 | 1160 |
! |
1161 |
||
2465 | 1162 |
browseChange:aChange |
6828 | 1163 |
"browse the change in aChange" |
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1164 |
|cls sel m| |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1165 |
|
2578
29264fb3847e
avoid debugger in browse-menu
Claus Gittinger <cg@exept.de>
parents:
2536
diff
changeset
|
1166 |
aChange isNil ifTrue:[^ self]. |
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1167 |
cls := aChange changeClass. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1168 |
sel := aChange changeSelector. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1169 |
(cls compiledMethodAt:sel) isNil ifTrue:[ |
6792 | 1170 |
(self confirm:'Method does not exist.\\Browse Class ?' withCRs) ifTrue:[ |
1171 |
UserPreferences systemBrowserClass openInClass:cls |
|
1172 |
]. |
|
1173 |
] ifFalse:[ |
|
1174 |
UserPreferences systemBrowserClass openInClass:cls selector:sel. |
|
1175 |
] |
|
6828 | 1176 |
|
1177 |
"Modified: / 25-07-2006 / 11:14:08 / cg" |
|
2465 | 1178 |
! |
1179 |
||
1180 |
browseClassInA |
|
6828 | 1181 |
"browse the selected method." |
1182 |
self browseChange:(self selectedChangeInA). |
|
2507 | 1183 |
|
6828 | 1184 |
"Modified: / 25-07-2006 / 11:14:02 / cg" |
2465 | 1185 |
! |
2221 | 1186 |
|
2465 | 1187 |
browseClassInB |
6828 | 1188 |
"browse the selected method." |
1189 |
self browseChange:(self selectedChangeInB). |
|
2507 | 1190 |
|
6828 | 1191 |
"Modified: / 25-07-2006 / 11:13:58 / cg" |
2465 | 1192 |
! |
1193 |
||
1194 |
browseClassInM |
|
6828 | 1195 |
"browse the selected method." |
1196 |
self browseChange:(self selectedChangesInM first). |
|
2507 | 1197 |
|
6828 | 1198 |
"Modified: / 25-07-2006 / 11:13:54 / cg" |
2465 | 1199 |
! |
1200 |
||
2469 | 1201 |
createPatchFile |
2856 | 1202 |
"create a patchFile, to patch the old version (versionB) into the new version (versionA). |
1203 |
I.e. a little changeFile to transport those changes." |
|
1204 |
||
6828 | 1205 |
|defaultName f oldVersion newVersion vsnMthdA vsnMthdB vsnA vsnB info classBeingCompared| |
2856 | 1206 |
|
1207 |
defaultName := 'patchFile.chg'. |
|
2469 | 1208 |
|
6828 | 1209 |
classBeingCompared := classChangeSet classBeingCompared. |
1210 |
classBeingCompared notNil ifTrue:[ |
|
1211 |
defaultName := classBeingCompared nameWithoutPrefix. |
|
2856 | 1212 |
classChangeSet versionA notNil ifTrue:[ |
1213 |
defaultName := defaultName , '-'. |
|
1214 |
defaultName := defaultName , classChangeSet versionA. |
|
1215 |
classChangeSet versionB notNil ifTrue:[ |
|
1216 |
defaultName := defaultName , '-'. |
|
1217 |
defaultName := defaultName , classChangeSet versionB. |
|
1218 |
]. |
|
1219 |
]. |
|
1220 |
defaultName := defaultName , '.chg'. |
|
1221 |
]. |
|
1222 |
f := Dialog |
|
1223 |
requestFileName:'Name of patchFile:' |
|
1224 |
default:defaultName. |
|
1225 |
self warn:'Sorry: This function is not yet implemented'. |
|
2730 | 1226 |
^ self. |
1227 |
||
3103 | 1228 |
"/ vsnMthdA := self changeSetA |
1229 |
"/ detect:[:ch | ch isMethodChange |
|
1230 |
"/ and:[ch changeClass isMeta |
|
1231 |
"/ and:[ch changeSelector = #version]]] |
|
1232 |
"/ ifNone:nil. |
|
1233 |
"/ vsnMthdB := self changeSetA |
|
1234 |
"/ detect:[:ch | ch isMethodChange |
|
1235 |
"/ and:[ch changeClass isMeta |
|
1236 |
"/ and:[ch changeSelector = #version]]] |
|
1237 |
"/ ifNone:nil. |
|
1238 |
"/ |
|
1239 |
"/ vsnMthdA notNil ifTrue:[ |
|
1240 |
"/ "/ extract the version |
|
1241 |
"/ vsnA := Class revisionStringFromSource:vsnMthdA source. |
|
1242 |
"/ vsnA notNil ifTrue:[ |
|
1243 |
"/ info := Class revisionInfoFromString:vsnA. |
|
1244 |
"/ info notNil ifTrue:[ |
|
1245 |
"/ vsnA := info at:#revision ifAbsent:nil. |
|
1246 |
"/ ] ifFalse:[ |
|
1247 |
"/ vsnA := nil. |
|
1248 |
"/ ]. |
|
1249 |
"/ ]. |
|
1250 |
"/ ]. |
|
1251 |
"/ vsnMthdB notNil ifTrue:[ |
|
1252 |
"/ "/ extract the version |
|
1253 |
"/ vsnB := Class revisionStringFromSource:vsnMthdB source. |
|
1254 |
"/ vsnB notNil ifTrue:[ |
|
1255 |
"/ info := Class revisionInfoFromString:vsnB. |
|
1256 |
"/ info notNil ifTrue:[ |
|
1257 |
"/ vsnB := info at:#revision ifAbsent:nil. |
|
1258 |
"/ ] ifFalse:[ |
|
1259 |
"/ vsnB := nil. |
|
1260 |
"/ ]. |
|
1261 |
"/ ]. |
|
1262 |
"/ ]. |
|
1263 |
"/ |
|
1264 |
"/ (vsnA isNil or:[vsnB isNil or:[vsnA = vsnB]]) ifTrue:[ |
|
1265 |
"/ self warn:'The generated patch file will not be able to validate/update the class version'. |
|
1266 |
"/ ]. |
|
1267 |
"/ |
|
1268 |
"/self halt:'not yet finished'. |
|
6828 | 1269 |
|
1270 |
"Modified: / 25-07-2006 / 11:12:58 / cg" |
|
2469 | 1271 |
! |
1272 |
||
2465 | 1273 |
inspectSelectedChangeInA |
6828 | 1274 |
"inspect the selected method change for the 'method only in version A'." |
2507 | 1275 |
|
2465 | 1276 |
self selectedChangeInA inspect. |
6828 | 1277 |
|
1278 |
"Modified: / 25-07-2006 / 11:13:30 / cg" |
|
2221 | 1279 |
! |
1280 |
||
1281 |
inspectSelectedChangeInB |
|
6828 | 1282 |
"inspect the selected method change for the 'method only in version B'." |
2507 | 1283 |
|
2465 | 1284 |
self selectedChangeInB inspect. |
6828 | 1285 |
|
1286 |
"Modified: / 25-07-2006 / 11:13:22 / cg" |
|
2465 | 1287 |
! |
1288 |
||
1289 |
inspectSelectedChangeInM |
|
6828 | 1290 |
"inspect the two method changes for the selected 'changed method'." |
2507 | 1291 |
|
2465 | 1292 |
|changes| |
1293 |
||
1294 |
changes := self selectedChangesInM. |
|
1295 |
changes do:[:change | |
|
1296 |
change inspect |
|
1297 |
]. |
|
6828 | 1298 |
|
1299 |
"Modified: / 25-07-2006 / 11:13:13 / cg" |
|
2465 | 1300 |
! |
1301 |
||
2501 | 1302 |
mainMenu |
6828 | 1303 |
"if this application runs as an subapplication, |
1304 |
the menu bar should not be used." |
|
2507 | 1305 |
|
2501 | 1306 |
self masterApplication isNil ifTrue:[ |
1307 |
^ self class mainMenu |
|
1308 |
]. |
|
1309 |
^ nil |
|
6828 | 1310 |
|
1311 |
"Modified: / 25-07-2006 / 11:13:44 / cg" |
|
2221 | 1312 |
! ! |
1313 |
||
1314 |
!VersionDiffBrowser methodsFor:'private'! |
|
1315 |
||
3753 | 1316 |
acceptInLeftView |
1317 |
|change| |
|
1318 |
||
1319 |
change := self selectedChangesInM first. |
|
1320 |
self applyChange:change |
|
1321 |
! |
|
1322 |
||
1323 |
acceptInRightView |
|
1324 |
|change| |
|
1325 |
||
1326 |
change := self selectedChangesInM second. |
|
1327 |
self applyChange:change |
|
1328 |
! |
|
1329 |
||
1330 |
acceptInSingleView |
|
1331 |
|change| |
|
1332 |
||
1333 |
change := self selectedChangeInA. |
|
1334 |
change isNil ifTrue:[ |
|
1335 |
change := self selectedChangeInB |
|
1336 |
]. |
|
1337 |
self applyChange:change |
|
1338 |
! |
|
1339 |
||
2745 | 1340 |
addAcceptToTextViewMenus |
3147 | 1341 |
" |
1342 |
add to the standard diff text view or single text views menu an accept entry. |
|
1343 |
The acceptAction will fetch the corresponding change and apply it |
|
1344 |
(not the shown text) |
|
2745 | 1345 |
|
3147 | 1346 |
<return: self> |
1347 |
" |
|
2745 | 1348 |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1349 |
|m diffTextView leftView rightView singleView| |
2745 | 1350 |
|
1351 |
diffTextView := self diffTextView. |
|
1352 |
leftView := diffTextView leftTextView. |
|
1353 |
rightView := diffTextView rightTextView. |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1354 |
singleView := self componentAt:#singleTextView. |
2745 | 1355 |
|
1356 |
(Array |
|
1357 |
with:leftView |
|
1358 |
with:rightView |
|
1359 |
with:singleView) |
|
1360 |
do:[:v | |
|
1361 |
m := v editMenu. |
|
1362 |
(m selectorAt:#accept) isNil ifTrue:[ |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1363 |
m addLabels:(resources array:#('-' 'Accept')) |
2745 | 1364 |
selectors:(Array with:nil with:#accept) |
1365 |
after:#copySelection. |
|
1366 |
]. |
|
1367 |
m |
|
1368 |
actionAt:#accept |
|
1369 |
put:[ |
|
1370 |
v == singleView ifTrue:[ |
|
3753 | 1371 |
self acceptInSingleView |
1372 |
] ifFalse:[ |
|
1373 |
v == leftView ifTrue:[ |
|
1374 |
self acceptInLeftView |
|
2745 | 1375 |
] ifFalse:[ |
3753 | 1376 |
self acceptInRightView |
2745 | 1377 |
]. |
1378 |
]. |
|
1379 |
]. |
|
1380 |
m selectorAt:#accept put:nil. |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1381 |
m enable:#copySelection. |
3753 | 1382 |
m setEnable:#accept to:[self halt. self canAcceptInCodeView]. |
2745 | 1383 |
v menuHolder:m. |
1384 |
v menuMessage:#value. |
|
1385 |
] |
|
1386 |
! |
|
1387 |
||
3753 | 1388 |
applyChange:change |
1389 |
change notNil ifTrue:[ |
|
1390 |
change apply |
|
1391 |
] |
|
1392 |
! |
|
1393 |
||
3839 | 1394 |
printStringGenerator |
3147 | 1395 |
" |
1396 |
generate a print string for a change. |
|
2497 | 1397 |
|
3147 | 1398 |
<return: Block> |
1399 |
" |
|
3839 | 1400 |
^ [:aChange | |
3678 | 1401 |
|result mPkg cPkg cls m changeClassName useChangesString |
1402 |
singleComparedClass singleComparedClassesName singleComparedMetaclassesName| |
|
1403 |
||
1404 |
(singleComparedClass := self classBeingCompared) notNil ifTrue:[ |
|
1405 |
singleComparedClassesName := singleComparedClass name. |
|
1406 |
singleComparedMetaclassesName := singleComparedClass theMetaclass name. |
|
1407 |
]. |
|
2585 | 1408 |
|
2507 | 1409 |
aChange isClassDefinitionChange ifTrue:[ |
2585 | 1410 |
result := aChange printStringWithoutClassName |
2497 | 1411 |
] ifFalse:[ |
2507 | 1412 |
aChange isDoIt ifTrue:[ |
1413 |
result := aChange source , ' (doIt)' |
|
2497 | 1414 |
] ifFalse:[ |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1415 |
useChangesString := false. |
2585 | 1416 |
changeClassName := aChange className. |
3678 | 1417 |
changeClassName = singleComparedClassesName ifTrue:[ |
2585 | 1418 |
result := aChange printStringWithoutClassName. |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1419 |
useChangesString := true. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1420 |
] ifFalse:[ |
3678 | 1421 |
changeClassName = singleComparedMetaclassesName ifTrue:[ |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1422 |
result := aChange printString. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1423 |
useChangesString := true. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1424 |
]. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1425 |
]. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1426 |
useChangesString ifTrue:[ |
2745 | 1427 |
aChange isMethodCategoryChange ifTrue:[ |
1428 |
result := result , ' (category)' |
|
1429 |
] ifFalse:[ |
|
1430 |
aChange isMethodChange ifTrue:[ |
|
1431 |
cls := aChange changeClass. |
|
1432 |
cls notNil ifTrue:[ |
|
1433 |
m := cls compiledMethodAt:aChange selector. |
|
1434 |
(m notNil |
|
1435 |
and:[m package ~= cls package]) ifTrue:[ |
|
1436 |
result := aChange printStringWithoutClassName , ' [' , m package , ']'. |
|
1437 |
]. |
|
2497 | 1438 |
]. |
2745 | 1439 |
] |
2497 | 1440 |
] |
1441 |
] ifFalse:[ |
|
6272 | 1442 |
|
2497 | 1443 |
"/ include name in private class changes |
6272 | 1444 |
(changeClassName notNil |
1445 |
and:[singleComparedClassesName notNil |
|
1446 |
and:[changeClassName startsWith:(singleComparedClassesName , '::')]]) ifTrue:[ |
|
3678 | 1447 |
result := (changeClassName copyFrom:(singleComparedClassesName size + 3)) , ' ' , aChange printStringWithoutClassName |
2497 | 1448 |
] ifFalse:[ |
2507 | 1449 |
result := aChange printString |
2497 | 1450 |
] |
1451 |
] |
|
1452 |
] |
|
1453 |
]. |
|
1454 |
result |
|
1455 |
]. |
|
1456 |
! |
|
1457 |
||
2501 | 1458 |
resetSelectionHolders |
3147 | 1459 |
" |
1460 |
reset all selection holders when a new change set is given. |
|
1461 |
First set the selection to nil. |
|
2507 | 1462 |
|
3147 | 1463 |
<return: self> |
1464 |
" |
|
2501 | 1465 |
|
1466 |
self methodsChangedSelection value:nil. |
|
1467 |
self methodsOnlyInASelection value:nil. |
|
1468 |
self methodsOnlyInBSelection value:nil. |
|
2507 | 1469 |
self diffTextView text1:'' text2:''. |
1470 |
self methodText value:''. |
|
1471 |
||
1472 |
"/ self methodsChangedSelectionChanged. |
|
1473 |
"/ self methodsOnlyInASelectionChanged. |
|
1474 |
"/ self methodsOnlyInBSelectionChanged. |
|
2501 | 1475 |
! |
1476 |
||
2221 | 1477 |
showDiffTextView |
3147 | 1478 |
" |
1479 |
if a method change is selected, then show the diff text view. |
|
1480 |
Add an accept entry to the popup menu. |
|
2507 | 1481 |
|
3147 | 1482 |
<return: self> |
1483 |
" |
|
2694 | 1484 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1485 |
(self componentAt:#diffTextViewBox) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1486 |
(self componentAt:#singleTextView) beInvisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1487 |
(self componentAt:#diffTextView) realizeAllSubViews. |
2694 | 1488 |
|
2465 | 1489 |
self addAcceptToTextViewMenus. |
2221 | 1490 |
! |
1491 |
||
1492 |
showSingleTextView |
|
3147 | 1493 |
" |
1494 |
if a method is selected which is only in version A or B of the class, |
|
1495 |
then show the text view. |
|
1496 |
Add an accept entry to the popup menu. |
|
2507 | 1497 |
|
3147 | 1498 |
<return: self> |
1499 |
" |
|
2507 | 1500 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1501 |
(self componentAt:#singleTextView) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1502 |
(self componentAt:#diffTextViewBox) beInvisible. |
2501 | 1503 |
self addAcceptToTextViewMenus. |
2221 | 1504 |
! |
1505 |
||
2497 | 1506 |
updateLabels |
3147 | 1507 |
" |
1508 |
update the labels of the diff text view. Show the version numbers |
|
1509 |
of the class. |
|
2221 | 1510 |
|
3147 | 1511 |
<return: self> |
1512 |
" |
|
2221 | 1513 |
|
2694 | 1514 |
|theVersionA theVersionB builder| |
2224 | 1515 |
|
2694 | 1516 |
builder := self builder. |
2497 | 1517 |
(theVersionA := self versionA) notNil ifTrue:[ |
1518 |
self diffTextLabelA value:theVersionA. |
|
2726 | 1519 |
self onlyInALabelHolder value:('Only in ' , theVersionA). |
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1520 |
(self componentAt:#OnlyInALabel) backgroundColor:Color green darkened. |
2224 | 1521 |
]. |
2497 | 1522 |
(theVersionB :=self versionB) notNil ifTrue:[ |
1523 |
self diffTextLabelB value:theVersionB. |
|
2726 | 1524 |
self onlyInBLabelHolder value:('Only in ' , theVersionB). |
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1525 |
(self componentAt:#OnlyInBLabel) backgroundColor:Color red darkened. |
2224 | 1526 |
]. |
1527 |
! |
|
1528 |
||
1529 |
updateLists |
|
3839 | 1530 |
|classChangeSet listOnlyInA listOnlyInB listChanged printStringGenerator sortBlockForChangeLists| |
2230
5e10eebb1de2
move change-compare code to where it belongs (Change-hierarchy)
Claus Gittinger <cg@exept.de>
parents:
2229
diff
changeset
|
1531 |
|
2585 | 1532 |
classChangeSet := self classChangeSet. |
1533 |
||
3839 | 1534 |
printStringGenerator := self printStringGenerator. |
1535 |
sortBlockForChangeLists := [:a :b | (printStringGenerator value:a) < (printStringGenerator value:b)]. |
|
1536 |
||
2731 | 1537 |
listOnlyInA := self methodsOnlyInA. |
1538 |
listOnlyInA removeAll. |
|
1539 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1540 |
classChangeSet methodsOnlyInA sort:sortBlockForChangeLists. |
1541 |
listOnlyInA addAll: (classChangeSet methodsOnlyInA collect:printStringGenerator). |
|
2731 | 1542 |
]. |
2585 | 1543 |
|
2731 | 1544 |
listOnlyInB := self methodsOnlyInB. |
1545 |
listOnlyInB removeAll. |
|
1546 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1547 |
classChangeSet methodsOnlyInB sort:sortBlockForChangeLists. |
1548 |
listOnlyInB addAll: (classChangeSet methodsOnlyInB collect:printStringGenerator). |
|
2731 | 1549 |
]. |
2221 | 1550 |
|
2731 | 1551 |
listChanged := self methodsChanged. |
1552 |
listChanged removeAll. |
|
1553 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1554 |
classChangeSet methodsChanged sort:[:a :b | sortBlockForChangeLists value:a first value:b first]. |
1555 |
listChanged addAll: (classChangeSet methodsChanged collect:[:arr| printStringGenerator value:(arr first)]). |
|
2731 | 1556 |
]. |
2221 | 1557 |
|
2731 | 1558 |
self boxAVisible value:(listOnlyInA notEmpty). |
1559 |
self boxBVisible value:(listOnlyInB notEmpty). |
|
2221 | 1560 |
|
2731 | 1561 |
self boxMVisible value:(listChanged isEmpty |
1562 |
and: [(listOnlyInA notEmpty |
|
1563 |
or:[listOnlyInB notEmpty])]) not. |
|
2221 | 1564 |
! ! |
1565 |
||
2501 | 1566 |
!VersionDiffBrowser methodsFor:'setup'! |
1567 |
||
2695 | 1568 |
setupForClass:aClass againstVersion:aVersionA |
3147 | 1569 |
" |
1570 |
compute the class change set for the class aClass of its current version against the repository version A. |
|
1571 |
When setting the class change set, the labels, list etc. of the receiver |
|
1572 |
are updated. |
|
2695 | 1573 |
|
3147 | 1574 |
<return: self> |
1575 |
" |
|
2731 | 1576 |
|changeSet| |
1577 |
||
2745 | 1578 |
aClass isNil ifTrue:[ |
1579 |
changeSet := nil |
|
1580 |
] ifFalse:[ |
|
1581 |
aClass isNameSpace ifFalse:[ |
|
1582 |
aClass isLoaded ifTrue:[ |
|
1583 |
changeSet := (ClassChangeSet newForClass:aClass againstVersion:aVersionA). |
|
1584 |
] |
|
1585 |
]. |
|
2731 | 1586 |
]. |
2856 | 1587 |
self classChangeSet:changeSet. |
2857
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1588 |
aVersionA isNil ifTrue:[ |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1589 |
self class:aClass versionA:'rep' versionB:'current'. |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1590 |
] ifFalse:[ |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1591 |
self class:aClass versionA:aVersionA versionB:(aVersionA , 'm'). |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1592 |
] |
2695 | 1593 |
! |
1594 |
||
2949 | 1595 |
setupForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
3147 | 1596 |
" |
1597 |
generate the class change set from the two classes A and B. |
|
1598 |
When setting the class change set, the labels, list etc. of the receiver |
|
1599 |
are updated. |
|
2949 | 1600 |
|
3147 | 1601 |
<return: self> |
1602 |
" |
|
2949 | 1603 |
|changeSet| |
1604 |
||
1605 |
changeSet := (ClassChangeSet newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB). |
|
1606 |
self classChangeSet:changeSet |
|
1607 |
! |
|
1608 |
||
2510 | 1609 |
setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
3147 | 1610 |
" |
1611 |
generate the class change set from the two source files A and B. |
|
1612 |
When setting the class change set, the labels, list etc. of the receiver |
|
1613 |
are updated. |
|
2510 | 1614 |
|
3147 | 1615 |
<return: self> |
1616 |
" |
|
2731 | 1617 |
|changeSet| |
1618 |
||
2751
f2fbe11e166a
oops - isNameSpace query prevented Smalltalk-diffs from beeing shown
Claus Gittinger <cg@exept.de>
parents:
2745
diff
changeset
|
1619 |
(aClass isNameSpace not or:[aClass == Smalltalk]) ifTrue:[ |
2731 | 1620 |
aClass isLoaded ifTrue:[ |
1621 |
changeSet := (ClassChangeSet newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB). |
|
1622 |
] |
|
1623 |
]. |
|
1624 |
self classChangeSet:changeSet |
|
2510 | 1625 |
! |
1626 |
||
2501 | 1627 |
setupForClass:aClass versionA:aVersionA versionB:aVersionB |
3147 | 1628 |
" |
1629 |
compute the class change set for the class aClass and the versions A and B. |
|
1630 |
When setting the class change set, the labels, list etc. of the receiver |
|
1631 |
are updated. |
|
2501 | 1632 |
|
3147 | 1633 |
<return: self> |
1634 |
" |
|
2731 | 1635 |
|changeSet| |
1636 |
||
1637 |
aClass isNameSpace ifFalse:[ |
|
1638 |
aClass isLoaded ifTrue:[ |
|
1639 |
changeSet := (ClassChangeSet newForClass:aClass versionA:aVersionA versionB:aVersionB). |
|
1640 |
] |
|
1641 |
]. |
|
2856 | 1642 |
self classChangeSet:changeSet. |
1643 |
self class:aClass versionA:aVersionA versionB:aVersionB. |
|
3678 | 1644 |
! |
1645 |
||
1646 |
setupForDiffSet:diffSet labelA:aLabelA labelB:aLabelB |
|
1647 |
|changeSet| |
|
1648 |
||
1649 |
changeSet := (ClassChangeSet new diffSet:diffSet; labelA:aLabelA; labelB:aLabelB). |
|
1650 |
self classChangeSet:changeSet |
|
2501 | 1651 |
! ! |
1652 |
||
2497 | 1653 |
!VersionDiffBrowser::ClassChangeSet class methodsFor:'instance creation'! |
1654 |
||
2695 | 1655 |
changeSetForClass:aClass |
3756 | 1656 |
"return a ChangeSet for the class aClass and its current source. |
1657 |
The source is generated into a stream and then the change set is generated |
|
1658 |
from the source stream. |
|
2695 | 1659 |
|
3756 | 1660 |
<return: ChangeSet|nil> |
1661 |
" |
|
2695 | 1662 |
|
3756 | 1663 |
^ ChangeSet forExistingClass:aClass. |
2695 | 1664 |
! |
1665 |
||
2497 | 1666 |
changeSetForClass:aClass andRevision:aVersion |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1667 |
"return a ChangeSet for the class aClass and version aVersion. |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1668 |
The version from the class source stream is checked out from the repositiory |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1669 |
into a source stream. Then the change set is generated from the source stream. |
2497 | 1670 |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1671 |
<return: ChangeSet|nil> |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1672 |
" |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1673 |
|
2497 | 1674 |
|theSourceCodeManager theSourceStream theChangeSet| |
1675 |
||
7108 | 1676 |
theSourceCodeManager := SourceCodeManagerUtilities sourceCodeManagerFor:aClass. |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1677 |
[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1678 |
theSourceStream := theSourceCodeManager getSourceStreamFor:aClass revision:aVersion. |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1679 |
theSourceStream notNil |
3763 | 1680 |
ifTrue:[theChangeSet := ChangeSet fromStream:theSourceStream] |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1681 |
] ensure:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1682 |
theSourceStream notNil ifTrue:[theSourceStream close] |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1683 |
]. |
2497 | 1684 |
^theChangeSet |
7108 | 1685 |
|
1686 |
"Modified: / 12-09-2006 / 14:24:51 / cg" |
|
2497 | 1687 |
! |
1688 |
||
1689 |
changeSetForClass:aClass andSource:aSource |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1690 |
"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
|
1691 |
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
|
1692 |
from the source stream. |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1693 |
Raise an error if the source stream cannot be opened |
2497 | 1694 |
|
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1695 |
<return: ChangeSet>" |
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4359
diff
changeset
|
1696 |
|
2497 | 1697 |
|theChangeSet theSourceStream| |
1698 |
||
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1699 |
[ |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1700 |
theSourceStream := aSource readStream. |
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1701 |
theChangeSet := ChangeSet fromStream:(theSourceStream := aSource readStream) |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1702 |
] ensure:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1703 |
theSourceStream notNil ifTrue:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1704 |
theSourceStream close |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1705 |
] |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1706 |
]. |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1707 |
^ theChangeSet |
2497 | 1708 |
! |
1709 |
||
2695 | 1710 |
newForClass:aClass againstVersion:aVersionA |
1711 |
"return a ClassChangeSet for the class aClass against some verison in the repository. |
|
1712 |
A new instance of ClassChangeSet is generated containing |
|
1713 |
the correspondenting changes. |
|
1714 |
||
1715 |
<return: ClassChangeSet> |
|
1716 |
" |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1717 |
|theChangeSetA theChangeSetB theClassChangeSet versionCompared diffSet| |
2695 | 1718 |
|
1719 |
theClassChangeSet := self new. |
|
1720 |
theClassChangeSet classBeingCompared:aClass. |
|
1721 |
versionCompared := aVersionA. |
|
1722 |
aVersionA isNil ifTrue:[ |
|
1723 |
theClassChangeSet labelA:(versionCompared := aClass revision). |
|
2856 | 1724 |
theClassChangeSet versionA:versionCompared. |
2695 | 1725 |
] ifFalse:[ |
1726 |
aVersionA == #newest ifTrue:[ |
|
2776 | 1727 |
theClassChangeSet labelA:(VersionDiffBrowser resources string:'newest'). |
2695 | 1728 |
] ifFalse:[ |
1729 |
theClassChangeSet labelA:versionCompared. |
|
2856 | 1730 |
theClassChangeSet versionA:versionCompared. |
2695 | 1731 |
] |
1732 |
]. |
|
2776 | 1733 |
theClassChangeSet labelB:(VersionDiffBrowser resources string:'current'). |
2695 | 1734 |
theChangeSetA := self changeSetForClass: aClass andRevision: versionCompared. |
1735 |
theChangeSetB := self changeSetForClass: aClass. |
|
1736 |
theChangeSetA isNil |
|
1737 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1738 |
theChangeSetB isNil |
|
1739 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1740 |
"/ if we are comparing a private class, prune out other changes |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1741 |
aClass isPrivate ifTrue:[ |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1742 |
theChangeSetA removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1743 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1744 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1745 |
theChangeSetB removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1746 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1747 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1748 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1749 |
self activityNotification:'generating diff-set...'. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1750 |
diffSet := theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1751 |
self activityNotification:nil. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1752 |
^ diffSet |
2695 | 1753 |
! |
1754 |
||
2949 | 1755 |
newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
1756 |
"return a ClassChangeSet for two classes. |
|
1757 |
A new instance of ClassChangeSet is generated containing the correspondenting changes. |
|
1758 |
||
1759 |
<return: ClassChangeSet> |
|
1760 |
" |
|
1761 |
|aStream sourceA sourceB theChangeSetA theChangeSetB theClassChangeSet| |
|
1762 |
||
1763 |
theClassChangeSet := self new. |
|
1764 |
theClassChangeSet classBeingCompared:classA. |
|
1765 |
theClassChangeSet labelA:aLabelA. |
|
1766 |
theClassChangeSet labelB:aLabelB. |
|
1767 |
||
1768 |
aStream := '' writeStream. |
|
1769 |
Method flushSourceStreamCache. |
|
1770 |
classA fileOutOn:aStream withTimeStamp:false. |
|
1771 |
sourceA := aStream contents asString. |
|
1772 |
||
1773 |
aStream := '' writeStream. |
|
1774 |
Method flushSourceStreamCache. |
|
1775 |
classB fileOutOn:aStream withTimeStamp:false. |
|
1776 |
sourceB := aStream contents asString. |
|
1777 |
||
1778 |
theChangeSetA:=self changeSetForClass:classA andSource:sourceA. |
|
1779 |
theChangeSetB:=self changeSetForClass:classB andSource:sourceB. |
|
1780 |
theChangeSetA isNil |
|
1781 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1782 |
theChangeSetB isNil |
|
1783 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
1784 |
||
1785 |
"/ just in case (if comparing a class against another), |
|
1786 |
"/ unify the classes of the changes (to avoid that all changes are detected as different) |
|
1787 |
||
1788 |
theChangeSetB do:[:eachChange | |
|
1789 |
eachChange isMethodChange ifTrue:[ |
|
1790 |
eachChange changeClass isMeta ifTrue:[ |
|
1791 |
eachChange changeClass ~~ classA theMetaclass ifTrue:[ |
|
1792 |
eachChange changeClass:classA theMetaclass. |
|
1793 |
] |
|
1794 |
] ifFalse:[ |
|
1795 |
eachChange changeClass ~~ classA theNonMetaclass ifTrue:[ |
|
1796 |
eachChange changeClass:classA theNonMetaclass. |
|
1797 |
] |
|
1798 |
]. |
|
1799 |
]. |
|
1800 |
]. |
|
1801 |
"/ remove all #initialize doIts |
|
1802 |
theChangeSetA := theChangeSetA select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
1803 |
theChangeSetB := theChangeSetB select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
1804 |
||
1805 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
|
1806 |
! |
|
1807 |
||
2497 | 1808 |
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
|
1809 |
"return a ClassChangeSet for the class aClass and the two sources. |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1810 |
The two classes are compared via the source files. A new instance of |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1811 |
ClassChangeSet is generated containing the correspondenting changes. |
2497 | 1812 |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1813 |
<return: ClassChangeSet> |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1814 |
" |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1815 |
|
4128 | 1816 |
|theChangeSetA theChangeSetB theClassChangeSet className metaClassName| |
2497 | 1817 |
|
1818 |
theClassChangeSet := self new. |
|
1819 |
theClassChangeSet classBeingCompared:aClass. |
|
1820 |
theClassChangeSet labelA:aLabelA. |
|
1821 |
theClassChangeSet labelB:aLabelB. |
|
1822 |
theChangeSetA:=self changeSetForClass:aClass andSource:aSourceA. |
|
1823 |
theChangeSetB:=self changeSetForClass:aClass andSource:aSourceB. |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1824 |
|
4128 | 1825 |
className := aClass name. |
1826 |
metaClassName := aClass class name. |
|
1827 |
||
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1828 |
aClass isPrivate ifTrue:[ |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1829 |
theChangeSetA := theChangeSetA select:[:change | change isMethodChange not |
4128 | 1830 |
or:[change className = className or:[change className = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1831 |
theChangeSetA := theChangeSetA select:[:change | change isClassDefinitionChange not |
4128 | 1832 |
or:[change className = className or:[change className = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1833 |
theChangeSetA := theChangeSetA select:[:change | change isDoIt not |
4128 | 1834 |
or:[change receiverClassName = className or:[change receiverClassName = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1835 |
theChangeSetB := theChangeSetB select:[:change | change isMethodChange not |
4128 | 1836 |
or:[change className = className or:[change className = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1837 |
theChangeSetB := theChangeSetB select:[:change | change isClassDefinitionChange not |
4128 | 1838 |
or:[change className = className or:[change className = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1839 |
theChangeSetB := theChangeSetB select:[:change | change isDoIt not |
4128 | 1840 |
or:[change receiverClassName = className or:[change receiverClassName = metaClassName]]]. |
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1841 |
"/ there might be more needed... |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1842 |
]. |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1843 |
|
2497 | 1844 |
theChangeSetA isNil |
1845 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1846 |
theChangeSetB isNil |
|
1847 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2947 | 1848 |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1849 |
^ theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2465 | 1850 |
! |
1851 |
||
2497 | 1852 |
newForClass:aClass versionA:aVersionA versionB:aVersionB |
1853 |
"return a ClassChangeSet for the class aClass and the two versions. |
|
1854 |
The two class version are checked out from the repository and then being |
|
1855 |
compared. A new instance of ClassChangeSet is generated containing |
|
1856 |
the correspondenting changes. |
|
1857 |
||
1858 |
<return: ClassChangeSet> |
|
1859 |
" |
|
1860 |
|theChangeSetA theChangeSetB theClassChangeSet| |
|
1861 |
||
1862 |
theClassChangeSet := self new. |
|
1863 |
theClassChangeSet classBeingCompared:aClass. |
|
2856 | 1864 |
theClassChangeSet versionA:aVersionA. |
1865 |
theClassChangeSet versionB:aVersionB. |
|
2497 | 1866 |
theClassChangeSet labelA:aVersionA. |
1867 |
theClassChangeSet labelB:aVersionB. |
|
1868 |
theChangeSetA := self changeSetForClass: aClass andRevision: aVersionA. |
|
1869 |
theChangeSetB := self changeSetForClass: aClass andRevision: aVersionB. |
|
1870 |
theChangeSetA isNil |
|
1871 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1872 |
theChangeSetB isNil |
|
1873 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2695 | 1874 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2497 | 1875 |
! ! |
1876 |
||
1877 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'accessing'! |
|
1878 |
||
1879 |
classBeingCompared |
|
3756 | 1880 |
"returns the value of the class which is compared" |
2497 | 1881 |
|
1882 |
^ classBeingCompared |
|
1883 |
! |
|
2221 | 1884 |
|
2497 | 1885 |
classBeingCompared:something |
3756 | 1886 |
"set the value of the class which is compared" |
2497 | 1887 |
|
1888 |
classBeingCompared := something. |
|
1889 |
! |
|
1890 |
||
2695 | 1891 |
diffSet |
3756 | 1892 |
"returns a diffSet containing the different changes. |
1893 |
it responds to: |
|
2695 | 1894 |
|
3756 | 1895 |
changed OrderedCollection of arrays containing ChangeSets for methods |
1896 |
which are changed and exists in the class versionA and versionB |
|
1897 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1898 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1899 |
" |
|
1900 |
||
2695 | 1901 |
^ diffSet |
1902 |
! |
|
1903 |
||
1904 |
diffSet:something |
|
3756 | 1905 |
"sets the diffSet containing the different changes. |
1906 |
it responds to: |
|
2695 | 1907 |
|
3756 | 1908 |
changed OrderedCollection of arrays containing ChangeSets for methods |
1909 |
which are changed and exists in the class versionA and versionB |
|
1910 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1911 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1912 |
" |
|
2695 | 1913 |
|
1914 |
diffSet := something. |
|
1915 |
! |
|
1916 |
||
2497 | 1917 |
labelA |
3756 | 1918 |
"returns the label for the class versionA" |
2497 | 1919 |
|
1920 |
^ labelA |
|
1921 |
! |
|
1922 |
||
1923 |
labelA:something |
|
3756 | 1924 |
"sets the label for the class versionA" |
2497 | 1925 |
|
1926 |
labelA := something. |
|
1927 |
! |
|
1928 |
||
1929 |
labelB |
|
3756 | 1930 |
"returns the label for the class versionB" |
2497 | 1931 |
|
1932 |
^ labelB |
|
1933 |
! |
|
2465 | 1934 |
|
2497 | 1935 |
labelB:something |
3756 | 1936 |
"sets the label for the class versionB" |
2497 | 1937 |
|
1938 |
labelB := something. |
|
1939 |
! |
|
1940 |
||
1941 |
methodsChanged |
|
3756 | 1942 |
"returns an OrderedCollection of arrays containing ChangeSets for methods |
1943 |
which are changed and exists in the class versionA and versionB |
|
2497 | 1944 |
|
3756 | 1945 |
<return: OrderedCollection of Array(2)> |
1946 |
" |
|
1947 |
||
1948 |
^ self diffSet changed |
|
2497 | 1949 |
! |
1950 |
||
1951 |
methodsOnlyInA |
|
3756 | 1952 |
"returns a ChangeSet for the methods which exists only in the class versionA" |
2497 | 1953 |
|
3756 | 1954 |
^ self diffSet onlyInReceiver |
2497 | 1955 |
! |
1956 |
||
1957 |
methodsOnlyInB |
|
3756 | 1958 |
"returns a ChangeSet for the methods which exists only in the class versionB" |
2497 | 1959 |
|
3756 | 1960 |
^ self diffSet onlyInArg |
2856 | 1961 |
! |
1962 |
||
1963 |
versionA |
|
1964 |
^ versionA |
|
1965 |
! |
|
1966 |
||
1967 |
versionA:something |
|
1968 |
versionA := something. |
|
1969 |
! |
|
1970 |
||
1971 |
versionB |
|
1972 |
^ versionB |
|
1973 |
! |
|
1974 |
||
1975 |
versionB:something |
|
1976 |
versionB := something. |
|
2221 | 1977 |
! ! |
1978 |
||
1979 |
!VersionDiffBrowser class methodsFor:'documentation'! |
|
1980 |
||
1981 |
version |
|
7108 | 1982 |
^ '$Header: /cvs/stx/stx/libtool/VersionDiffBrowser.st,v 1.74 2006-09-12 12:27:23 cg Exp $' |
2221 | 1983 |
! ! |