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