ChangesBrowser.st
author Claus Gittinger <cg@exept.de>
Mon, 24 Aug 1998 14:35:47 +0200
changeset 1848 61054ff3d470
parent 1833 c9b1a30b326d
child 1996 e229ecc9f839
permissions -rw-r--r--
added find prev/next snapshot to search menu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     1
"
4
77d8e96499b2 *** empty log message ***
claus
parents: 1
diff changeset
     2
 COPYRIGHT (c) 1990 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
     3
	      All Rights Reserved
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
     4
571fd5eee315 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
571fd5eee315 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
571fd5eee315 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
571fd5eee315 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
571fd5eee315 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
571fd5eee315 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
571fd5eee315 Initial revision
claus
parents:
diff changeset
    11
"
571fd5eee315 Initial revision
claus
parents:
diff changeset
    12
571fd5eee315 Initial revision
claus
parents:
diff changeset
    13
StandardSystemView subclass:#ChangesBrowser
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
    14
	instanceVariableNames:'changeListView codeView changeFileName changeChunks
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
    15
		changePositions changeClassNames changeHeaderLines
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
    16
		changeIsFollowupMethodChange anyChanges changeNrShown
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
    17
		changeNrProcessed skipSignal compareChanges compareCheckBox
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
    18
		changeFileSize changeFileTimestamp checkBlock changeTimeStamps
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
    19
		tabSpec autoUpdate editingClassSource lastSearchType'
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
    20
	classVariableNames:'CompressSnapshotInfo'
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
    21
	poolDictionaries:''
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
    22
	category:'Interface-Browsers'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    23
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
    24
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
    25
!ChangesBrowser class methodsFor:'documentation'!
29
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    26
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    27
copyright
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    28
"
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    29
 COPYRIGHT (c) 1990 by Claus Gittinger
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    30
	      All Rights Reserved
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    31
29
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    32
 This software is furnished under a license and may be used
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    33
 only in accordance with the terms of that license and with the
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    35
 be provided or otherwise made available to, or used by, any
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    36
 other person.  No title to or ownership of the software is
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    37
 hereby transferred.
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    38
"
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    39
!
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    40
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    41
documentation
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    42
"
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    43
    this implements a browser for the changes-file.
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    44
    See the extra document 'doc/misc/cbrowser.doc' for how to use this browser.
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    45
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    46
    written jan 90 by claus
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
    47
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 502
diff changeset
    48
    [Class variables:]
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    49
	CompressSnapshotInfo            if true (the default), snapshot entries
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    50
					are also compressed in the compress function.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    51
					Some users prefer them to be not compressed.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    52
					Set it to false for this.
58
43b7d463a7e5 *** empty log message ***
claus
parents: 57
diff changeset
    53
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
    54
    Notice:
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    55
	this needs a total rewrite, to build up a changeSet from the file
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    56
	(which did not exist when the ChangesBrowser was originally written) 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    57
	and manipulate that changeSet.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    58
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    59
	This way, we get a browser for any upcoming incore changeSets for
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    60
	free. Also, this will put the chunk analyzation code into Change and
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    61
	subclasses (where it belongs) and give a better encapsulation and
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    62
	overall structure. Do not take this as an example for good style ;-)
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 502
diff changeset
    63
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 502
diff changeset
    64
    [author:]
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    65
	Claus Gittinger
508
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 502
diff changeset
    66
8d2ab732fca5 documentation
Claus Gittinger <cg@exept.de>
parents: 502
diff changeset
    67
    [start with:]
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    68
	ChangesBrowser open
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
    69
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
    70
    [see also:]
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
    71
	( Using the ChangesBrowser :html: tools/cbrowser/TOP.html )
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
    72
        
29
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    73
"
8a72e10043f6 *** empty log message ***
claus
parents: 28
diff changeset
    74
! !
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    75
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
    76
!ChangesBrowser class methodsFor:'instance creation'!
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    77
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    78
new
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    79
    "create a new changes browser"
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    80
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    81
    ^ super 
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    82
        label:(self defaultLabel)
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    83
        icon:(self defaultIcon)
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    84
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    85
    "Modified: / 6.2.1998 / 13:25:18 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    86
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    87
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    88
openOn:aFileName
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    89
    "create c changes browser on a change file"
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    90
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    91
    ^ ((self new label:(self defaultLabel , ': ', aFileName)) 
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    92
        changeFileName:aFileName) open
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    93
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
    94
    "Modified: / 6.2.1998 / 13:27:19 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    95
! !
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
    96
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
    97
!ChangesBrowser class methodsFor:'behavior'!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
    98
571fd5eee315 Initial revision
claus
parents:
diff changeset
    99
autoSelectNext
571fd5eee315 Initial revision
claus
parents:
diff changeset
   100
    "returning true here, makes a Delete operation automatically
571fd5eee315 Initial revision
claus
parents:
diff changeset
   101
     select the next change"
571fd5eee315 Initial revision
claus
parents:
diff changeset
   102
571fd5eee315 Initial revision
claus
parents:
diff changeset
   103
    ^ true
571fd5eee315 Initial revision
claus
parents:
diff changeset
   104
! !
571fd5eee315 Initial revision
claus
parents:
diff changeset
   105
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
   106
!ChangesBrowser class methodsFor:'defaults'!
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   107
489
89cbd82e4541 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 419
diff changeset
   108
defaultIcon
1153
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   109
    "return the browsers default window icon"
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   110
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   111
    <resource: #style (#ICON #ICON_FILE)>
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   112
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   113
    |nm i|
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   114
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   115
    (i := DefaultIcon) isNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   116
	i := self classResources at:'ICON' default:nil.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   117
	i isNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   118
	    nm := ClassResources at:'ICON_FILE' default:'CBrowser.xbm'.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   119
	    i := Image fromFile:nm resolution:100.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   120
	    i isNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   121
		i := Image fromFile:('bitmaps/' , nm) resolution:100.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   122
		i isNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   123
		    i := StandardSystemView defaultIcon
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   124
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   125
	    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   126
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   127
	i notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   128
	    DefaultIcon := i := i on:Display
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   129
	]
1084
bf64c6b08604 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   130
    ].
bf64c6b08604 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   131
    ^ i
bf64c6b08604 icon from resources
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
   132
1153
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   133
    "Modified: 19.3.1997 / 20:48:34 / ca"
9e57c1d4339a better default icon
Claus Gittinger <cg@exept.de>
parents: 1150
diff changeset
   134
    "Modified: 18.4.1997 / 15:16:24 / cg"
489
89cbd82e4541 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 419
diff changeset
   135
!
89cbd82e4541 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 419
diff changeset
   136
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   137
defaultLabel
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   138
    ^ 'Changes Browser'
28
eea5a71a1e23 *** empty log message ***
claus
parents: 27
diff changeset
   139
! !
eea5a71a1e23 *** empty log message ***
claus
parents: 27
diff changeset
   140
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   141
!ChangesBrowser methodsFor:'compiler interface'!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   142
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   143
wantChangeLog
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   144
    "sent by the compiler to ask if a changeLog entry should
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   145
     be written. Return false here."
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   146
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   147
    ^ false
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   148
! !
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   149
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   150
!ChangesBrowser methodsFor:'error handling'!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   151
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   152
correctableError:aString position:relPos to:relEndPos from:aCompiler
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   153
    "compiler notifys us of an error - this should really not happen since
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   154
     changes ought to be correct (did someone edit the changes file ??).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   155
     Show the bad change in the codeView and let codeView hilight the error;
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   156
     no corrections allowed here therefore return false"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   157
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   158
    self error:aString position:relPos to:relEndPos from:aCompiler.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   159
    ^ false
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   160
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   161
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   162
error:aString position:relPos to:relEndPos from:aCompiler
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   163
    "compiler notifys us of an error - this should really not happen since
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   164
     changes ought to be correct (did someone edit the changes file ??).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   165
     Show the bad change in the codeView and let codeView hilight the error"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   166
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   167
    |action|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   168
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   169
    (changeNrProcessed ~~ changeNrShown) ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   170
	self changeSelection:changeNrProcessed
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   171
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   172
    (skipSignal notNil) ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   173
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   174
	codeView highlightingErrorPosition:relPos to:relEndPos do:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   175
	    |box|
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   176
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   177
	    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   178
	     start dialog - make certain cleanup is done
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   179
	    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   180
	    action := OptionBox 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   181
			  request:aString
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   182
			  label:'Error'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   183
			  form:(WarningBox iconBitmap)
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   184
			  buttonLabels:#('cancel' 'skip' 'continue')
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   185
			  values:#(#abort #skip #continue)
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   186
			  default:#continue.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   187
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   188
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   189
	action == #abort ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   190
	    Object abortSignal raise.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   191
	    ^ false
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   192
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   193
	action == #skip ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   194
	    skipSignal raise.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   195
	    ^ false
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   196
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   197
	^  false 
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   198
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   199
    ^ codeView error:aString position:relPos to:relEndPos from:aCompiler
373
292071301f91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   200
292071301f91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 358
diff changeset
   201
    "Modified: 20.2.1996 / 20:47:59 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   202
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   203
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   204
warning:aString position:relPos to:relEndPos from:aCompiler
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   205
    "compiler notifys us of a warning - ignore it"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   206
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   207
    ^ self
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   208
! !
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   209
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   210
!ChangesBrowser methodsFor:'event handling '!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   211
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   212
handlesKeyPress:key inView:view
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   213
    "this method is reached via delegation: are we prepared to handle
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   214
     a keyPress in some other view ?"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   215
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   216
    <resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)>
417
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   217
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   218
    view == changeListView ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   219
	(key == #Delete 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   220
	or:[key == #BackSpace
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   221
	or:[key == #Accept
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   222
	or:[key == #Find
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   223
	or:[key == #FindPrev
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   224
	or:[key == #FindNext]]]]]) ifTrue:[^ true].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   225
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   226
    ^ false
417
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   227
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   228
    "Modified: 8.4.1997 / 11:01:42 / cg"
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   229
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
   230
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   231
keyPress:key x:x y:y view:view
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   232
    "this method is reached via delegation from the changeListView"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   233
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   234
    <resource: #keyboard (#Delete #BackSpace #Accept #Find #FindPrev #FindNext)>
417
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   235
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   236
    (key == #Delete or:[key == #BackSpace]) ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   237
        self doDelete.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   238
        ^ self
417
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   239
    ].
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   240
    (key == #Accept) ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   241
        self doApply.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   242
        ^ self
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   243
    ].
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   244
    (key == #Find) ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   245
        self findClass.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   246
        ^ self
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
   247
    ].
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   248
    (key == #FindPrev) ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   249
        self findPrevious.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   250
        ^ self
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   251
    ].
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   252
    (key == #FindNext) ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   253
        self findNext.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   254
        ^ self
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   255
    ].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   256
    changeListView keyPress:key x:x y:y
417
c80a8acf429c show shortkeys in changeList view
Claus Gittinger <cg@exept.de>
parents: 394
diff changeset
   257
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   258
    "Modified: / 18.6.1998 / 22:15:36 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   259
! !
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   260
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   261
!ChangesBrowser methodsFor:'help '!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   262
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   263
helpTextFor:aComponent
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   264
    |s|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   265
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   266
    aComponent == codeView ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   267
	s := 'HELP_CODEVIEW'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   268
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   269
    aComponent == changeListView ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   270
	s := 'HELP_CHANGELIST'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   271
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   272
    ((aComponent == compareCheckBox)
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   273
    or:[aComponent superView == compareCheckBox]) ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   274
	s := 'HELP_CHECK_COMPARE'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   275
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   276
    s notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   277
	^ resources string:s
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   278
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   279
    ^ nil
394
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   280
!
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   281
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   282
showActivity:someMessage
502
e8d7b3f08e03 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
   283
    "some activityNotification to be forwarded to the user;
e8d7b3f08e03 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
   284
     show it in the windows title area here."
e8d7b3f08e03 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
   285
394
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   286
    self label:someMessage
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   287
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
   288
    "Created: 24.2.1996 / 19:35:42 / cg"
502
e8d7b3f08e03 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
   289
    "Modified: 23.4.1996 / 21:39:36 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   290
! !
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   291
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   292
!ChangesBrowser methodsFor:'initialize / release'!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   293
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   294
changeListMenu
586
1acb0c4f0ecd added resource info
Claus Gittinger <cg@exept.de>
parents: 584
diff changeset
   295
    <resource: #keyboard ( #Accept #Delete ) >
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   296
    <resource: #programMenu >
586
1acb0c4f0ecd added resource info
Claus Gittinger <cg@exept.de>
parents: 584
diff changeset
   297
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   298
    |items m|
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   299
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   300
    self sensor ctrlDown ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   301
        lastSearchType == #selector ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   302
            items := #(
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   303
                              ('search class'                 findClass             #Find         )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   304
                              ('next for this class'          findNextForClass                    )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   305
                              ('previous for this class'      findPreviousForClass                )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   306
                              ('-'                                                                )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   307
                              ('search selector'              findSelector                        )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   308
                              ('next with this selector'      findNextForSelector     #FindNext   )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   309
                              ('previous with this selector'  findPreviousForSelector #FindPrev   )
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   310
                              ('-'                                                                )
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   311
                              ('next snapshot'                findNextSnapshot                    )
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   312
                              ('previous snapshot'            findPreviousSnapshot                )
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   313
                     ).
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   314
        ] ifFalse:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   315
            items := #(
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   316
                              ('search class'                 findClass             #Find         )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   317
                              ('next for this class'          findNextForClass      #FindNext     )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   318
                              ('previous for this class'      findPreviousForClass  #FindPrev     )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   319
                              ('-'                                                                )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   320
                              ('search selector'              findSelector                        )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   321
                              ('next with this selector'      findNextForSelector                 )
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   322
                              ('previous with this selector'  findPreviousForSelector             )
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   323
                              ('-'                                                                )
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   324
                              ('next snapshot'                findNextSnapshot                    )
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   325
                              ('previous snapshot'            findPreviousSnapshot                )
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   326
                     ).
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   327
        ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   328
        ^ PopUpMenu itemList:items resources:resources.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   329
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   330
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   331
    items := #(
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   332
                      ('apply'                        doApply                    Accept)
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   333
                      ('apply to end'                 doApplyRest                      )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   334
                      ('apply for class to end'       doApplyClassRest                 )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   335
                      ('apply all'                    doApplyAll                       )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   336
                      ('-'                                                             )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   337
                      ('delete'                       doDelete                   Delete)
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   338
                      ('delete to end'                doDeleteRest                     )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   339
                      ('delete for class to end'      doDeleteClassRest                )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   340
                      ('delete for class from begin'  doDeleteClassFromBeginning       )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   341
                      ('delete all for class'         doDeleteClassAll                 )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   342
                      ('-'                                                             )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   343
                      ('compress'                     doCompress                       )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   344
                      ('compress for class'           doCompressClass                  )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   345
                      ('compare with current version' doCompare                        )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   346
                      ('browse'                       doBrowse                         )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   347
                      ('-'                                                             )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   348
                      ('make change a patch'          doMakePatch                      )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   349
             ).
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   350
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   351
    editingClassSource ifFalse:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   352
        items := items , #(
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   353
                      ('fileout & delete all for class' doFileoutAndDeleteClassAll     )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   354
                          )
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   355
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   356
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   357
    items := items , #(
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   358
                      ('-'                                             )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   359
                      ('save in ...'                  doSave           )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   360
                      ('save to end in ...'           doSaveRest       )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   361
                      ('save for class to end in ...' doSaveClassRest  )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   362
                      ('save all for class in ...'    doSaveClassAll   )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   363
                      ('-'                                             )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   364
                     ).
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   365
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   366
    editingClassSource ifTrue:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   367
        items := items , #(
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   368
                      ('writeback classFile'  doWriteBack )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   369
                     )
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   370
    ] ifFalse:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   371
        items := items , #(
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   372
                      ('writeback changeFile' doWriteBack )
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   373
                     )
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   374
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   375
1833
c9b1a30b326d moved update item to the end
Claus Gittinger <cg@exept.de>
parents: 1788
diff changeset
   376
    items := items , #(
c9b1a30b326d moved update item to the end
Claus Gittinger <cg@exept.de>
parents: 1788
diff changeset
   377
                  ('-'                                                             )
c9b1a30b326d moved update item to the end
Claus Gittinger <cg@exept.de>
parents: 1788
diff changeset
   378
                  ('update view'                  doUpdate                         )
c9b1a30b326d moved update item to the end
Claus Gittinger <cg@exept.de>
parents: 1788
diff changeset
   379
                 ).
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   380
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   381
    m := PopUpMenu itemList:items resources:resources.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   382
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   383
    "/
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   384
    "/ disable those that require a selected entry
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   385
    "/
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   386
    changeListView hasSelection ifFalse:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   387
        m disableAll:#(doApply doApplyClassRest doApplyRest doDelete doDeleteRest doDeleteClassRest
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   388
                       doDeleteClassFromBeginning doDeleteClassAll 
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   389
                       doCompare doCompressClass doMakePatch doSaveChangeInFile doMakePermanent
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   390
                       doSave doSaveRest doSaveClassAll doSaveClassRest doBrowse doFileoutAndDeleteClassAll) 
1368
a27fc06ba9ea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
   391
    ] ifTrue:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   392
        (self classNameOfChange:(changeListView selection)) isNil ifTrue:[
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   393
            m disableAll:#(doApplyClassRest doDeleteClassRest
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   394
                           doDeleteClassFromBeginning doDeleteClassAll 
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   395
                           doCompressClass
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   396
                           doSaveClassAll doSaveClassRest doBrowse doFileoutAndDeleteClassAll) 
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   397
        ]
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   398
    ].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   399
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   400
    "/
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   401
    "/ disable those that do not make sense with autoUpdate
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   402
    "/ ('cause this would be overwritten by next update operation)
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   403
    "/
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   404
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   405
    autoUpdate ifTrue:[
1670
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   406
        m disableAll:#(doDelete doDeleteRest doDeleteClassRest doDeleteClassAll doCompress 
c3915af3f7f6 use new menu creation message
Claus Gittinger <cg@exept.de>
parents: 1649
diff changeset
   407
                       doFileoutAndDeleteClassAll doWriteBack)
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   408
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   409
    ^ m
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   410
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   411
    "Modified: / 6.9.1995 / 17:14:22 / claus"
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
   412
    "Modified: / 22.8.1998 / 15:50:17 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   413
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   414
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   415
compare:aBoolean
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   416
    "sent from the compare-toggle"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   417
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   418
    aBoolean ~~ compareChanges ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   419
	compareChanges := aBoolean.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   420
	compareChanges ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   421
	    tabSpec positions:#(0  0.15  5   8.5 ).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   422
	    self doUpdate
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   423
	] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   424
	    "/
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   425
	    "/ set tabs to hide compare-column
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   426
	    "/
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   427
	    tabSpec positions:#(-1  0    5   8.5 ).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   428
	    changeListView invalidate. "/ clear; redraw.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   429
	]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   430
    ]
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   431
584
3f49ec1318ef use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents: 577
diff changeset
   432
    "Modified: 29.5.1996 / 16:12:19 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   433
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   434
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   435
focusSequence
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   436
    ^ Array with:changeListView with:codeView
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   437
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   438
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   439
initialize
221
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   440
    |panel v upperFrame buttonPanel autoUpdateCheckBox|
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   441
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   442
    super initialize.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   443
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   444
    changeFileName := ObjectMemory nameForChanges. "/ 'changes'.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   445
    compareChanges := false.
