author | Claus Gittinger <cg@exept.de> |
Mon, 12 Jul 1999 14:06:43 +0200 | |
changeset 798 | 999fff0aa0d0 |
parent 787 | 5d49bd054fc2 |
child 849 | d31825895bb2 |
permissions | -rw-r--r-- |
3 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 3 |
All Rights Reserved |
3 | 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 |
" |
|
0 | 12 |
|
13 |
Object subclass:#Change |
|
235 | 14 |
instanceVariableNames:'source' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Changes' |
|
0 | 18 |
! |
19 |
||
633 | 20 |
!Change class methodsFor:'documentation'! |
9 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 25 |
All Rights Reserved |
9 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
abstract superclass for all kind of changes - managed in changeSets. |
|
235 | 39 |
|
40 |
[author:] |
|
41 |
Claus Gittinger |
|
9 | 42 |
" |
43 |
! ! |
|
44 |
||
647 | 45 |
!Change methodsFor:'accessing'! |
46 |
||
47 |
className |
|
48 |
"the className of the change" |
|
49 |
||
50 |
^ nil |
|
51 |
||
52 |
"Modified: / 15.7.1996 / 09:26:34 / cg" |
|
53 |
"Created: / 6.2.1998 / 13:06:56 / cg" |
|
54 |
! |
|
55 |
||
56 |
selector |
|
57 |
^ nil |
|
58 |
||
59 |
"Created: / 6.2.1998 / 13:29:35 / cg" |
|
787 | 60 |
! |
61 |
||
62 |
source |
|
63 |
"return the source of the change" |
|
64 |
||
65 |
^ source |
|
66 |
||
67 |
"Modified: 15.7.1996 / 09:26:34 / cg" |
|
68 |
! |
|
69 |
||
70 |
source:someString |
|
71 |
"set the source of the change" |
|
72 |
||
73 |
source := someString |
|
74 |
||
75 |
"Modified: / 15.7.1996 / 09:26:34 / cg" |
|
76 |
"Created: / 16.2.1998 / 13:05:16 / cg" |
|
647 | 77 |
! ! |
78 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
79 |
!Change methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
80 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
81 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
82 |
"return true, if the given change represents a change for the same |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
83 |
thingy as the receiver (i.e. same method, same definition etc.)." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
84 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
85 |
^ false |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
86 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
87 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
88 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
89 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
90 |
"return true, if the given change represents the same change as the receiver." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
91 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
92 |
^ false |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
93 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
94 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
95 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
96 |
sameSourceAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
97 |
"return true, if the given change has the same source as the receiver." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
98 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
99 |
|sourceA sourceB| |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
100 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
101 |
(sourceA := source) = (sourceB := changeB source) ifTrue:[^ true]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
102 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
103 |
sourceA := sourceA asCollectionOfLines. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
104 |
sourceB := sourceB asCollectionOfLines. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
105 |
sourceA size ~~ sourceB size ifTrue:[^ false]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
106 |
sourceA := sourceA collect:[:line | line withTabsExpanded withoutTrailingSeparators]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
107 |
sourceB := sourceB collect:[:line | line withTabsExpanded withoutTrailingSeparators]. |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
108 |
^ sourceA = sourceB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
109 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
110 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
783
diff
changeset
|
111 |
|
778 | 112 |
!Change methodsFor:'printing & storing'! |
113 |
||
114 |
printStringWithoutClass |
|
115 |
|s| |
|
116 |
||
117 |
s := '' writeStream. |
|
118 |
self printWithoutClassOn:s. |
|
119 |
^ s contents |
|
120 |
||
121 |
||
122 |
! |
|
123 |
||
124 |
printWithoutClassOn:aStream |
|
125 |
self printOn:aStream |
|
126 |
||
127 |
||
128 |
! ! |
|
129 |
||
651 | 130 |
!Change methodsFor:'queries'! |
131 |
||
777 | 132 |
isClassCommentChange |
133 |
^ false |
|
134 |
||
135 |
"Created: / 7.2.1998 / 19:26:50 / cg" |
|
136 |
! |
|
137 |
||
771 | 138 |
isClassDefinitionChange |
139 |
^ false |
|
140 |
||
141 |
"Created: / 7.2.1998 / 19:26:50 / cg" |
|
142 |
! |
|
143 |
||
798 | 144 |
isClassInstVarDefinitionChange |
145 |
^ false |
|
146 |
||
147 |
! |
|
148 |
||
773 | 149 |
isDoIt |
150 |
^ false |
|
151 |
||
152 |
"Created: / 7.2.1998 / 19:26:50 / cg" |
|
153 |
! |
|
154 |
||
651 | 155 |
isMethodChange |
156 |
^ false |
|
157 |
||
158 |
"Created: / 7.2.1998 / 19:26:50 / cg" |
|
783 | 159 |
! |
160 |
||
161 |
isPrimitiveChange |
|
162 |
^ false |
|
163 |
||
164 |
! |
|
165 |
||
166 |
isPrimitiveDefinitionsChange |
|
167 |
^ false |
|
168 |
||
169 |
! |
|
170 |
||
171 |
isPrimitiveFunctionsChange |
|
172 |
^ false |
|
173 |
||
174 |
! |
|
175 |
||
176 |
isPrimitiveVariablesChange |
|
177 |
^ false |
|
178 |
||
651 | 179 |
! ! |
180 |
||
633 | 181 |
!Change class methodsFor:'documentation'! |
235 | 182 |
|
183 |
version |
|
798 | 184 |
^ '$Header: /cvs/stx/stx/libbasic3/Change.st,v 1.23 1999-07-12 12:06:36 cg Exp $' |
235 | 185 |
! ! |