ChangeSet.st
author Claus Gittinger <cg@exept.de>
Mon, 07 Feb 2000 12:16:03 +0100
changeset 901 8fd26c5e8e8f
parent 899 7b65d6f2b0f0
child 916 fff32b43ac7d
permissions -rw-r--r--
more VW compatibility
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
16
fcbfbba03d49 *** empty log message ***
claus
parents: 10
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
"
0
470788421600 Initial revision
claus
parents:
diff changeset
    12
470788421600 Initial revision
claus
parents:
diff changeset
    13
OrderedCollection subclass:#ChangeSet
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    14
	instanceVariableNames:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    15
	classVariableNames:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    16
	poolDictionaries:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    17
	category:'System-Changes'
0
470788421600 Initial revision
claus
parents:
diff changeset
    18
!
470788421600 Initial revision
claus
parents:
diff changeset
    19
625
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
    20
!ChangeSet class methodsFor:'documentation'!
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    21
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    22
copyright
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    23
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    24
 COPYRIGHT (c) 1993 by Claus Gittinger
16
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
    25
	      All Rights Reserved
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    26
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    27
 This software is furnished under a license and may be used
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    28
 only in accordance with the terms of that license and with the
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    30
 be provided or otherwise made available to, or used by, any
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    31
 other person.  No title to or ownership of the software is
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    32
 hereby transferred.
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    33
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    34
!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    35
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    36
documentation
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    37
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    38
    used in the changes management to keep track of changes
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    39
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
    40
    [author:]
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
    41
	Claus Gittinger
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    42
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    43
! !
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    44
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    45
!ChangeSet class methodsFor:'instance creation'!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    46
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    47
forExistingClass:aClass
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    48
    "build a changeSet for some given class.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    49
     That does of course not give deltas, but instead reflects the current
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    50
     state of the given class.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    51
     It is useful in conjunction with the other utility methods,
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    52
     for example, when building patchLists etc."
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    53
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    54
    |changeSet chunk sawExcla lastTimeStamp s change nameSpace|
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    55
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    56
    changeSet := self new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    57
    nameSpace := Smalltalk.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    58
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    59
    "/ first, a classDefinition change ...
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    60
    changeSet addClassDefinitionChangeFor:aClass.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    61
    "/ are there any class-instVars ?
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    62
    aClass class instVarNames size > 0 ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    63
        changeSet addInstVarDefinitionChangeFor:aClass class.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    64
    ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    65
    "/ a comment ?
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    66
    aClass comment size > 0 ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    67
        changeSet addClassCommentChangeFor:aClass.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    68
    ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    69
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    70
    "/ class methods first ...
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    71
    aClass class methodDictionary keysAndValuesDo:[:sel :mthd |
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    72
        changeSet addMethodChange:mthd in:aClass class. 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    73
    ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    74
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    75
    "/ instance methods ...
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    76
    aClass methodDictionary keysAndValuesDo:[:sel :mthd |
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    77
        changeSet addMethodChange:mthd in:aClass.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    78
    ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    79
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    80
    ^ changeSet
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    81
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    82
    "
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    83
     ChangeSet forExistingClass:ChangeSet
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    84
    "
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    85
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    86
    "Created: / 16.2.1998 / 12:19:34 / cg"
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    87
    "Modified: / 14.12.1999 / 15:23:16 / cg"
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    88
!
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
    89
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    90
fromStream:aStream
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    91
    "build a changeSet from a stream, containing chunks.
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    92
     (i.e. either a classes sourceFile or a change-file).
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    93
     Return the changeSet."
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    94
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
    95
    |changeSet chunk sawExcla lastTimeStamp s change nameSpace|
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    96
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    97
    changeSet := self new.
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
    98
    nameSpace := Smalltalk.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
    99
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   100
    [aStream atEnd] whileFalse:[
894
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   101
        aStream skipSeparators.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   102
        sawExcla := aStream peekFor:$!!.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   103
        chunk := aStream nextChunk.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   104
        (chunk notNil and:[chunk notEmpty]) ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   105
            Class nameSpaceQuerySignal answer:nameSpace do:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   106
                |parser tree|
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   107
894
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   108
                parser := Parser for:chunk.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   109
                tree := parser 
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   110
                            parseExpressionWithSelf:nil 
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   111
                            notifying:nil 
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   112
                            ignoreErrors:true 
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   113
                            ignoreWarnings:true 
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   114
                            inNameSpace:nameSpace.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   115
                tree == #Error ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   116
                    change := DoItChange new.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   117
                    change source:chunk.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   118
                    changeSet add: change.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   119
                ] ifFalse:[    
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   120
                    (tree notNil and:[tree ~~ #Error]) ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   121
                        "/ if there is any nameSPace directive in there, extract it.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   122
                        parser currentNameSpace notNil ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   123
                            nameSpace := parser currentNameSpace
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   124
                        ].
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   125
                        Class nameSpaceQuerySignal answer:nameSpace do:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   126
                            "/
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   127
                            "/ what type of chunk is this ...
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   128
                            "/
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   129
                            tree isConstant ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   130
                                (s := tree evaluate) isString ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   131
                                    (s startsWith:'---- timestamp ') ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   132
                                        lastTimeStamp := s.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   133
                                    ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   134
                                ] ifFalse:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   135
                                    self halt:'unexpected change-chunk'
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   136
                                ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   137
                            ] ifFalse:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   138
                                tree isMessage ifTrue:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   139
                                    (changeSet addFromParseTree:tree andStream:aStream) ifFalse:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   140
                                        change := DoItChange new.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   141
                                        change source:chunk.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   142
                                        changeSet add: change.
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   143
                                    ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   144
                                ] ifFalse:[
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   145
                                    self halt:'unexpected change-chunk'
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   146
                                ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   147
                            ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   148
                        ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   149
                    ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   150
                ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   151
            ]
40292337f043 comment.
Claus Gittinger <cg@exept.de>
parents: 889
diff changeset
   152
        ]
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   153
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   154
    ^ changeSet
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   155
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   156
    "
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   157
     ChangeSet fromStream:('changes' asFilename readStream)
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   158
     ChangeSet fromStream:('patches' asFilename readStream)
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   159
     ChangeSet fromStream:(Object source asString readStream)
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   160
    "
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   161
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   162
    "Created: / 16.2.1998 / 12:19:34 / cg"
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   163
    "Modified: / 14.12.1999 / 15:23:16 / cg"
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   164
! !
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   165
883
1d1fd75b36e5 category renamining
Claus Gittinger <cg@exept.de>
parents: 879
diff changeset
   166