221
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   446
    autoUpdate := false.
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   447
1099
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   448
    "
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   449
      checkBlock is executed by the Processor.
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   450
      We use #pushEvent: to perform the update
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   451
      in our windowgroups process.
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   452
    "
b0a4e8ccc5cc Use #pushEvent: for timer handling.
Stefan Vogel <sv@exept.de>
parents: 1090
diff changeset
   453
    checkBlock := [self pushEvent:#checkIfFileHasChanged].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   454
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   455
    panel := VariableVerticalPanel origin:(0.0 @ 0.0)
1471
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   456
                                   corner:(1.0 @ 1.0)
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   457
                              borderWidth:0
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   458
                                       in:self.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   459
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   460
    upperFrame := View origin:(0.0 @ 0.0) corner:(1.0 @ 0.3) in:panel.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   461
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   462
    v := HVScrollableView for:SelectionInListView miniScrollerH:true in:upperFrame.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   463
    v origin:(0.0 @ 0.0) corner:(0.8 @ 1.0).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   464
    changeListView := v scrolledView.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   465
    changeListView delegate:self.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   466
    changeListView menuHolder:self; menuPerformer:self; menuMessage:#changeListMenu.
1471
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   467
    changeListView doubleClickAction:[:line | self doubleClickOnChange:line].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   468
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   469
    buttonPanel := VerticalPanelView in:upperFrame.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   470
    buttonPanel origin:(0.8 @ 0.0) corner:(1.0 @ 1.0).
221
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   471
    buttonPanel verticalLayout:#topSpace; horizontalLayout:#leftSpace.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   472
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   473
    compareCheckBox := CheckBox new.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   474
    compareCheckBox label:(resources string:'compare').
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   475
    compareCheckBox action:[:val | self compare:val].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   476
    buttonPanel addSubView:compareCheckBox.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   477
221
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   478
    autoUpdateCheckBox := CheckBox new.
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   479
    autoUpdateCheckBox label:(resources string:'auto update').
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   480
    autoUpdateCheckBox action:[:val | self autoUpdate:val].
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   481
    buttonPanel addSubView:autoUpdateCheckBox.
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
   482
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   483
    v := HVScrollableView for:CodeView miniScrollerH:true miniScrollerV:false in:panel.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   484
    v origin:(0.0 @ 0.3) corner:(1.0 @ 1.0).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   485
    codeView := v scrolledView.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   486
    codeView readOnly.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   487
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   488
    anyChanges := false.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   489
    ObjectMemory addDependent:self.   "to get shutdown-update"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   490
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   491
    tabSpec := TabulatorSpecification new.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   492
    tabSpec unit:#inch.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   493
    tabSpec positions:#(-1      0        5      8.5 ).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   494
    "                   +/-    cls>>sel  type   info"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   495
    tabSpec align:    #(#left  #left     #left  #left).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   496
1471
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   497
    "Modified: / 27.3.1997 / 11:07:07 / stefan"
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
   498
    "Modified: / 6.2.1998 / 13:08:16 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   499
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   500
1246
9ed3722bd2f2 setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   501
postRealize
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   502
    self readChangesFileInBackground:true.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   503
    self setChangeList.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   504
    changeListView action:[:lineNr | self changeSelection:lineNr].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   505
    Processor addTimedBlock:checkBlock afterSeconds:5.
1246
9ed3722bd2f2 setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   506
9ed3722bd2f2 setup in #postRealize instead of #realize
Claus Gittinger <cg@exept.de>
parents: 1200
diff changeset
   507
    "Created: 24.7.1997 / 18:06:12 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   508
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   509
627
60c38701d4a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 586
diff changeset
   510
update:what with:aParameter from:changedObject
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   511
    |box|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   512
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   513
    (what == #aboutToExit) ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   514
	"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   515
	 smalltalk is about to shut down -
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   516
	 - if change list was modified, ask user and save if requested.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   517
	"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   518
	anyChanges ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   519
	    self raiseDeiconified.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   520
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   521
	    box := YesNoBox new.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   522
	    box title:(resources at:'changefile has not been updated from the modified changelist.\\Update before exiting ?') withCRs.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   523
	    box okText:(resources at:'update') noText:(resources at:'don''t update').
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   524
	    box yesAction:[self writeBackChanges] 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   525
		 noAction:[].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   526
	    box showAtPointer.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   527
	    box destroy
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   528
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   529
	^ self
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   530
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   531
    super update:what
627
60c38701d4a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 586
diff changeset
   532
60c38701d4a2 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 586
diff changeset
   533
    "Created: 15.6.1996 / 15:26:30 / cg"
917
72349fe1f8ee destroy box after use
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
   534
    "Modified: 7.1.1997 / 23:03:47 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   535
! !
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   536
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   537
!ChangesBrowser methodsFor:'private'!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   538
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   539
appendChange:changeNr toFile:fileName
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   540
    "append change to a file. return true if ok."
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   541
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   542
    |aStream outStream chunk sawExcla separator|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   543
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   544
    outStream := FileStream oldFileNamed:fileName.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   545
    outStream isNil ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   546
        outStream isNil ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   547
            outStream := FileStream newFileNamed:fileName.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   548
            outStream isNil ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   549
                self warn:'cannot update file ''%1''' with:fileName.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   550
                ^ false
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   551
            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   552
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   553
    ].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   554
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   555
    outStream setToEnd.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   556
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   557
    aStream := self streamForChange:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   558
    aStream isNil ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   559
        self warn:'oops cannot read change'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   560
        ^ false
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   561
    ].
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   562
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   563
    separator := aStream class chunkSeparator.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   564
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   565
    (self changeIsFollowupMethodChange:changeNr) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   566
        sawExcla := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   567
        chunk := changeChunks at:changeNr
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   568
    ] ifFalse:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   569
        sawExcla := aStream peekFor:separator.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   570
        chunk := aStream nextChunk.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   571
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   572
    sawExcla ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   573
        outStream nextPut:separator
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   574
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   575
    outStream nextChunkPut:chunk; cr.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   576
    sawExcla ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   577
        chunk := aStream nextChunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   578
        outStream nextChunkPut:chunk; space
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   579
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   580
    sawExcla ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   581
        outStream nextPut:separator
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   582
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   583
    outStream cr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   584
    aStream close.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   585
    outStream close.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   586
    ^ true
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   587
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   588
    "Modified: / 6.2.1998 / 13:03:54 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   589
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   590
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   591
applyChange:changeNr
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   592
    "fileIn a change"
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   593
358
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   594
    |aStream nm applyAction|
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   595
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   596
    aStream := self streamForChange:changeNr.
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   597
    aStream isNil ifTrue:[^ self].
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   598
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   599
    nm := self classNameOfChange:changeNr.
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   600
    nm notNil ifTrue:[
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   601
        |cls|
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   602
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   603
        cls := Smalltalk at:(nm asSymbol) ifAbsent:[].
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   604
        cls notNil ifTrue:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   605
            cls isLoaded ifFalse:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   606
                cls autoload
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   607
            ]
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   608
        ]
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   609
    ].
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   610
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
   611
    changeNrProcessed := changeNr.
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   612
358
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   613
    applyAction := [
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   614
        |sig|
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   615
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   616
        (skipSignal notNil) ifTrue:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   617
            sig := skipSignal
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   618
        ] ifFalse:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   619
            sig := Object abortSignal
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   620
        ].
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   621
        sig catch:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   622
            |reader doItChunk methodsForChunk|
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   623
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   624
            "/ a followup methodsFor: chunk ...
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   625
            (self changeIsFollowupMethodChange:changeNr) ifTrue:[
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   626
                methodsForChunk := (changeChunks at:changeNr).
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   627
            ] ifFalse:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   628
                doItChunk := aStream nextChunk.   "/ an empty chunk sometimes ...
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   629
                doItChunk notEmpty ifTrue:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   630
                    Compiler evaluate:doItChunk notifying:self.
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   631
                ] ifFalse:[
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   632
                    methodsForChunk := aStream nextChunk.   "/ the real one
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   633
                ]
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   634
            ].
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   635
            methodsForChunk notNil ifTrue:[
1594
834765de8cb5 no need for handler of methodRedefSignal; #keep is now the default.
Claus Gittinger <cg@exept.de>
parents: 1566
diff changeset
   636
                reader := Compiler evaluate:methodsForChunk notifying:self.
834765de8cb5 no need for handler of methodRedefSignal; #keep is now the default.
Claus Gittinger <cg@exept.de>
parents: 1566
diff changeset
   637
                reader fileInFrom:aStream notifying:self passChunk:false single:true.
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   638
            ]
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   639
        ].
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   640
        changeNrProcessed := nil.
358
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   641
    ].
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   642
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   643
    "/
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   644
    "/ if I am showing the changes file, dont update it
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   645
    "/
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   646
    changeFileName = ObjectMemory nameForChanges ifTrue:[
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   647
        Class withoutUpdatingChangesDo:applyAction
358
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   648
    ] ifFalse:[
1427
0b2794583306 care for methodRedefinitionSignal when accepting
Claus Gittinger <cg@exept.de>
parents: 1425
diff changeset
   649
        applyAction value
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   650
    ].
132
claus
parents: 126
diff changeset
   651
    aStream close
358
a7546792f073 update changeFile if applying changes from another changeFile
Claus Gittinger <cg@exept.de>
parents: 326
diff changeset
   652
1473
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
   653
    "Modified: / 7.2.1998 / 19:56:34 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   654
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
   655
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   656
autoSelect:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   657
    "select a change"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   658
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   659
    self class autoSelectNext ifTrue:[
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   660
        (changeNr <= self numberOfChanges) ifTrue:[
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   661
            changeListView setSelection:changeNr.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   662
            self changeSelection:changeNr.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   663
            ^ self
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   664
        ]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   665
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   666
    self clearCodeView.
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
   667
    changeListView setSelection:nil.
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
   668
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
   669
    "Modified: / 18.5.1998 / 14:26:43 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   670
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
   671
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   672
autoSelectLast
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   673
    "select the last change"
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
   674
223
d451e2badbd1 fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   675
    self autoSelect:(self numberOfChanges)
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   676
!
107
claus
parents: 106
diff changeset
   677
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   678
autoSelectOrEnd:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   679
    "select the next change or the last"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   680
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   681
    |last|
50
3106c0de1707 *** empty log message ***
claus
parents: 49
diff changeset
   682
223
d451e2badbd1 fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   683
    last := self numberOfChanges.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   684
    changeNr < last ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   685
	self autoSelect:changeNr
133
claus
parents: 132
diff changeset
   686
    ] ifFalse:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   687
	changeListView setSelection:last .
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   688
	self changeSelection:last.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   689
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
   690
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
   691
    "Modified: 25.5.1996 / 12:26:17 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   692
