author | Claus Gittinger <cg@exept.de> |
Wed, 19 May 2004 14:47:13 +0200 | |
changeset 5875 | c85e7a5cb5dd |
parent 5520 | b6644f3ac71f |
child 6210 | d3d6064474a5 |
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 |
|
332 |
#label: 'About this Application' |
|
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 |
|
3147 | 996 |
" |
997 |
aspect for the 'method only in version A' list. |
|
2221 | 998 |
|
3147 | 999 |
<return: List> |
1000 |
" |
|
2221 | 1001 |
|
3147 | 1002 |
methodsOnlyInA isNil ifTrue:[ |
1003 |
methodsOnlyInA := List new. |
|
2221 | 1004 |
]. |
3147 | 1005 |
^ methodsOnlyInA. |
2221 | 1006 |
! |
1007 |
||
1008 |
methodsOnlyInASelection |
|
3147 | 1009 |
" |
1010 |
aspect for the selection holder of 'method only in version A'-list. |
|
2221 | 1011 |
|
3147 | 1012 |
<return: ValueHolder on: nil> |
1013 |
" |
|
2221 | 1014 |
|
3147 | 1015 |
methodsOnlyInASelection isNil ifTrue:[ |
1016 |
methodsOnlyInASelection := ValueHolder new. |
|
2221 | 1017 |
]. |
3147 | 1018 |
^ methodsOnlyInASelection. |
2221 | 1019 |
! |
1020 |
||
1021 |
methodsOnlyInB |
|
3147 | 1022 |
" |
1023 |
aspect for the 'method only in version B' list. |
|
2221 | 1024 |
|
3147 | 1025 |
<return: List> |
1026 |
" |
|
2221 | 1027 |
|
3147 | 1028 |
methodsOnlyInB isNil ifTrue:[ |
1029 |
methodsOnlyInB := List new. |
|
2221 | 1030 |
]. |
3147 | 1031 |
^ methodsOnlyInB. |
2221 | 1032 |
! |
1033 |
||
1034 |
methodsOnlyInBSelection |
|
3147 | 1035 |
" |
1036 |
aspect for the selection holder of 'method only in version B'-list. |
|
2221 | 1037 |
|
3147 | 1038 |
<return: ValueHolder on: nil> |
1039 |
" |
|
2221 | 1040 |
|
3147 | 1041 |
methodsOnlyInBSelection isNil ifTrue:[ |
1042 |
methodsOnlyInBSelection := ValueHolder new. |
|
2221 | 1043 |
]. |
3147 | 1044 |
^ methodsOnlyInBSelection. |
2221 | 1045 |
! |
1046 |
||
1047 |
onlyInALabelHolder |
|
3147 | 1048 |
" |
1049 |
aspect for the label for 'method only in version A'. |
|
2221 | 1050 |
|
3147 | 1051 |
<return: ValueHolder on: nil> |
1052 |
" |
|
2221 | 1053 |
|
3147 | 1054 |
onlyInALabelHolder isNil ifTrue:[ |
1055 |
onlyInALabelHolder := ValueHolder new. |
|
2221 | 1056 |
]. |
3147 | 1057 |
^ onlyInALabelHolder. |
2221 | 1058 |
! |
1059 |
||
1060 |
onlyInBLabelHolder |
|
3147 | 1061 |
" |
1062 |
aspect for the label for 'method only in version B'. |
|
2221 | 1063 |
|
3147 | 1064 |
<return: ValueHolder on: nil> |
1065 |
" |
|
2221 | 1066 |
|
3147 | 1067 |
onlyInBLabelHolder isNil ifTrue:[ |
1068 |
onlyInBLabelHolder := ValueHolder new. |
|
2221 | 1069 |
]. |
3147 | 1070 |
^ onlyInBLabelHolder. |
2221 | 1071 |
! ! |
1072 |
||
2725 | 1073 |
!VersionDiffBrowser methodsFor:'aspects-exported'! |
2695 | 1074 |
|
1075 |
changedLabelHolder:aValueHolder |
|
1076 |
builder aspectAt:#changedLabelHolder put:aValueHolder. |
|
1077 |
||
1078 |
! |
|
1079 |
||
1080 |
classHolder:aValueHolder |
|
5182 | 1081 |
classHolder notNil ifTrue:[ |
1082 |
classHolder removeDependent:self |
|
2695 | 1083 |
]. |
5182 | 1084 |
classHolder := aValueHolder. |
1085 |
classHolder notNil ifTrue:[ |
|
1086 |
classHolder addDependent:self |
|
2695 | 1087 |
] |
1088 |
! |
|
1089 |
||
1090 |
onlyInALabelHolder:aValueHolder |
|
1091 |
builder aspectAt:#onlyInALabelHolder put:aValueHolder. |
|
1092 |
! |
|
1093 |
||
1094 |
onlyInBLabelHolder:aValueHolder |
|
1095 |
builder aspectAt:#onlyInBLabelHolder put:aValueHolder. |
|
1096 |
! |
|
1097 |
||
1098 |
versionAHolder:aValueHolder |
|
5182 | 1099 |
versionAHolder notNil ifTrue:[ |
1100 |
versionAHolder removeDependent:self |
|
2695 | 1101 |
]. |
5182 | 1102 |
versionAHolder := aValueHolder. |
1103 |
versionAHolder notNil ifTrue:[ |
|
1104 |
versionAHolder addDependent:self |
|
2695 | 1105 |
] |
1106 |
! |
|
1107 |
||
1108 |
versionBHolder:aValueHolder |
|
5182 | 1109 |
versionBHolder notNil ifTrue:[ |
1110 |
versionBHolder removeDependent:self |
|
2695 | 1111 |
]. |
5182 | 1112 |
versionBHolder := aValueHolder. |
1113 |
versionBHolder notNil ifTrue:[ |
|
1114 |
versionBHolder addDependent:self |
|
2695 | 1115 |
] |
1116 |
! ! |
|
1117 |
||
4359 | 1118 |
!VersionDiffBrowser methodsFor:'aspects-menu'! |
1119 |
||
1120 |
canAcceptInCodeView |
|
1121 |
^ self hasChangeSelectedInA |
|
1122 |
or:[self hasChangeSelectedInB |
|
1123 |
or:[self hasChangeSelectedInM]] |
|
1124 |
! |
|
1125 |
||
1126 |
hasChangeSelectedInA |
|
1127 |
^ self selectedChangeInA notNil |
|
1128 |
! |
|
1129 |
||
1130 |
hasChangeSelectedInB |
|
1131 |
^ self selectedChangeInB notNil |
|
1132 |
! |
|
1133 |
||
1134 |
hasChangeSelectedInM |
|
1135 |
^ self methodsChangedSelection value notNil |
|
1136 |
! ! |
|
1137 |
||
2695 | 1138 |
!VersionDiffBrowser methodsFor:'change & update'! |
1139 |
||
1140 |
update:something with:parameter from:changedObject |
|
1141 |
(changedObject == classHolder |
|
1142 |
or:[changedObject == versionAHolder |
|
1143 |
or:[changedObject == versionBHolder]]) ifTrue:[ |
|
1144 |
self setupForClass:(classHolder value) versionA:(versionAHolder value) versionB:(versionBHolder value) |
|
1145 |
. ^ self |
|
1146 |
]. |
|
1147 |
super update:something with:parameter from:changedObject |
|
1148 |
! ! |
|
1149 |
||
2221 | 1150 |
!VersionDiffBrowser methodsFor:'initialization & release'! |
1151 |
||
1152 |
postBuildWith:aBuilder |
|
3147 | 1153 |
" |
1154 |
components which are invisible should be ignored by the panel. |
|
1155 |
Cannot be set via the interface builder. |
|
2221 | 1156 |
|
3147 | 1157 |
<return: self> |
1158 |
" |
|
1159 |
||
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1160 |
(self componentAt:#TopHorizontalPanel) ignoreInvisibleComponents:true. |
2221 | 1161 |
^ super postBuildWith:aBuilder |
1162 |
! ! |
|
1163 |
||
1164 |
!VersionDiffBrowser methodsFor:'menu action'! |
|
1165 |
||
3344 | 1166 |
applySelectedChangeInA |
3753 | 1167 |
self applyChange:(self selectedChangeInA) |
3344 | 1168 |
! |
1169 |
||
1170 |
applySelectedChangeInB |
|
3753 | 1171 |
self applyChange:(self selectedChangeInB) |
3344 | 1172 |
! |
1173 |
||
2465 | 1174 |
browseChange:aChange |
3147 | 1175 |
" |
1176 |
browse the change in aChange |
|
2507 | 1177 |
|
3147 | 1178 |
<return: self> |
1179 |
" |
|
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1180 |
|cls sel m| |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1181 |
|
2578
29264fb3847e
avoid debugger in browse-menu
Claus Gittinger <cg@exept.de>
parents:
2536
diff
changeset
|
1182 |
aChange isNil ifTrue:[^ self]. |
2650
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1183 |
cls := aChange changeClass. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1184 |
sel := aChange changeSelector. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1185 |
(cls compiledMethodAt:sel) isNil ifTrue:[ |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1186 |
self information:'Method does not exist.' |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1187 |
]. |
447c99ac6f76
oops - inspect & browse menu was broken.
Claus Gittinger <cg@exept.de>
parents:
2626
diff
changeset
|
1188 |
|
3138 | 1189 |
UserPreferences systemBrowserClass openInClass:cls selector:sel. |
2465 | 1190 |
! |
1191 |
||
1192 |
browseClassInA |
|
3147 | 1193 |
" |
1194 |
browse the selected method. |
|
2507 | 1195 |
|
3147 | 1196 |
<return: self> |
1197 |
" |
|
2465 | 1198 |
self browseChange:(self selectedChangeInA). |
1199 |
! |
|
2221 | 1200 |
|
2465 | 1201 |
browseClassInB |
3147 | 1202 |
" |
1203 |
browse the selected method. |
|
2507 | 1204 |
|
3147 | 1205 |
<return: self> |
1206 |
" |
|
2465 | 1207 |
self browseChange:(self selectedChangeInB). |
1208 |
! |
|
1209 |
||
1210 |
browseClassInM |
|
3147 | 1211 |
" |
1212 |
browse the selected method. |
|
2507 | 1213 |
|
3147 | 1214 |
<return: self> |
1215 |
" |
|
2465 | 1216 |
self browseChange:(self selectedChangesInM first). |
1217 |
! |
|
1218 |
||
2469 | 1219 |
createPatchFile |
2856 | 1220 |
"create a patchFile, to patch the old version (versionB) into the new version (versionA). |
1221 |
I.e. a little changeFile to transport those changes." |
|
1222 |
||
1223 |
|defaultName f oldVersion newVersion vsnMthdA vsnMthdB vsnA vsnB info| |
|
1224 |
||
1225 |
defaultName := 'patchFile.chg'. |
|
2469 | 1226 |
|
2856 | 1227 |
classChangeSet classBeingCompared notNil ifTrue:[ |
1228 |
defaultName := classChangeSet classBeingCompared nameWithoutPrefix. |
|
1229 |
classChangeSet versionA notNil ifTrue:[ |
|
1230 |
defaultName := defaultName , '-'. |
|
1231 |
defaultName := defaultName , classChangeSet versionA. |
|
1232 |
classChangeSet versionB notNil ifTrue:[ |
|
1233 |
defaultName := defaultName , '-'. |
|
1234 |
defaultName := defaultName , classChangeSet versionB. |
|
1235 |
]. |
|
1236 |
]. |
|
1237 |
defaultName := defaultName , '.chg'. |
|
1238 |
]. |
|
1239 |
f := Dialog |
|
1240 |
requestFileName:'Name of patchFile:' |
|
1241 |
default:defaultName. |
|
1242 |
self warn:'Sorry: This function is not yet implemented'. |
|
2730 | 1243 |
^ self. |
1244 |
||
3103 | 1245 |
"/ vsnMthdA := self changeSetA |
1246 |
"/ detect:[:ch | ch isMethodChange |
|
1247 |
"/ and:[ch changeClass isMeta |
|
1248 |
"/ and:[ch changeSelector = #version]]] |
|
1249 |
"/ ifNone:nil. |
|
1250 |
"/ vsnMthdB := self changeSetA |
|
1251 |
"/ detect:[:ch | ch isMethodChange |
|
1252 |
"/ and:[ch changeClass isMeta |
|
1253 |
"/ and:[ch changeSelector = #version]]] |
|
1254 |
"/ ifNone:nil. |
|
1255 |
"/ |
|
1256 |
"/ vsnMthdA notNil ifTrue:[ |
|
1257 |
"/ "/ extract the version |
|
1258 |
"/ vsnA := Class revisionStringFromSource:vsnMthdA source. |
|
1259 |
"/ vsnA notNil ifTrue:[ |
|
1260 |
"/ info := Class revisionInfoFromString:vsnA. |
|
1261 |
"/ info notNil ifTrue:[ |
|
1262 |
"/ vsnA := info at:#revision ifAbsent:nil. |
|
1263 |
"/ ] ifFalse:[ |
|
1264 |
"/ vsnA := nil. |
|
1265 |
"/ ]. |
|
1266 |
"/ ]. |
|
1267 |
"/ ]. |
|
1268 |
"/ vsnMthdB notNil ifTrue:[ |
|
1269 |
"/ "/ extract the version |
|
1270 |
"/ vsnB := Class revisionStringFromSource:vsnMthdB source. |
|
1271 |
"/ vsnB notNil ifTrue:[ |
|
1272 |
"/ info := Class revisionInfoFromString:vsnB. |
|
1273 |
"/ info notNil ifTrue:[ |
|
1274 |
"/ vsnB := info at:#revision ifAbsent:nil. |
|
1275 |
"/ ] ifFalse:[ |
|
1276 |
"/ vsnB := nil. |
|
1277 |
"/ ]. |
|
1278 |
"/ ]. |
|
1279 |
"/ ]. |
|
1280 |
"/ |
|
1281 |
"/ (vsnA isNil or:[vsnB isNil or:[vsnA = vsnB]]) ifTrue:[ |
|
1282 |
"/ self warn:'The generated patch file will not be able to validate/update the class version'. |
|
1283 |
"/ ]. |
|
1284 |
"/ |
|
1285 |
"/self halt:'not yet finished'. |
|
2469 | 1286 |
! |
1287 |
||
2465 | 1288 |
inspectSelectedChangeInA |
3147 | 1289 |
" |
1290 |
inspect the selected method change for the 'method only in version A'. |
|
2507 | 1291 |
|
3147 | 1292 |
<return: self> |
1293 |
" |
|
2465 | 1294 |
self selectedChangeInA inspect. |
2221 | 1295 |
! |
1296 |
||
1297 |
inspectSelectedChangeInB |
|
3147 | 1298 |
" |
1299 |
inspect the selected method change for the 'method only in version B'. |
|
2507 | 1300 |
|
3147 | 1301 |
<return: self> |
1302 |
" |
|
2465 | 1303 |
self selectedChangeInB inspect. |
1304 |
! |
|
1305 |
||
1306 |
inspectSelectedChangeInM |
|
3147 | 1307 |
" |
1308 |
inspect the two method changes for the selected 'changed method'. |
|
2507 | 1309 |
|
3147 | 1310 |
<return: self> |
1311 |
" |
|
2465 | 1312 |
|changes| |
1313 |
||
1314 |
changes := self selectedChangesInM. |
|
1315 |
changes do:[:change | |
|
1316 |
change inspect |
|
1317 |
]. |
|
1318 |
! |
|
1319 |
||
2501 | 1320 |
mainMenu |
3147 | 1321 |
" |
1322 |
if this application runs as an subapplication, |
|
1323 |
the menu bar should not be used. |
|
2507 | 1324 |
|
3147 | 1325 |
<return: self> |
1326 |
" |
|
2501 | 1327 |
self masterApplication isNil ifTrue:[ |
1328 |
^ self class mainMenu |
|
1329 |
]. |
|
1330 |
^ nil |
|
2221 | 1331 |
! ! |
1332 |
||
1333 |
!VersionDiffBrowser methodsFor:'private'! |
|
1334 |
||
3753 | 1335 |
acceptInLeftView |
1336 |
|change| |
|
1337 |
||
1338 |
change := self selectedChangesInM first. |
|
1339 |
self applyChange:change |
|
1340 |
! |
|
1341 |
||
1342 |
acceptInRightView |
|
1343 |
|change| |
|
1344 |
||
1345 |
change := self selectedChangesInM second. |
|
1346 |
self applyChange:change |
|
1347 |
! |
|
1348 |
||
1349 |
acceptInSingleView |
|
1350 |
|change| |
|
1351 |
||
1352 |
change := self selectedChangeInA. |
|
1353 |
change isNil ifTrue:[ |
|
1354 |
change := self selectedChangeInB |
|
1355 |
]. |
|
1356 |
self applyChange:change |
|
1357 |
! |
|
1358 |
||
2745 | 1359 |
addAcceptToTextViewMenus |
3147 | 1360 |
" |
1361 |
add to the standard diff text view or single text views menu an accept entry. |
|
1362 |
The acceptAction will fetch the corresponding change and apply it |
|
1363 |
(not the shown text) |
|
2745 | 1364 |
|
3147 | 1365 |
<return: self> |
1366 |
" |
|
2745 | 1367 |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1368 |
|m diffTextView leftView rightView singleView| |
2745 | 1369 |
|
1370 |
diffTextView := self diffTextView. |
|
1371 |
leftView := diffTextView leftTextView. |
|
1372 |
rightView := diffTextView rightTextView. |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1373 |
singleView := self componentAt:#singleTextView. |
2745 | 1374 |
|
1375 |
(Array |
|
1376 |
with:leftView |
|
1377 |
with:rightView |
|
1378 |
with:singleView) |
|
1379 |
do:[:v | |
|
1380 |
m := v editMenu. |
|
1381 |
(m selectorAt:#accept) isNil ifTrue:[ |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1382 |
m addLabels:(resources array:#('-' 'Accept')) |
2745 | 1383 |
selectors:(Array with:nil with:#accept) |
1384 |
after:#copySelection. |
|
1385 |
]. |
|
1386 |
m |
|
1387 |
actionAt:#accept |
|
1388 |
put:[ |
|
1389 |
v == singleView ifTrue:[ |
|
3753 | 1390 |
self acceptInSingleView |
1391 |
] ifFalse:[ |
|
1392 |
v == leftView ifTrue:[ |
|
1393 |
self acceptInLeftView |
|
2745 | 1394 |
] ifFalse:[ |
3753 | 1395 |
self acceptInRightView |
2745 | 1396 |
]. |
1397 |
]. |
|
1398 |
]. |
|
1399 |
m selectorAt:#accept put:nil. |
|
3684
e478c26e5c5b
copySelection must be enabled (sigh - must rewrite TextView
Claus Gittinger <cg@exept.de>
parents:
3682
diff
changeset
|
1400 |
m enable:#copySelection. |
3753 | 1401 |
m setEnable:#accept to:[self halt. self canAcceptInCodeView]. |
2745 | 1402 |
v menuHolder:m. |
1403 |
v menuMessage:#value. |
|
1404 |
] |
|
1405 |
! |
|
1406 |
||
3753 | 1407 |
applyChange:change |
1408 |
change notNil ifTrue:[ |
|
1409 |
change apply |
|
1410 |
] |
|
1411 |
! |
|
1412 |
||
3839 | 1413 |
printStringGenerator |
3147 | 1414 |
" |
1415 |
generate a print string for a change. |
|
2497 | 1416 |
|
3147 | 1417 |
<return: Block> |
1418 |
" |
|
3839 | 1419 |
^ [:aChange | |
3678 | 1420 |
|result mPkg cPkg cls m changeClassName useChangesString |
1421 |
singleComparedClass singleComparedClassesName singleComparedMetaclassesName| |
|
1422 |
||
1423 |
(singleComparedClass := self classBeingCompared) notNil ifTrue:[ |
|
1424 |
singleComparedClassesName := singleComparedClass name. |
|
1425 |
singleComparedMetaclassesName := singleComparedClass theMetaclass name. |
|
1426 |
]. |
|
2585 | 1427 |
|
2507 | 1428 |
aChange isClassDefinitionChange ifTrue:[ |
2585 | 1429 |
result := aChange printStringWithoutClassName |
2497 | 1430 |
] ifFalse:[ |
2507 | 1431 |
aChange isDoIt ifTrue:[ |
1432 |
result := aChange source , ' (doIt)' |
|
2497 | 1433 |
] ifFalse:[ |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1434 |
useChangesString := false. |
2585 | 1435 |
changeClassName := aChange className. |
3678 | 1436 |
changeClassName = singleComparedClassesName ifTrue:[ |
2585 | 1437 |
result := aChange printStringWithoutClassName. |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1438 |
useChangesString := true. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1439 |
] ifFalse:[ |
3678 | 1440 |
changeClassName = singleComparedMetaclassesName ifTrue:[ |
3329
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1441 |
result := aChange printString. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1442 |
useChangesString := true. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1443 |
]. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1444 |
]. |
30435f09bc6f
better list-items for metaclass changes
Claus Gittinger <cg@exept.de>
parents:
3322
diff
changeset
|
1445 |
useChangesString ifTrue:[ |
2745 | 1446 |
aChange isMethodCategoryChange ifTrue:[ |
1447 |
result := result , ' (category)' |
|
1448 |
] ifFalse:[ |
|
1449 |
aChange isMethodChange ifTrue:[ |
|
1450 |
cls := aChange changeClass. |
|
1451 |
cls notNil ifTrue:[ |
|
1452 |
m := cls compiledMethodAt:aChange selector. |
|
1453 |
(m notNil |
|
1454 |
and:[m package ~= cls package]) ifTrue:[ |
|
1455 |
result := aChange printStringWithoutClassName , ' [' , m package , ']'. |
|
1456 |
]. |
|
2497 | 1457 |
]. |
2745 | 1458 |
] |
2497 | 1459 |
] |
1460 |
] ifFalse:[ |
|
3678 | 1461 |
|
2497 | 1462 |
"/ include name in private class changes |
3678 | 1463 |
(singleComparedClassesName notNil |
1464 |
and:[changeClassName startsWith:(singleComparedClassesName , '::')]) ifTrue:[ |
|
1465 |
result := (changeClassName copyFrom:(singleComparedClassesName size + 3)) , ' ' , aChange printStringWithoutClassName |
|
2497 | 1466 |
] ifFalse:[ |
2507 | 1467 |
result := aChange printString |
2497 | 1468 |
] |
1469 |
] |
|
1470 |
] |
|
1471 |
]. |
|
1472 |
result |
|
1473 |
]. |
|
1474 |
! |
|
1475 |
||
2501 | 1476 |
resetSelectionHolders |
3147 | 1477 |
" |
1478 |
reset all selection holders when a new change set is given. |
|
1479 |
First set the selection to nil. |
|
2507 | 1480 |
|
3147 | 1481 |
<return: self> |
1482 |
" |
|
2501 | 1483 |
|
1484 |
self methodsChangedSelection value:nil. |
|
1485 |
self methodsOnlyInASelection value:nil. |
|
1486 |
self methodsOnlyInBSelection value:nil. |
|
2507 | 1487 |
self diffTextView text1:'' text2:''. |
1488 |
self methodText value:''. |
|
1489 |
||
1490 |
"/ self methodsChangedSelectionChanged. |
|
1491 |
"/ self methodsOnlyInASelectionChanged. |
|
1492 |
"/ self methodsOnlyInBSelectionChanged. |
|
2501 | 1493 |
! |
1494 |
||
2221 | 1495 |
showDiffTextView |
3147 | 1496 |
" |
1497 |
if a method change is selected, then show the diff text view. |
|
1498 |
Add an accept entry to the popup menu. |
|
2507 | 1499 |
|
3147 | 1500 |
<return: self> |
1501 |
" |
|
2694 | 1502 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1503 |
(self componentAt:#diffTextViewBox) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1504 |
(self componentAt:#singleTextView) beInvisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1505 |
(self componentAt:#diffTextView) realizeAllSubViews. |
2694 | 1506 |
|
2465 | 1507 |
self addAcceptToTextViewMenus. |
2221 | 1508 |
! |
1509 |
||
1510 |
showSingleTextView |
|
3147 | 1511 |
" |
1512 |
if a method is selected which is only in version A or B of the class, |
|
1513 |
then show the text view. |
|
1514 |
Add an accept entry to the popup menu. |
|
2507 | 1515 |
|
3147 | 1516 |
<return: self> |
1517 |
" |
|
2507 | 1518 |
|
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1519 |
(self componentAt:#singleTextView) raise; beVisible. |
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1520 |
(self componentAt:#diffTextViewBox) beInvisible. |
2501 | 1521 |
self addAcceptToTextViewMenus. |
2221 | 1522 |
! |
1523 |
||
2497 | 1524 |
updateLabels |
3147 | 1525 |
" |
1526 |
update the labels of the diff text view. Show the version numbers |
|
1527 |
of the class. |
|
2221 | 1528 |
|
3147 | 1529 |
<return: self> |
1530 |
" |
|
2221 | 1531 |
|
2694 | 1532 |
|theVersionA theVersionB builder| |
2224 | 1533 |
|
2694 | 1534 |
builder := self builder. |
2497 | 1535 |
(theVersionA := self versionA) notNil ifTrue:[ |
1536 |
self diffTextLabelA value:theVersionA. |
|
2726 | 1537 |
self onlyInALabelHolder value:('Only in ' , theVersionA). |
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1538 |
(self componentAt:#OnlyInALabel) backgroundColor:Color green darkened. |
2224 | 1539 |
]. |
2497 | 1540 |
(theVersionB :=self versionB) notNil ifTrue:[ |
1541 |
self diffTextLabelB value:theVersionB. |
|
2726 | 1542 |
self onlyInBLabelHolder value:('Only in ' , theVersionB). |
3843
673fbeb191c9
builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents:
3839
diff
changeset
|
1543 |
(self componentAt:#OnlyInBLabel) backgroundColor:Color red darkened. |
2224 | 1544 |
]. |
1545 |
! |
|
1546 |
||
1547 |
updateLists |
|
3839 | 1548 |
|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
|
1549 |
|
2585 | 1550 |
classChangeSet := self classChangeSet. |
1551 |
||
3839 | 1552 |
printStringGenerator := self printStringGenerator. |
1553 |
sortBlockForChangeLists := [:a :b | (printStringGenerator value:a) < (printStringGenerator value:b)]. |
|
1554 |
||
2731 | 1555 |
listOnlyInA := self methodsOnlyInA. |
1556 |
listOnlyInA removeAll. |
|
1557 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1558 |
classChangeSet methodsOnlyInA sort:sortBlockForChangeLists. |
1559 |
listOnlyInA addAll: (classChangeSet methodsOnlyInA collect:printStringGenerator). |
|
2731 | 1560 |
]. |
2585 | 1561 |
|
2731 | 1562 |
listOnlyInB := self methodsOnlyInB. |
1563 |
listOnlyInB removeAll. |
|
1564 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1565 |
classChangeSet methodsOnlyInB sort:sortBlockForChangeLists. |
1566 |
listOnlyInB addAll: (classChangeSet methodsOnlyInB collect:printStringGenerator). |
|
2731 | 1567 |
]. |
2221 | 1568 |
|
2731 | 1569 |
listChanged := self methodsChanged. |
1570 |
listChanged removeAll. |
|
1571 |
classChangeSet notNil ifTrue:[ |
|
3839 | 1572 |
classChangeSet methodsChanged sort:[:a :b | sortBlockForChangeLists value:a first value:b first]. |
1573 |
listChanged addAll: (classChangeSet methodsChanged collect:[:arr| printStringGenerator value:(arr first)]). |
|
2731 | 1574 |
]. |
2221 | 1575 |
|
2731 | 1576 |
self boxAVisible value:(listOnlyInA notEmpty). |
1577 |
self boxBVisible value:(listOnlyInB notEmpty). |
|
2221 | 1578 |
|
2731 | 1579 |
self boxMVisible value:(listChanged isEmpty |
1580 |
and: [(listOnlyInA notEmpty |
|
1581 |
or:[listOnlyInB notEmpty])]) not. |
|
2221 | 1582 |
! ! |
1583 |
||
2501 | 1584 |
!VersionDiffBrowser methodsFor:'setup'! |
1585 |
||
2695 | 1586 |
setupForClass:aClass againstVersion:aVersionA |
3147 | 1587 |
" |
1588 |
compute the class change set for the class aClass of its current version against the repository version A. |
|
1589 |
When setting the class change set, the labels, list etc. of the receiver |
|
1590 |
are updated. |
|
2695 | 1591 |
|
3147 | 1592 |
<return: self> |
1593 |
" |
|
2731 | 1594 |
|changeSet| |
1595 |
||
2745 | 1596 |
aClass isNil ifTrue:[ |
1597 |
changeSet := nil |
|
1598 |
] ifFalse:[ |
|
1599 |
aClass isNameSpace ifFalse:[ |
|
1600 |
aClass isLoaded ifTrue:[ |
|
1601 |
changeSet := (ClassChangeSet newForClass:aClass againstVersion:aVersionA). |
|
1602 |
] |
|
1603 |
]. |
|
2731 | 1604 |
]. |
2856 | 1605 |
self classChangeSet:changeSet. |
2857
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1606 |
aVersionA isNil ifTrue:[ |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1607 |
self class:aClass versionA:'rep' versionB:'current'. |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1608 |
] ifFalse:[ |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1609 |
self class:aClass versionA:aVersionA versionB:(aVersionA , 'm'). |
0c467f6b1741
handle case if invoked without versionString
Claus Gittinger <cg@exept.de>
parents:
2856
diff
changeset
|
1610 |
] |
2695 | 1611 |
! |
1612 |
||
2949 | 1613 |
setupForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
3147 | 1614 |
" |
1615 |
generate the class change set from the two classes A and B. |
|
1616 |
When setting the class change set, the labels, list etc. of the receiver |
|
1617 |
are updated. |
|
2949 | 1618 |
|
3147 | 1619 |
<return: self> |
1620 |
" |
|
2949 | 1621 |
|changeSet| |
1622 |
||
1623 |
changeSet := (ClassChangeSet newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB). |
|
1624 |
self classChangeSet:changeSet |
|
1625 |
! |
|
1626 |
||
2510 | 1627 |
setupForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB |
3147 | 1628 |
" |
1629 |
generate the class change set from the two source files A and B. |
|
1630 |
When setting the class change set, the labels, list etc. of the receiver |
|
1631 |
are updated. |
|
2510 | 1632 |
|
3147 | 1633 |
<return: self> |
1634 |
" |
|
2731 | 1635 |
|changeSet| |
1636 |
||
2751
f2fbe11e166a
oops - isNameSpace query prevented Smalltalk-diffs from beeing shown
Claus Gittinger <cg@exept.de>
parents:
2745
diff
changeset
|
1637 |
(aClass isNameSpace not or:[aClass == Smalltalk]) ifTrue:[ |
2731 | 1638 |
aClass isLoaded ifTrue:[ |
1639 |
changeSet := (ClassChangeSet newForClass:aClass labelA:aLabelA sourceA:aSourceA labelB:aLabelB sourceB:aSourceB). |
|
1640 |
] |
|
1641 |
]. |
|
1642 |
self classChangeSet:changeSet |
|
2510 | 1643 |
! |
1644 |
||
2501 | 1645 |
setupForClass:aClass versionA:aVersionA versionB:aVersionB |
3147 | 1646 |
" |
1647 |
compute the class change set for the class aClass and the versions A and B. |
|
1648 |
When setting the class change set, the labels, list etc. of the receiver |
|
1649 |
are updated. |
|
2501 | 1650 |
|
3147 | 1651 |
<return: self> |
1652 |
" |
|
2731 | 1653 |
|changeSet| |
1654 |
||
1655 |
aClass isNameSpace ifFalse:[ |
|
1656 |
aClass isLoaded ifTrue:[ |
|
1657 |
changeSet := (ClassChangeSet newForClass:aClass versionA:aVersionA versionB:aVersionB). |
|
1658 |
] |
|
1659 |
]. |
|
2856 | 1660 |
self classChangeSet:changeSet. |
1661 |
self class:aClass versionA:aVersionA versionB:aVersionB. |
|
3678 | 1662 |
! |
1663 |
||
1664 |
setupForDiffSet:diffSet labelA:aLabelA labelB:aLabelB |
|
1665 |
|changeSet| |
|
1666 |
||
1667 |
changeSet := (ClassChangeSet new diffSet:diffSet; labelA:aLabelA; labelB:aLabelB). |
|
1668 |
self classChangeSet:changeSet |
|
2501 | 1669 |
! ! |
1670 |
||
2497 | 1671 |
!VersionDiffBrowser::ClassChangeSet class methodsFor:'instance creation'! |
1672 |
||
2695 | 1673 |
changeSetForClass:aClass |
3756 | 1674 |
"return a ChangeSet for the class aClass and its current source. |
1675 |
The source is generated into a stream and then the change set is generated |
|
1676 |
from the source stream. |
|
2695 | 1677 |
|
3756 | 1678 |
<return: ChangeSet|nil> |
1679 |
" |
|
2695 | 1680 |
|
3756 | 1681 |
^ ChangeSet forExistingClass:aClass. |
2695 | 1682 |
! |
1683 |
||
2497 | 1684 |
changeSetForClass:aClass andRevision:aVersion |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1685 |
"return a ChangeSet for the class aClass and version aVersion. |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1686 |
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
|
1687 |
into a source stream. Then the change set is generated from the source stream. |
2497 | 1688 |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1689 |
<return: ChangeSet|nil> |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1690 |
" |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1691 |
|
2497 | 1692 |
|theSourceCodeManager theSourceStream theChangeSet| |
1693 |
||
1694 |
theSourceCodeManager := aClass sourceCodeManager. |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1695 |
[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1696 |
theSourceStream := theSourceCodeManager getSourceStreamFor:aClass revision:aVersion. |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1697 |
theSourceStream notNil |
3763 | 1698 |
ifTrue:[theChangeSet := ChangeSet fromStream:theSourceStream] |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1699 |
] ensure:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1700 |
theSourceStream notNil ifTrue:[theSourceStream close] |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1701 |
]. |
2497 | 1702 |
^theChangeSet |
1703 |
! |
|
1704 |
||
1705 |
changeSetForClass:aClass andSource:aSource |
|
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1706 |
"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
|
1707 |
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
|
1708 |
from the source stream. |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1709 |
Raise an error if the source stream cannot be opened |
2497 | 1710 |
|
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1711 |
<return: ChangeSet>" |
4638
79734f7bdfc4
Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents:
4359
diff
changeset
|
1712 |
|
2497 | 1713 |
|theChangeSet theSourceStream| |
1714 |
||
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1715 |
[ |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1716 |
theSourceStream := aSource readStream. |
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1717 |
theSourceStream checkNilFileStream. |
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1718 |
theChangeSet := ChangeSet fromStream:(theSourceStream := aSource readStream) |
3594
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1719 |
] ensure:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1720 |
theSourceStream notNil ifTrue:[ |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1721 |
theSourceStream close |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1722 |
] |
12071dccbbe4
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
3344
diff
changeset
|
1723 |
]. |
4653
0a97ce41f5bd
More openErrorSignal change preparations
Stefan Vogel <sv@exept.de>
parents:
4638
diff
changeset
|
1724 |
^ theChangeSet |
2497 | 1725 |
! |
1726 |
||
2695 | 1727 |
newForClass:aClass againstVersion:aVersionA |
1728 |
"return a ClassChangeSet for the class aClass against some verison in the repository. |
|
1729 |
A new instance of ClassChangeSet is generated containing |
|
1730 |
the correspondenting changes. |
|
1731 |
||
1732 |
<return: ClassChangeSet> |
|
1733 |
" |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1734 |
|theChangeSetA theChangeSetB theClassChangeSet versionCompared diffSet| |
2695 | 1735 |
|
1736 |
theClassChangeSet := self new. |
|
1737 |
theClassChangeSet classBeingCompared:aClass. |
|
1738 |
versionCompared := aVersionA. |
|
1739 |
aVersionA isNil ifTrue:[ |
|
1740 |
theClassChangeSet labelA:(versionCompared := aClass revision). |
|
2856 | 1741 |
theClassChangeSet versionA:versionCompared. |
2695 | 1742 |
] ifFalse:[ |
1743 |
aVersionA == #newest ifTrue:[ |
|
2776 | 1744 |
theClassChangeSet labelA:(VersionDiffBrowser resources string:'newest'). |
2695 | 1745 |
] ifFalse:[ |
1746 |
theClassChangeSet labelA:versionCompared. |
|
2856 | 1747 |
theClassChangeSet versionA:versionCompared. |
2695 | 1748 |
] |
1749 |
]. |
|
2776 | 1750 |
theClassChangeSet labelB:(VersionDiffBrowser resources string:'current'). |
2695 | 1751 |
theChangeSetA := self changeSetForClass: aClass andRevision: versionCompared. |
1752 |
theChangeSetB := self changeSetForClass: aClass. |
|
1753 |
theChangeSetA isNil |
|
1754 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1755 |
theChangeSetB isNil |
|
1756 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2710
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1757 |
"/ 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
|
1758 |
aClass isPrivate ifTrue:[ |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1759 |
theChangeSetA removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1760 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1761 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1762 |
theChangeSetB removeAllSuchThat:[:aChange | |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1763 |
aChange className ~= aClass name |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1764 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1765 |
]. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1766 |
self activityNotification:'generating diff-set...'. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1767 |
diffSet := theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB). |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1768 |
self activityNotification:nil. |
88a97fa1d140
allow comparing private classes
Claus Gittinger <cg@exept.de>
parents:
2697
diff
changeset
|
1769 |
^ diffSet |
2695 | 1770 |
! |
1771 |
||
2949 | 1772 |
newForClass:classA labelA:aLabelA andClass:classB labelB:aLabelB |
1773 |
"return a ClassChangeSet for two classes. |
|
1774 |
A new instance of ClassChangeSet is generated containing the correspondenting changes. |
|
1775 |
||
1776 |
<return: ClassChangeSet> |
|
1777 |
" |
|
1778 |
|aStream sourceA sourceB theChangeSetA theChangeSetB theClassChangeSet| |
|
1779 |
||
1780 |
theClassChangeSet := self new. |
|
1781 |
theClassChangeSet classBeingCompared:classA. |
|
1782 |
theClassChangeSet labelA:aLabelA. |
|
1783 |
theClassChangeSet labelB:aLabelB. |
|
1784 |
||
1785 |
aStream := '' writeStream. |
|
1786 |
Method flushSourceStreamCache. |
|
1787 |
classA fileOutOn:aStream withTimeStamp:false. |
|
1788 |
sourceA := aStream contents asString. |
|
1789 |
||
1790 |
aStream := '' writeStream. |
|
1791 |
Method flushSourceStreamCache. |
|
1792 |
classB fileOutOn:aStream withTimeStamp:false. |
|
1793 |
sourceB := aStream contents asString. |
|
1794 |
||
1795 |
theChangeSetA:=self changeSetForClass:classA andSource:sourceA. |
|
1796 |
theChangeSetB:=self changeSetForClass:classB andSource:sourceB. |
|
1797 |
theChangeSetA isNil |
|
1798 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1799 |
theChangeSetB isNil |
|
1800 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
1801 |
||
1802 |
"/ just in case (if comparing a class against another), |
|
1803 |
"/ unify the classes of the changes (to avoid that all changes are detected as different) |
|
1804 |
||
1805 |
theChangeSetB do:[:eachChange | |
|
1806 |
eachChange isMethodChange ifTrue:[ |
|
1807 |
eachChange changeClass isMeta ifTrue:[ |
|
1808 |
eachChange changeClass ~~ classA theMetaclass ifTrue:[ |
|
1809 |
eachChange changeClass:classA theMetaclass. |
|
1810 |
] |
|
1811 |
] ifFalse:[ |
|
1812 |
eachChange changeClass ~~ classA theNonMetaclass ifTrue:[ |
|
1813 |
eachChange changeClass:classA theNonMetaclass. |
|
1814 |
] |
|
1815 |
]. |
|
1816 |
]. |
|
1817 |
]. |
|
1818 |
"/ remove all #initialize doIts |
|
1819 |
theChangeSetA := theChangeSetA select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
1820 |
theChangeSetB := theChangeSetB select:[:eachChange | eachChange isDoIt not or:[eachChange isInitialize not]]. |
|
1821 |
||
1822 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
|
1823 |
! |
|
1824 |
||
2497 | 1825 |
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
|
1826 |
"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
|
1827 |
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
|
1828 |
ClassChangeSet is generated containing the correspondenting changes. |
2497 | 1829 |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1830 |
<return: ClassChangeSet> |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1831 |
" |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1832 |
|
4128 | 1833 |
|theChangeSetA theChangeSetB theClassChangeSet className metaClassName| |
2497 | 1834 |
|
1835 |
theClassChangeSet := self new. |
|
1836 |
theClassChangeSet classBeingCompared:aClass. |
|
1837 |
theClassChangeSet labelA:aLabelA. |
|
1838 |
theClassChangeSet labelB:aLabelB. |
|
1839 |
theChangeSetA:=self changeSetForClass:aClass andSource:aSourceA. |
|
1840 |
theChangeSetB:=self changeSetForClass:aClass andSource:aSourceB. |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1841 |
|
4128 | 1842 |
className := aClass name. |
1843 |
metaClassName := aClass class name. |
|
1844 |
||
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1845 |
aClass isPrivate ifTrue:[ |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1846 |
theChangeSetA := theChangeSetA select:[:change | change isMethodChange not |
4128 | 1847 |
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
|
1848 |
theChangeSetA := theChangeSetA select:[:change | change isClassDefinitionChange not |
4128 | 1849 |
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
|
1850 |
theChangeSetA := theChangeSetA select:[:change | change isDoIt not |
4128 | 1851 |
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
|
1852 |
theChangeSetB := theChangeSetB select:[:change | change isMethodChange not |
4128 | 1853 |
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
|
1854 |
theChangeSetB := theChangeSetB select:[:change | change isClassDefinitionChange not |
4128 | 1855 |
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
|
1856 |
theChangeSetB := theChangeSetB select:[:change | change isDoIt not |
4128 | 1857 |
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
|
1858 |
"/ there might be more needed... |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1859 |
]. |
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1860 |
|
2497 | 1861 |
theChangeSetA isNil |
1862 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1863 |
theChangeSetB isNil |
|
1864 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2947 | 1865 |
|
3730
717e425e843e
allow for private classes to be compared
Claus Gittinger <cg@exept.de>
parents:
3687
diff
changeset
|
1866 |
^ theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2465 | 1867 |
! |
1868 |
||
2497 | 1869 |
newForClass:aClass versionA:aVersionA versionB:aVersionB |
1870 |
"return a ClassChangeSet for the class aClass and the two versions. |
|
1871 |
The two class version are checked out from the repository and then being |
|
1872 |
compared. A new instance of ClassChangeSet is generated containing |
|
1873 |
the correspondenting changes. |
|
1874 |
||
1875 |
<return: ClassChangeSet> |
|
1876 |
" |
|
1877 |
|theChangeSetA theChangeSetB theClassChangeSet| |
|
1878 |
||
1879 |
theClassChangeSet := self new. |
|
1880 |
theClassChangeSet classBeingCompared:aClass. |
|
2856 | 1881 |
theClassChangeSet versionA:aVersionA. |
1882 |
theClassChangeSet versionB:aVersionB. |
|
2497 | 1883 |
theClassChangeSet labelA:aVersionA. |
1884 |
theClassChangeSet labelB:aVersionB. |
|
1885 |
theChangeSetA := self changeSetForClass: aClass andRevision: aVersionA. |
|
1886 |
theChangeSetB := self changeSetForClass: aClass andRevision: aVersionB. |
|
1887 |
theChangeSetA isNil |
|
1888 |
ifTrue: [theChangeSetA := ChangeSet new]. |
|
1889 |
theChangeSetB isNil |
|
1890 |
ifTrue: [theChangeSetB := ChangeSet new]. |
|
2695 | 1891 |
^theClassChangeSet diffSet:(theChangeSetA diffSetsAgainst:theChangeSetB) |
2497 | 1892 |
! ! |
1893 |
||
1894 |
!VersionDiffBrowser::ClassChangeSet methodsFor:'accessing'! |
|
1895 |
||
1896 |
classBeingCompared |
|
3756 | 1897 |
"returns the value of the class which is compared" |
2497 | 1898 |
|
1899 |
^ classBeingCompared |
|
1900 |
! |
|
2221 | 1901 |
|
2497 | 1902 |
classBeingCompared:something |
3756 | 1903 |
"set the value of the class which is compared" |
2497 | 1904 |
|
1905 |
classBeingCompared := something. |
|
1906 |
! |
|
1907 |
||
2695 | 1908 |
diffSet |
3756 | 1909 |
"returns a diffSet containing the different changes. |
1910 |
it responds to: |
|
2695 | 1911 |
|
3756 | 1912 |
changed OrderedCollection of arrays containing ChangeSets for methods |
1913 |
which are changed and exists in the class versionA and versionB |
|
1914 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1915 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1916 |
" |
|
1917 |
||
2695 | 1918 |
^ diffSet |
1919 |
! |
|
1920 |
||
1921 |
diffSet:something |
|
3756 | 1922 |
"sets the diffSet containing the different changes. |
1923 |
it responds to: |
|
2695 | 1924 |
|
3756 | 1925 |
changed OrderedCollection of arrays containing ChangeSets for methods |
1926 |
which are changed and exists in the class versionA and versionB |
|
1927 |
onlyInArg ChangeSet for the methods which exists only in the class versionB |
|
1928 |
onlyInReceiver ChangeSet for the methods which exists only in the class versionA |
|
1929 |
" |
|
2695 | 1930 |
|
1931 |
diffSet := something. |
|
1932 |
! |
|
1933 |
||
2497 | 1934 |
labelA |
3756 | 1935 |
"returns the label for the class versionA" |
2497 | 1936 |
|
1937 |
^ labelA |
|
1938 |
! |
|
1939 |
||
1940 |
labelA:something |
|
3756 | 1941 |
"sets the label for the class versionA" |
2497 | 1942 |
|
1943 |
labelA := something. |
|
1944 |
! |
|
1945 |
||
1946 |
labelB |
|
3756 | 1947 |
"returns the label for the class versionB" |
2497 | 1948 |
|
1949 |
^ labelB |
|
1950 |
! |
|
2465 | 1951 |
|
2497 | 1952 |
labelB:something |
3756 | 1953 |
"sets the label for the class versionB" |
2497 | 1954 |
|
1955 |
labelB := something. |
|
1956 |
! |
|
1957 |
||
1958 |
methodsChanged |
|
3756 | 1959 |
"returns an OrderedCollection of arrays containing ChangeSets for methods |
1960 |
which are changed and exists in the class versionA and versionB |
|
2497 | 1961 |
|
3756 | 1962 |
<return: OrderedCollection of Array(2)> |
1963 |
" |
|
1964 |
||
1965 |
^ self diffSet changed |
|
2497 | 1966 |
! |
1967 |
||
1968 |
methodsOnlyInA |
|
3756 | 1969 |
"returns a ChangeSet for the methods which exists only in the class versionA" |
2497 | 1970 |
|
3756 | 1971 |
^ self diffSet onlyInReceiver |
2497 | 1972 |
! |
1973 |
||
1974 |
methodsOnlyInB |
|
3756 | 1975 |
"returns a ChangeSet for the methods which exists only in the class versionB" |
2497 | 1976 |
|
3756 | 1977 |
^ self diffSet onlyInArg |
2856 | 1978 |
! |
1979 |
||
1980 |
versionA |
|
1981 |
^ versionA |
|
1982 |
! |
|
1983 |
||
1984 |
versionA:something |
|
1985 |
versionA := something. |
|
1986 |
! |
|
1987 |
||
1988 |
versionB |
|
1989 |
^ versionB |
|
1990 |
! |
|
1991 |
||
1992 |
versionB:something |
|
1993 |
versionB := something. |
|
2221 | 1994 |
! ! |
1995 |
||
1996 |
!VersionDiffBrowser class methodsFor:'documentation'! |
|
1997 |
||
1998 |
version |
|
5520 | 1999 |
^ '$Header: /cvs/stx/stx/libtool/VersionDiffBrowser.st,v 1.68 2004-02-16 10:39:09 penk Exp $' |
2221 | 2000 |
! ! |