author | convert-repo |
Tue, 09 Aug 2016 03:35:30 +0000 | |
changeset 1178 | 3a6dad9479fd |
parent 903 | 18a4a197eab8 |
permissions | -rw-r--r-- |
642 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
26 |
"{ Package: 'stx:libsvn' }" |
|
27 |
||
28 |
"{ NameSpace: SVN }" |
|
29 |
||
30 |
Tools::ChangeSetDiffTool subclass:#MergeBrowser |
|
31 |
instanceVariableNames:'' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'SVN-UI-Browsers-Diff' |
|
35 |
! |
|
36 |
||
37 |
!MergeBrowser class methodsFor:'documentation'! |
|
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
Copyright (c) 2007-2010 Jan Vrany |
|
42 |
Copyright (c) 2009-2010 eXept Software AG |
|
43 |
||
44 |
Permission is hereby granted, free of charge, to any person |
|
45 |
obtaining a copy of this software and associated documentation |
|
46 |
files (the 'Software'), to deal in the Software without |
|
47 |
restriction, including without limitation the rights to use, |
|
48 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
49 |
copies of the Software, and to permit persons to whom the |
|
50 |
Software is furnished to do so, subject to the following |
|
51 |
conditions: |
|
52 |
||
53 |
The above copyright notice and this permission notice shall be |
|
54 |
included in all copies or substantial portions of the Software. |
|
55 |
||
56 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
57 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
58 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
59 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
60 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
61 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
62 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
63 |
OTHER DEALINGS IN THE SOFTWARE. |
|
64 |
||
65 |
" |
|
66 |
! ! |
|
67 |
||
68 |
!MergeBrowser class methodsFor:'interface specs'! |
|
69 |
||
70 |
windowSpec |
|
71 |
"This resource specification was automatically generated |
|
72 |
by the UIPainter of ST/X." |
|
73 |
||
74 |
"Do not manually edit this!! If it is corrupted, |
|
75 |
the UIPainter may not be able to read the specification." |
|
76 |
||
77 |
" |
|
78 |
UIPainter new openOnClass:SVN::MergeBrowser andSelector:#windowSpec |
|
79 |
SVN::MergeBrowser new openInterface:#windowSpec |
|
80 |
SVN::MergeBrowser open |
|
81 |
" |
|
82 |
||
83 |
<resource: #canvas> |
|
84 |
||
85 |
^ |
|
86 |
#(FullSpec |
|
87 |
name: windowSpec |
|
88 |
window: |
|
89 |
(WindowSpec |
|
90 |
label: 'Diff Browser' |
|
91 |
name: 'Diff Browser' |
|
92 |
min: (Point 10 10) |
|
93 |
bounds: (Rectangle 0 0 908 676) |
|
94 |
menu: mainMenu |
|
95 |
) |
|
96 |
component: |
|
97 |
(SpecCollection |
|
98 |
collection: ( |
|
99 |
(VariableVerticalPanelSpec |
|
100 |
name: 'Panel' |
|
101 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
102 |
showHandle: true |
|
103 |
component: |
|
104 |
(SpecCollection |
|
105 |
collection: ( |
|
106 |
(SubCanvasSpec |
|
107 |
name: 'NavigatorPanel' |
|
108 |
hasHorizontalScrollBar: false |
|
109 |
hasVerticalScrollBar: false |
|
110 |
specHolder: navigatorPanelSpecHolder |
|
111 |
createNewBuilder: false |
|
112 |
) |
|
113 |
(SubCanvasSpec |
|
114 |
name: 'DiffView' |
|
115 |
majorKey: #'SVN::MergeViewApp' |
|
116 |
minorKey: #'diffSpec_Merge' |
|
117 |
specHolder: diffPanelSpecAspect |
|
118 |
subAspectHolders: |
|
119 |
(Array |
|
120 |
||
121 |
(SubChannelInfoSpec |
|
122 |
subAspect: diffHolder |
|
123 |
aspect: singleSelectionHolder |
|
124 |
) |
|
125 |
) |
|
126 |
createNewApplication: true |
|
127 |
createNewBuilder: true |
|
128 |
) |
|
129 |
) |
|
130 |
||
131 |
) |
|
132 |
handles: (Any 0.3 1.0) |
|
133 |
) |
|
134 |
) |
|
135 |
||
136 |
) |
|
137 |
) |
|
138 |
||
139 |
"Modified: / 23-11-2009 / 19:51:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
140 |
! ! |
|
141 |
||
142 |
!MergeBrowser class methodsFor:'menu specs'! |
|
143 |
||
144 |
listMenu |
|
145 |
"This resource specification was automatically generated |
|
146 |
by the MenuEditor of ST/X." |
|
147 |
||
148 |
"Do not manually edit this!! If it is corrupted, |
|
149 |
the MenuEditor may not be able to read the specification." |
|
150 |
||
151 |
" |
|
152 |
MenuEditor new openOnClass:SVN::MergeBrowser andSelector:#listMenu |
|
153 |
(Menu new fromLiteralArrayEncoding:(SVN::MergeBrowser listMenu)) startUp |
|
154 |
" |
|
155 |
||
156 |
<resource: #menu> |
|
157 |
||
158 |
^ |
|
159 |
#(Menu |
|
160 |
( |
|
161 |
(MenuItem |
|
162 |
label: 'Resolve using A' |
|
163 |
itemValue: resolveUsingVersionA |
|
164 |
nameKey: ResolveUsingA |
|
165 |
translateLabel: true |
|
166 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionA16x16 'Resolve using A') |
|
167 |
) |
|
168 |
(MenuItem |
|
169 |
label: 'Resolve using B' |
|
170 |
itemValue: resolveUsingVersionB |
|
171 |
nameKey: ResolveUsingB |
|
172 |
translateLabel: true |
|
173 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionB16x16 'Resolve using B') |
|
174 |
) |
|
175 |
(MenuItem |
|
176 |
label: 'Resolve using Base' |
|
177 |
itemValue: resolveUsingVersionBase |
|
178 |
nameKey: ResolveUsingBase |
|
179 |
translateLabel: true |
|
180 |
labelImage: (ResourceRetriever #'SVN::IconLibrary' versionBase16x16 'Resolve using Base') |
|
181 |
) |
|
182 |
(MenuItem |
|
183 |
label: '-' |
|
184 |
) |
|
185 |
(MenuItem |
|
186 |
enabled: hasSelection |
|
187 |
label: 'Inspect' |
|
188 |
itemValue: listMenuInspect |
|
189 |
translateLabel: true |
|
190 |
) |
|
191 |
) |
|
192 |
nil |
|
193 |
nil |
|
194 |
) |
|
195 |
! |
|
196 |
||
197 |
mainMenu |
|
198 |
"This resource specification was automatically generated |
|
199 |
by the MenuEditor of ST/X." |
|
200 |
||
201 |
"Do not manually edit this!! If it is corrupted, |
|
202 |
the MenuEditor may not be able to read the specification." |
|
203 |
||
204 |
" |
|
205 |
MenuEditor new openOnClass:SVN::MergeBrowser andSelector:#mainMenu |
|
206 |
(Menu new fromLiteralArrayEncoding:(SVN::MergeBrowser mainMenu)) startUp |
|
207 |
" |
|
208 |
||
209 |
<resource: #menu> |
|
210 |
||
211 |
^ |
|
212 |
#(Menu |
|
213 |
( |
|
214 |
(MenuItem |
|
215 |
label: 'File' |
|
216 |
translateLabel: true |
|
217 |
submenu: |
|
218 |
(Menu |
|
219 |
( |
|
220 |
(MenuItem |
|
221 |
label: 'Exit' |
|
222 |
itemValue: closeRequest |
|
223 |
translateLabel: true |
|
224 |
) |
|
225 |
) |
|
226 |
nil |
|
227 |
nil |
|
228 |
) |
|
229 |
) |
|
230 |
(MenuItem |
|
231 |
label: 'Change Set' |
|
232 |
translateLabel: true |
|
233 |
submenu: |
|
234 |
(Menu |
|
235 |
( |
|
236 |
(MenuItem |
|
237 |
label: 'Browse merge changeset' |
|
238 |
itemValue: browseMergeChangeset |
|
239 |
translateLabel: true |
|
240 |
) |
|
241 |
) |
|
242 |
nil |
|
243 |
nil |
|
244 |
) |
|
245 |
) |
|
246 |
(MenuItem |
|
247 |
label: 'Merge' |
|
248 |
translateLabel: true |
|
249 |
submenuChannel: listMenu |
|
250 |
) |
|
251 |
) |
|
252 |
nil |
|
253 |
nil |
|
254 |
) |
|
255 |
! ! |
|
256 |
||
903
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
257 |
!MergeBrowser class methodsFor:'others'! |
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
258 |
|
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
259 |
version_CVS |
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
260 |
^ '$Header$' |
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
261 |
! ! |
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
262 |
|
642 | 263 |
!MergeBrowser class methodsFor:'plugIn spec'! |
264 |
||
265 |
aspectSelectors |
|
266 |
"This resource specification was automatically generated |
|
267 |
by the UIPainter of ST/X." |
|
268 |
||
269 |
"Do not manually edit this. If it is corrupted, |
|
270 |
the UIPainter may not be able to read the specification." |
|
271 |
||
272 |
"Return a description of exported aspects; |
|
273 |
these can be connected to aspects of an embedding application |
|
274 |
(if this app is embedded in a subCanvas)." |
|
275 |
||
276 |
^ #( |
|
277 |
#diffsetHolder |
|
278 |
). |
|
279 |
||
280 |
! ! |
|
281 |
||
282 |
!MergeBrowser methodsFor:'accessing'! |
|
283 |
||
284 |
mergeChangeSet |
|
285 |
||
286 |
^self diffsetHolder value resolution |
|
287 |
||
288 |
"Created: / 25-11-2009 / 10:21:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
289 |
"Modified: / 26-11-2009 / 08:44:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
290 |
! ! |
|
291 |
||
292 |
!MergeBrowser methodsFor:'aspects'! |
|
293 |
||
294 |
diffListEntryLabelGeneratorAspect |
|
295 |
||
296 |
^[:diff| |
|
297 |
diff merged |
|
298 |
ifFalse:[diff name asText allBold colorizeAllWith: Color red] |
|
299 |
ifTrue:[diff name]] |
|
300 |
||
301 |
"Created: / 24-11-2009 / 10:02:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302 |
! ! |
|
303 |
||
304 |
!MergeBrowser methodsFor:'change & update'! |
|
305 |
||
306 |
updateListMenu |
|
307 |
||
308 |
"Created: / 25-11-2009 / 10:05:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
309 |
! ! |
|
310 |
||
311 |
!MergeBrowser methodsFor:'menu actions'! |
|
312 |
||
313 |
browseMergeChangeset |
|
314 |
||
315 |
||
316 |
Tools::ChangeSetBrowser new |
|
317 |
changeset: self mergeChangeSet; |
|
318 |
open |
|
319 |
||
320 |
"Modified: / 25-11-2009 / 10:30:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
321 |
! |
|
322 |
||
323 |
resolveUsingVersionA |
|
324 |
||
325 |
self selection do: |
|
326 |
[:diff|diff versionMerged: diff versionA copy] |
|
327 |
||
328 |
"Modified: / 25-11-2009 / 10:01:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
329 |
! |
|
330 |
||
331 |
resolveUsingVersionB |
|
332 |
||
333 |
self selection do: |
|
334 |
[:diff|diff versionMerged: diff versionB copy] |
|
335 |
||
336 |
"Modified: / 25-11-2009 / 10:01:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
337 |
! |
|
338 |
||
339 |
resolveUsingVersionBase |
|
340 |
||
341 |
self selection do: |
|
342 |
[:diff|diff versionMerged: diff versionBase copy] |
|
343 |
||
344 |
"Modified: / 25-11-2009 / 10:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
345 |
! ! |
|
346 |
||
347 |
!MergeBrowser class methodsFor:'documentation'! |
|
348 |
||
349 |
version |
|
350 |
^ '$Header$' |
|
351 |
! |
|
352 |
||
353 |
version_SVN |
|
903
18a4a197eab8
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
642
diff
changeset
|
354 |
^ '§Id: SVN__MergeBrowser.st 362 2011-08-08 13:07:42Z vranyj1 §' |
642 | 355 |
! ! |