!
133
claus
parents: 132
diff changeset
   693
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   694
changeFileName:aFileName
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
   695
    changeFileName := aFileName
133
claus
parents: 132
diff changeset
   696
!
claus
parents: 132
diff changeset
   697
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   698
changeIsFollowupMethodChange:changeNr
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   699
    ^ changeIsFollowupMethodChange at:changeNr
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   700
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   701
    "Created: / 6.2.1998 / 13:03:39 / cg"
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   702
!
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
   703
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   704
checkClassIsLoaded:aClass
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   705
    |cls|
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   706
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   707
    aClass isMeta ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   708
	cls := aClass soleInstance
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   709
    ] ifFalse:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   710
	cls := aClass
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   711
    ].
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   712
    cls isLoaded ifFalse:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   713
	(self confirm:(cls name , ' is an autoloaded class.\I can only compare the methods texts if its loaded first.\\Load the class first ?') withCRs)
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   714
	ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   715
	    cls autoload
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   716
	]
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   717
    ].
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   718
    ^ cls isLoaded
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   719
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   720
    "Created: 12.12.1995 / 14:04:39 / cg"
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   721
    "Modified: 12.12.1995 / 14:11:05 / cg"
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   722
!
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   723
133
claus
parents: 132
diff changeset
   724
checkIfFileHasChanged
claus
parents: 132
diff changeset
   725
    |f info |
claus
parents: 132
diff changeset
   726
claus
parents: 132
diff changeset
   727
    Processor removeTimedBlock:checkBlock.
claus
parents: 132
diff changeset
   728
    f := changeFileName asFilename.
claus
parents: 132
diff changeset
   729
    (info := f info) isNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   730
	self newLabel:'(unaccessable)'
133
claus
parents: 132
diff changeset
   731
    ] ifFalse:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   732
	(info modified) > changeFileTimestamp ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   733
	    self newLabel:'(outdated)'.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   734
	    autoUpdate ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   735
		self doUpdate
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   736
	    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   737
	] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   738
	    self newLabel:''
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   739
	]
133
claus
parents: 132
diff changeset
   740
    ].
claus
parents: 132
diff changeset
   741
    Processor addTimedBlock:checkBlock afterSeconds:5.
claus
parents: 132
diff changeset
   742
claus
parents: 132
diff changeset
   743
    "Created: 8.9.1995 / 19:30:19 / claus"
claus
parents: 132
diff changeset
   744
    "Modified: 8.9.1995 / 19:38:18 / claus"
829
b6b0be2e14af changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents: 761
diff changeset
   745
    "Modified: 1.11.1996 / 20:22:56 / cg"
133
claus
parents: 132
diff changeset
   746
!
claus
parents: 132
diff changeset
   747
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   748
classNameOfChange:changeNr
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   749
    "return the classname of a change 
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   750
     (for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   751
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   752
    |name|
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   753
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   754
    name := self fullClassNameOfChange:changeNr.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   755
    name isNil ifTrue:[^ nil].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   756
    (name endsWith:' class') ifTrue:[
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   757
	^ name copyWithoutLast:6
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   758
    ].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   759
    ^ name
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   760
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   761
    "Modified: 6.12.1995 / 17:06:31 / cg"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   762
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   763
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   764
clearCodeView
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   765
    self unselect "changeListView deselect".
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   766
    codeView contents:nil.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   767
    changeNrShown := nil
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   768
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   769
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   770
compareChange:changeNr
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   771
    "compare a change with current version"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   772
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   773
    |aStream chunk sawExcla parseTree thisClass cat oldSource newSource
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 724
diff changeset
   774
     parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   775
     method beep sClass thisClassSym|
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   776
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   777
    aStream := self streamForChange:changeNr.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   778
    aStream isNil ifTrue:[^ self].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   779
275
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   780
    showDiff := false.
604a906c0eb7 better handling of changes for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 255
diff changeset
   781
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   782
    (self changeIsFollowupMethodChange:changeNr) ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   783
        sawExcla := aStream peekFor:(aStream class chunkSeparator).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   784
        chunk := aStream nextChunk.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   785
    ] ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   786
        chunk := (changeChunks at:changeNr).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   787
        sawExcla := true.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   788
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
   789
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
   790
    beep := false.
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   791
    sawExcla ifFalse:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   792
        outcome := 'cannot compare this change\\(i.e. this is not a method change).'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   793
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   794
        parseTree := Parser parseExpression:chunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   795
        (parseTree notNil and:[parseTree isMessage]) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   796
            ((selector := parseTree selector) == #removeSelector:) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   797
                thisClass := (parseTree receiver evaluate).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   798
                thisClass isBehavior ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   799
                    (self checkClassIsLoaded:thisClass) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   800
                        selector := (parseTree arg1 evaluate).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   801
                        (thisClass includesSelector:selector) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   802
                            outcome := 'change removes the #' , selector , ' method from ' , thisClass name.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   803
                        ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   804
                            outcome := 'change has no effect\\(there is no method for #' , selector , ' in ' , thisClass name , ')'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   805
                        ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   806
                    ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   807
                        beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   808
                        outcome := 'cannot compare this change (compare requires class to be loaded).'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   809
                    ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   810
                ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   811
            ].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   812
            selector == #category: ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   813
                parseTree receiver isMessage ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   814
                    parseTree receiver selector == #compiledMethodAt: ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   815
                        (method := parseTree receiver evaluate) isMethod ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   816
                            method category = parseTree arg1 evaluate ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   817
                                outcome := 'change has no effect\\(same category)'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   818
                            ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   819
                                outcome := 'category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   820
                            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   821
                        ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   822
                            beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   823
                            outcome := 'there is no such method'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   824
                        ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   825
                    ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   826
                ]
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   827
            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   828
            selector == #subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   829
                sClass := (parseTree receiver evaluate).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   830
                sClass isBehavior ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   831
                    (self checkClassIsLoaded:sClass) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   832
                        thisClassSym := (parseTree arguments at:1) evaluate.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   833
                        thisClass := Smalltalk at:thisClassSym ifAbsent:nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   834
                        thisClass notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   835
                            thisClass instanceVariableString = (parseTree arguments at:2) evaluate ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   836
                                thisClass classVariableString = (parseTree arguments at:3) evaluate ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   837
                                    ((thisClass sharedPools size == 0) and:[(parseTree arguments at:4) evaluate = '']) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   838
                                        thisClass category = (parseTree arguments at:5) evaluate ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   839
                                            outcome := 'change has no effect\\(same definition)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   840
                                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   841
                                    ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   842
                                ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   843
                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   844
                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   845
                    ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   846
                ]
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   847
            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   848
        ]
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   849
    ] ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   850
        parseTree := Parser parseExpression:chunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   851
        (parseTree notNil 
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   852
         and:[parseTree ~~ #Error
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   853
         and:[parseTree isMessage]]) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   854
            (parseTree selector == #methodsFor:) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   855
                thisClass := (parseTree receiver evaluate).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   856
                thisClass isBehavior ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   857
                    (isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   858
                        outcome := 'cannot compare this change\\(compare requires class to be loaded).'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   859
                    ].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   860
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   861
                    cat := parseTree arg1 evaluate.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   862
                    newSource := aStream nextChunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   863
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   864
                    parser := Parser parseMethod:newSource in:thisClass.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   865
                    (parser notNil and:[parser ~~ #Error]) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   866
                        sel := parser selector.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   867
                        oldMethod := thisClass compiledMethodAt:sel.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   868
                        oldMethod notNil ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   869
                            (oldMethod category = cat) ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   870
                                Transcript showCR:'category changed.'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   871
                            ].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   872
                            oldSource := oldMethod source.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   873
                            (oldSource = newSource) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   874
                                outcome := 'same source'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   875
                            ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   876
                                oldSource isNil ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   877
                                    beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   878
                                    outcome := 'no source for compare.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   879
                                ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   880
                                    "/
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   881
                                    "/ compare for tabulator <-> space changes
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   882
                                    "/ before showing diff ...
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   883
                                    "/
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   884
                                    t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   885
                                    t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   886
                                    t1 = t2 ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   887
                                        outcome := 'same source'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   888
                                    ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   889
                                        outcome := 'source changed.'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   890
                                        showDiff := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   891
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   892
                                        "/
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   893
                                        "/ check if only historyLine diffs
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   894
                                        "/
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   895
                                        (HistoryManager notNil 
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   896
                                        and:[HistoryManager isActive]) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   897
                                            (HistoryManager withoutHistoryLines:newSource)
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   898
                                            =
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   899
                                            (HistoryManager withoutHistoryLines:oldSource)
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   900
                                            ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   901
                                                outcome := 'same source (history only)'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   902
                                                showDiff := false.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   903
                                            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   904
                                        ].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   905
                                    ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   906
                                ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   907
                            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   908
                        ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   909
                            isLoaded ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   910
                                beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   911
                                outcome := 'method does not exist.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   912
                            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   913
                        ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   914
                    ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   915
                        outcome := 'change unparsable.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   916
                    ].
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   917
                    (showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   918
                        d := DiffTextView 
1622
fecb0d17cb42 national strings
Claus Gittinger <cg@exept.de>
parents: 1594
diff changeset
   919
                                openOn:oldSource label:(resources string:'current version (in image)')
fecb0d17cb42 national strings
Claus Gittinger <cg@exept.de>
parents: 1594
diff changeset
   920
                                and:newSource label:(resources string:'change version').
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   921
                        d label:'method differences'.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   922
                    ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   923
                ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   924
                    beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   925
                    outcome := 'class does not exist.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   926
                ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   927
            ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   928
                beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   929
                outcome := 'not comparable.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   930
            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   931
        ] ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   932
            beep := true.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   933
            outcome := 'not comparable.'
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   934
        ]
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   935
    ].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   936
    aStream close.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   937
    showDiff ifFalse:[
1622
fecb0d17cb42 national strings
Claus Gittinger <cg@exept.de>
parents: 1594
diff changeset
   938
        outcome := (resources string:outcome) withCRs.
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   939
        beep ifTrue:[
1622
fecb0d17cb42 national strings
Claus Gittinger <cg@exept.de>
parents: 1594
diff changeset
   940
            self warn:outcome.
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   941
        ] ifFalse:[
1622
fecb0d17cb42 national strings
Claus Gittinger <cg@exept.de>
parents: 1594
diff changeset
   942
            self information:outcome.
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   943
        ]
553
b67caadfe334 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 548
diff changeset
   944
"/        Transcript showCR:outcome.
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   945
    ].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   946
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
   947
    "Created: / 24.11.1995 / 14:30:46 / cg"
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
   948
    "Modified: / 6.7.1998 / 17:07:47 / cg"
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   949
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
   950
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   951
compressForClass:aClassNameOrNil
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   952
    "compress the change-set; 
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   953
     this replaces multiple method-changes by the last (i.e. the most recent) change.
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   954
     If the class argument is nil, compress for all classes.
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   955
     otherwise, only changes for that class are compressed."
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   956
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   957
    |aStream searchIndex anyMore deleteSet index  
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   958
     str snapshotProto snapshotPrefix snapshotNameIndex fileName|
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   959
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   960
    aStream := FileStream readonlyFileNamed:changeFileName.
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   961
    aStream isNil ifTrue:[^ self].
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   962
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   963
    aClassNameOrNil isNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   964
	self newLabel:'compressing ...'.
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   965
    ] ifFalse:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   966
	self newLabel:'compressing for ' , aClassNameOrNil.
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   967
    ].
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   968
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   969
    CompressSnapshotInfo == true ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   970
	"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   971
	 get a prototype snapshot record (to be independent of
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   972
	 the actual format ..
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   973
	"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   974
	str := WriteStream on:String new.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   975
	Class addChangeRecordForSnapshot:'foo' to:str.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   976
	snapshotProto := str contents.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   977
	snapshotPrefix := snapshotProto copyTo:10.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   978
	snapshotNameIndex := snapshotProto findString:'foo'.
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   979
    ].
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   980
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
   981
    self withExecuteCursorDo:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   982
	|numChanges classes selectors types excla sawExcla
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   983
	 changeNr chunk aParseTree parseTreeChunk
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   984
	 thisClass thisSelector codeChunk codeParser
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   985
	 compressThis|
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   986
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   987
	numChanges := self numberOfChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   988
	classes := Array new:numChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   989
	selectors := Array new:numChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   990
	types := Array new:numChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   991
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   992
	"starting at the end, get the change class and change selector;
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   993
	 collect all in classes / selectors"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   994
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   995
	changeNr := numChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   996
	excla := aStream class chunkSeparator.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   997
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   998
	[changeNr >= 1] whileTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
   999
	    aStream position:(changePositions at:changeNr).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1000
	    sawExcla := aStream peekFor:excla.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1001
	    chunk := aStream nextChunk.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1002
	    sawExcla ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1003
		"optimize a bit if multiple methods for same category arrive"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1004
		(chunk = parseTreeChunk) ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1005
		    aParseTree := Parser parseExpression:chunk.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1006
		    parseTreeChunk := chunk
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1007
		].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1008
		(aParseTree notNil 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1009
		and:[(aParseTree ~~ #Error) 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1010
		and:[aParseTree isMessage]]) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1011
		    (aParseTree selector == #methodsFor:) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1012
			thisClass := (aParseTree receiver evaluate).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1013
			codeChunk := aStream nextChunk.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1014
			codeParser := Parser 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1015
					  parseMethodSpecification:codeChunk
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1016
					  in:thisClass
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1017
					  ignoreErrors:true
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1018
					  ignoreWarnings:true.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1019
			(codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1020
			    selectors at:changeNr put:(codeParser selector).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1021
			    classes at:changeNr put:thisClass.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1022
			    types at:changeNr put:#methodsFor
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1023
			]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1024
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1025
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1026
	    ] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1027
		aParseTree := Parser parseExpression:chunk.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1028
		parseTreeChunk := chunk.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1029
		(aParseTree notNil 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1030
		and:[(aParseTree ~~ #Error) 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1031
		and:[aParseTree isMessage]]) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1032
		    (aParseTree selector == #removeSelector:) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1033
			selectors at:changeNr put:(aParseTree arg1 value ).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1034
			classes at:changeNr put:(aParseTree receiver evaluate).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1035
			types at:changeNr put:#removeSelector
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1036
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1037
		] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1038
		    CompressSnapshotInfo == true ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1039
			(chunk startsWith:snapshotPrefix) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1040
			    str := chunk readStream position:snapshotNameIndex.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1041
			    fileName := str upTo:(Character space).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1042
			    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1043
			     kludge to allow use of match-check below
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1044
			    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1045
			    selectors at:changeNr put:snapshotPrefix.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1046
			    classes at:changeNr put:fileName.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1047
			]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1048
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1049
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1050
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1051
	    changeNr := changeNr - 1
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1052
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1053
	aStream close.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1054
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1055
	"for all changes, look for another class/selector occurence later
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1056
	 in the list and, if there is one, add change number to the delete set"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1057
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1058
	deleteSet := OrderedCollection new.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1059
	changeNr := 1.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1060
	[changeNr < self numberOfChanges] whileTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1061
	    thisClass := classes at:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1062
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1063
	    compressThis := false.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1064
	    aClassNameOrNil isNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1065
		compressThis := true
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1066
	    ] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1067
		"/ skipping unloaded/unknown classes
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1068
		thisClass isBehavior ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1069
		    thisClass isMeta ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1070
			compressThis := aClassNameOrNil = thisClass soleInstance name. 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1071
		    ] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1072
			compressThis := aClassNameOrNil = thisClass name
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1073
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1074
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1075
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1076
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1077
	    compressThis ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1078
		thisSelector := selectors at:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1079
		searchIndex := changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1080
		anyMore := true.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1081
		[anyMore] whileTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1082
		    searchIndex := classes indexOf:thisClass
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1083
					startingAt:(searchIndex + 1).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1084
		    (searchIndex ~~ 0) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1085
			((selectors at:searchIndex) == thisSelector) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1086
			    thisClass notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1087
				deleteSet add:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1088
				anyMore := false
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1089
			    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1090
			]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1091
		    ] ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1092
			anyMore := false      
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1093
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1094
		].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1095
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1096
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1097
	    changeNr := changeNr + 1
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1098
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1099
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1100
	"finally delete what has been found"
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1101
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1102
	(deleteSet size > 0) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1103
	    changeListView setSelection:nil.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1104
	    index := deleteSet size.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1105
	    [index > 0] whileTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1106
		self silentDeleteChange:(deleteSet at:index).
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1107
		index := index - 1
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1108
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1109
	    self setChangeList.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1110
	    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1111
	     scroll back a bit, if we are left way behind the list
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1112
	    "
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1113
	    changeListView firstLineShown > self numberOfChanges ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1114
		changeListView makeLineVisible:self numberOfChanges
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1115
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1116
	    self clearCodeView
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1117
	]
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1118
    ].
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1119
    self newLabel:''.
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1120
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1121
    "Created: / 29.10.1997 / 01:02:44 / cg"
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1122
    "Modified: / 29.10.1997 / 01:26:59 / cg"
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1123
!
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  1124
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1125
contractClass:className selector:selector to:maxLen
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1126
    |s l|
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1127
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1128
    s := className , ' ', selector.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1129
    s size > maxLen ifTrue:[
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1130
	l := maxLen - 1 - selector size max:20.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1131
	s := (className contractTo:l) , ' ' , selector.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1132
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1133
	s size > maxLen ifTrue:[
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1134
	    l := maxLen - 1 - className size max:20.
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1135
	    s := className , ' ', (selector contractTo:l).
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1136
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1137
	    s size > maxLen ifTrue:[
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1138
		s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2)
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1139
	    ]
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1140
	]
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1141
    ].
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1142
    ^ s
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1143
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1144
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1145
deleteChange:changeNr
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1146
    "delete a change"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1147
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1148
    self deleteChangesFrom:changeNr to:changeNr
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1149
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1150
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1151
deleteChangesFrom:start to:stop
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1152
    "delete a range of changes"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1153
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  1154
    changeListView setSelection:nil.
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1155
    stop to:start by:-1 do:[:changeNr |
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  1156
        self silentDeleteInternalChange:changeNr.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  1157
        changeListView removeIndex:changeNr.
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1158
    ].
