ClassCommentChange.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 01 Apr 2015 10:37:40 +0100
branchjv
changeset 3838 474d8ec95b33
parent 3303 7ed5d48e3756
parent 3497 abe91fa703b2
child 4024 aeb721b75bb8
permissions -rw-r--r--
Merged d15ba356cc58 and 30ceae481017 (branch default - CVS HEAD)
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
3497
abe91fa703b2 category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
    50
    ^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.36 2014-02-19 13:05:27 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
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    74
isConflict
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    75
    "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
    76
     (i.e. it overwrites some existing code)"
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    77
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    78
    |cls|
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    79
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    80
    ^ (cls := self changeClass) notNil
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    81
    and:[ cls comment ~= self comment ]
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    82
!
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
    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
be86669ca62e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
    88
    changeB isClassCommentChange ifFalse:[^ false].   
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 786
diff changeset
    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
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    97
    (self isForSameAs:changeB) ifFalse:[^ false].
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
    98
    ^ comment = changeB comment
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 780
diff changeset
    99
1834
62bf05cbd095 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1316
diff changeset
   100
    "Modified: / 06-10-2006 / 14:06:02 / cg"
890
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   101
!
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   102
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   103
source
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   104
    "synthesize the changes source"
f1ab9db8757f fixes (source access)
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
   105
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   106
    ^ String streamContents: [:s |
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   107
            self printOn:s.
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   108
            comment storeOn:s.
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   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
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   112
!ClassCommentChange methodsFor:'converting'!
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   113
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   114
asAntiChange
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   115
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   116
    ^self copy comment:''
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   117
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   118
    "Created: / 26-11-2009 / 16:09:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   119
! !
0c1000d6978b Extension methods from libsvn
vrany
parents: 1834
diff changeset
   120
962
3821ab69b939 category change
Claus Gittinger <cg@exept.de>
parents: 957
diff changeset
   121
!ClassCommentChange methodsFor:'printing & storing'!
0
470788421600 Initial revision
claus
parents:
diff changeset
   122
6
2f5dd35ff019 *** empty log message ***
claus
parents: 3
diff changeset
   123
printOn:aStream
801
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   124
    "append a user printed representation of the receiver to aStream.
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   125
     The format is suitable for a human - not meant to be read back."
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   126
1316
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   127
"/    |ns|
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   128
"/
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   129
"/    ns := self nameSpaceName.
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   130
"/    ns notNil ifTrue:[
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   131
"/        aStream nextPutAll:ns; nextPutAll:'::'
9819f02f6e48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1314
diff changeset
   132
"/    ].
3211
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   133
    aStream 
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   134
        nextPutAll:self className; 
2e89235b6593 class: ClassCommentChange
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   135
        nextPutAll:' comment:'
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   136
!
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   137
896
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 890
diff changeset
   138
printWithoutClassNameOn:aStream
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   139
    (className endsWith:' class') ifTrue:[
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   140
        aStream nextPutAll:'class '
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 776
diff changeset
   141
    ].
780
1582b108ef4c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   142
    aStream nextPutAll:'comment:'
0
470788421600 Initial revision
claus
parents:
diff changeset
   143
! !
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   144
3497
abe91fa703b2 category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
   145
!ClassCommentChange methodsFor:'testing'!
776
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
isClassCommentChange
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   148
    ^ true
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   149
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   150
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   151
! !
74fe5c9f27db checkin from browser
Claus Gittinger <cg@exept.de>
parents: 774
diff changeset
   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
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   161
!ClassCommentChange class methodsFor:'documentation'!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   162
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   163
version
3497
abe91fa703b2 category change for isXXX testers;
Claus Gittinger <cg@exept.de>
parents: 3211
diff changeset
   164
    ^ '$Header: /cvs/stx/stx/libbasic3/ClassCommentChange.st,v 1.36 2014-02-19 13:05:27 cg Exp $'
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