author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 12:51:41 +0000 | |
branch | jv |
changeset 3011 | 1997ff6e7e55 |
parent 2613 | 374b0b85e23c |
child 3012 | 4f40b8304d54 |
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 |
||
0 | 14 |
ClassChange subclass:#ClassCommentChange |
235 | 15 |
instanceVariableNames:'comment' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Changes' |
|
0 | 19 |
! |
20 |
||
9 | 21 |
!ClassCommentChange class methodsFor:'documentation'! |
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
38 | 26 |
All Rights Reserved |
9 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
1162 | 39 |
instances represent class comment-changes. |
40 |
They are typically held in a ChangeSet. |
|
235 | 41 |
|
42 |
[author:] |
|
43 |
Claus Gittinger |
|
9 | 44 |
" |
45 |
! ! |
|
46 |
||
2413 | 47 |
!ClassCommentChange class methodsFor:'others'! |
48 |
||
49 |
version_CVS |
|
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2613
diff
changeset
|
50 |
^ '§Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.34 2011/11/25 16:45:02 cg Exp §' |
2413 | 51 |
! ! |
52 |
||
0 | 53 |
!ClassCommentChange methodsFor:'accessing'! |
54 |
||
654 | 55 |
className:clsName comment:aCommentString |
56 |
className := clsName. |
|
57 |
comment := aCommentString |
|
58 |
||
59 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
60 |
! |
|
61 |
||
0 | 62 |
comment |
63 |
^ comment |
|
890 | 64 |
! |
65 |
||
66 |
comment:aCommentString |
|
67 |
comment := aCommentString |
|
68 |
||
69 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
0 | 70 |
! ! |
71 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
72 |
!ClassCommentChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
73 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
74 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
75 |
"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
|
76 |
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
|
77 |
|
786 | 78 |
changeB isClassCommentChange ifFalse:[^ false]. |
798 | 79 |
^ className = changeB className |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
80 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
81 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
82 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
83 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
84 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
85 |
"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
|
86 |
|
1834 | 87 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
88 |
^ comment = changeB comment |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
89 |
|
1834 | 90 |
"Modified: / 06-10-2006 / 14:06:02 / cg" |
890 | 91 |
! |
92 |
||
93 |
source |
|
94 |
"synthesize the changes source" |
|
95 |
||
1314 | 96 |
^ String |
97 |
streamContents: |
|
98 |
[:s | |
|
99 |
self printOn:s. |
|
100 |
comment storeOn:s. |
|
101 |
] |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
102 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
103 |
|
2413 | 104 |
!ClassCommentChange methodsFor:'converting'! |
105 |
||
106 |
asAntiChange |
|
107 |
||
108 |
^self copy comment:'' |
|
109 |
||
110 |
"Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
111 |
! ! |
|
112 |
||
962 | 113 |
!ClassCommentChange methodsFor:'printing & storing'! |
0 | 114 |
|
6 | 115 |
printOn:aStream |
801 | 116 |
"append a user printed representation of the receiver to aStream. |
117 |
The format is suitable for a human - not meant to be read back." |
|
118 |
||
1316 | 119 |
"/ |ns| |
120 |
"/ |
|
121 |
"/ ns := self nameSpaceName. |
|
122 |
"/ ns notNil ifTrue:[ |
|
123 |
"/ aStream nextPutAll:ns; nextPutAll:'::' |
|
124 |
"/ ]. |
|
1314 | 125 |
aStream nextPutAll:self className; nextPutAll:' comment:' |
779 | 126 |
! |
127 |
||
896 | 128 |
printWithoutClassNameOn:aStream |
779 | 129 |
(className endsWith:' class') ifTrue:[ |
130 |
aStream nextPutAll:'class ' |
|
131 |
]. |
|
780 | 132 |
aStream nextPutAll:'comment:' |
0 | 133 |
! ! |
85 | 134 |
|
776 | 135 |
!ClassCommentChange methodsFor:'queries'! |
136 |
||
137 |
isClassCommentChange |
|
138 |
^ true |
|
139 |
||
140 |
||
141 |
! ! |
|
142 |
||
2613
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
143 |
!ClassCommentChange methodsFor:'visiting'! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
144 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
145 |
acceptChangeVisitor:aVisitor |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
146 |
^ aVisitor visitClassCommentChange:self. |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
147 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
148 |
"Created: / 25-11-2011 / 17:13:02 / cg" |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
149 |
! ! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
150 |
|
235 | 151 |
!ClassCommentChange class methodsFor:'documentation'! |
152 |
||
153 |
version |
|
3011
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2613
diff
changeset
|
154 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.34 2011/11/25 16:45:02 cg Exp $' |
1997ff6e7e55
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2613
diff
changeset
|
155 |
! ! |