!ChangeSet class methodsFor:'Compatibility - ST80'!
625
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   167
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   168
patches
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   169
    ^ #()
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   170
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   171
    "Created: / 27.10.1997 / 13:52:54 / cg"
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   172
! !
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   173
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   174
!ChangeSet class methodsFor:'queries'!
27
claus
parents: 16
diff changeset
   175
claus
parents: 16
diff changeset
   176
current
claus
parents: 16
diff changeset
   177
    "ST-80 compatibility: return the current changeSet"
claus
parents: 16
diff changeset
   178
claus
parents: 16
diff changeset
   179
    |p|
claus
parents: 16
diff changeset
   180
claus
parents: 16
diff changeset
   181
    (Project notNil and:[(p := Project current) notNil]) ifTrue:[
claus
parents: 16
diff changeset
   182
	^ p changeSet
claus
parents: 16
diff changeset
   183
    ]
claus
parents: 16
diff changeset
   184
claus
parents: 16
diff changeset
   185
    "
claus
parents: 16
diff changeset
   186
     ChangeSet current 
claus
parents: 16
diff changeset
   187
    "
claus
parents: 16
diff changeset
   188
! !
claus
parents: 16
diff changeset
   189
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
   190
!ChangeSet methodsFor:'Compatibility - ST80'!
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   191
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
   192
