MethodChange.st
author Claus Gittinger <cg@exept.de>
Sun, 27 Nov 2011 13:29:49 +0100
changeset 2625 5dc802065e4b
parent 2616 0eba26a9f6af
child 2846 221a345239fb
child 3011 1997ff6e7e55
permissions -rw-r--r--
changed: #delta
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     1
"
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
25
claus
parents: 10
diff changeset
     3
	       All Rights Reserved
4
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     4
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     5
 This software is furnished under a license and may be used
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     6
 only in accordance with the terms of that license and with the
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     8
 be provided or otherwise made available to, or used by, any
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
     9
 other person.  No title to or ownership of the software is
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
    10
 hereby transferred.
7744cd9b1453 *** empty log message ***
claus
parents: 0
diff changeset
    11
"
956
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
    13
0
470788421600 Initial revision
claus
parents:
diff changeset
    14
ClassChange subclass:#MethodChange
956
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
    15
	instanceVariableNames:'selector methodCategory privacy previousVersion'
2509
173f64701e6a class definition
Claus Gittinger <cg@exept.de>
parents: 2503
diff changeset
    16
	classVariableNames:'LastReplacementClass'
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    17
	poolDictionaries:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    18
	category:'System-Changes'
0
470788421600 Initial revision
claus
parents:
diff changeset
    19
!
470788421600 Initial revision
claus
parents:
diff changeset
    20
1325
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    21
MethodChange subclass:#NamedMethodChange
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    22
	instanceVariableNames:'changeName'
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    23
	classVariableNames:''
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    24
	poolDictionaries:''
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    25
	privateIn:MethodChange
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    26
!
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
    27
25
claus
parents: 10
diff changeset
    28
!MethodChange class methodsFor:'documentation'!
claus
parents: 10
diff changeset
    29
claus
parents: 10
diff changeset
    30
copyright
claus
parents: 10
diff changeset
    31
"
claus
parents: 10
diff changeset
    32
 COPYRIGHT (c) 1993 by Claus Gittinger
claus
parents: 10
diff changeset
    33
	       All Rights Reserved
10
676ce0471de4 *** empty log message ***
claus
parents: 7
diff changeset
    34
25
claus
parents: 10
diff changeset
    35
 This software is furnished under a license and may be used
claus
parents: 10
diff changeset
    36
 only in accordance with the terms of that license and with the
claus
parents: 10
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
claus
parents: 10
diff changeset
    38
 be provided or otherwise made available to, or used by, any
claus
parents: 10
diff changeset
    39
 other person.  No title to or ownership of the software is
claus
parents: 10
diff changeset
    40
 hereby transferred.
claus
parents: 10
diff changeset
    41
"
claus
parents: 10
diff changeset
    42
!
claus
parents: 10
diff changeset
    43
45
claus
parents: 39
diff changeset
    44
documentation
claus
parents: 39
diff changeset
    45
"
claus
parents: 39
diff changeset
    46
    instances represent method-changes (as done in the browser). 
claus
parents: 39
diff changeset
    47
    They are typically held in a ChangeSet.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    48
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    49
    [author:]
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    50
        Claus Gittinger
45
claus
parents: 39
diff changeset
    51
"
25
claus
parents: 10
diff changeset
    52
! !
10
676ce0471de4 *** empty log message ***
claus
parents: 7
diff changeset
    53
0
470788421600 Initial revision
claus
parents:
diff changeset
    54
!MethodChange class methodsFor:'instance creation'!
470788421600 Initial revision
claus
parents:
diff changeset
    55
2119
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    56
class:cls selector:sel category:cat 
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    57
    ^ self basicNew class:cls selector:sel category:cat
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    58
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    59
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    60
!
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    61
102
3f85fe87cc58 include category in methodChanges
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    62
class:cls selector:sel source:src category:cat
3f85fe87cc58 include category in methodChanges
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    63
    ^ self basicNew class:cls selector:sel source:src category:cat
1073
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    64
!
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    65
2119
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    66
className:clsName selector:sel category:cat 
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    67
    ^ self basicNew className:clsName selector:sel category:cat
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    68
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    69
    "Created: / 12-11-2006 / 15:54:25 / cg"
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    70
!
b7a8a5cd9da1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2077
diff changeset
    71
1073
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    72
className:clsName selector:sel source:src category:cat
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    73
    ^ self basicNew className:clsName selector:sel source:src category:cat
0
470788421600 Initial revision
claus
parents:
diff changeset
    74
! !
470788421600 Initial revision
claus
parents:
diff changeset
    75
470788421600 Initial revision
claus
parents:
diff changeset
    76
