ClassCommentChange.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 31 Mar 2012 01:14:49 +0100
branchjv
changeset 3042 48e76977cdc3
parent 3012 4f40b8304d54
child 3121 19723298dd2c
child 3125 08d6603c4fe9
permissions -rw-r--r--
Added info-record processing support into changeset reader
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     1
"
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
     3
	      All Rights Reserved
3
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     4
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     5
 This software is furnished under a license and may be used
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     6
 only in accordance with the terms of that license and with the
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     8
 be provided or otherwise made available to, or used by, any
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     9
 other person.  No title to or ownership of the software is
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
    10
 hereby transferred.
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
    11
"
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    13
0
470788421600 Initial revision
claus
parents:
diff changeset
    14
ClassChange subclass:#ClassCommentChange
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    15
	instanceVariableNames:'comment'
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    16
	classVariableNames:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    17
	poolDictionaries:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    18
	category:'System-Changes'
0
470788421600 Initial revision
claus
parents:
diff changeset
    19
!
470788421600 Initial revision
claus
parents:
diff changeset
    20
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    21
!ClassCommentChange class methodsFor:'documentation'!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    22
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    23
copyright
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    24
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    25
 COPYRIGHT (c) 1993 by Claus Gittinger
38
claus
parents: 10
diff changeset
    26
	      All Rights Reserved
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    27
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    28
 This software is furnished under a license and may be used
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    29
 only in accordance with the terms of that license and with the
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    31
 be provided or otherwise made available to, or used by, any
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    32
 other person.  No title to or ownership of the software is
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    33
 hereby transferred.
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    34
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    35
!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    36
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    37
documentation
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    38
"
1162
4af27057a3ce comment
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
    39
    instances represent class comment-changes. 
4af27057a3ce comment
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
    40
    They are typically held in a ChangeSet.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    41
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    42
    [author:]
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    43
        Claus Gittinger
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    44
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    45
! !
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    46
2413
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
    47
!ClassCommentChange class methodsFor:'others'!
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
    48
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
    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
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
    51
! !
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
    52
0
470788421600 Initial revision
claus
parents:
diff changeset
    53
!ClassCommentChange methodsFor:'accessing'!
470788421600 Initial revision
claus
parents:
diff changeset
    54
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    55
className:clsName comment:aCommentString
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    56
    className := clsName.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    57
    comment := aCommentString
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    58
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    59
    "Created: / 16.2.1998 / 14:16:45 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    60
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    61
0
470788421600 Initial revision
claus
parents:
diff changeset
    62
comment
470788421600 Initial revision
claus
parents:
diff changeset
    63
    ^ comment
890
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    64
!
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    65
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    66
comment:aCommentString
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    67
    comment := aCommentString
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    68
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    69
    "Created: / 16.2.1998 / 14:16:45 / cg"
0
470788421600 Initial revision
claus
parents:
diff changeset
    70
! !
470788421600 Initial revision
claus
parents:
diff changeset
    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
be86669ca62e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    78
    changeB isClassCommentChange ifFalse:[^ false].   
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
    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
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    87
    (self isForSameAs:changeB) ifFalse:[^ false].
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    88
    ^ comment = changeB comment
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
    89
1834
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    90
    "Modified: / 06-10-2006 / 14:06:02 / cg"
890
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    91
!
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    92
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    93
source
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    94
    "synthesize the changes source"
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    95
1314
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
    96
    ^ String
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
    97
        streamContents:
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
    98
            [:s |
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
    99
                self printOn:s.
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   100
                comment storeOn:s.
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   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
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   104
!ClassCommentChange methodsFor:'converting'!
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   105
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   106
asAntiChange
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   107
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   108
    ^self copy comment:''
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   109
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   110
    "Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   111
! !
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   112
962
3821ab69b939 category change
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
   113
!ClassCommentChange methodsFor:'printing & storing'!
0
470788421600 Initial revision
claus
parents:
diff changeset
   114
6
2f5dd35ff019 *** empty log message ***
claus
parents: 3
diff changeset
   115
printOn:aStream
801
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   116
    "append a user printed representation of the receiver to aStream.
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   117
     The format is suitable for a human - not meant to be read back."
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   118
1316
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   119
"/    |ns|
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   120
"/
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   121
"/    ns := self nameSpaceName.
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   122
"/    ns notNil ifTrue:[
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   123
"/        aStream nextPutAll:ns; nextPutAll:'::'
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   124
"/    ].
1314
482509739cd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1299
diff changeset
   125
    aStream nextPutAll:self className; nextPutAll:' comment:'
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   126
!
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   127
896
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
   128
printWithoutClassNameOn:aStream
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   129
    (className endsWith:' class') ifTrue:[
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   130
        aStream nextPutAll:'class '
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   131
    ].
780
1582b108ef4c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   132
    aStream nextPutAll:'comment:'
0
470788421600 Initial revision
claus
parents:
diff changeset
   133
! !
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   134
776
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   135
!ClassCommentChange methodsFor:'queries'!
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   136
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   137
isClassCommentChange
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   138
    ^ true
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   139
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   140
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   141
! !
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   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
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   151
!ClassCommentChange class methodsFor:'documentation'!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   152
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   153
version
3042
48e76977cdc3 Added info-record processing support into changeset reader
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3012
diff changeset
   154
    ^ '$Id: ClassCommentChange.st 1909 2012-03-31 00:14:49Z vranyj1 $'
3012
4f40b8304d54 Added InvalidChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3011
diff changeset
   155
!
4f40b8304d54 Added InvalidChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3011
diff changeset
   156
4f40b8304d54 Added InvalidChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3011
diff changeset
   157
version_SVN
3042
48e76977cdc3 Added info-record processing support into changeset reader
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3012
diff changeset
   158
    ^ '$Id: ClassCommentChange.st 1909 2012-03-31 00:14:49Z vranyj1 $'
3012
4f40b8304d54 Added InvalidChange
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3011
diff changeset
   159
! !