author | Claus Gittinger <cg@exept.de> |
Mon, 20 Aug 2018 10:11:25 +0200 | |
changeset 4346 | 6604af2f1554 |
parent 4018 | 580724bd4643 |
child 4024 | aeb721b75bb8 |
permissions | -rw-r--r-- |
3 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
85 | 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 |
" |
|
957 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
4018 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
0 | 16 |
ClassChange subclass:#ClassCommentChange |
235 | 17 |
instanceVariableNames:'comment' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'System-Changes' |
|
0 | 21 |
! |
22 |
||
9 | 23 |
!ClassCommentChange class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 28 |
All Rights Reserved |
9 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
1162 | 41 |
instances represent class comment-changes. |
42 |
They are typically held in a ChangeSet. |
|
235 | 43 |
|
44 |
[author:] |
|
45 |
Claus Gittinger |
|
9 | 46 |
" |
47 |
! ! |
|
48 |
||
0 | 49 |
!ClassCommentChange methodsFor:'accessing'! |
50 |
||
654 | 51 |
className:clsName comment:aCommentString |
52 |
className := clsName. |
|
53 |
comment := aCommentString |
|
54 |
||
55 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
56 |
! |
|
57 |
||
0 | 58 |
comment |
59 |
^ comment |
|
890 | 60 |
! |
61 |
||
62 |
comment:aCommentString |
|
63 |
comment := aCommentString |
|
64 |
||
65 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
0 | 66 |
! ! |
67 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
68 |
!ClassCommentChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
69 |
|
3211 | 70 |
isConflict |
71 |
"true if this change is different than what is already in the image |
|
72 |
(i.e. it overwrites some existing code)" |
|
73 |
||
74 |
|cls| |
|
75 |
||
76 |
^ (cls := self changeClass) notNil |
|
77 |
and:[ cls comment ~= self comment ] |
|
78 |
! |
|
79 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
80 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
81 |
"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:
780
diff
changeset
|
82 |
thingy as the receiver (i.e. same method, same definition etc.)." |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
83 |
|
786 | 84 |
changeB isClassCommentChange ifFalse:[^ false]. |
798 | 85 |
^ className = changeB className |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
86 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
87 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
88 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
89 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
90 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
91 |
"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:
780
diff
changeset
|
92 |
|
1834 | 93 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
94 |
^ comment = changeB comment |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
95 |
|
1834 | 96 |
"Modified: / 06-10-2006 / 14:06:02 / cg" |
890 | 97 |
! |
98 |
||
99 |
source |
|
100 |
"synthesize the changes source" |
|
101 |
||
3211 | 102 |
^ String streamContents: [:s | |
103 |
self printOn:s. |
|
104 |
comment storeOn:s. |
|
105 |
] |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
106 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
107 |
|
2413 | 108 |
!ClassCommentChange methodsFor:'converting'! |
109 |
||
110 |
asAntiChange |
|
111 |
||
112 |
^self copy comment:'' |
|
113 |
||
114 |
"Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
115 |
! ! |
|
116 |
||
962 | 117 |
!ClassCommentChange methodsFor:'printing & storing'! |
0 | 118 |
|
6 | 119 |
printOn:aStream |
801 | 120 |
"append a user printed representation of the receiver to aStream. |
121 |
The format is suitable for a human - not meant to be read back." |
|
122 |
||
1316 | 123 |
"/ |ns| |
124 |
"/ |
|
125 |
"/ ns := self nameSpaceName. |
|
126 |
"/ ns notNil ifTrue:[ |
|
127 |
"/ aStream nextPutAll:ns; nextPutAll:'::' |
|
128 |
"/ ]. |
|
3211 | 129 |
aStream |
130 |
nextPutAll:self className; |
|
131 |
nextPutAll:' comment:' |
|
779 | 132 |
! |
133 |
||
896 | 134 |
printWithoutClassNameOn:aStream |
779 | 135 |
(className endsWith:' class') ifTrue:[ |
136 |
aStream nextPutAll:'class ' |
|
137 |
]. |
|
780 | 138 |
aStream nextPutAll:'comment:' |
0 | 139 |
! ! |
85 | 140 |
|
3497
abe91fa703b2
category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents:
3211
diff
changeset
|
141 |
!ClassCommentChange methodsFor:'testing'! |
776 | 142 |
|
143 |
isClassCommentChange |
|
144 |
^ true |
|
145 |
||
146 |
||
147 |
! ! |
|
148 |
||
2613
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
149 |
!ClassCommentChange methodsFor:'visiting'! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
150 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
151 |
acceptChangeVisitor:aVisitor |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
152 |
^ aVisitor visitClassCommentChange:self. |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
153 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
154 |
"Created: / 25-11-2011 / 17:13:02 / cg" |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
155 |
! ! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
156 |
|
235 | 157 |
!ClassCommentChange class methodsFor:'documentation'! |
158 |
||
159 |
version |
|
4018 | 160 |
^ '$Header$' |
161 |
! |
|
162 |
||
163 |
version_CVS |
|
164 |
^ '$Header$' |
|
235 | 165 |
! ! |
3211 | 166 |