ClassCommentChange.st
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--
#OTHER by cg class: FileBasedSourceCodeManager class removed: #version_FileRepository
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
4018
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
    14
"{ NameSpace: Smalltalk }"
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
    15
0
470788421600 Initial revision
claus
parents:
diff changeset
    16
ClassChange subclass:#ClassCommentChange
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    17
	instanceVariableNames:'comment'
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    18
	classVariableNames:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    19
	poolDictionaries:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    20
	category:'System-Changes'
0
470788421600 Initial revision
claus
parents:
diff changeset
    21
!
470788421600 Initial revision
claus
parents:
diff changeset
    22
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    23
!ClassCommentChange class methodsFor:'documentation'!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    24
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    25
copyright
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    26
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    27
 COPYRIGHT (c) 1993 by Claus Gittinger
38
claus
parents: 10
diff changeset
    28
	      All Rights Reserved
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    29
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    30
 This software is furnished under a license and may be used
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    31
 only in accordance with the terms of that license and with the
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    33
 be provided or otherwise made available to, or used by, any
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    34
 other person.  No title to or ownership of the software is
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    35
 hereby transferred.
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    36
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    37
!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    38
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    39
documentation
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    40
"
1162
4af27057a3ce comment
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
    41
    instances represent class comment-changes. 
4af27057a3ce comment
Claus Gittinger <cg@exept.de>
parents: 1101
diff changeset
    42
    They are typically held in a ChangeSet.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    43
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    44
    [author:]
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    45
        Claus Gittinger
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    46
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    47
! !
f5b6ab00bdf6 *** empty log message ***
claus
parents: 6
diff changeset
    48
0
470788421600 Initial revision
claus
parents:
diff changeset
    49
!ClassCommentChange methodsFor:'accessing'!
470788421600 Initial revision
claus
parents:
diff changeset
    50
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    51
className:clsName comment:aCommentString
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    52
    className := clsName.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    53
    comment := aCommentString
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    54
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    55
    "Created: / 16.2.1998 / 14:16:45 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    56
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    57
0
470788421600 Initial revision
claus
parents:
diff changeset
    58
comment
470788421600 Initial revision
claus
parents:
diff changeset
    59
    ^ comment
890
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    60
!
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    61
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    62
comment:aCommentString
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    63
    comment := aCommentString
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
    "Created: / 16.2.1998 / 14:16:45 / cg"
0
470788421600 Initial revision
claus
parents:
diff changeset
    66
! !
470788421600 Initial revision
claus
parents:
diff changeset
    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
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    70
isConflict
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    71
    "true if this change is different than what is already in the image
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    72
     (i.e. it overwrites some existing code)"
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    73
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    74
    |cls|
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    75
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    76
    ^ (cls := self changeClass) notNil
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    77
    and:[ cls comment ~= self comment ]
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    78
!
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    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
be86669ca62e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    84
    changeB isClassCommentChange ifFalse:[^ false].   
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
    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
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    93
    (self isForSameAs:changeB) ifFalse:[^ false].
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    94
    ^ comment = changeB comment
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
    95
1834
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    96
    "Modified: / 06-10-2006 / 14:06:02 / cg"
890
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    97
!
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    98
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    99
source
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   100
    "synthesize the changes source"
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   101
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   102
    ^ String streamContents: [:s |
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   103
            self printOn:s.
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   104
            comment storeOn:s.
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   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
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   108
!ClassCommentChange methodsFor:'converting'!
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   109
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   110
asAntiChange
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   111
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   112
    ^self copy comment:''
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   113
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   114
    "Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   115
! !
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   116
962
3821ab69b939 category change
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
   117
!ClassCommentChange methodsFor:'printing & storing'!
0
470788421600 Initial revision
claus
parents:
diff changeset
   118
6
2f5dd35ff019 *** empty log message ***
claus
parents: 3
diff changeset
   119
printOn:aStream
801
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   120
    "append a user printed representation of the receiver to aStream.
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   121
     The format is suitable for a human - not meant to be read back."
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   122
1316
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   123
"/    |ns|
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   124
"/
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   125
"/    ns := self nameSpaceName.
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   126
"/    ns notNil ifTrue:[
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   127
"/        aStream nextPutAll:ns; nextPutAll:'::'
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   128
"/    ].
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   129
    aStream 
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   130
        nextPutAll:self className; 
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   131
        nextPutAll:' comment:'
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   132
!
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   133
896
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
   134
printWithoutClassNameOn:aStream
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   135
    (className endsWith:' class') ifTrue:[
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   136
        aStream nextPutAll:'class '
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   137
    ].
780
1582b108ef4c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   138
    aStream nextPutAll:'comment:'
0
470788421600 Initial revision
claus
parents:
diff changeset
   139
! !
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   140
3497
abe91fa703b2 category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
   141
!ClassCommentChange methodsFor:'testing'!
776
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   142
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   143
isClassCommentChange
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   144
    ^ true
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   145
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   146
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   147
! !
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   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
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   157
!ClassCommentChange class methodsFor:'documentation'!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   158
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   159
version
4018
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
   160
    ^ '$Header$'
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
   161
!
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
   162
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
   163
version_CVS
580724bd4643 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 3497
diff changeset
   164
    ^ '$Header$'
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   165
! !
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   166