!MethodChange methodsFor:'accessing'!
470788421600 Initial revision
claus
parents:
diff changeset
    77
1073
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    78
category
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    79
    ^ methodCategory 
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    80
!
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
    81
911
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    82
category: aCategory
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    83
    methodCategory := aCategory
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    84
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    85
    "Created: / 7.2.1998 / 19:47:53 / cg"
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    86
!
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
    87
852
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    88
changeMethod
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    89
    |cls|
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    90
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    91
    cls := self changeClass.
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    92
    cls isNil ifTrue:[^ nil].
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    93
    ^ cls compiledMethodAt:selector 
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    94
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    95
    "Created: / 7.2.1998 / 19:47:53 / cg"
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    96
!
1acd7d3ed3fc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
    97
850
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
    98
changeSelector
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
    99
    ^ selector
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
   100
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
   101
    "Created: / 6.2.1998 / 13:29:25 / cg"
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
   102
!
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 849
diff changeset
   103
102
3f85fe87cc58 include category in methodChanges
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   104
class:cls selector:sel source:src category:cat
1288
a18544df474d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1234
diff changeset
   105
    self className:(cls name) selector:sel source:src category:cat
648
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   106
!
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   107
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   108
className:clsName selector:sel source:src category:cat
1288
a18544df474d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1234
diff changeset
   109
    self className:clsName selector:sel source:src category:cat privacy:nil
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   110
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   111
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   112
className:clsName selector:sel source:src category:cat privacy:priv
2258
b976e8e2874e comment/format in: #selector:
Claus Gittinger <cg@exept.de>
parents: 2257
diff changeset
   113
    self assert:(src isString).
b976e8e2874e comment/format in: #selector:
Claus Gittinger <cg@exept.de>
parents: 2257
diff changeset
   114
    self assert:(sel isString or:[sel isSymbol]).
1288
a18544df474d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1234
diff changeset
   115
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   116
    className := clsName.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   117
    selector := sel.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   118
    source := src.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   119
    methodCategory := cat.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   120
    privacy := priv.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   121
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   122
    "Created: / 16.2.1998 / 12:29:49 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   123
    "Modified: / 16.2.1998 / 14:28:12 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   124
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 652
diff changeset
   125
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   126
delta
2503
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   127
    "/ obsolete: please use deltaDetail
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   128
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   129
    | mth |
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   130
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   131
    self isMethodCodeChange ifFalse:[^super delta].
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   132
    mth := self changeMethod.
