author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 12 Jun 2013 11:54:30 +0100 | |
branch | jv |
changeset 3303 | 7ed5d48e3756 |
parent 3219 | 92e64a42ab4e |
child 3838 | 474d8ec95b33 |
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 |
|
3211 | 50 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.35 2013-04-14 06:57:10 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 |
|
3211 | 74 |
isConflict |
75 |
"true if this change is different than what is already in the image |
|
76 |
(i.e. it overwrites some existing code)" |
|
77 |
||
78 |
|cls| |
|
79 |
||
80 |
^ (cls := self changeClass) notNil |
|
81 |
and:[ cls comment ~= self comment ] |
|
82 |
! |
|
83 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
84 |
isForSameAs: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 a change for the same |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
86 |
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
|
87 |
|
786 | 88 |
changeB isClassCommentChange ifFalse:[^ false]. |
798 | 89 |
^ className = changeB className |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
90 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
91 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
92 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
93 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
94 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
95 |
"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
|
96 |
|
1834 | 97 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
98 |
^ comment = changeB comment |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
99 |
|
1834 | 100 |
"Modified: / 06-10-2006 / 14:06:02 / cg" |
890 | 101 |
! |
102 |
||
103 |
source |
|
104 |
"synthesize the changes source" |
|
105 |
||
3211 | 106 |
^ String streamContents: [:s | |
107 |
self printOn:s. |
|
108 |
comment storeOn:s. |
|
109 |
] |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
110 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
111 |
|
2413 | 112 |
!ClassCommentChange methodsFor:'converting'! |
113 |
||
114 |
asAntiChange |
|
115 |
||
116 |
^self copy comment:'' |
|
117 |
||
118 |
"Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 |
! ! |
|
120 |
||
962 | 121 |
!ClassCommentChange methodsFor:'printing & storing'! |
0 | 122 |
|
6 | 123 |
printOn:aStream |
801 | 124 |
"append a user printed representation of the receiver to aStream. |
125 |
The format is suitable for a human - not meant to be read back." |
|
126 |
||
1316 | 127 |
"/ |ns| |
128 |
"/ |
|
129 |
"/ ns := self nameSpaceName. |
|
130 |
"/ ns notNil ifTrue:[ |
|
131 |
"/ aStream nextPutAll:ns; nextPutAll:'::' |
|
132 |
"/ ]. |
|
3211 | 133 |
aStream |
134 |
nextPutAll:self className; |
|
135 |
nextPutAll:' comment:' |
|
779 | 136 |
! |
137 |
||
896 | 138 |
printWithoutClassNameOn:aStream |
779 | 139 |
(className endsWith:' class') ifTrue:[ |
140 |
aStream nextPutAll:'class ' |
|
141 |
]. |
|
780 | 142 |
aStream nextPutAll:'comment:' |
0 | 143 |
! ! |
85 | 144 |
|
776 | 145 |
!ClassCommentChange methodsFor:'queries'! |
146 |
||
147 |
isClassCommentChange |
|
148 |
^ true |
|
149 |
||
150 |
||
151 |
! ! |
|
152 |
||
2613
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
153 |
!ClassCommentChange methodsFor:'visiting'! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
154 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
155 |
acceptChangeVisitor:aVisitor |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
156 |
^ aVisitor visitClassCommentChange:self. |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
157 |
|
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
158 |
"Created: / 25-11-2011 / 17:13:02 / cg" |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
159 |
! ! |
374b0b85e23c
visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents:
2413
diff
changeset
|
160 |
|
235 | 161 |
!ClassCommentChange class methodsFor:'documentation'! |
162 |
||
163 |
version |
|
3211 | 164 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.35 2013-04-14 06:57:10 cg Exp $' |
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
165 |
! |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
166 |
|
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
167 |
version_HG |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
168 |
|
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
169 |
^ '$Changeset: <not expanded> $' |
3012 | 170 |
! |
171 |
||
172 |
version_SVN |
|
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3042
diff
changeset
|
173 |
^ '§Id: ClassCommentChange.st 1909 2012-03-31 00:14:49Z vranyj1 §' |
235 | 174 |
! ! |
3211 | 175 |