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 |
|
|
29 |
Model subclass:#ChangeSetDiffComponent
|
|
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
|
|
71 |
|
|
72 |
^ChangeSet withAll: (self flattened collect:[:each|each versionA])
|
|
73 |
!
|
|
74 |
|
|
75 |
changesetB
|
|
76 |
|
|
77 |
^ChangeSet withAll: (self flattened collect:[:each|each versionB])
|
|
78 |
!
|
|
79 |
|
|
80 |
diffs
|
|
81 |
|
|
82 |
^#()
|
|
83 |
|
|
84 |
"Created: / 10-11-2009 / 11:29:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
85 |
!
|
|
86 |
|
|
87 |
flattened
|
|
88 |
|
|
89 |
^ChangeSetDiffSet new add: self
|
|
90 |
|
|
91 |
"Created: / 05-12-2009 / 11:07:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
92 |
!
|
|
93 |
|
|
94 |
merged
|
|
95 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
96 |
|
|
97 |
^ self subclassResponsibility
|
|
98 |
!
|
|
99 |
|
|
100 |
name
|
|
101 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
102 |
|
|
103 |
^ self subclassResponsibility
|
|
104 |
!
|
|
105 |
|
|
106 |
parent
|
|
107 |
^ parent
|
|
108 |
!
|
|
109 |
|
|
110 |
parent:aDiffSet
|
|
111 |
parent := aDiffSet.
|
|
112 |
! !
|
|
113 |
|
|
114 |
!ChangeSetDiffComponent methodsFor:'change & update'!
|
|
115 |
|
|
116 |
changed: aspect with: param
|
|
117 |
|
|
118 |
(aspect = #resolution and:[parent notNil])
|
|
119 |
ifTrue:[parent changed: aspect with: param].
|
|
120 |
super changed: aspect with: param.
|
|
121 |
|
|
122 |
"Created: / 24-11-2009 / 12:58:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
123 |
! !
|
|
124 |
|
|
125 |
!ChangeSetDiffComponent methodsFor:'enumerating'!
|
|
126 |
|
|
127 |
do: aBlock
|
|
128 |
|
|
129 |
self subclassResponsibility
|
|
130 |
|
|
131 |
"Created: / 25-11-2009 / 10:22:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
132 |
! !
|
|
133 |
|
|
134 |
!ChangeSetDiffComponent methodsFor:'printing & storing'!
|
|
135 |
|
|
136 |
printOn:aStream
|
|
137 |
"append a printed representation if the receiver to the argument, aStream"
|
|
138 |
|
|
139 |
super printOn:aStream.
|
|
140 |
aStream nextPut:$(.
|
|
141 |
self name printOn: aStream.
|
|
142 |
aStream nextPut:$).
|
|
143 |
|
|
144 |
"Modified: / 26-11-2009 / 16:25:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
145 |
! !
|
|
146 |
|
|
147 |
!ChangeSetDiffComponent methodsFor:'private'!
|
|
148 |
|
|
149 |
flattenOn: stream
|
|
150 |
|
|
151 |
^stream nextPut: self
|
|
152 |
|
|
153 |
"Created: / 05-12-2009 / 11:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
154 |
! !
|
|
155 |
|
|
156 |
!ChangeSetDiffComponent methodsFor:'testing'!
|
|
157 |
|
|
158 |
isDiffItem
|
|
159 |
^ false
|
|
160 |
!
|
|
161 |
|
|
162 |
isDiffSet
|
|
163 |
^ false
|
|
164 |
!
|
|
165 |
|
|
166 |
isEmpty
|
|
167 |
|
|
168 |
^false
|
|
169 |
! !
|
|
170 |
|
|
171 |
!ChangeSetDiffComponent class methodsFor:'documentation'!
|
|
172 |
|
|
173 |
version_CVS
|
|
174 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeSetDiffComponent.st,v 1.1 2011-07-06 11:46:34 vrany Exp $'
|
|
175 |
! !
|