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