author | Claus Gittinger <cg@exept.de> |
Fri, 06 Oct 2006 14:20:29 +0200 | |
changeset 1834 | 62bf05cbd095 |
parent 1316 | 9819f02f6e48 |
child 2413 | 0c1000d6978b |
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 |
||
0 | 47 |
!ClassCommentChange methodsFor:'accessing'! |
48 |
||
654 | 49 |
className:clsName comment:aCommentString |
50 |
className := clsName. |
|
51 |
comment := aCommentString |
|
52 |
||
53 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
54 |
! |
|
55 |
||
0 | 56 |
comment |
57 |
^ comment |
|
890 | 58 |
! |
59 |
||
60 |
comment:aCommentString |
|
61 |
comment := aCommentString |
|
62 |
||
63 |
"Created: / 16.2.1998 / 14:16:45 / cg" |
|
0 | 64 |
! ! |
65 |
||
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
66 |
!ClassCommentChange methodsFor:'comparing'! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
67 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
68 |
isForSameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
69 |
"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
|
70 |
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
|
71 |
|
786 | 72 |
changeB isClassCommentChange ifFalse:[^ false]. |
798 | 73 |
^ className = changeB className |
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
74 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
75 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
76 |
! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
77 |
|
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
78 |
sameAs:changeB |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
79 |
"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
|
80 |
|
1834 | 81 |
(self isForSameAs:changeB) ifFalse:[^ false]. |
82 |
^ comment = changeB comment |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
83 |
|
1834 | 84 |
"Modified: / 06-10-2006 / 14:06:02 / cg" |
890 | 85 |
! |
86 |
||
87 |
source |
|
88 |
"synthesize the changes source" |
|
89 |
||
1314 | 90 |
^ String |
91 |
streamContents: |
|
92 |
[:s | |
|
93 |
self printOn:s. |
|
94 |
comment storeOn:s. |
|
95 |
] |
|
784
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
96 |
! ! |
1e50cc7fd07d
added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents:
780
diff
changeset
|
97 |
|
962 | 98 |
!ClassCommentChange methodsFor:'printing & storing'! |
0 | 99 |
|
6 | 100 |
printOn:aStream |
801 | 101 |
"append a user printed representation of the receiver to aStream. |
102 |
The format is suitable for a human - not meant to be read back." |
|
103 |
||
1316 | 104 |
"/ |ns| |
105 |
"/ |
|
106 |
"/ ns := self nameSpaceName. |
|
107 |
"/ ns notNil ifTrue:[ |
|
108 |
"/ aStream nextPutAll:ns; nextPutAll:'::' |
|
109 |
"/ ]. |
|
1314 | 110 |
aStream nextPutAll:self className; nextPutAll:' comment:' |
779 | 111 |
! |
112 |
||
896 | 113 |
printWithoutClassNameOn:aStream |
779 | 114 |
(className endsWith:' class') ifTrue:[ |
115 |
aStream nextPutAll:'class ' |
|
116 |
]. |
|
780 | 117 |
aStream nextPutAll:'comment:' |
0 | 118 |
! ! |
85 | 119 |
|
776 | 120 |
!ClassCommentChange methodsFor:'queries'! |
121 |
||
122 |
isClassCommentChange |
|
123 |
^ true |
|
124 |
||
125 |
||
126 |
! ! |
|
127 |
||
235 | 128 |
!ClassCommentChange class methodsFor:'documentation'! |
129 |
||
130 |
version |
|
1834 | 131 |
^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.32 2006-10-06 12:20:29 cg Exp $' |
235 | 132 |
! ! |