|
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 |
|
257 !MergeBrowser class methodsFor:'plugIn spec'! |
|
258 |
|
259 aspectSelectors |
|
260 "This resource specification was automatically generated |
|
261 by the UIPainter of ST/X." |
|
262 |
|
263 "Do not manually edit this. If it is corrupted, |
|
264 the UIPainter may not be able to read the specification." |
|
265 |
|
266 "Return a description of exported aspects; |
|
267 these can be connected to aspects of an embedding application |
|
268 (if this app is embedded in a subCanvas)." |
|
269 |
|
270 ^ #( |
|
271 #diffsetHolder |
|
272 ). |
|
273 |
|
274 ! ! |
|
275 |
|
276 !MergeBrowser methodsFor:'accessing'! |
|
277 |
|
278 mergeChangeSet |
|
279 |
|
280 ^self diffsetHolder value resolution |
|
281 |
|
282 "Created: / 25-11-2009 / 10:21:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
283 "Modified: / 26-11-2009 / 08:44:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
284 ! ! |
|
285 |
|
286 !MergeBrowser methodsFor:'aspects'! |
|
287 |
|
288 diffListEntryLabelGeneratorAspect |
|
289 |
|
290 ^[:diff| |
|
291 diff merged |
|
292 ifFalse:[diff name asText allBold colorizeAllWith: Color red] |
|
293 ifTrue:[diff name]] |
|
294 |
|
295 "Created: / 24-11-2009 / 10:02:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
296 ! ! |
|
297 |
|
298 !MergeBrowser methodsFor:'change & update'! |
|
299 |
|
300 updateListMenu |
|
301 |
|
302 "Created: / 25-11-2009 / 10:05:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
303 ! ! |
|
304 |
|
305 !MergeBrowser methodsFor:'menu actions'! |
|
306 |
|
307 browseMergeChangeset |
|
308 |
|
309 |
|
310 Tools::ChangeSetBrowser new |
|
311 changeset: self mergeChangeSet; |
|
312 open |
|
313 |
|
314 "Modified: / 25-11-2009 / 10:30:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
315 ! |
|
316 |
|
317 resolveUsingVersionA |
|
318 |
|
319 self selection do: |
|
320 [:diff|diff versionMerged: diff versionA copy] |
|
321 |
|
322 "Modified: / 25-11-2009 / 10:01:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
323 ! |
|
324 |
|
325 resolveUsingVersionB |
|
326 |
|
327 self selection do: |
|
328 [:diff|diff versionMerged: diff versionB copy] |
|
329 |
|
330 "Modified: / 25-11-2009 / 10:01:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
331 ! |
|
332 |
|
333 resolveUsingVersionBase |
|
334 |
|
335 self selection do: |
|
336 [:diff|diff versionMerged: diff versionBase copy] |
|
337 |
|
338 "Modified: / 25-11-2009 / 10:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
339 ! ! |
|
340 |
|
341 !MergeBrowser class methodsFor:'documentation'! |
|
342 |
|
343 version |
|
344 ^ '$Header$' |
|
345 ! |
|
346 |
|
347 version_CVS |
|
348 ^ '$Header$' |
|
349 ! |
|
350 |
|
351 version_SVN |
|
352 ^ '§Id: SVN__MergeBrowser.st 354 2011-07-07 22:28:54Z vranyj1 §' |
|
353 ! ! |