author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 12:51:41 +0000 | |
branch | jv |
changeset 3011 | 1997ff6e7e55 |
parent 2643 | faaf64df2524 |
child 3012 | 4f40b8304d54 |
permissions | -rw-r--r-- |
2406 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, |
|
3 |
Czech Technical University in Prague |
|
4 |
Copyright (c) 2009-2010 eXept Software AG |
|
5 |
||
6 |
Permission is hereby granted, free of charge, to any person |
|
7 |
obtaining a copy of this software and associated documentation |
|
8 |
files (the 'Software'), to deal in the Software without |
|
9 |
restriction, including without limitation the rights to use, |
|
10 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
11 |
copies of the Software, and to permit persons to whom the |
|
12 |
Software is furnished to do so, subject to the following |
|
13 |
conditions: |
|
14 |
||
15 |
The above copyright notice and this permission notice shall be |
|
16 |
included in all copies or substantial portions of the Software. |
|
17 |
||
18 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
19 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
20 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
21 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
22 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
23 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
24 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
25 |
OTHER DEALINGS IN THE SOFTWARE. |
|
26 |
" |
|
27 |
"{ Package: 'stx:libbasic3' }" |
|
28 |
||
2424
bc7e320cec40
Inherit from object, not Model (to fix dependencies)
vrany
parents:
2406
diff
changeset
|
29 |
Object subclass:#ChangeSetDiffComponent |
2406 | 30 |
instanceVariableNames:'parent' |
31 |
classVariableNames:'' |
|
32 |
poolDictionaries:'' |
|
33 |
category:'System-Changes-Diff' |
|
34 |
! |
|
35 |
||
36 |
!ChangeSetDiffComponent class methodsFor:'documentation'! |
|
37 |
||
38 |
copyright |
|
39 |
" |
|
40 |
Copyright (c) 2007-2010 Jan Vrany, SWING Research Group, |
|
41 |
Czech Technical University in Prague |
|
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 |
!ChangeSetDiffComponent methodsFor:'accessing'! |
|
69 |
||
70 |
changesetA |
|
2643 | 71 |
"Answers a changeset with containing all versionA changes" |
72 |
| cs | |
|
2406 | 73 |
|
2643 | 74 |
cs := ChangeSet new name: self versionALabel. |
75 |
self do:[:item| |
|
76 |
cs add: item versionA |
|
77 |
]. |
|
78 |
^cs |
|
79 |
||
80 |
"Modified: / 16-12-2011 / 14:35:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2406 | 81 |
! |
82 |
||
83 |
changesetB |
|
2643 | 84 |
"Answers a changeset with containing all versionB changes" |
85 |
| cs | |
|
2406 | 86 |
|
2643 | 87 |
cs := ChangeSet new name: self versionBLabel. |
88 |
self do:[:item| |
|
89 |
cs add: item versionB |
|
90 |
]. |
|
91 |
^cs |
|
92 |
||
93 |
"Modified: / 16-12-2011 / 14:35:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2406 | 94 |
! |
95 |
||
96 |
diffs |
|
97 |
||
98 |
^#() |
|
99 |
||
100 |
"Created: / 10-11-2009 / 11:29:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
101 |
! |
|
102 |
||
103 |
flattened |
|
104 |
||
105 |
^ChangeSetDiffSet new add: self |
|
106 |
||
107 |
"Created: / 05-12-2009 / 11:07:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
108 |
! |
|
109 |
||
110 |
merged |
|
111 |
"raise an error: must be redefined in concrete subclass(es)" |
|
112 |
||
113 |
^ self subclassResponsibility |
|
114 |
! |
|
115 |
||
116 |
name |
|
117 |
"raise an error: must be redefined in concrete subclass(es)" |
|
118 |
||
119 |
^ self subclassResponsibility |
|
120 |
! |
|
121 |
||
122 |
parent |
|
123 |
^ parent |
|
124 |
! |
|
125 |
||
126 |
parent:aDiffSet |
|
127 |
parent := aDiffSet. |
|
2643 | 128 |
! |
129 |
||
130 |
versionALabel |
|
131 |
^ parent versionALabel |
|
132 |
||
133 |
"Created: / 09-11-2009 / 12:38:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
134 |
! |
|
135 |
||
136 |
versionBLabel |
|
137 |
^ parent versionBLabel |
|
138 |
||
139 |
"Created: / 09-11-2009 / 12:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2406 | 140 |
! ! |
141 |
||
142 |
!ChangeSetDiffComponent methodsFor:'change & update'! |
|
143 |
||
144 |
changed: aspect with: param |
|
145 |
||
146 |
(aspect = #resolution and:[parent notNil]) |
|
147 |
ifTrue:[parent changed: aspect with: param]. |
|
148 |
super changed: aspect with: param. |
|
149 |
||
150 |
"Created: / 24-11-2009 / 12:58:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
151 |
! ! |
|
152 |
||
153 |
!ChangeSetDiffComponent methodsFor:'enumerating'! |
|
154 |
||
155 |
do: aBlock |
|
156 |
||
157 |
self subclassResponsibility |
|
158 |
||
159 |
"Created: / 25-11-2009 / 10:22:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
160 |
! ! |
|
161 |
||
162 |
!ChangeSetDiffComponent methodsFor:'printing & storing'! |
|
163 |
||
164 |
printOn:aStream |
|
165 |
"append a printed representation if the receiver to the argument, aStream" |
|
166 |
||
167 |
super printOn:aStream. |
|
168 |
aStream nextPut:$(. |
|
169 |
self name printOn: aStream. |
|
170 |
aStream nextPut:$). |
|
171 |
||
172 |
"Modified: / 26-11-2009 / 16:25:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
173 |
! ! |
|
174 |
||
175 |
!ChangeSetDiffComponent methodsFor:'private'! |
|
176 |
||
177 |
flattenOn: stream |
|
178 |
||
179 |
^stream nextPut: self |
|
180 |
||
181 |
"Created: / 05-12-2009 / 11:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
182 |
! ! |
|
183 |
||
184 |
!ChangeSetDiffComponent methodsFor:'testing'! |
|
185 |
||
186 |
isDiffItem |
|
187 |
^ false |
|
188 |
! |
|
189 |
||
190 |
isDiffSet |
|
191 |
^ false |
|
192 |
! |
|
193 |
||
194 |
isEmpty |
|
195 |
||
196 |
^false |
|
197 |
! ! |
|
198 |
||
199 |
!ChangeSetDiffComponent class methodsFor:'documentation'! |
|
200 |
||
201 |
version_CVS |
|
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2643
diff
changeset
|
202 |
^ '§Header: /cvs/stx/stx/libbasic3/ChangeSetDiffComponent.st,v 1.3 2011/12/19 08:37:48 vrany Exp §' |
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2643
diff
changeset
|
203 |
! ! |