changeClass:aClass
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
   193
    "dummy here"
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   194
899
7b65d6f2b0f0 more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 894
diff changeset
   195
    "Created: / 4.2.2000 / 18:30:59 / cg"
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   196
!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   197
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   198
reorganizeSystem
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   199
    "dummy here"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   200
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   201
    "Created: / 6.2.2000 / 20:45:10 / cg"
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   202
! !
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   203
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   204
!ChangeSet methodsFor:'changes management'!
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   205
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   206
addClassCommentChangeFor:aClass
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   207
    "add a classComment change to the receiver"
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   208
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   209
    |newChange|
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   210
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   211
    newChange := ClassCommentChange class:aClass.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   212
    newChange comment:aClass comment.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   213
    self add:newChange
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   214
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   215
    "Modified: 15.7.1996 / 09:27:05 / cg"
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   216
!
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   217
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   218
addClassDefinitionChangeFor:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   219
    "add a classDefinition change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   220
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   221
    |newChange|
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   222
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   223
    newChange := ClassDefinitionChange class:aClass.
787
5d49bd054fc2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
   224
    newChange source:aClass definition.
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   225
    self add:newChange
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   226
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   227
    "Modified: 15.7.1996 / 09:27:05 / cg"
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   228
!
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   229
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   230
addInstVarDefinitionChangeFor:aClass
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   231
    "add an instVarDefinition change to the receiver"
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   232
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   233
    |newChange|
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   234
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   235
    newChange := ClassInstVarDefinitionChange class:aClass.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   236
    newChange source:(aClass name , ' instanceVariableNames:' , aClass instanceVariableString storeString).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   237
    self add:newChange
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   238
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   239
!
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   240
16
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   241
addMethodCategoryChange:aMethod category:newCategory in:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   242
    "add a methodCategory change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   243
16
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   244
    |newChange|
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   245
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   246
    newChange := MethodCategoryChange class:aClass
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   247
				   selector:(aClass selectorAtMethod:aMethod)
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   248
				   category:newCategory.
16
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   249
    self add:newChange
fcbfbba03d49 *** empty log message ***
claus
parents: 10
diff changeset
   250
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   251
    "Modified: 15.7.1996 / 09:27:15 / cg"
44
claus
parents: 39
diff changeset
   252
!
claus
parents: 39
diff changeset
   253
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   254
addMethodChange:aMethod in:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   255
    "add a method change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   256
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   257
    |newChange|
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   258
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   259
    newChange := MethodChange class:aClass
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   260
			   selector:(aClass selectorAtMethod:aMethod)
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   261
			     source:aMethod source
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   262
			   category:aMethod category.
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   263
    self add:newChange
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   264
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   265
    "Modified: 15.7.1996 / 09:27:21 / cg"
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   266
!
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   267
44
claus
parents: 39
diff changeset
   268
addMethodPrivacyChange:aMethod in:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   269
    "add a methodPrivacy change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   270
44
claus
parents: 39
diff changeset
   271
    |newChange|
claus
parents: 39
diff changeset
   272
claus
parents: 39
diff changeset
   273
    newChange := MethodPrivacyChange class:aClass
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   274
				   selector:(aClass selectorAtMethod:aMethod)
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   275
				   privacy:aMethod privacy.
44
claus
parents: 39
diff changeset
   276
    self add:newChange
claus
parents: 39
diff changeset
   277
claus
parents: 39
diff changeset
   278
    "Modified: 27.8.1995 / 22:55:22 / claus"
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   279
    "Modified: 15.7.1996 / 09:27:28 / cg"
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   280
!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   281
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   282
addPrimitiveDefinitionsChangeFor:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   283
    "add a primitiveDefinitions change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   284
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   285
    |newChange|
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   286
783
90ffa6f0a86b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
   287
    newChange := ClassPrimitiveDefinitionsChange new
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   288
			class:aClass name source:aClass primitiveDefinitionsString.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   289
    self add:newChange
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   290
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   291
    "Modified: 15.7.1996 / 09:27:40 / cg"
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   292
!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   293
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   294
addPrimitiveFunctionsChangeFor:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   295
    "add a primitiveFunctions change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   296
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   297
    |newChange|
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   298
783
90ffa6f0a86b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
   299
    newChange := ClassPrimitiveFunctionsChange new
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   300
			class:aClass name source:aClass primitiveFunctionsString.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   301
    self add:newChange
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   302
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   303
    "Modified: 15.7.1996 / 09:27:47 / cg"
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   304
!
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   305
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   306
addPrimitiveVariablesChangeFor:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   307
    "add a primitiveVariables change to the receiver"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   308
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   309
    |newChange|
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   310
783
90ffa6f0a86b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 781
diff changeset
   311
    newChange := ClassPrimitiveVariablesChange new
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   312
			 class:aClass name source:aClass primitiveVariablesString.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 102
