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