2625
5dc802065e4b changed: #delta
Claus Gittinger <cg@exept.de>
parents: 2616
diff changeset
   133
    mth isNil ifTrue:[^#+].
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   134
    ^(self class isSource: self source sameSourceAs: mth source)
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   135
        ifTrue:[#=]
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   136
        ifFalse:[#~]
2503
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   137
2625
5dc802065e4b changed: #delta
Claus Gittinger <cg@exept.de>
parents: 2616
diff changeset
   138
    "Modified: / 18-11-2011 / 14:48:50 / cg"
2503
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   139
!
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   140
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   141
deltaDetail
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   142
    "Returns a delta to the current state as a ChangeDelta object"
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   143
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   144
    | mth mySource imageSource|
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   145
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   146
    self isMethodCodeChange ifFalse:[^super deltaDetail].
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   147
    mth := self changeMethod.
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   148
    mth isNil ifTrue:[^ ChangeDeltaInformation added ].
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   149
    mySource := self source.
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   150
    imageSource := mth source.
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   151
    ^(self class isSource: mySource sameSourceAs: imageSource)
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   152
        ifTrue:[ ChangeDeltaInformation identical ]
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   153
        ifFalse:[ ChangeDeltaInformation different ]
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   154
bbdc31516652 added: #deltaDetail
Claus Gittinger <cg@exept.de>
parents: 2470
diff changeset
   155
    "Created: / 31-08-2011 / 10:27:58 / cg"
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   156
!
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   157
2470
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   158
imageSource
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   159
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   160
    | mth |
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   161
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   162
    self isMethodCodeChange ifFalse:[^super imageSource].
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   163
    mth := self changeMethod.
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   164
    ^mth isNil ifTrue: [nil] ifFalse:[mth source]
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   165
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   166
    "Created: / 19-07-2011 / 12:02:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   167
!
47bec7c32db6 Added #changeSource, #imageSource
vrany
parents: 2414
diff changeset
   168
652
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   169
methodCategory
1234
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   170
652
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   171
    ^ methodCategory
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   172
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   173
    "Created: / 7.2.1998 / 19:47:53 / cg"
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   174
!
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   175
1234
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   176
previousPackage
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   177
    | isNewMethod |
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   178
    isNewMethod := self previousVersion isNil.
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   179
    isNewMethod ifFalse:[
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   180
        ^ self previousVersion package.
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   181
    ].
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   182
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   183
    ^ nil
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   184
!
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   185
956
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   186
previousVersion
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   187
    "return the value of the instance variable 'previousVersion' (automatically generated)"
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   188
1073
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   189
    ^ previousVersion
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   190
!
956
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   191
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   192
previousVersion:something
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   193
    "set the value of the instance variable 'previousVersion' (automatically generated)"
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   194
1073
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   195
    previousVersion := something.
627aafb2cfec checkin from browser
Claus Gittinger <cg@exept.de>
parents: 963
diff changeset
   196
!
956
0c6c209df4e9 keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   197
1234
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   198
previousVersionSource
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   199
    "return the value of the instance variable 'previousVersion' (automatically generated)"
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   200
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   201
    previousVersion isNil ifTrue:[^ nil].
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   202
    ^ previousVersion source
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   203
!
2edbb63a70b7 james' package changes
james
parents: 1199
diff changeset
   204
648
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   205
selector
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   206
    ^ selector
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   207
b7e0ef4b3781 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   208
    "Created: / 6.2.1998 / 13:29:25 / cg"
911
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   209
!
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   210
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   211
selector:aSymbol
2257
808be4648d12 changed:
Claus Gittinger <cg@exept.de>
parents: 2187
diff changeset
   212
    self assert:(aSymbol isSymbol).
808be4648d12 changed:
Claus Gittinger <cg@exept.de>
parents: 2187
diff changeset
   213
911
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   214
    selector := aSymbol
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   215
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 896
diff changeset
   216
    "Created: / 6.2.1998 / 13:29:25 / cg"
0
470788421600 Initial revision
claus
parents:
diff changeset
   217
! !
470788421600 Initial revision
claus
parents:
diff changeset
   218
849
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   219
!MethodChange methodsFor:'applying'!
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   220
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   221
apply
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   222
    "apply the change"
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   223
2512
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   224
    |class replacementClassName suggestion|
1322
8ff0023c7694 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1307
diff changeset
   225
2020
5b3af99a4829 changed #apply: use #applyChange
Stefan Vogel <sv@exept.de>
parents: 1845
diff changeset
   226
    class := self changeClass.
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
   227
    class isNil ifTrue:[
2512
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   228
        "/ try the same replacement class again
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   229
        (LastReplacementClass notEmptyOrNil 
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   230
            and:[ (class := Smalltalk classNamed:LastReplacementClass) notNil
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   231
            and:[ 
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   232
                (className endsWith:' class') ifTrue:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   233
                    class := class theMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   234
                ] ifFalse:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   235
                    class := class theNonMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   236
                ].
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   237
                class nameWithoutPrefix = className    
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   238
            ]])
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   239
        ifFalse:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   240
            "/ try a replacement class in the same namespace again
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   241
            suggestion := LastReplacementClass.
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   242
            (class notNil
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   243
            and:[ (class := class nameSpace classNamed:className) notNil
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   244
            and:[ 
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   245
                (className endsWith:' class') ifTrue:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   246
                    class := class theMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   247
                ] ifFalse:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   248
                    class := class theNonMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   249
                ].
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   250
                class nameWithoutPrefix = className    
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   251
            ]])
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   252
            ifFalse:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   253
                "/ ask for a replacement class
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   254
                replacementClassName := Dialog 
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   255
                                request:('Cannot apply change for missing class: %1\\Use replacement class (or press cancel)' bindWith:className) withCRs
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   256
                                initialAnswer:suggestion.
2516
a1fdfc5e22cd handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents: 2512
diff changeset
   257
                replacementClassName isNil ifTrue:[ AbortSignal raise ].
a1fdfc5e22cd handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents: 2512
diff changeset
   258
2512
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   259
                (replacementClassName isEmptyOrNil
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   260
                or:[ (class := Smalltalk classNamed:replacementClassName) isNil]) ifTrue:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   261
                    self error:('Cannot apply change for missing class: ' , replacementClassName) mayProceed:true.
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   262
                    ^ self
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   263
                ].
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   264
                (className endsWith:' class') ifTrue:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   265
                    class := class theMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   266
                ] ifFalse:[
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   267
                    class := class theNonMetaclass
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   268
                ].
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   269
                LastReplacementClass := replacementClassName
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   270
            ]
9caca2c0b8ed changed: #apply
Claus Gittinger <cg@exept.de>
parents: 2509
diff changeset
   271
        ]
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1073
diff changeset
   272
    ].