diff changeset
   313
    self add:newChange
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   314
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   315
    "Modified: 15.7.1996 / 09:27:55 / cg"
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   316
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   317
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   318
addRemoveSelectorChange:aSelector in:aClass
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   319
    "add a method-remove change to the receiver"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   320
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   321
    |newChange|
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   322
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   323
    newChange := MethodRemoveChange 
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   324
			class:aClass
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   325
			selector:aSelector.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   326
    self add:newChange
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   327
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   328
    "Modified: / 27.8.1995 / 22:55:22 / claus"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   329
    "Modified: / 15.7.1996 / 09:27:28 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   330
    "Created: / 16.2.1998 / 12:47:07 / cg"
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   331
!
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   332
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   333
addRenameCategoryChangeIn:aClass from:oldCategory to:newCategory
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   334
    "add a category rename change to the receiver"
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   335
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   336
    |newChange|
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   337
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   338
    newChange := MethodCategoryRenameChange class:aClass.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   339
    newChange oldCategoryName:oldCategory newCategoryName:newCategory.
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   340
    self add:newChange
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   341
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   342
    "Modified: / 6.2.2000 / 02:30:30 / cg"
0
470788421600 Initial revision
claus
parents:
diff changeset
   343
! !
470788421600 Initial revision
claus
parents:
diff changeset
   344
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   345
!ChangeSet methodsFor:'misc'!
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   346
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   347
addPatch:nameOfPatch
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   348
    "ignored for now - allows fileIn of ST-80 patch stuff .."
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   349
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   350
    ^ self
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   351
! !
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   352
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   353
!ChangeSet methodsFor:'private'!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   354
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   355
addFromParseTree:aTree andStream:aStream
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   356
    |sel className categoryName 
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   357
     methodSource methodSelector change parser
775
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   358
     oldName newName priv receiver receiverVarName
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   359
     receiverSelector receiverReceiver primSource
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   360
     nameSpace|
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   361
860
4e159afd172a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   362
    nameSpace := Class nameSpaceQuerySignal query.
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 857
diff changeset
   363
    nameSpace isNil ifTrue:[nameSpace := Smalltalk].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   364
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   365
    sel := aTree selector.
775
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   366
    receiver := aTree receiver.
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   367
    receiver isMessage ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   368
        receiverSelector := receiver selector.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   369
        receiverReceiver := receiver receiver.
775
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   370
    ] ifFalse:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   371
        receiver isVariable ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   372
            receiverVarName := receiver name
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   373
        ]
775
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   374
    ].