744
cb962cb21e8c faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1159
1070
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1160
"/    changeListView contentsChanged.
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1161
"/    changeListView redrawFromLine:start.
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1162
744
cb962cb21e8c faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1163
"/    self setChangeList
cb962cb21e8c faster drawing when deleting items
Claus Gittinger <cg@exept.de>
parents: 742
diff changeset
  1164
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  1165
    "Modified: / 18.5.1998 / 14:22:27 / cg"
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1166
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1167
241
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1168
fullClassNameOfChange:changeNr
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1169
    "return the full classname of a change 
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1170
     (for classChanges (i.e. xxx class), a string ending in ' class' is returned.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1171
     - since parsing ascii methods is slow, keep result cached in 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1172
       changeClassNames for the next query"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1173
958
942fbe2a9806 can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1174
    |chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1175
     words changeStream fullParseTree ownerTree ownerName oldDollarSetting|
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1176
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1177
    changeNr isNil ifTrue:[^ nil].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1178
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1179
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1180
     first look, if not already known
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1181
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1182
    name := changeClassNames at:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1183
    name notNil ifTrue:[^ name].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1184
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1185
    prevMethodDefNr := changeNr.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1186
    [changeIsFollowupMethodChange at:prevMethodDefNr] whileTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1187
        prevMethodDefNr := prevMethodDefNr - 1.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1188
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1189
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1190
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1191
     get the chunk
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1192
    "
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1193
    chunk := changeChunks at:prevMethodDefNr.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1194
    chunk isNil ifTrue:[^ nil].       "mhmh - empty"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1195
958
942fbe2a9806 can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1196
    (chunk startsWith:'''---') ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1197
        words := chunk asCollectionOfWords.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1198
        words size > 2 ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1199
            (words at:2) = 'checkin' ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1200
                name := words at:3.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1201
                changeClassNames at:changeNr put:name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1202
                ^ name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1203
            ]
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1204
        ].
958
942fbe2a9806 can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1205
    ].
942fbe2a9806 can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1206
942fbe2a9806 can now extract className from a checkin-chunk
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1207
    "/ fix it - otherwise, it cannot be parsed
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1208
    (chunk endsWith:'primitiveDefinitions:') ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1209
        chunk := chunk , ''''''
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1210
    ].
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1211
    (chunk endsWith:'primitiveFunctions:') ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1212
        chunk := chunk , ''''''
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1213
    ].
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1214
    (chunk endsWith:'primitiveVariables:') ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1215
        chunk := chunk , ''''''
226
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1216
    ].
4b050498fe46 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 225
diff changeset
  1217
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1218
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1219
     use parser to construct a parseTree
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1220
    "
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1221
    oldDollarSetting := Parser allowDollarInIdentifier.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1222
    [
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1223
        Parser allowDollarInIdentifier:true.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1224
        aParseTree := Parser parseExpression:chunk.
1625
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1225
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1226
        aParseTree == #Error ifTrue:[
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1227
            (chunk includesString:'comment') ifTrue:[
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1228
                "/ could be a comment ...
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1229
                aParseTree := Parser parseExpression:chunk , ''''.
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1230
            ]
0b907cb3f8af also parse a comment-changes class
Claus Gittinger <cg@exept.de>
parents: 1622
diff changeset
  1231
        ].
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1232
    ] valueNowOrOnUnwindDo:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1233
        Parser allowDollarInIdentifier:oldDollarSetting
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1234
    ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1235
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1236
    (aParseTree isNil or:[aParseTree == #Error]) ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1237
        ^ nil        "seems strange ... (could be a comment)"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1238
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1239
    aParseTree isMessage ifFalse:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1240
        ^ nil        "very strange ... (whats that ?)"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1241
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1242
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1243
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1244
     ask parser for selector
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1245
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1246
    sel := aParseTree selector.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1247
    recTree := aParseTree receiver.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1248
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1249
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1250
     is it a method-change, methodRemove or comment-change ?
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1251
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1252
    (#(#'methodsFor:' 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1253
       #'privateMethodsFor:' 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1254
       #'protectedMethodsFor:' 
1788
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1255
       #'ignoredMethodsFor:' 
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1256
       #'publicMethodsFor:' 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1257
       #'removeSelector:' 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1258
       #'comment:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1259
       #'primitiveDefinitions:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1260
       #'primitiveFunctions:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1261
       #'primitiveVariables:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1262
       #'renameCategory:to:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1263
       #'instanceVariableNames:'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1264
    ) includes:sel) ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1265
        "
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1266
         yes, the className is the receiver
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1267
        "
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1268
        (recTree notNil and:[recTree ~~ #Error]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1269
            isMeta := false.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1270
            recTree isUnaryMessage ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1271
                (recTree selector ~~ #class) ifTrue:[^ nil].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1272
                "id class methodsFor:..."
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1273
                recTree := recTree receiver.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1274
                isMeta := true.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1275
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1276
            recTree isPrimary ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1277
                name := recTree name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1278
                isMeta ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1279
                    name := name , ' class'.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1280
                ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1281
                changeClassNames at:changeNr put:name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1282
                ^ name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1283
            ]
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1284
        ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1285
        "more strange things"
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1286
        ^ nil
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1287
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1288
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1289
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1290
     is it a change in a class-description ?
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1291
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1292
    (('subclass:*' match:sel) 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1293
    or:[('variable*subclass:*' match:sel)]) ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1294
        "/ must parse the full changes text, to get
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1295
        "/ privacy information.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1296
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1297
        changeStream := self streamForChange:changeNr.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1298
        changeStream notNil ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1299
            chunk := changeStream nextChunk.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1300
            changeStream close.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1301
            fullParseTree := Parser parseExpression:chunk.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1302
            (fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1303
                fullParseTree := nil
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1304
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1305
            fullParseTree isMessage ifFalse:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1306
                fullParseTree := nil
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1307
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1308
            "/ actually, the nil case cannot happen
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1309
            fullParseTree notNil ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1310
                aParseTree := fullParseTree.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1311
                sel := aParseTree selector.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1312
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1313
        ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1314
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1315
        arg1Tree := aParseTree arg1.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1316
        (arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1317
            name := arg1Tree value asString.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1318
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1319
            "/ is it a private-class ?
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1320
            ('*privateIn:' match:sel) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1321
                ownerTree := aParseTree args last.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1322
                ownerName := ownerTree name asString.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1323
                name := ownerName , '::' , name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1324
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1325
            changeClassNames at:changeNr put:name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1326
            ^ name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1327
        ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1328
        "very strange"
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1329
        ^ nil
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1330
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1331
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1332
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1333
     is it a class remove ?
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1334
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1335
    (sel == #removeClass:) ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1336
        (recTree notNil 
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1337
        and:[recTree ~~ #Error
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1338
        and:[recTree isPrimary
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1339
        and:[recTree name = 'Smalltalk']]]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1340
            arg1Tree := aParseTree arg1.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1341
            (arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1342
                name := arg1Tree name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1343
                changeClassNames at:changeNr put:name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1344
                ^ name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1345
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1346
        ]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1347
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1348
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1349
    "
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1350
     is it a method category change ?
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1351
    "
928
1e8d4f40a473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  1352
    ((sel == #category:)
1e8d4f40a473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
  1353
    or:[sel == #privacy:]) ifTrue:[
1425
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1354
        (recTree notNil 
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1355
        and:[recTree ~~ #Error
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1356
        and:[recTree isMessage
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1357
        and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1358
            isMeta := false.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1359
            recTree := recTree receiver.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1360
            recTree isUnaryMessage ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1361
                (recTree selector ~~ #class) ifTrue:[^ nil].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1362
                "id class "
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1363
                recTree := recTree receiver
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1364
            ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1365
            recTree isPrimary ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1366
                isMeta ifTrue:[
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1367
                    name := name , ' class'.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1368
                ].
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1369
                name := recTree name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1370
                changeClassNames at:changeNr put:name.
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1371
                ^ name
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1372
            ]
443eb4286f66 must allow dollars-in-identifiers while parsing a change for its class
Claus Gittinger <cg@exept.de>
parents: 1378
diff changeset
  1373
        ]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1374
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1375
    ^ nil
241
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1376
1788
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1377
    "Modified: / 3.8.1998 / 19:58:17 / cg"
241
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1378
!
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  1379
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1380
makeChangeAPatch:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1381
    "append change to patchfile"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1382
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1383
    self appendChange:changeNr toFile:'patches'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1384
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1385
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1386
makeChangePermanent:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1387
    "rewrite the source file where change changeNr lies"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1388
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1389
    self notify:'this is not yet implemented'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1390
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1391
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1392
newLabel:how
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1393
    |l|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1394
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1395
    (changeFileName ~= 'changes') ifTrue:[
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
  1396
        l := self class defaultLabel , ': ', changeFileName
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1397
    ] ifFalse:[
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
  1398
        l := self class defaultLabel
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1399
    ].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1400
    l := l , ' ' , how.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1401
    self label:l
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1402
1470
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
  1403
    "Created: / 8.9.1995 / 19:32:04 / claus"
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
  1404
    "Modified: / 8.9.1995 / 19:39:29 / claus"
6c0fc11207fe checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1431
diff changeset
  1405
    "Modified: / 6.2.1998 / 13:27:01 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1406
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1407
255
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1408
numberOfChanges
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1409
    ^ changePositions size
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1410
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1411
    "Created: 3.12.1995 / 18:15:39 / cg"
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1412
!
08ec5e9cdbd2 disable entries
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
  1413
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1414
queryCloseText
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1415
    "made this a method for easy redefinition in subclasses"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1416
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1417
    ^ 'Quit without updating changeFile ?'
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1418
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1419
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1420
readChangesFile
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1421
    "read the changes file, create a list of header-lines (changeChunks)
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1422
     and a list of chunk-positions (changePositions)"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1423
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1424
    ^ self readChangesFileInBackground:false
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1425
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1426
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  1427
readChangesFileInBackground:inBackground
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  1428
    "read the changes file, create a list of header-lines (changeChunks)
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1429
     and a list of chunk-positions (changePositions).
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1430
     Starting with 2.10.3, the entries are multi-col entries;
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1431
     the cols are:
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1432
        1   delta (only if comparing)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1433
                '+' -> new method (w.r.t. current state)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1434
                '-' -> removed method (w.r.t. current state)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1435
                '?' -> class does not exist currently
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1436
                '=' -> change is same as current methods source
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1437
        2   class/selector
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1438
        3   type of change
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1439
                doit
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1440
                method
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1441
                category change
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1442
        4   timestamp
89
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  1443
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  1444
     since comparing slows down startup time, it is now disabled by
182
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1445
     default and can be enabled via a toggle."
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  1446
829
b6b0be2e14af changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents: 761
diff changeset
  1447
    |aStream maxLen i f|
50
3106c0de1707 *** empty log message ***
claus
parents: 49
diff changeset
  1448
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1449
    editingClassSource := false.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1450
50
3106c0de1707 *** empty log message ***
claus
parents: 49
diff changeset
  1451
    maxLen := 60.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1452
133
claus
parents: 132
diff changeset
  1453
    f := changeFileName asFilename.
claus
parents: 132
diff changeset
  1454
    aStream :=  f readStream.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1455
    aStream isNil ifTrue:[^ nil].
571fd5eee315 Initial revision
claus
parents:
diff changeset
  1456
326
85838b6f0e07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 294
diff changeset
  1457
    self newLabel:'updating ...'.
85838b6f0e07 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 294
diff changeset
  1458
829
b6b0be2e14af changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents: 761
diff changeset
  1459
    i := f info.
b6b0be2e14af changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents: 761
diff changeset
  1460
    changeFileSize := i size.
b6b0be2e14af changes for new return from OS>>infoOf:
Claus Gittinger <cg@exept.de>
parents: 761
diff changeset
  1461
    changeFileTimestamp := i modified.
133
claus
parents: 132
diff changeset
  1462
294
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  1463
    self withReadCursorDo:[
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1464
        |myProcess myPriority|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1465
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1466
        "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1467
         this is a time consuming operation (especially, if reading an
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1468
         NFS-mounted directory; therefore lower my priority ...
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1469
        "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1470
        inBackground ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1471
            myProcess := Processor activeProcess.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1472
            myPriority := myProcess priority.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1473
            myProcess priority:(Processor userBackgroundPriority).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1474
        ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1475
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1476
        [
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1477
            |excla timeStampInfo|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1478
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1479
            changeChunks := OrderedCollection new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1480
            changeHeaderLines := OrderedCollection new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1481
            changePositions := OrderedCollection new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1482
            changeTimeStamps := OrderedCollection new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1483
            changeIsFollowupMethodChange := OrderedCollection new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1484
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1485
            excla := aStream class chunkSeparator.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1486
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1487
            [aStream atEnd] whileFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1488
                |entry changeDelta changeString changeType 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1489
                 line s l changeClass sawExcla category 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1490
                 chunkText chunkPos sel|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1491
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1492
                "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1493
                 get a chunk (separated by excla)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1494
                "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1495
                aStream skipSeparators.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1496
                chunkPos := aStream position.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1497
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1498
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1499
                sawExcla := aStream peekFor:excla.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1500
                chunkText := aStream nextChunk.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1501
                chunkText notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1502
                    |index headerLine cls|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1503
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1504
                    (chunkText startsWith:'''---- timestamp ') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1505
                        timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1506
                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1507
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1508
                        "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1509
                         only first line is saved in changeChunks ...
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1510
                        "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1511
                        index := chunkText indexOf:(Character cr).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1512
                        (index ~~ 0) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1513
                            chunkText := chunkText copyTo:(index - 1).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1514
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1515
                            "take care for comment changes - must still be a
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1516
                             valid expression for classNameOfChange: to work"
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1517
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1518
                            (chunkText endsWith:'comment:''') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1519
                                chunkText := chunkText , '...'''
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1520
                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1521
                            (chunkText endsWith:'primitiveDefinitions:''') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1522
                                sel := 'primitiveDefinitions:'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1523
                                chunkText := chunkText copyWithoutLast:1
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1524
                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1525
                            (chunkText endsWith:'primitiveVariables:''') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1526
                                sel := 'primitiveVariables:'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1527
                                chunkText := chunkText copyWithoutLast:1
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1528
                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1529
                            (chunkText endsWith:'primitiveFunctions:''') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1530
                                sel := 'primitiveFunctions:'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1531
                                chunkText := chunkText copyWithoutLast:1
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1532
                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1533
                        ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1534
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1535
                        changeChunks add:chunkText.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1536
                        changePositions add:chunkPos.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1537
                        changeTimeStamps add:timeStampInfo.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1538
                        changeIsFollowupMethodChange add:false.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1539
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1540
                        headerLine := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1541
                        changeDelta := ' '.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1542
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1543
                        sawExcla ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1544
                            (chunkText startsWith:'''---- snap') ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1545
                                changeType := ''.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1546
                                headerLine := chunkText.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1547
                                changeString := (chunkText contractTo:maxLen).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1548
                                timeStampInfo := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1549
                            ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1550
1714
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1551
                                |p cls clsName|
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1552
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1553
                                headerLine := chunkText , ' (doIt)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1554
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1555
                                "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1556
                                 first, assume doIt - then lets have a more detailed look ...
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1557
                                "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1558
                                ((chunkText startsWith:'''---- file')
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1559
                                or:[(chunkText startsWith:'''---- check')]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1560
                                    changeType := ''.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1561
                                    timeStampInfo := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1562
                                ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1563
                                    changeType := '(doIt)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1564
                                ].    
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1565
                                changeString := (chunkText contractTo:maxLen).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1566
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1567
                                p := Parser parseExpression:chunkText inNameSpace:Smalltalk.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1568
                                (p notNil 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1569
                                 and:[p ~~ #Error
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1570
                                 and:[p isMessage]]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1571
                                    sel := p selector.
1726
37e8450c18ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1714
diff changeset
  1572
                                ] ifFalse:[
37e8450c18ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1714
diff changeset
  1573
                                    sel := nil.    
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1574
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1575
                                (sel == #removeSelector:) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1576
                                    p receiver isUnaryMessage ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1577
                                        cls := p receiver receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1578
                                        changeClass := (Smalltalk classNamed:cls) class.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1579
                                        cls := cls , ' class'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1580
                                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1581
                                        cls := p receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1582
                                        changeClass := (Smalltalk classNamed:cls)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1583
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1584
                                    sel := (p args at:1) evaluate.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1585
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1586
                                    compareChanges ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1587
                                        (changeClass isNil or:[changeClass isLoaded not]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1588
                                            changeDelta := '?'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1589
                                        ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1590
                                            (changeClass implements:sel asSymbol) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1591
                                                changeDelta := '-'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1592
                                            ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1593
                                                changeDelta := '='.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1594
                                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1595
                                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1596
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1597
                                    changeType := '(remove)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1598
                                    changeString := self contractClass:cls selector:sel to:maxLen.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1599
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1600
                                (p ~~ #Error
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1601
                                and:[p isMessage 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1602
                                and:[p receiver isMessage
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1603
                                and:[p receiver selector == #compiledMethodAt:]]]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1604
                                    p receiver receiver isUnaryMessage ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1605
                                        cls := p receiver receiver receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1606
                                        changeClass := (Smalltalk classNamed:cls) class.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1607
                                        cls := cls , ' class'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1608
                                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1609
                                        cls := p receiver receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1610
                                        changeClass := (Smalltalk classNamed:cls)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1611
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1612
                                    (sel == #category:) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1613
                                        sel := (p receiver args at:1) evaluate.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1614
                                        changeType := '(category change)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1615
                                        changeString := self contractClass:cls selector:sel to:maxLen.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1616
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1617
                                    (sel == #privacy:) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1618
                                        sel := (p receiver args at:1) evaluate.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1619
                                        changeType := '(privacy change)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1620
                                        changeString := self contractClass:cls selector:sel to:maxLen.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1621
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1622
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1623
                                (#(#'subclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1624
                                  #'variableSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1625
                                  #'variableByteSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1626
                                  #'variableWordSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1627
                                  #'variableLongSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1628
                                  #'variableFloatSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1629
                                  #'variableDoubleSubclass:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1630
                                  #'primitiveDefinitions:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1631
                                  #'primitiveFunctions:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1632
                                  #'primitiveVariables:'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1633
                                 ) includes:sel) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1634
                                    changeType := '(class definition)'.
1714
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1635
                                    clsName := (p args at:1) evaluate.
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1636
                                    cls := Smalltalk at:clsName ifAbsent:nil.
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1637
                                    cls isNil ifTrue:[
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1638
                                        changeDelta := '+'.
2a06650719f1 also show '+' for new class-definitions.
Claus Gittinger <cg@exept.de>
parents: 1713
diff changeset
  1639
                                    ]
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1640
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1641
                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1642
                        ] ifTrue:[ "sawExcla"
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1643
                            |done first p className cls text methodPos|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1644
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1645
                            "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1646
                             method definitions actually consist of
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1647
                             two (or more) chunks; skip next chunk(s)
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1648
                             up to an empty one.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1649
                             The system only writes one chunk,
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1650
                             and we cannot handle more in this ChangesBrowser ....
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1651
                            "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1652
                            className := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1653
                            p := Parser parseExpression:chunkText inNameSpace:Smalltalk.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1654
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1655
                            (p notNil and:[p ~~ #Error]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1656
                                sel := p selector.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1657
                                (sel == #methodsFor:) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1658
                                    p receiver isUnaryMessage ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1659
                                        className := p receiver receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1660
                                        changeClass := (Smalltalk classNamed:className) class.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1661
                                        className := className , ' class'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1662
                                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1663
                                        className := p receiver name.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1664
                                        changeClass := Smalltalk classNamed:className
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1665
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1666
                                    category := (p args at:1) evaluate.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1667
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1668
                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1669
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1670
                            done := false.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1671
                            first := true.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1672
                            [done] whileFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1673
                                changeDelta := ' '.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1674
                                methodPos := aStream position.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1675
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1676
                                text := aStream nextChunk.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1677
                                text isNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1678
                                    done := true
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1679
                                ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1680
                                    done := text isEmpty
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1681
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1682
                                done ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1683
                                    first ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1684
                                        changeChunks add:chunkText.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1685
                                        changePositions add:methodPos.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1686
                                        changeTimeStamps add:timeStampInfo.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1687
                                        changeIsFollowupMethodChange add:true.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1688
                                        editingClassSource := true.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1689
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1690
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1691
                                    first := false.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1692
                                    "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1693
                                     try to find the selector
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1694
                                    "
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1695
                                    sel := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1696
                                    className notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1697
                                        p := Parser 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1698
                                                 parseMethodSpecification:text
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1699
                                                 in:nil
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1700
                                                 ignoreErrors:true
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1701
                                                 ignoreWarnings:true.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1702
                                        (p notNil and:[p ~~ #Error]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1703
                                            sel := p selector.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1704
                                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1705
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1706
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1707
                                    sel isNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1708
                                        changeString := (chunkText contractTo:maxLen).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1709
                                        changeType := '(change)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1710
                                        headerLine := chunkText , ' (change)'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1711
                                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1712
                                        changeString :=  self contractClass:className selector:sel to:maxLen.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1713
                                        changeType := '(method in: ''' , category , ''')'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1714
                                        headerLine := className , ' ' , sel , ' ' , '(change category: ''' , category , ''')'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1715
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1716
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1717
                                    compareChanges ifTrue:[ 
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1718
                                        changeClass isNil ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1719
                                            changeClass isMeta ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1720
                                                cls := changeClass soleInstance
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1721
                                            ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1722
                                                cls := changeClass
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1723
                                            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1724
                                        ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1725
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1726
                                        (changeClass isNil or:[cls isLoaded not]) ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1727
                                            changeDelta := '?'
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1728
                                        ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1729
                                            (changeClass implements:sel asSymbol) ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1730
                                                changeDelta := '+'.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1731
                                            ] ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1732
                                                |m currentText t1 t2|
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1733
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1734
                                                m := changeClass compiledMethodAt:sel asSymbol.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1735
                                                currentText := m source.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1736
                                                currentText notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1737
                                                    text asString = currentText asString ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1738
                                                        changeDelta := '='
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1739
                                                    ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1740
                                                        t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1741
                                                        t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1742
                                                        t1 = t2 ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1743
                                                            changeDelta := '='
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1744
                                                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1745
                                                    ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1746
                                                ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1747
                                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1748
                                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1749
                                    ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1750
                                    entry := MultiColListEntry new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1751
                                    entry tabulatorSpecification:tabSpec.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1752
                                    entry colAt:1 put:changeDelta.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1753
                                    entry colAt:2 put:changeString.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1754
                                    entry colAt:3 put:changeType.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1755
                                    timeStampInfo notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1756
                                        entry colAt:4 put:timeStampInfo.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1757
                                    ].    
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1758
                                    changeHeaderLines add:entry
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1759
                                ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1760
                                changeString := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1761
                                headerLine := nil.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1762
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1763
                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1764
                        ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1765
                        changeString notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1766
                            entry := MultiColListEntry new.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1767
                            entry tabulatorSpecification:tabSpec.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1768
                            entry colAt:1 put:changeDelta.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1769
                            entry colAt:2 put:changeString.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1770
                            entry colAt:3 put:changeType.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1771
                            timeStampInfo notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1772
                                entry colAt:4 put:timeStampInfo.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1773
                            ].    
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1774
                            changeHeaderLines add:entry
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1775
                        ] ifFalse:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1776
                            headerLine notNil ifTrue:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1777
                                changeHeaderLines add:headerLine
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1778
                            ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1779
                        ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1780
                    ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1781
                ]
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1782
            ].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1783
            changeClassNames := OrderedCollection new grow:(changeChunks size).
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1784
            anyChanges := false
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1785
        ] valueNowOrOnUnwindDo:[
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1786
            aStream close.
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1787
            inBackground ifTrue:[myProcess priority:myPriority].
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1788
        ].
133
claus
parents: 132
diff changeset
  1789
    ].
claus
parents: 132
diff changeset
  1790
claus
parents: 132
diff changeset
  1791
    self checkIfFileHasChanged
123
claus
parents: 120
diff changeset
  1792
1713
f6a93c02e953 also show '=' for method-removes (if non-existing in image);
Claus Gittinger <cg@exept.de>
parents: 1706
diff changeset
  1793
    "Modified: / 27.8.1995 / 23:06:55 / claus"
1726
37e8450c18ad checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1714
diff changeset
  1794
    "Modified: / 17.7.1998 / 11:10:07 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1795
!
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  1796
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1797
selectorOfMethodChange:changeNr
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1798
    "return a method-changes selector, or nil if its not a methodChange"
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1799
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1800
    |source parser sel|
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1801
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1802
    source := self sourceOfMethodChange:changeNr.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1803
    source isNil ifTrue:[^ nil].
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1804
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1805
    parser := Parser 
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1806
		parseMethod:source 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1807
		in:nil 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1808
		ignoreErrors:true 
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1809
		ignoreWarnings:true.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1810
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1811
    (parser notNil and:[parser ~~ #Error]) ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1812
	sel := parser selector.
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1813
    ].
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1814
    ^ sel
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1815
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1816
    "Created: 24.11.1995 / 14:30:46 / cg"
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1817
    "Modified: 5.9.1996 / 17:12:50 / cg"
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1818
!
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1819
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1820
setChangeList
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1821
    "extract type-information from changes and stuff into top selection
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1822
     view"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1823
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  1824
    changeListView setList:changeHeaderLines expandTabs:false redraw:false.
1649
95dad57b34f1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1648
diff changeset
  1825
    changeListView invalidate.
95dad57b34f1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1648
diff changeset
  1826
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1827
    "/ changeListView deselect.
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  1828
1649
95dad57b34f1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1648
diff changeset
  1829
    "Modified: / 18.5.1998 / 14:29:10 / cg"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1830
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1831
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1832
silentDeleteChange:changeNr
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1833
    "delete a change do not update changeListView"
57
36e13831b62d *** empty log message ***
claus
parents: 56
diff changeset
  1834
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1835
    anyChanges := true.
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1836
    changeChunks removeIndex:changeNr.
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1837
    changePositions removeIndex:changeNr.
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1838
    changeClassNames removeIndex:changeNr.
182
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1839
    changeHeaderLines removeIndex:changeNr.
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1840
    changeTimeStamps removeIndex:changeNr
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1841
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  1842
    "Modified: 18.11.1995 / 17:08:44 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1843
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1844
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1845
silentDeleteChangesFor:aClassName from:start to:stop
1428
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1846
    "delete changes for a given class in a range.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1847
     Return the number of deleted changes."
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1848
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1849
    |thisClassName index numDeleted|
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1850
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1851
    numDeleted := 0.
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1852
    index := stop.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1853
    [index >= start] whileTrue:[
1428
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1854
        thisClassName := self classNameOfChange:index.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1855
        thisClassName = aClassName ifTrue:[
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1856
            self silentDeleteChange:index.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1857
            numDeleted := numDeleted + 1.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1858
        ].
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1859
        index := index - 1
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1860
    ].
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  1861
    ^ numDeleted
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  1862
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1863
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1864
1070
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1865
silentDeleteInternalChange:changeNr
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1866
    "delete a change do not update changeListView"
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1867
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1868
    anyChanges := true.
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1869
    changeChunks removeIndex:changeNr.
1473
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  1870
    changePositions size >= changeNr ifTrue:[changePositions removeIndex:changeNr].
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  1871
    changeClassNames size >= changeNr ifTrue:[changeClassNames removeIndex:changeNr].
1496
978b3c3565c9 #silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents: 1473
diff changeset
  1872
    changeTimeStamps size >= changeNr ifTrue:[changeTimeStamps removeIndex:changeNr]
1473
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  1873
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  1874
    "Created: / 7.3.1997 / 16:28:32 / cg"
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  1875
    "Modified: / 7.2.1998 / 19:59:11 / cg"
1496
978b3c3565c9 #silentDeleteInternalChange: copy-paste error
Stefan Vogel <sv@exept.de>
parents: 1473
diff changeset
  1876
    "Modified: / 26.2.1998 / 18:20:48 / stefan"
1070
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1877
!
cdf5cf202f3b faster redraw, when deleting items.
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
  1878
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1879
sourceOfMethodChange:changeNr
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1880
    "return a method-changes source code, or nil if its not a methodChange."
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1881
742
2ef5e22d8983 code cleanup (unused vars eliminated)
Claus Gittinger <cg@exept.de>
parents: 724
diff changeset
  1882
    |aStream chunk sawExcla parseTree sourceChunk|
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1883
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1884
    aStream := self streamForChange:changeNr.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1885
    aStream isNil ifTrue:[^ nil].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1886
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1887
    (self changeIsFollowupMethodChange:changeNr) ifFalse:[
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1888
        sawExcla := aStream peekFor:(aStream class chunkSeparator).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1889
        chunk := aStream nextChunk.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1890
    ] ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1891
        chunk := (changeChunks at:changeNr).
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1892
        sawExcla := true.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1893
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1894
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1895
    sawExcla ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1896
        parseTree := Parser parseExpression:chunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1897
        (parseTree notNil and:[parseTree isMessage]) ifTrue:[
1788
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1898
            (#(#methodsFor: 
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1899
               #privateMethodsFor:
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1900
               #publicMethodsFor:
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1901
               #ignoredMethodsFor:
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1902
               #protectedMethodsFor:) 
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1903
            includes:parseTree selector) ifTrue:[
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1904
                sourceChunk := aStream nextChunk.
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1905
            ]
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1906
        ].
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1907
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1908
    aStream close.
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1909
    ^ sourceChunk
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1910
1472
6620dc742f2a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1471
diff changeset
  1911
    "Created: / 5.9.1996 / 17:11:32 / cg"
1788
4f2616466d68 fixed extract of className/selector for ignored methods,
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1912
    "Modified: / 3.8.1998 / 20:00:21 / cg"
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1913
!
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1914
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1915
streamForChange:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1916
    "answer a stream for change"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1917
 
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1918
    |aStream|
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1919
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1920
    (changeNr between:1 and:changePositions size) ifFalse:[^ nil].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1921
    aStream := FileStream readonlyFileNamed:changeFileName.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1922
    aStream isNil ifTrue:[^ nil].
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1923
    aStream position:(changePositions at:changeNr).
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1924
    ^ aStream
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1925
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1926
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1927
unselect
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1928
    "common unselect"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1929
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  1930
    changeListView setSelection:nil.
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  1931
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  1932
    "Modified: 25.5.1996 / 13:02:49 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1933
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1934
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1935
withSelectedChangeDo:aBlock
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1936
    "just a helper, check for a selected change and evaluate aBlock
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1937
     with busy cursor"
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1938
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1939
    |changeNr|
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1940
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1941
    changeNr := changeListView selection.
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1942
    changeNr notNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1943
	self withExecuteCursorDo:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1944
	    aBlock value:changeNr
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  1945
	]
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1946
    ]
294
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  1947
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  1948
    "Modified: 14.12.1995 / 20:58:45 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1949
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  1950
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1951
writeBackChanges
163
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1952
    "write back the changes file. To avoid problems when the disk is full
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1953
     or a crash occurs while writing (well, or someone kills us), 
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1954
     first write the stuff to a new temporary file. If this works ok,
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1955
     rename the old change-file to a .bak file and finally rename the
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1956
     tempfile back to the change-file. 
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1957
     That way, if anything happens, either the original file is left unchanged,
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1958
     or we have at least a backup of the previous change file."
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1959
1316
3fefcc2e9b16 mostly filename changes
Claus Gittinger <cg@exept.de>
parents: 1293
diff changeset
  1960
    |inStream outStream tempfile stamp f|
163
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1961
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1962
    editingClassSource ifTrue:[
1566
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1963
        (self confirm:'You are editing a classes sourceFile (not a changeFile) !!\\Are you certain, you want to overwrite it ?' withCRs)
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1964
        ifFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1965
            ^ false
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1966
        ]
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1967
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1968
163
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1969
    tempfile := Filename newTemporaryIn:nil.
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1970
    tempfile exists ifTrue:[tempfile remove].
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1971
3aa2b2e7db65 handle different change-file-name; use unique temporary filenames
Claus Gittinger <cg@exept.de>
parents: 133
diff changeset
  1972
    outStream := tempfile writeStream.
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1973
    outStream isNil ifTrue:[
1566
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1974
        self warn:'cannot create temporary file in current directory.'.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1975
        ^ false
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1976
    ].
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1977
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1978
    inStream := FileStream readonlyFileNamed:changeFileName.
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  1979
    inStream isNil ifTrue:[^ false].
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1980
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  1981
    self withCursor:(Cursor write) do:[
1566
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1982
        |excla sawExcla done first chunk
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1983
         nChanges "{Class:SmallInteger}" |
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1984
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1985
        Stream writeErrorSignal handle:[:ex |
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1986
            self warn:('could not update the changes file.\\' , ex errorString) withCRs.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1987
            tempfile exists ifTrue:[tempfile remove].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1988
            ^ false
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1989
        ] do:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1990
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1991
            excla := inStream class chunkSeparator.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1992
            nChanges := self numberOfChanges.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1993
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1994
            1 to:nChanges do:[:index |
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1995
                inStream position:(changePositions at:index).
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1996
                sawExcla := inStream peekFor:excla.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1997
                chunk := inStream nextChunk.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1998
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  1999
                (chunk notNil
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2000
                and:[(chunk startsWith:'''---- snap') not]) ifTrue:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2001
                    (stamp := changeTimeStamps at:index) notNil ifTrue:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2002
                        outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2003
                        outStream nextPut:excla; cr.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2004
                    ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2005
                ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2006
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2007
                sawExcla ifTrue:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2008
                    outStream nextPut:excla.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2009
                    outStream nextChunkPut:chunk.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2010
                    outStream cr; cr.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2011
                    "
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2012
                     a method-definition chunk - output followups
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2013
                    "
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2014
                    done := false.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2015
                    first := true.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2016
                    [done] whileFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2017
                        chunk := inStream nextChunk.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2018
                        chunk isNil ifTrue:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2019
                            outStream cr; cr.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2020
                            done := true
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2021
                        ] ifFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2022
                            chunk isEmpty ifTrue:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2023
                                outStream space; nextChunkPut:chunk; cr; cr.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2024
                                done := true.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2025
                            ] ifFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2026
                                first ifFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2027
                                    outStream cr; cr.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2028
                                ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2029
                                outStream nextChunkPut:chunk.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2030
                            ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2031
                        ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2032
                        first := false.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2033
                    ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2034
                ] ifFalse:[
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2035
                    outStream nextChunkPut:chunk.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2036
                    outStream cr
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2037
                ]
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2038
            ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2039
            outStream close.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2040
            inStream close.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2041
        ].
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2042
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2043
        f := changeFileName asFilename.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2044
        f renameTo:(f withSuffix:'bak').
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2045
        tempfile renameTo:changeFileName.
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2046
        anyChanges := false
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  2047
    ].
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  2048
    ^ true
182
0c2f9214d531 handle & display timestamp records
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
  2049
1566
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2050
    "Modified: / 2.12.1996 / 22:29:15 / stefan"
7a4ef80fb49b try to rewrite the changeFile in the same format as
Claus Gittinger <cg@exept.de>
parents: 1496
diff changeset
  2051
    "Modified: / 21.4.1998 / 17:50:11 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2052
! !
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2053
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2054
!ChangesBrowser methodsFor:'termination'!
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2055
1787
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2056
closeRequest
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2057
    "window manager wants us to go away"
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2058
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2059
    |action again|
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2060
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2061
    anyChanges ifTrue:[
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2062
        again := true.
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2063
        [again] whileTrue:[
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2064
            action := OptionBox 
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2065
                              request:(resources at:'changefile has not been updated from the modified changelist.\\Update before closing ?') withCRs
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2066
                              label:'ChangesBrowser'
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2067
                              form:(WarningBox iconBitmap)
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2068
                              buttonLabels:(resources array:#('cancel' 'don''t update' 'update'))
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2069
                              values:#(#abort #ignore #save)
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2070
                              default:#save.
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2071
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2072
            again := false.
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2073
            action == #abort ifTrue:[^ self].
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2074
            action  == #save ifTrue:[
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2075
                again := self writeBackChanges not
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2076
            ].
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2077
        ]
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2078
    ].
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2079
    super closeRequest
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2080
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2081
    "Modified: / 31.7.1997 / 18:29:06 / cg"
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2082
    "Created: / 3.8.1998 / 19:54:13 / cg"
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2083
!
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2084
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2085
destroy
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2086
    "destroy the receiver; make certain, that boxes are destroyed too"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2087
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2088
    Processor removeTimedBlock:checkBlock.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2089
    ObjectMemory removeDependent:self.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2090
    super destroy
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2091
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2092
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2093
saveAndTerminate
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2094
    "update the changes file and quit.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2095
     Dont depend on this being sent, not all window managers
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2096
     send it; instead, they simply destroy the view."
28
eea5a71a1e23 *** empty log message ***
claus
parents: 27
diff changeset
  2097
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2098
    anyChanges ifTrue:[
1787
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2099
        self writeBackChanges.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2100
    ].
1787
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2101
    super saveAndTerminate
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2102
d3d0266b35ec #terminate -> #closeRequest
Claus Gittinger <cg@exept.de>
parents: 1781
diff changeset
  2103
    "Modified: / 3.8.1998 / 19:54:00 / cg"
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2104
! !
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2105
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2106
!ChangesBrowser methodsFor:'user interaction'!
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2107
221
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2108
autoUpdate:aBoolean
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2109
    autoUpdate := aBoolean
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2110
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2111
    "Created: 3.12.1995 / 14:14:24 / cg"
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2112
    "Modified: 3.12.1995 / 14:20:45 / cg"
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2113
!
6c278b8ec6ca added autoUpdate
Claus Gittinger <cg@exept.de>
parents: 209
diff changeset
  2114
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2115
changeSelection:lineNr
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2116
    "show a change in the codeView"
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2117
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2118
    |aStream sawExcla chunk|
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2119
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2120
    aStream := self streamForChange:lineNr.
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2121
    aStream isNil ifTrue:[^ self].
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2122
    sawExcla := aStream peekFor:(aStream class chunkSeparator).
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2123
    chunk := aStream nextChunk.
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2124
    sawExcla ifTrue:[
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2125
	chunk := aStream nextChunk
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2126
    ].
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2127
    aStream close.
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2128
    codeView contents:chunk.
13
145a9461122e *** empty log message ***
claus
parents: 6
diff changeset
  2129
    codeView acceptAction:[:theCode | self doApply "noChangesAllowed"].
15
7fc8fcef7bc6 *** empty log message ***
claus
parents: 13
diff changeset
  2130
    changeNrShown := lineNr.
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2131
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2132
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2133
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2134
doApply
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2135
    "user wants a change to be applied"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2136
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2137
    self withSelectedChangeDo:[:changeNr |
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2138
	skipSignal := nil.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2139
	self applyChange:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2140
	self autoSelect:(changeNr + 1)
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2141
    ]
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2142
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2143
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2144
doApplyAll
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2145
    "user wants all changes to be applied"
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2146
294
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  2147
    self withExecuteCursorDo:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2148
	|lastNr "{ Class: SmallInteger }" |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2149
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2150
	self clearCodeView.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2151
	skipSignal isNil ifTrue:[skipSignal := Signal new].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2152
	lastNr := self numberOfChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2153
	1 to:lastNr do:[:changeNr |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2154
	    changeListView setSelection:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2155
	    self applyChange:changeNr
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2156
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2157
	self autoSelectLast
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2158
    ]
294
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  2159
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2160
    "Modified: 21.1.1997 / 22:26:30 / cg"
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2161
!
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2162
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2163
doApplyClassRest
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2164
    "user wants all changes for this class from changeNr to be applied"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2165
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2166
    self withSelectedChangeDo:[:changeNr |
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2167
	|thisClassName classNameToApply lastChange
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2168
	 lastNr "{ Class: SmallInteger }" |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2169
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2170
	classNameToApply := self classNameOfChange:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2171
	classNameToApply notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2172
	    self clearCodeView.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2173
	    skipSignal isNil ifTrue:[skipSignal := Signal new].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2174
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2175
	    lastNr := self numberOfChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2176
	    changeNr to:lastNr do:[:changeNr |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2177
		thisClassName := self classNameOfChange:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2178
		thisClassName = classNameToApply ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2179
		    changeListView setSelection:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2180
		    self applyChange:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2181
		    lastChange := changeNr
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2182
		].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2183
	    ].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2184
	    self autoSelect:lastChange.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2185
	]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2186
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2187
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2188
    "Modified: 21.1.1997 / 22:26:04 / cg"
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2189
!
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2190
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2191
doApplyRest
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2192
    "user wants all changes from changeNr to be applied"
28
eea5a71a1e23 *** empty log message ***
claus
parents: 27
diff changeset
  2193
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2194
    self withSelectedChangeDo:[:changeNr |
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2195
	|lastNr "{ Class: SmallInteger }" |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2196
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2197
	self clearCodeView.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2198
	skipSignal isNil ifTrue:[skipSignal := Signal new].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2199
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2200
	lastNr := self numberOfChanges.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2201
	changeNr to:lastNr do:[:changeNr |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2202
	    changeListView setSelection:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2203
	    self applyChange:changeNr
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2204
	].
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2205
	self autoSelect:self numberOfChanges.
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2206
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2207
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2208
    "Modified: 21.1.1997 / 22:25:29 / cg"
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2209
!
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2210
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2211
doBrowse
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2212
    "user wants a browser on the class of a change"
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2213
241
9366ced0db42 doBrowse was wrong for class-methods
Claus Gittinger <cg@exept.de>
parents: 226
diff changeset
  2214
    |changeNr className cls isMeta|
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2215
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2216
    changeNr := changeListView selection.
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2217
    changeNr notNil ifTrue:[
1781
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2218
        className := self fullClassNameOfChange:changeNr.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2219
        className notNil ifTrue:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2220
            isMeta := false.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2221
            (className endsWith:' class') ifTrue:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2222
                className := className copyWithoutLast:6.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2223
                isMeta := true.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2224
            ].
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2225
            (cls := Smalltalk classNamed:className) notNil ifTrue:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2226
                isMeta ifTrue:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2227
                    cls := cls class
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2228
                ].
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2229
                SystemBrowser 
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2230
                    openInClass:cls 
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2231
                    selector:(self selectorOfMethodChange:changeNr)
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2232
            ] ifFalse:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2233
                self warn:'class not found: ''' , className , ''''.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2234
            ]
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2235
        ] ifFalse:[
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2236
            self warn:'could not extract classname from change'.
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2237
        ]
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2238
    ]
209
dc43fdd0aadf browse-menu function opens browser in selected method
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  2239
1781
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2240
    "Created: / 24.11.1995 / 23:13:24 / cg"
f1e06a41b1ac show a warning if browse fails.
Claus Gittinger <cg@exept.de>
parents: 1726
diff changeset
  2241
    "Modified: / 31.7.1998 / 20:17:42 / cg"
37
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2242
!
50f59bad66b1 *** empty log message ***
claus
parents: 33
diff changeset
  2243
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2244
doCompare
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2245
    "compare change with current system version
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2246
     - give a note in transcript"
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2247
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2248
    |changeNr|
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2249
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2250
    changeNr := changeListView selection.
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2251
    changeNr notNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2252
	self withExecuteCursorDo:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2253
	    self compareChange:changeNr
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2254
	]
394
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
  2255
    ].
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
  2256
    self newLabel:''
294
a693bd6d7ae6 read cursor while reading
Claus Gittinger <cg@exept.de>
parents: 293
diff changeset
  2257
394
1d19a14fc96e show activity notifiactions
Claus Gittinger <cg@exept.de>
parents: 392
diff changeset
  2258
    "Modified: 24.2.1996 / 19:37:19 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2259
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2260
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2261
doCompress
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2262
    "compress the change-set; this replaces multiple method-changes by the last 
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2263
     (i.e. the most recent) change"
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2264
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2265
    self compressForClass:nil
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2266
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2267
    "Modified: / 29.10.1997 / 01:03:26 / cg"
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2268
!
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2269
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2270
doCompressClass
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2271
    "compress changes for the selected class.
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2272
     this replaces multiple method-changes by the last (i.e. the most recent) change."
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2273
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2274
    self withSelectedChangeDo:[:changeNr |
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2275
	| classNameToCompress |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2276
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2277
	classNameToCompress := self classNameOfChange:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2278
	classNameToCompress notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2279
	    self compressForClass:classNameToCompress.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2280
	]
1359
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2281
    ]
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2282
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2283
    "Created: / 29.10.1997 / 01:05:16 / cg"
17bc3051f5d7 added #compressForClass
Claus Gittinger <cg@exept.de>
parents: 1321
diff changeset
  2284
    "Modified: / 29.10.1997 / 01:06:22 / cg"
45
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2285
!
950b84ba89e6 *** empty log message ***
claus
parents: 37
diff changeset
  2286
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2287
doDelete
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2288
    "delete currently selected change"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2289
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2290
    |changeNr|
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2291
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2292
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2293
    changeNr notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2294
	self deleteChange:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2295
	self autoSelectOrEnd:changeNr
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2296
    ]
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2297
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2298
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2299
doDeleteClassAll
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2300
    "delete all changes with same class as currently selected change"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2301
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2302
    self withSelectedChangeDo:[:changeNr |
1428
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2303
        |classNameToDelete numDeletedBefore|
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2304
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2305
        classNameToDelete := self classNameOfChange:changeNr.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2306
        classNameToDelete notNil ifTrue:[
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2307
            changeListView setSelection:nil.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2308
            self silentDeleteChangesFor:classNameToDelete
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2309
                                   from:changeNr
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2310
                                     to:(self numberOfChanges).
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2311
            numDeletedBefore := self 
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2312
                                   silentDeleteChangesFor:classNameToDelete
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2313
                                   from:1
1431
f4900d4f0c06 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1428
diff changeset
  2314
                                   to:(changeNr-1).
1428
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2315
            self setChangeList. 
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2316
            self autoSelectOrEnd:(changeNr - numDeletedBefore)
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2317
        ]
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2318
    ]
286
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2319
1431
f4900d4f0c06 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1428
diff changeset
  2320
    "Created: / 13.12.1995 / 16:07:14 / cg"
f4900d4f0c06 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1428
diff changeset
  2321
    "Modified: / 28.1.1998 / 20:42:14 / cg"
286
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2322
!
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2323
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2324
doDeleteClassFromBeginning
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2325
    "delete changes with same class as currently selected change from the beginning
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2326
     up to the selected change.
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2327
     Useful to get rid of obsolete changes before a fileout or checkin entry."
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2328
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2329
    self withSelectedChangeDo:[:changeNr |
1428
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2330
        |classNameToDelete prevSelection numDeleted|
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2331
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2332
        classNameToDelete := self classNameOfChange:changeNr.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2333
        classNameToDelete notNil ifTrue:[
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2334
            prevSelection := changeNr.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2335
            changeListView setSelection:nil.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2336
            numDeleted := self 
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2337
                                silentDeleteChangesFor:classNameToDelete 
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2338
                                from:1 
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2339
                                to:changeNr.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2340
            self setChangeList.
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2341
            self autoSelectOrEnd:(changeNr + 1 - numDeleted)
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2342
        ]
180d03d00db4 fixed selection after deleting a bunch of changes
Claus Gittinger <cg@exept.de>
parents: 1427
diff changeset
  2343
    ].
286
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2344
96d31200b0c1 added delete-for-class-from-beginning; ignore timestamps for fileOut/checkin/snapshot entries
Claus Gittinger <cg@exept.de>
parents: 276
diff changeset
  2345
    "Created: 13.12.1995 / 15:41:58 / cg"
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2346
    "Modified: 25.5.1996 / 12:26:34 / cg"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2347
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2348
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2349
doDeleteClassRest
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2350
    "delete rest of changes with same class as currently selected change"
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2351
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2352
    self withSelectedChangeDo:[:changeNr |
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2353
        | classNameToDelete |
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2354
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2355
        classNameToDelete := self classNameOfChange:changeNr.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2356
        classNameToDelete notNil ifTrue:[
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2357
            changeListView setSelection:nil.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2358
            self silentDeleteChangesFor:classNameToDelete 
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2359
                                   from:changeNr
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2360
                                     to:(self numberOfChanges).
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2361
            self setChangeList.
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2362
            self autoSelectOrEnd:changeNr
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2363
        ]
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2364
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2365
1648
db1ca601ad8c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1625
diff changeset
  2366
    "Modified: / 18.5.1998 / 14:25:07 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2367
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2368
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2369
doDeleteRest
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2370
    "delete all changes from current to the end"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2371
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2372
    |changeNr|
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2373
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2374
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2375
    changeNr notNil ifTrue:[
223
d451e2badbd1 fixed handling of primitive def/var/function changes
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
  2376
	self deleteChangesFrom:changeNr to:(self numberOfChanges).
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2377
	self clearCodeView.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2378
	self autoSelectOrEnd:changeNr-1
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2379
    ]
132
claus
parents: 126
diff changeset
  2380
!
claus
parents: 126
diff changeset
  2381
claus
parents: 126
diff changeset
  2382
doFileoutAndDeleteClassAll
claus
parents: 126
diff changeset
  2383
    "first fileOut the selected changes class then delete all changes
claus
parents: 126
diff changeset
  2384
     for it."
claus
parents: 126
diff changeset
  2385
claus
parents: 126
diff changeset
  2386
    self withSelectedChangeDo:[:changeNr |
claus
parents: 126
diff changeset
  2387
	| className class |
claus
parents: 126
diff changeset
  2388
claus
parents: 126
diff changeset
  2389
	className := self classNameOfChange:changeNr.
claus
parents: 126
diff changeset
  2390
	className notNil ifTrue:[
claus
parents: 126
diff changeset
  2391
	    class := Smalltalk classNamed:className.
claus
parents: 126
diff changeset
  2392
	    class notNil ifTrue:[
claus
parents: 126
diff changeset
  2393
		Class fileOutErrorSignal handle:[:ex |
claus
parents: 126
diff changeset
  2394
		    self warn:('fileout failed: ' , ex errorString).
claus
parents: 126
diff changeset
  2395
		] do:[
claus
parents: 126
diff changeset
  2396
		    class fileOut.
claus
parents: 126
diff changeset
  2397
		    self doDeleteClassAll
claus
parents: 126
diff changeset
  2398
		].
claus
parents: 126
diff changeset
  2399
	    ].
claus
parents: 126
diff changeset
  2400
claus
parents: 126
diff changeset
  2401
	].
claus
parents: 126
diff changeset
  2402
    ]
claus
parents: 126
diff changeset
  2403
claus
parents: 126
diff changeset
  2404
    "Modified: 6.9.1995 / 17:11:16 / claus"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2405
!
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2406
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2407
doMakePatch
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2408
    "user wants a change to be made a patch
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2409
     - copy it over to the patches file"
89
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  2410
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2411
    |changeNr|
89
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  2412
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2413
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2414
    changeNr notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2415
	self makeChangeAPatch:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2416
	self autoSelect:(changeNr + 1)
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2417
    ]
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2418
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2419
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2420
doMakePermanent
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2421
    "user wants a change to be made permanent
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2422
     - rewrite the source file where this change has to go"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2423
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2424
    |yesNoBox|
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2425
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2426
    yesNoBox := YesNoBox new.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2427
    yesNoBox title:(resources at:'Warning: this operation cannot be undone').
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2428
    yesNoBox okText:(resources at:'continue') noText:(resources at:'abort').
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2429
    yesNoBox okAction:[   |changeNr|
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2430
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2431
			  changeNr := changeListView selection.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2432
			  changeNr notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2433
			      self makeChangePermanent:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2434
			      self autoSelect:(changeNr + 1)
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2435
			  ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2436
		      ].
917
72349fe1f8ee destroy box after use
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  2437
    yesNoBox showAtPointer.
72349fe1f8ee destroy box after use
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  2438
    yesNoBox destroy
72349fe1f8ee destroy box after use
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  2439
72349fe1f8ee destroy box after use
Claus Gittinger <cg@exept.de>
parents: 911
diff changeset
  2440
    "Modified: 7.1.1997 / 23:03:33 / cg"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2441
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2442
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2443
doSave
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2444
    "user wants a change to be appended to a file"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2445
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2446
    |changeNr fileName|
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2447
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2448
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2449
    changeNr notNil ifTrue:[
1473
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2450
        fileName := Dialog
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2451
                        requestFileName:'append change to:'
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2452
                        default:''
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2453
                        ok:'append'
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2454
                        abort:'abort'
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2455
                        pattern:'*.chg'.
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2456
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2457
        fileName notNil ifTrue:[
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2458
            self withCursor:(Cursor write) do:[
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2459
                self appendChange:changeNr toFile:fileName.
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2460
            ].
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2461
            self autoSelect:(changeNr + 1)
160652b05e38 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1472
diff changeset
  2462
        ].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2463
    ]
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2464
!
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2465
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2466
doSaveClass
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2467
    "user wants changes for some class from current to end to be appended to a file"
89
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  2468
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2469
    self doSaveClassFrom:1
89
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  2470
!
43ca5e534f5e *** empty log message ***
claus
parents: 81
diff changeset
  2471
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2472
doSaveClassAll
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2473
    "user wants changes for some class from current to end to be appended to a file"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2474
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2475
    self doSaveClassFrom:1
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2476
!
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2477
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2478
doSaveClassFrom:startNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2479
    "user wants changes from current to end to be appended to a file"
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2480
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2481
    |changeNr classNameToSave|
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2482
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2483
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2484
    changeNr notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2485
	classNameToSave := self classNameOfChange:changeNr.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2486
	classNameToSave notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2487
	    self saveClass:classNameToSave from:startNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2488
	]
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2489
    ]
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2490
!
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2491
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2492
doSaveClassRest
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2493
    "user wants changes for some class from current to end to be appended to a file"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2494
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2495
    |changeNr|
132
claus
parents: 126
diff changeset
  2496
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2497
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2498
    changeNr notNil ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2499
	self doSaveClassFrom:changeNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2500
    ]
81
b3b4d34c5ada *** empty log message ***
claus
parents: 77
diff changeset
  2501
!
b3b4d34c5ada *** empty log message ***
claus
parents: 77
diff changeset
  2502
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2503
doSaveRest
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2504
    "user wants changes from current to end to be appended to a file"
73
e332d9c71624 *** empty log message ***
claus
parents: 68
diff changeset
  2505
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2506
    |changeNr fileName|
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2507
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2508
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2509
    changeNr notNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2510
	fileName := Dialog
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2511
			requestFileName:'append changes to:'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2512
			default:''
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2513
			ok:'append'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2514
			abort:'abort'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2515
			pattern:'*.chg'.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2516
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2517
	fileName notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2518
	    self withCursor:(Cursor write) do:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2519
		changeNr to:(self numberOfChanges) do:[:changeNr |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2520
		    changeListView setSelection:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2521
		    (self appendChange:changeNr toFile:fileName) ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2522
			^ self
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2523
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2524
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2525
	    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2526
	].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2527
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2528
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2529
    "Modified: 25.5.1996 / 12:26:41 / cg"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2530
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2531
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2532
doUpdate
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2533
    "reread the changes-file"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2534
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2535
    self readChangesFileInBackground:true.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2536
    realized ifTrue:[
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2537
	self setChangeList.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2538
    ]
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2539
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2540
!
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2541
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2542
doWriteBack
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2543
    "write back the list onto the changes file"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2544
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2545
    anyChanges ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2546
	(self writeBackChanges) ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2547
	    realized ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2548
		self readChangesFileInBackground:false.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2549
		realized ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2550
		    self setChangeList
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2551
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2552
	    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2553
	]
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2554
    ]
703
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  2555
1b3b008d9f19 fixed to allow class-source files to be handled
Claus Gittinger <cg@exept.de>
parents: 627
diff changeset
  2556
    "Modified: 5.9.1996 / 17:19:46 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2557
!
126
claus
parents: 123
diff changeset
  2558
1471
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2559
doubleClickOnChange:lineNr
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2560
    self doBrowse
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2561
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2562
    "Created: / 6.2.1998 / 13:08:49 / cg"
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2563
!
f73ed23816d4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1470
diff changeset
  2564
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2565
findClass
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2566
    |nm current savedCursor search|
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2567
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2568
    lastSearchType := #class.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2569
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2570
    changeNrShown notNil ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2571
        current := self classNameOfChange:changeNrShown.
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2572
    ].
1275
b370370cf48c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
  2573
    nm := Dialog 
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2574
            request:'class to search for:' 
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2575
            initialAnswer:current
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2576
            onCancel:nil.
1275
b370370cf48c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
  2577
    nm isNil ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2578
        ^ self
1275
b370370cf48c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
  2579
    ].
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2580
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2581
    changeNrShown isNil ifTrue:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2582
        search := 1.
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2583
    ] ifFalse:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2584
        search := changeNrShown + 1
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2585
    ].
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2586
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2587
    self withCursor:Cursor questionMark do:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2588
        |lastNr nr thisClass |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2589
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2590
        lastNr := self numberOfChanges.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2591
        nr := search.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2592
        [nr <= lastNr] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2593
            thisClass := self classNameOfChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2594
            (thisClass = nm
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2595
            or:[nm includesMatchCharacters and:[nm match:thisClass]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2596
                changeListView setSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2597
                self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2598
                ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2599
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2600
            nr := nr + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2601
        ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2602
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2603
    self beep.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2604
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2605
    savedCursor := cursor.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2606
    self cursor:(Cursor cross).
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2607
    Delay waitForMilliseconds:300.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2608
    self cursor:savedCursor
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2609
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2610
    "Created: / 8.4.1997 / 11:00:16 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2611
    "Modified: / 18.4.1997 / 12:47:52 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2612
    "Modified: / 18.6.1998 / 22:27:33 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2613
!
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2614
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2615
findNext
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2616
    lastSearchType == #selector ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2617
        ^ self findNextForSelector
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2618
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2619
    ^ self findNextForClass
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2620
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2621
    "Created: / 18.6.1998 / 22:15:00 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2622
    "Modified: / 18.6.1998 / 22:15:25 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2623
!
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2624
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2625
findNextForClass
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2626
    |savedCursor|
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2627
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2628
    lastSearchType := #class.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2629
    changeNrShown isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2630
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2631
    self withCursor:Cursor questionMark do:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2632
        |lastNr cls nr thisClass |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2633
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2634
        cls := self classNameOfChange:changeNrShown.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2635
        cls isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2636
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2637
        lastNr := self numberOfChanges.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2638
        nr := changeNrShown + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2639
        [nr <= lastNr] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2640
            thisClass := self classNameOfChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2641
            (thisClass = cls
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2642
            or:[cls includesMatchCharacters and:[cls match:thisClass]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2643
                changeListView setSelection:nr .
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2644
                self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2645
                ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2646
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2647
            nr := nr + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2648
        ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2649
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2650
    self beep.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2651
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2652
    savedCursor := cursor.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2653
    self cursor:(Cursor cross).
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2654
    Delay waitForMilliseconds:300.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2655
    self cursor:savedCursor
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2656
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2657
    "Created: / 21.1.1997 / 22:28:07 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2658
    "Modified: / 18.4.1997 / 12:48:18 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2659
    "Modified: / 18.6.1998 / 22:29:40 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2660
!
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2661
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2662
findNextForSelector
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2663
    |savedCursor|
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2664
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2665
    lastSearchType := #selector.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2666
    changeNrShown isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2667
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2668
    self withCursor:Cursor questionMark do:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2669
        |lastNr sel nr thisSelector |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2670
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2671
        sel := self selectorOfMethodChange:changeNrShown.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2672
        sel isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2673
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2674
        lastNr := self numberOfChanges.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2675
        nr := changeNrShown + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2676
        [nr <= lastNr] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2677
            thisSelector := self classNameOfChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2678
            (thisSelector = sel
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2679
            or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2680
                changeListView setSelection:nr .
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2681
                self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2682
                ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2683
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2684
            nr := nr + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2685
        ].
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2686
    ].
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2687
    self beep.
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2688
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2689
    savedCursor := cursor.
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2690
    self cursor:(Cursor cross).
1150
fc05bbed9e43 Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents: 1127
diff changeset
  2691
    Delay waitForMilliseconds:300.
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2692
    self cursor:savedCursor
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2693
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2694
    "Modified: / 18.4.1997 / 12:48:18 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2695
    "Created: / 18.6.1998 / 22:17:37 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2696
    "Modified: / 18.6.1998 / 22:29:33 / cg"
1127
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2697
!
32383ecaebe4 added alt-S for search
Claus Gittinger <cg@exept.de>
parents: 1109
diff changeset
  2698
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2699
findNextSnapshot
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2700
    |savedCursor|
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2701
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2702
    changeNrShown isNil ifTrue:[^ self].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2703
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2704
    self withCursor:Cursor questionMark do:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2705
        |cls nr lastNr words chunk|
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2706
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2707
        Object userInterruptSignal handle:[:ex |
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2708
            self beep.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2709
            ^ self
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2710
        ] do:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2711
            lastNr := self numberOfChanges.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2712
            nr := changeNrShown + 1.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2713
            [nr <= lastNr] whileTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2714
                "
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2715
                 get the chunk
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2716
                "
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2717
                chunk := changeChunks at:nr.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2718
                chunk isNil ifTrue:[^ nil].       "mhmh - empty"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2719
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2720
                (chunk startsWith:'''---') ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2721
                    words := chunk asCollectionOfWords.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2722
                    words size > 2 ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2723
                        (words at:2) = 'snapshot' ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2724
                            changeListView setSelection:nr .
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2725
                            self changeSelection:nr.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2726
                            ^ self
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2727
                        ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2728
                    ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2729
                ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2730
                nr := nr + 1.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2731
            ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2732
        ]
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2733
    ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2734
    self beep.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2735
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2736
    savedCursor := cursor.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2737
    self cursor:(Cursor cross).
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2738
    Delay waitForMilliseconds:300.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2739
    self cursor:savedCursor
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2740
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2741
    "Modified: / 18.4.1997 / 12:48:41 / stefan"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2742
    "Created: / 22.8.1998 / 15:58:49 / cg"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2743
    "Modified: / 22.8.1998 / 15:59:38 / cg"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2744
!
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2745
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2746
findPrevious
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2747
    lastSearchType == #selector ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2748
        ^ self findPreviousForSelector
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2749
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2750
    ^ self findPreviousForClass
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2751
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2752
    "Created: / 18.6.1998 / 22:15:15 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2753
!
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2754
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2755
findPreviousForClass
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2756
    |savedCursor|
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2757
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2758
    lastSearchType := #class.
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2759
    changeNrShown isNil ifTrue:[^ self].
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2760
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2761
    self withCursor:Cursor questionMark do:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2762
        |cls nr thisClass |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2763
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2764
        Object userInterruptSignal handle:[:ex |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2765
            self beep.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2766
            ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2767
        ] do:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2768
            cls := self classNameOfChange:changeNrShown.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2769
            cls isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2770
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2771
            nr := changeNrShown - 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2772
            [nr >= 1] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2773
                thisClass := self classNameOfChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2774
                (thisClass = cls
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2775
                or:[cls includesMatchCharacters and:[cls match:thisClass]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2776
                    changeListView setSelection:nr .
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2777
                    self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2778
                    ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2779
                ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2780
                nr := nr - 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2781
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2782
        ]
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2783
    ].
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2784
    self beep.
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2785
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2786
    savedCursor := cursor.
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2787
    self cursor:(Cursor cross).
1150
fc05bbed9e43 Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents: 1127
diff changeset
  2788
    Delay waitForMilliseconds:300.
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2789
    self cursor:savedCursor
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2790
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2791
    "Modified: / 18.4.1997 / 12:48:41 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2792
    "Modified: / 18.6.1998 / 22:29:44 / cg"
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2793
!
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2794
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2795
findPreviousForSelector
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2796
    |savedCursor|
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2797
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2798
    lastSearchType := #selector.
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2799
    changeNrShown isNil ifTrue:[^ self].
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2800
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2801
    self withCursor:Cursor questionMark do:[
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2802
        |sel nr thisSelector |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2803
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2804
        Object userInterruptSignal handle:[:ex |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2805
            self beep.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2806
            ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2807
        ] do:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2808
            sel := self selectorOfMethodChange:changeNrShown.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2809
            sel isNil ifTrue:[^ self].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2810
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2811
            nr := changeNrShown - 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2812
            [nr >= 1] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2813
                thisSelector := self selectorOfMethodChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2814
                (thisSelector = sel
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2815
                or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2816
                    changeListView setSelection:nr .
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2817
                    self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2818
                    ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2819
                ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2820
                nr := nr - 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2821
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2822
        ]
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2823
    ].
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2824
    self beep.
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2825
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2826
    savedCursor := cursor.
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2827
    self cursor:(Cursor cross).
1150
fc05bbed9e43 Use 'Delay' instead of Process waitForMilliseconds:
Stefan Vogel <sv@exept.de>
parents: 1127
diff changeset
  2828
    Delay waitForMilliseconds:300.
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2829
    self cursor:savedCursor
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2830
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2831
    "Modified: / 18.4.1997 / 12:48:41 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2832
    "Created: / 18.6.1998 / 22:18:19 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2833
    "Modified: / 18.6.1998 / 22:29:29 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2834
!
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2835
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2836
findPreviousSnapshot
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2837
    |savedCursor|
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2838
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2839
    changeNrShown isNil ifTrue:[^ self].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2840
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2841
    self withCursor:Cursor questionMark do:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2842
        |cls nr words chunk|
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2843
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2844
        Object userInterruptSignal handle:[:ex |
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2845
            self beep.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2846
            ^ self
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2847
        ] do:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2848
            nr := changeNrShown - 1.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2849
            [nr >= 1] whileTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2850
                "
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2851
                 get the chunk
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2852
                "
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2853
                chunk := changeChunks at:nr.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2854
                chunk isNil ifTrue:[^ nil].       "mhmh - empty"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2855
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2856
                (chunk startsWith:'''---') ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2857
                    words := chunk asCollectionOfWords.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2858
                    words size > 2 ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2859
                        (words at:2) = 'snapshot' ifTrue:[
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2860
                            changeListView setSelection:nr .
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2861
                            self changeSelection:nr.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2862
                            ^ self
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2863
                        ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2864
                    ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2865
                ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2866
                nr := nr - 1.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2867
            ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2868
        ]
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2869
    ].
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2870
    self beep.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2871
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2872
    savedCursor := cursor.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2873
    self cursor:(Cursor cross).
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2874
    Delay waitForMilliseconds:300.
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2875
    self cursor:savedCursor
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2876
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2877
    "Modified: / 18.4.1997 / 12:48:41 / stefan"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2878
    "Modified: / 18.6.1998 / 22:29:44 / cg"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2879
    "Created: / 22.8.1998 / 15:57:34 / cg"
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2880
!
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2881
1706
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2882
findSelector
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2883
    |sel current savedCursor search|
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2884
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2885
    lastSearchType := #selector.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2886
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2887
    changeNrShown notNil ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2888
        current := self selectorOfMethodChange:changeNrShown.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2889
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2890
    sel := Dialog 
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2891
            request:'selector to search for:' 
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2892
            initialAnswer:current
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2893
            onCancel:nil.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2894
    sel isNil ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2895
        ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2896
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2897
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2898
    changeNrShown isNil ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2899
        search := 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2900
    ] ifFalse:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2901
        search := changeNrShown + 1
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2902
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2903
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2904
    self withCursor:Cursor questionMark do:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2905
        |lastNr cls nr thisSelector |
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2906
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2907
        lastNr := self numberOfChanges.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2908
        nr := search.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2909
        [nr <= lastNr] whileTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2910
            thisSelector := self selectorOfMethodChange:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2911
            (thisSelector = sel
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2912
            or:[sel includesMatchCharacters and:[sel match:thisSelector]]) ifTrue:[
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2913
                changeListView setSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2914
                self changeSelection:nr.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2915
                ^ self
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2916
            ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2917
            nr := nr + 1.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2918
        ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2919
    ].
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2920
    self beep.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2921
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2922
    savedCursor := cursor.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2923
    self cursor:(Cursor cross).
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2924
    Delay waitForMilliseconds:300.
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2925
    self cursor:savedCursor
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2926
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2927
    "Modified: / 18.4.1997 / 12:47:52 / stefan"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2928
    "Created: / 18.6.1998 / 22:17:04 / cg"
dd888c645873 added more search functions and a control-menu.
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  2929
    "Modified: / 18.6.1998 / 22:27:44 / cg"
975
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2930
!
41a41f54874d added findPrev (Alt-B) and findNext (Alt-F)
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  2931
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2932
noChangesAllowed
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2933
    "show a warning that changes cannot be changed"
93
claus
parents: 92
diff changeset
  2934
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2935
    self warn:'changes are not allowed to be changed'
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2936
!
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2937
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2938
saveClass:aClassName from:startNr
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2939
    "user wants changes from current to end to be appended to a file"
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2940
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2941
    |changeNr fileName|
51
57c1ccc3d7e0 *** empty log message ***
claus
parents: 50
diff changeset
  2942
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2943
    changeNr := changeListView selection.
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2944
    changeNr notNil ifTrue:[
1378
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2945
	fileName := Dialog
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2946
			requestFileName:'append changes for class to:'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2947
			default:''
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2948
			ok:'append'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2949
			abort:'abort'
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2950
			pattern:'*.chg'.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2951
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2952
	fileName notNil ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2953
	    self withCursor:(Cursor write) do:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2954
		startNr to:(self numberOfChanges) do:[:changeNr |
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2955
		    |thisClassName|
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2956
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2957
		    thisClassName := self classNameOfChange:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2958
		    thisClassName = aClassName ifTrue:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2959
			changeListView setSelection:changeNr.
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2960
			(self appendChange:changeNr toFile:fileName) ifFalse:[
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2961
			    ^ self
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2962
			]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2963
		    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2964
		]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2965
	    ]
f7cf4cf1baf2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1368
diff changeset
  2966
	].
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2967
    ]
562
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2968
8f772068fd1a #selection: now does a notification / #setSelection: does not
Claus Gittinger <cg@exept.de>
parents: 553
diff changeset
  2969
    "Modified: 25.5.1996 / 12:26:44 / cg"
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2970
! !
0
571fd5eee315 Initial revision
claus
parents:
diff changeset
  2971
761
5c2b46a38efa checkin from browser
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  2972
!ChangesBrowser class methodsFor:'documentation'!
202
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2973
468378999911 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  2974
version
1848
61054ff3d470 added find prev/next snapshot to search menu
Claus Gittinger <cg@exept.de>
parents: 1833
diff changeset
  2975
    ^ '$Header: /cvs/stx/stx/libtool/ChangesBrowser.st,v 1.146 1998-08-24 12:35:47 cg Exp $'
276
017219e571e4 more stuff for autoloaded classes
Claus Gittinger <cg@exept.de>
parents: 275
diff changeset
  2976
! !