849
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   273
    class compile:source classified:methodCategory logged:true.
2509
173f64701e6a class definition
Claus Gittinger <cg@exept.de>
parents: 2503
diff changeset
   274
2516
a1fdfc5e22cd handle namespace overrides (for mc browser)
Claus Gittinger <cg@exept.de>
parents: 2512
diff changeset
   275
    "Modified: / 07-09-2011 / 21:09:19 / cg"
849
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   276
! !
d31825895bb2 preps to allow applying
Claus Gittinger <cg@exept.de>
parents: 800
diff changeset
   277
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   278
!MethodChange methodsFor:'comparing'!
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   279
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   280
isForSameAs:changeB
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   281
    "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: 779
diff changeset
   282
     thingy as the receiver (i.e. same method, same definition etc.)."
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   283
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   284
    "/ I am a methodChange - B must be as well.
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   285
    changeB isMethodChange ifFalse:[^ false].   
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   286
1199
53f7de3f5c9b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1196
diff changeset
   287
    selector ~= changeB selector ifTrue:[^ false].
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   288
    className ~= changeB className ifTrue:[^ false].
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   289
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   290
    ^ true
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   291
!
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   292
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   293
sameAs:changeB
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   294
    "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: 779
diff changeset
   295
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   296
    (self isForSameAs:changeB) ifFalse:[^ false].   
1509
e3f924fdfb6c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
   297
    (self sameSourceAs:changeB) ifTrue:[^ true].
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   298
1509
e3f924fdfb6c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
   299
    ^ false.
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   300
1509
e3f924fdfb6c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1487
diff changeset
   301
    "Modified: / 25-07-2006 / 11:23:27 / cg"
784
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   302
! !
1e50cc7fd07d added compare methods #sameAs: and #isForSameAs:
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
   303
1325
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   304
!MethodChange methodsFor:'converting'!
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   305
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   306
asNamedMethodChange
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   307
    ^ NamedMethodChange fromMethodChange:self
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   308
! !
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   309
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   310
!MethodChange methodsFor:'fileout'!
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   311
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   312
basicFileOutOn: aStream
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   313
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   314
    |cat |
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   315
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   316
    self isMethodCodeChange ifFalse:[^super basicFileOutOn: aStream].
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   317
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   318
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   319
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   320
    aStream nextPutChunkSeparator.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   321
    self className printOn:aStream.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   322
"/        self printClassNameOn:aStream.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   323
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   324
    (privacy ? #public) ~~ #public ifTrue:[
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   325
        aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   326
    ] ifFalse:[
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   327
        aStream nextPutAll:' methodsFor:'.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   328
    ].
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   329
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   330
    cat := methodCategory ? ''.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   331
    aStream nextPutAll:cat asString storeString.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   332
    aStream nextPutChunkSeparator; cr; cr.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   333
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   334
    source := self source.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   335
    source isNil ifTrue:[
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   336
        ClassDescription fileOutErrorSignal
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   337
            raiseRequestWith:self
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   338
            errorString:(' - no source for method: ' ,
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   339
                         self className , '>>' , selector).
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   340
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   341
    ] ifFalse:[
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   342
        aStream nextChunkPut:source.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   343
    ].
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   344
    aStream space.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   345
    aStream nextPutChunkSeparator.
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   346
    aStream cr; cr
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   347
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   348
    "Modified: / 05-12-2009 / 12:38:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   349
! !
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   350
963
a4fb4b9f7e72 category change
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
   351
!MethodChange methodsFor:'printing & storing'!
0
470788421600 Initial revision
claus
parents:
diff changeset
   352
7
1ec2a2047025 *** empty log message ***
claus
parents: 4
diff changeset
   353
printOn:aStream
800
3c41a8705c48 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   354
    "append a user printed representation of the receiver to aStream.
3c41a8705c48 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   355
     The format is suitable for a human - not meant to be read back."
3c41a8705c48 comment
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   356
2170
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   357
    aStream
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   358
	nextPutAll:(self className ? 'unnamed');
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   359
	nextPutAll:'>>';
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   360
	nextPutAll:(selector ? '?');
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   361
	nextPutAll:' {';
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   362
	nextPutAll:(methodCategory ? '?');
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   363
	nextPutAll:'}'
1512
2a7a41afb1e2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1509
diff changeset
   364
1833
cf60e3c0087e care for bad (nil) methodCategory
Claus Gittinger <cg@exept.de>
parents: 1512
diff changeset
   365
    "Modified: / 04-10-2006 / 16:46:01 / cg"