04b5618b4477 code cleanup
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   375
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   376
    (sel == #'methodsFor:'
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   377
    or:[(sel == #'ignoredMethodsFor:')]) ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   378
        (sel == #'ignoredMethodsFor:') ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   379
            priv := #ignored.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   380
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   381
            priv := nil
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   382
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   383
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   384
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   385
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   386
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   387
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   388
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   389
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   390
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   391
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   392
        categoryName := (aTree arguments at:1) evaluate.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   393
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   394
        aStream skipSeparators.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   395
        methodSource := aStream nextChunk.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   396
        [methodSource notEmpty] whileTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   397
            parser := Parser
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   398
                        parseMethodArgAndVarSpecification:methodSource 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   399
                        in:nil 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   400
                        ignoreErrors:true 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   401
                        ignoreWarnings:true
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   402
                        parseBody:false.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   403
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   404
            parser isNil ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   405
                "/ something wierd ...
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   406
                methodSelector := '????'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   407
            ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   408
                methodSelector := parser selector.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   409
            ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   410
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   411
            change := MethodChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   412
            change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   413
                className:className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   414
                selector:methodSelector
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   415
                source:methodSource
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   416
                category:categoryName
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   417
                privacy:priv.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   418
            self add: change.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   419
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   420
            aStream skipSeparators.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   421
            methodSource := aStream nextChunk.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   422
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   423
        ^ true
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   424
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   425
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   426
    sel == #'removeSelector:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   427
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   428
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   429
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   430
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   431
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   432
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   433
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   434
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   435
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   436
        methodSelector := (aTree arguments at:1) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   437
        change := MethodRemoveChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   438
        change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   439
            className:className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   440
            selector:methodSelector.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   441
        self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   442
        ^ true
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   443
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   444
787
5d49bd054fc2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
   445
    "/ any subclass definiton selector ?
802
f6cfa27d60e0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 798
diff changeset
   446
    (Behavior definitionSelectors includes:sel)
787
5d49bd054fc2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 783
diff changeset
   447
    ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   448
        className := (aTree arguments at:1) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   449
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   450
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   451
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   452
        change := ClassDefinitionChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   453
        change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   454
            className:className;
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   455
            source:(aTree printString).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   456
        self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   457
        ^ true
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   458
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   459
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   460
    sel == #'renameCategory:to:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   461
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   462
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   463
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   464
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   465
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   466
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   467
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   468
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   469
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   470
        change := MethodCategoryRenameChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   471
        change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   472
            className:className;
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   473
            oldCategoryName:(aTree arguments at:1) evaluate
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   474
            newCategoryName:(aTree arguments at:2) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   475
        self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   476
        ^ true
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   477
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   478
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   479
    (sel == #'category:' 
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   480
    or:[sel == #'privacy:']) ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   481
        (receiver isMessage
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   482
        and:[receiverSelector == #'compiledMethodAt:']) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   483
            (receiverReceiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   484
            and:[receiverReceiver selector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   485
                className := (receiverReceiver receiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   486
            ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   487
                className := (receiverReceiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   488
            ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   489
            nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   490
                className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   491
            ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   492
            methodSelector := (receiver arguments at:1) evaluate.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   493
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   494
            sel == #'category:' ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   495
                change := MethodCategoryChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   496
                change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   497
                    className:className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   498
                    selector:methodSelector
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   499
                    category:(aTree arguments at:1) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   500
            ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   501
                change := MethodPrivacyChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   502
                change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   503
                    className:className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   504
                    selector:methodSelector
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   505
                    privacy:(aTree arguments at:1) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   506
            ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   507
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   508
            self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   509
            ^ true
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   510
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   511
            self halt:'unexpected change'
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   512
        ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   513
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   514
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   515
    sel == #'comment:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   516
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   517
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   518
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   519
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   520
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   521
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   522
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   523
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   524
        ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   525
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   526
        change := ClassCommentChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   527
        change 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   528
            className:className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   529
            comment:(aTree arguments at:1) evaluate.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   530
        change source:(aTree printString).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   531
        self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   532
        ^ true
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   533
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   534
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   535
    sel == #'instanceVariableNames:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   536
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   537
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   538
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   539
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   540
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   541
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   542
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   543
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   544
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   545
        change := ClassInstVarDefinitionChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   546
        change className:className.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   547
        change source:(aTree printString).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   548
        self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   549
        ^ true
798
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   550
    ].
999fff0aa0d0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 789
diff changeset
   551
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   552
    sel == #'removeClass:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   553
        (receiverVarName == #Smalltalk) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   554
            className := (aTree arguments at:1) name.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   555
            nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   556
                className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   557
            ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   558
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   559
            change := ClassRemoveChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   560
            change className:className.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   561
            self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   562
            ^ true
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   563
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   564
            self halt
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   565
        ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   566
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   567
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   568
    sel == #'renameClass:to:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   569
        (receiverVarName == #Smalltalk) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   570
            oldName := (aTree arguments at:1) name.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   571
            newName := (aTree arguments at:2) evaluate.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   572
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   573
            change := ClassRenameChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   574
            change oldName:oldName newName:newName.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   575
            self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   576
            ^ true
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   577
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   578
            self halt
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   579
        ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   580
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   581
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   582
    sel == #'name:' ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   583
        (receiverVarName == #Namespace) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   584
            className := (aTree arguments at:1) evaluate.
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   585
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   586
            change := NameSpaceCreationChange new.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   587
            change name:className.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   588
            self add: change.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   589
            ^ true
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   590
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   591
            self halt
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   592
        ].
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   593
    ].
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   594
781
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   595
    (sel == #'primitiveDefinitions'
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   596
    or:[sel == #'primitiveFunctions'
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   597
    or:[sel == #'primitiveVariables']]) ifTrue:[
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   598
        (receiver isUnaryMessage 
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   599
        and:[receiverSelector == #class]) ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   600
            className := (receiverReceiver name) , ' class'.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   601
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   602
            className := (receiver name).
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   603
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   604
        nameSpace ~~ Smalltalk ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   605
            className := nameSpace name , '::' , className
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   606
        ].
781
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   607
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   608
        aStream skipSeparators.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   609
        primSource := aStream nextChunk.
781
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   610
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   611
        sel == #'primitiveDefinitions' ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   612
            change := ClassPrimitiveDefinitionsChange new
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   613
        ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   614
            sel == #'primitiveFunctions' ifTrue:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   615
                change := ClassPrimitiveFunctionsChange new
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   616
            ] ifFalse:[
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   617
                change := ClassPrimitiveVariablesChange new
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   618
            ]
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   619
        ].
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   620
        change class:className source:primSource.
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   621
        self add: change.
781
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   622
889
6b05401d7184 more changes (comments, class-instVars) in the changeSet;
Claus Gittinger <cg@exept.de>
parents: 887
diff changeset
   623
        ^ true
781
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   624
    ].
d32abf3c57d7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 775
diff changeset
   625
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   626
    ^ false
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   627
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   628
    "Created: / 16.2.1998 / 13:42:40 / cg"
860
4e159afd172a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   629
    "Modified: / 15.12.1999 / 00:29:06 / cg"
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   630
! !
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 625
diff changeset
   631
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   632
!ChangeSet methodsFor:'utilities'!
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   633
878
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   634
apply
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   635
    "apply all changes in the receivers changeSet"
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   636
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   637
    self do:[:aChange |
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   638
	aChange apply
878
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   639
    ]
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   640
!
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   641
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   642
condenseChangesForClass:aClass package:aPackageSymbol
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   643
    "remove all changes for aClass and aPackageSymbol
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   644
     (i.e. leave methodChanges for other packages"
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   645
887
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   646
    |changesToRemove className|
878
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   647
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   648
    changesToRemove := OrderedCollection new.
887
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   649
    className := aClass name.
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   650
    self do:[:aChange | |chgClass|
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   651
        aChange className = className ifTrue:[
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   652
            changesToRemove add:aChange
3cfdf7d2ba89 oops - must care for unloaded/nonExistent/removed/renamed classes
Claus Gittinger <cg@exept.de>
parents: 883
diff changeset
   653
        ]
878
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   654
    ].
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   655
    self removeAll:changesToRemove
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   656
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   657
!
99583ccfe415 *** empty log message ***
ps
parents: 877
diff changeset
   658
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   659
diffSetsAgainst:anotherChangeSet
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   660
    "walk over the receiver and anotherChangeSet,
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   661
     add all changes to one of the tree lists:
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   662
	onlyInReceiver, onlyInArg or changed,
864
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   663
     each being a changeSet containing corresponding changes."
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   664
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   665
    |onlyInReceiver onlyInArg changedMethods
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   666
     indexFromChangedMethodsToA indexFromChangedMethodsToB
864
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   667
     "info" ret|
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   668
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   669
    onlyInReceiver := ChangeSet new.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   670
    onlyInArg      := ChangeSet new.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   671
    changedMethods := ChangeSet new.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   672
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   673
    indexFromChangedMethodsToA := OrderedCollection new.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   674
    indexFromChangedMethodsToB := OrderedCollection new.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   675
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   676
    self keysAndValuesDo:[:idxA :aChangeInA |
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   677
	|anyFound ch|
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   678
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   679
	anyFound := false.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   680
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   681
	anotherChangeSet keysAndValuesDo:[:idxB :aChangeInB |
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   682
	    (aChangeInA isForSameAs:aChangeInB) ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   683
		anyFound := true.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   684
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   685
		"/ also in B - is it different ?
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   686
		(aChangeInA sameAs:aChangeInB) ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   687
		    changedMethods add:aChangeInA.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   688
		    indexFromChangedMethodsToA add:idxA.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   689
		    indexFromChangedMethodsToB add:idxB.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   690
		] ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   691
		    aChangeInA isMethodChange ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   692
			aChangeInA methodCategory ~= aChangeInB methodCategory ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   693
			    "/ only the category is different;
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   694
			    "/ make it a MethodCategory changes.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   695
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   696
			    ch := MethodCategoryChange new
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   697
				    className:aChangeInA className
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   698
				    selector:aChangeInA selector
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   699
				    category:aChangeInA methodCategory.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   700
			    self at:idxA put:ch.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   701
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   702
			    ch := MethodCategoryChange new
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   703
				    className:aChangeInB className
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   704
				    selector:aChangeInB selector
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   705
				    category:aChangeInB methodCategory.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   706
			    anotherChangeSet at:idxB put:ch.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   707
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   708
			    changedMethods add:aChangeInA.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   709
			    indexFromChangedMethodsToA add:idxA.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   710
			    indexFromChangedMethodsToB add:idxB.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   711
			]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   712
		    ].
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   713
		]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   714
	    ] ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   715
		(aChangeInA sameAs:aChangeInB) ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   716
		    anyFound := true.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   717
		] ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   718
		]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   719
	    ]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   720
	].
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   721
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   722
	anyFound ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   723
	    onlyInReceiver add:aChangeInA.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   724
	]
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   725
    ].
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   726
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   727
    anotherChangeSet keysAndValuesDo:[:idxB :aChangeInB |
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   728
	|anyFound|
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   729
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   730
	anyFound := false.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   731
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   732
	self do:[:aChangeInA |
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   733
	    |idxM|
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   734
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   735
	    (aChangeInA isForSameAs:aChangeInB) ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   736
		anyFound := true.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   737
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   738
		"/ also in B - is it different ?
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   739
		(aChangeInA sameAs:aChangeInB) ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   740
		    "/ already there ?
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   741
		    idxM := changedMethods findFirst:[:c | c isForSameAs:aChangeInB].
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   742
		    idxM == 0 ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   743
			changedMethods add:aChangeInB.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   744
			indexFromChangedMethodsToB add:idxB.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   745
		    ] ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   746
			indexFromChangedMethodsToB at:idxM put:idxB
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   747
		    ]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   748
		]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   749
	    ] ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   750
		(aChangeInA sameAs:aChangeInB) ifTrue:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   751
		    anyFound := true.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   752
		] ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   753
		]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   754
	    ]
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   755
	].
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   756
	anyFound ifFalse:[
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   757
	    onlyInArg add:aChangeInB.
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   758
	]
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   759
    ].
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   760
864
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   761
"/    info := OrderedCollection new:(changedMethods size).
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   762
"/    changedMethods keysAndValuesDo:[:idx :changedMethod |
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   763
"/        info add:(Array 
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   764
"/                        with:(indexFromChangedMethodsToA at:idx)
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   765
"/                        with:(indexFromChangedMethodsToB at:idx)
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   766
"/                 )
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   767
"/    ].
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   768
    changedMethods := (1 to:changedMethods size) collect:[:idx |
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   769
			|cA cB|
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   770
879
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   771
			cA := self at:(indexFromChangedMethodsToA at:idx).
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   772
			cB := anotherChangeSet at:(indexFromChangedMethodsToB at:idx).
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   773
			Array with:cA with:cB
bfd06666f6c1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 878
diff changeset
   774
		      ].
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   775
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   776
    ret := IdentityDictionary new.
864
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   777
"/    ret at:#info           put:info.
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   778
    ret at:#changed        put:changedMethods.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   779
    ret at:#onlyInReceiver put:onlyInReceiver.
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   780
    ret at:#onlyInArg      put:onlyInArg.
864
4f35b96a799e checkin from browser
ps
parents: 860
diff changeset
   781
    ^ret
857
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   782
! !
0a1a91c94e53 diff utility
Claus Gittinger <cg@exept.de>
parents: 829
diff changeset
   783
625
06f4ed35832b added #patches for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   784
!ChangeSet class methodsFor:'documentation'!
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   785
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   786
version
901
8fd26c5e8e8f more VW compatibility
Claus Gittinger <cg@exept.de>
parents: 899
diff changeset
   787
    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeSet.st,v 1.42 2000-02-07 11:15:16 cg Exp $'
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   788
! !