2170
3357cc27387c changed: #printOn:
Claus Gittinger <cg@exept.de>
parents: 2157
diff changeset
   366
    "Modified: / 07-11-2008 / 08:29:03 / Jan Vrany <vranyj1@fel.cvut.cz>"
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   367
!
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   368
896
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   369
printWithoutClassNameOn:aStream
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   370
    (className endsWith:' class') ifTrue:[
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   371
        aStream nextPutAll:'class '
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   372
    ].
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   373
    aStream nextPutAll:selector 
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   374
!
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   375
035d5613a20c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 852
diff changeset
   376
printWithoutOwningClassOn:aStream
2022
a498c70c0aac changed #printWithoutOwningClassOn:
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
   377
    self breakPoint:#cg.
779
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   378
    (className endsWith:' class') ifTrue:[
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   379
        aStream nextPutAll:'class '
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   380
    ].
d2c59a219cbc *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   381
    aStream nextPutAll:selector 
1845
6fdd21eba549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   382
!
6fdd21eba549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   383
6fdd21eba549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   384
sourceForMethod
2157
281a40f3dfc9 changed: #sourceForMethod
Claus Gittinger <cg@exept.de>
parents: 2130
diff changeset
   385
    ^ '(' , className , ' compiledMethodAt:' , selector asSymbol storeString, ')'
1845
6fdd21eba549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   386
6fdd21eba549 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   387
    "Created: / 09-10-2006 / 13:58:09 / cg"
0
470788421600 Initial revision
claus
parents:
diff changeset
   388
! !
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   389
2130
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   390
!MethodChange methodsFor:'testing'!
652
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   391
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   392
isMethodChange
2130
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   393
    "true if this is a method related change"
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   394
652
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   395
    ^ true
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   396
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   397
    "Created: / 7.2.1998 / 19:26:59 / cg"
2130
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   398
!
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   399
2187
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   400
isMethodChangeForVersionMethod
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   401
    ^  self isMethodCodeChange
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   402
    and:[ AbstractSourceCodeManager isVersionMethodSelector:self selector ]
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   403
!
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   404
2130
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   405
isMethodCodeChange
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   406
    "true if this is a method's code change (not package, category etc.)"
1f2df83288c7 added: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2119
diff changeset
   407
2260
fc4873beed5b fixed: #isMethodCodeChange
Claus Gittinger <cg@exept.de>
parents: 2258
diff changeset
   408
    ^ true
652
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   409
! !
b9e4b4465a2c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 648
diff changeset
   410
2616
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   411
!MethodChange methodsFor:'visiting'!
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   412
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   413
acceptChangeVisitor:aVisitor
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   414
    ^ aVisitor visitMethodChange:self.
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   415
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   416
    "Created: / 25-11-2011 / 17:13:50 / cg"
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   417
! !
0eba26a9f6af visitor support (for monticello);
Claus Gittinger <cg@exept.de>
parents: 2516
diff changeset
   418
1325
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   419
!MethodChange::NamedMethodChange class methodsFor:'instance creation'!
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   420
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   421
fromMethodChange:aMethodChange
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   422
    ^ self new cloneInstanceVariablesFrom:aMethodChange
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   423
! !
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   424
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   425
!MethodChange::NamedMethodChange methodsFor:'accessing'!
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   426
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   427
changeName:something
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   428
    changeName := something.
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   429
! !
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   430
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   431
!MethodChange::NamedMethodChange methodsFor:'printing & storing'!
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   432
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   433
printOn:aStream
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   434
    changeName notNil ifTrue:[
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   435
        changeName printOn:aStream.
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   436
        ^ self.
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   437
    ].
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   438
    super printOn:aStream
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   439
! !
b874a070362e checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1322
diff changeset
   440
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   441
!MethodChange class methodsFor:'documentation'!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   442
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   443
version_CVS
2625
5dc802065e4b changed: #delta
Claus Gittinger <cg@exept.de>
parents: 2616
diff changeset
   444
    ^ '$Header: /cvs/stx/stx/libbasic3/MethodChange.st,v 1.64 2011-11-27 12:29:49 cg Exp $'
2187
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   445
!
b36325e3df21 added: #isMethodChangeForVersionMethod
fm
parents: 2170
diff changeset
   446
2369
ffbd3aa42d28 Jan's changes
vrany
parents: 2260
diff changeset
   447
version_SVN
2414
571f0daaef72 Extension methods from libsvn
vrany
parents: 2369
diff changeset
   448
    ^ '§ Id: MethodChange.st 1867 2011-06-08 21:57:08Z vranyj1  §'
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   449
! !