NewChangesBrowser.st
author Claus Gittinger <cg@exept.de>
Mon, 18 May 1998 13:19:54 +0200
changeset 1647 44936f6d17ed
parent 1644 16586a2c52b2
child 1650 c0c3fb153fc7
permissions -rw-r--r--
geometry
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     1
ToolApplicationModel subclass:#NewChangesBrowser
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
     2
	instanceVariableNames:'changes changeFileName skipSignal changeFileTimestamp
ffea21e237ed revised
tz
parents: 1545
diff changeset
     3
		autoUpdateBlock filterCompletionBlock editingClassSource modified'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     4
	classVariableNames:'AutoUpdate CompressSnapshotInfo CategoryColumn DeltaInfoColumn
1568
b37202441764 revised
tz
parents: 1556
diff changeset
     5
		TypeColumn TimeStampColumn PositionsColumn PrivateAsSeparate'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     6
	poolDictionaries:''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     7
	category:'Interface-Browsers'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     8
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
     9
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    10
Object subclass:#Change
1568
b37202441764 revised
tz
parents: 1556
diff changeset
    11
	instanceVariableNames:'delta string type timeStamp category chunk lastPosition position
b37202441764 revised
tz
parents: 1556
diff changeset
    12
		className followUp'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    13
	classVariableNames:''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    14
	poolDictionaries:''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    15
	privateIn:NewChangesBrowser
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    16
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    17
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    18
!NewChangesBrowser class methodsFor:'documentation'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    19
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    20
documentation
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    21
"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    22
    The future Changes Browser.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    23
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    24
    [start with:]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    25
        NewChangesBrowser open
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    26
        NewChangesBrowser openOnFile:aFileName
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    27
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    28
    [author:]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    29
        Thomas Zwick, eXept Software AG
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    30
"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    31
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    32
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    33
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    34
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    35
!NewChangesBrowser class methodsFor:'instance creation'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    36
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    37
openOnFile:aFileName
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
    38
    "opens a Changes Browser with the changes of the aFileName"
ffea21e237ed revised
tz
parents: 1545
diff changeset
    39
ffea21e237ed revised
tz
parents: 1545
diff changeset
    40
    ^self new 
ffea21e237ed revised
tz
parents: 1545
diff changeset
    41
        changeFileName:aFileName;
ffea21e237ed revised
tz
parents: 1545
diff changeset
    42
        open
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    43
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    44
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    45
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    46
!NewChangesBrowser class methodsFor:'accessing'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    47
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    48
autoSelectNext
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
    49
    "returns true here, makes a Delete operation automatically
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    50
     select the next change"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    51
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    52
    ^ true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    53
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    54
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    55
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    56
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    57
label
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
    58
    "returns my label"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    59
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    60
    ^'Changes Browser'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    61
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    62
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    63
!NewChangesBrowser class methodsFor:'help specs'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    64
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    65
helpSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    66
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    67
     by the UIHelpTool of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    68
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    69
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    70
     the UIHelpTool may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    71
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    72
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    73
     UIHelpTool openOnClass:NewChangesBrowser    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    74
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    75
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    76
    <resource: #help>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    77
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    78
    ^super helpSpec addPairsFrom:#(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    79
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    80
#applyAll
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    81
'Apply all changes from the first one to the last made change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    82
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    83
#applyForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    84
'Apply all changes from the selected one up to the last made change affecting on the same class as the class of the selected change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    85
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    86
#applyFromLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    87
'Apply all changes from the last snapshot up to the last made change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    88
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    89
#applyLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    90
'Apply the selected change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    91
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    92
#applyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    93
'Apply all changes from the selected one up to the last made change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    94
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
    95
#deleteAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
    96
'Deletes all changes from the first one to the last made change.'
ffea21e237ed revised
tz
parents: 1545
diff changeset
    97
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    98
#deleteCompress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
    99
'Deletes all multiple changes but leaving the last one.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   100
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   101
#deleteCompressForClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   102
'Deletes all multiple changes affecting on the same class as the class of the selected change but leaving the last one.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   103
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   104
#deleteForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   105
'Deletes all changes from the selected one up to the last made change affecting on the same class as the class of the selected change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   106
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   107
#deleteLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   108
'Deletes the selected change from the list of changes.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   109
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   110
#deleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   111
'Deletes all changes from the selected one up to the last made change.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   112
1556
tz
parents: 1554
diff changeset
   113
#fileLoad
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   114
'Opens a dialog for selecting and loading another changes files.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   115
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   116
#fileReload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   117
'Reloads the changes file (undo your modifications).'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   118
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   119
#fileSave
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   120
'Saves the list of changes into current changes file name.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   121
1556
tz
parents: 1554
diff changeset
   122
#filterField
tz
parents: 1554
diff changeset
   123
'Matching patterns filtering the changes (separate several patterns by spaces).'
tz
parents: 1554
diff changeset
   124
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   125
#settingsAutoUpdate
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   126
'Turns on/off whether the Changes Browser makes automatically an update after a change done while running.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   127
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   128
#settingsColumns
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   129
'Turns on/off whether columns  are shown by the table.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   130
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   131
#settingsColumnsCategory
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   132
'Turns on/off whether a column for the category of the change is shown by the table.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   133
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   134
#settingsColumnsDeltaInfo
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   135
'Turns on/off whether a column for the delta info of the change is shown by the table.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   136
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   137
#settingsColumnsPosition
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   138
'Turns on/off whether a column for the positions of the change in the change file is shown by the table.'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   139
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   140
#settingsColumnsTimeStamp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   141
'Turns on/off whether a column for the time stamp of the change is shown by the table.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   142
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   143
#settingsColumnsType
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   144
'Turns on/off whether a column for the type of the change is shown by the table.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   145
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   146
#settingsPrivateAsSeparate
ffea21e237ed revised
tz
parents: 1545
diff changeset
   147
'Turns on/off that private classes are separately handled when applying, deleting, or compressing for a certain class.'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   148
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   149
#testCompareWithCurrentVersion
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   150
'Opens a info dialog showing the compare results between the method code of the selected change with the current code.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   151
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   152
#testFindLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   153
'Moves upwards the list of changes in order to find to the last made snapshot.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   154
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   155
#testFindNextSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   156
'Moves downwards the list of changes in order to find to the next made snapshot.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   157
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   158
)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   159
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   160
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   161
!NewChangesBrowser class methodsFor:'image specs'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   162
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   163
applyFromLastSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   164
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   165
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   166
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   167
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   168
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   169
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   170
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   171
     ImageEditor openOnClass:self andSelector:#applyFromLastSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   172
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   173
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   174
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   175
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   176
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   177
        constantNamed:#'NewChangesBrowser applyFromLastSnapshotIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   178
        ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@QDQ<@@@@@@@@@@AH"H@@@@@@@@@@@D"H @@@@@@@@@@@RH"@@@@@@@@@@@AH"H@@@@@@@@@@@@@@@@@@@@@@@@@<@@@@@@@@@@@@@@@@@@@@@@@;.;.; @@@@@@@@C.;.;.@@@@@@@@@@@@@@8@@N@@@@C?????C @@@N@@@O????<@@@8@@@@@@@@@C0@@@@8@@O????<O@@C @@@@?????0@@@@C @@@@@@@O@@@N@@@@DQDQDP<@C @@@@@_??DQ@@@@@@@@@A????D@@@@@@@@@DQDQDP@@@@C @@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C<@@C<@@C<@@C<@@C<@@A<@@D@@?<@@?<@@?<LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   179
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   180
applyIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   181
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   182
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   183
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   184
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   185
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   186
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   187
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   188
     ImageEditor openOnClass:self andSelector:#applyIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   189
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   190
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   191
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   192
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   193
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   194
        constantNamed:#'NewChangesBrowser applyIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   195
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUPUUUUUUUPUUUUUUU[UUUUUUUPP@@@@@@QQUUUUUTPQUUUUUTVQ**UUUTPQUUUUUTPQUUUUUTXQ***UUTPQ**UUUTPQ*****TPQ***%UTPQ****)TPQUUUUUTPQUUUUUTUP@@@@@@PUUUUUUUPUUUUUUUPUUUUUUUPUUUUUUUP') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8_??8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   196
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   197
applyToEndIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   198
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   199
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   200
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   201
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   202
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   203
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   204
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   205
     ImageEditor openOnClass:self andSelector:#applyToEndIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   206
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   207
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   208
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   209
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   210
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   211
        constantNamed:#'NewChangesBrowser applyToEndIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   212
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@B** H@@@B** H@@@@@@ @@@@**( @@@@**(@J@@@@@H@@@@O??H@@@@O??@@@@@@@C@H@@C??3@@ @C??0@ @@@@@0@B@@UUT0B@K@UUT@@H@@@@D@H@CEUUDB@@JG?U@@@@MG?=@@@@@EUU@@B@@@@@@@@@H') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0@C?0@C?0@O?0@O?0@O?0@??@@??@@??LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   213
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   214
compressIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   215
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   216
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   217
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   218
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   219
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   220
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   221
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   222
     ImageEditor openOnClass:self andSelector:#compressIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   223
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   224
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   225
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   226
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   227
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   228
        constantNamed:#'NewChangesBrowser compressIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   229
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@????<@@@:***(@@@8@@@8@@@8@@@8@@@@@@@8@@@@@@@8A@@@@@@8@@:**0@8HC**+@@8@@@@@@@8H@@@@@@8@@@@@@@8@@@@@@@8@@@@@@@8@@C????8@@C****(@@@@@@@@H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 124 124 124 170 170 170 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@??0A??8A??8A??8A8A8G>A8@@A8G?98O?18_?!!8??A8@@A8G>A8@0A8C??8C??8C??8C??0@0@@D2@@G>@@D2@@') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   230
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   231
deleteIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   232
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   233
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   234
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   235
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   236
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   237
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   238
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   239
     ImageEditor openOnClass:self andSelector:#deleteIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   240
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   241
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   242
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   243
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   244
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   245
        constantNamed:#'NewChangesBrowser deleteIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   246
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@AUUUU@@OA??UU@@@AUUUU@@@AUUUU@B@A???U@H@A??5U@@@A???0@@@AUUUB@B@@@@@@@@@@@@@A@BK@@@@A_:@@@@@AO2G@@@@AL2@@@@@AL2C@@@@AL2@@@@@AL2@@@@@AL2H@@@@AL2@@@@@A\:@@@@@H_8 @@@@@@@H') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?<@_?<@_?<P_?<P_?<X_?<X_?<H_? H_?O<_?XL@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@G0') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   247
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   248
deleteToEndIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   249
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   250
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   251
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   252
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   253
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   254
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   255
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   256
     ImageEditor openOnClass:self andSelector:#deleteToEndIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   257
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   258
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   259
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   260
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   261
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   262
        constantNamed:#'NewChangesBrowser deleteToEndIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   263
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B** @@O@B** @@@@@@@ @@@@??< @B@@??<@@H@@@@L@@@@EUUL@@@@G?U@B@B@G?=@@@@@EUU@A@BK@@@@A_:@@@@@AO2G@@@@AL2@@@@@AL2C@@@@AL2@@@@@AL2@@@@@AL2H@@@@AL2@@@@@A\:@@@@@H_8 @@@@@@@H') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C?0@C?0@C?0PO?0PO?0XO?0X??@H??@H??O<?<XL?<_<?<_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@_<@@G0') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   264
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   265
findLastSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   266
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   267
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   268
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   269
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   270
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   271
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   272
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   273
     ImageEditor openOnClass:self andSelector:#findLastSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   274
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   275
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   276
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   277
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   278
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   279
        constantNamed:#'NewChangesBrowser findLastSnapshotIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   280
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@EUUUW@A@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@A@F***(@M@F***(@H@F***(@@@F***(@@@F***(@I@L@@@@@@@@@@@@@A@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??@C??B@@@B@C@B@G B@O0@@_8@@G @@G @@G @') ; yourself); yourself]!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   281
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   282
findNextSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   283
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   284
     by the ImageEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   285
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   286
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   287
     the ImageEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   288
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   289
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   290
     ImageEditor openOnClass:self andSelector:#findNextSnapshotIcon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   291
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   292
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   293
    <resource: #image>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   294
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   295
    ^Icon
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   296
        constantNamed:#'NewChangesBrowser findNextSnapshotIcon'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   297
        ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@DA@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@B@@@@@@@@@@@@@@@E@@@@@@@@@EUUUW@N@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@V***(@H@F***(@@@F***(@@@F***(@@@F***(@@@F***(@@@L@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 170 170 170]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@G @@G @@G @@_8@@O0@@G @@C@@@@@@C??@C??@C??@C??@C??@C??BC??BC??BC??BC??@C??@C??@C??@C??@') ; yourself); yourself]! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   298
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   299
!NewChangesBrowser class methodsFor:'interface specs'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   300
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   301
windowSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   302
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   303
     by the UIPainter of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   304
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   305
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   306
     the UIPainter may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   307
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   308
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   309
     UIPainter new openOnClass:NewChangesBrowser andSelector:#windowSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   310
     NewChangesBrowser new openInterface:#windowSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   311
     NewChangesBrowser open
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   312
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   313
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   314
    <resource: #canvas>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   315
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   316
    ^
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   317
     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   318
       #(#FullSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   319
          #window: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   320
           #(#WindowSpec
1556
tz
parents: 1554
diff changeset
   321
              #name: 'Changes Browser'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   322
              #layout: #(#LayoutFrame 53 0 92 0 687 0 583 0)
1556
tz
parents: 1554
diff changeset
   323
              #label: 'Changes Browser'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   324
              #min: #(#Point 10 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   325
              #max: #(#Point 1152 900)
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   326
              #bounds: #(#Rectangle 53 92 688 584)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   327
              #menu: #menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   328
              #usePreferredExtent: false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   329
          )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   330
          #component: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   331
           #(#SpecCollection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   332
              #collection: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   333
               #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   334
                 #(#MenuPanelSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   335
                    #name: 'menuToolbarView'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   336
                    #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   337
                    #menu: #menuToolbar
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   338
                    #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   339
                    #showSeparatingLines: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   340
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   341
                 #(#VariableVerticalPanelSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   342
                    #name: 'variableVerticalPanel1'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   343
                    #layout: #(#LayoutFrame 0 0.0 34 0 0 1.0 -26 1.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   344
                    #component: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   345
                     #(#SpecCollection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   346
                        #collection: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   347
                         #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   348
                           #(#ViewSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   349
                              #name: 'Box1'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   350
                              #component: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   351
                               #(#SpecCollection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   352
                                  #collection: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   353
                                   #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   354
                                     #(#DataSetSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   355
                                        #name: 'changesDataSetView'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   356
                                        #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -28 1.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   357
                                        #model: #selectionOfChange
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   358
                                        #menu: #menuTable
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   359
                                        #hasHorizontalScrollBar: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   360
                                        #hasVerticalScrollBar: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   361
                                        #miniScrollerHorizontal: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   362
                                        #dataList: #listOfChanges
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   363
                                        #useIndex: false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   364
                                        #has3Dsepartors: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   365
                                        #doubleClickSelector: #doBrowseClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   366
                                        #columnHolder: #listOfChangeColumns
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   367
                                        #valueChangeSelector: #changeSelected:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   368
                                    )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   369
                                     #(#ViewSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   370
                                        #name: 'Box2'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   371
                                        #layout: #(#LayoutFrame 0 0.0 -28 1 0 1.0 0 1.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   372
                                        #component: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   373
                                         #(#SpecCollection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   374
                                            #collection: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   375
                                             #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   376
                                               #(#LabelSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   377
                                                  #name: 'filterLabel'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   378
                                                  #layout: #(#AlignmentOrigin 37 0 13 0.0 1 0.5)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   379
                                                  #label: 'Filter:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   380
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   381
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   382
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   383
                                               #(#InputFieldSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   384
                                                  #name: 'filterField'
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   385
                                                  #layout: #(#LayoutFrame 41 0.0 3 0 250 0 25 0)
1556
tz
parents: 1554
diff changeset
   386
                                                  #activeHelpKey: #filterField
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   387
                                                  #model: #valueOfFilter
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   388
                                                  #immediateAccept: false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   389
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   390
                                               #(#ProgressIndicatorSpec
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   391
                                                  #name: 'readProgressIndicator'
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   392
                                                  #layout: #(#LayoutFrame 41 0 3 0 250 0 25 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   393
                                                  #model: #valueOfReadProgress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   394
                                                  #foregroundColor: #(#Color 0.0 60.0 60.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   395
                                              )
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   396
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   397
                                                  #name: 'allButton'
b37202441764 revised
tz
parents: 1556
diff changeset
   398
                                                  #layout: #(#LayoutFrame 258 0.0 2 0.0 268 0 13 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   399
                                                  #label: ' '
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   400
                                                  #model: #doFilter:
b37202441764 revised
tz
parents: 1556
diff changeset
   401
                                                  #actionValue: ''
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   402
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   403
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   404
                                                  #name: 'allLabel'
b37202441764 revised
tz
parents: 1556
diff changeset
   405
                                                  #layout: #(#LayoutFrame 273 0 0 0.0 310 0 14 0)
b37202441764 revised
tz
parents: 1556
diff changeset
   406
                                                  #label: '= all'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   407
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   408
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   409
                                              )
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   410
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   411
                                                  #name: 'methodChangesButton'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   412
                                                  #layout: #(#LayoutFrame 359 0.0 2 0.0 369 0 13 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   413
                                                  #label: ' '
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   414
                                                  #backgroundColor: #(#Color 100.0 100.0 100.0)
b37202441764 revised
tz
parents: 1556
diff changeset
   415
                                                  #model: #doFilterType:
b37202441764 revised
tz
parents: 1556
diff changeset
   416
                                                  #actionValue: 'method'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   417
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   418
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   419
                                                  #name: 'methodChangesLabel'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   420
                                                  #layout: #(#LayoutFrame 373 0 0 0.0 458 0 14 0)
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   421
                                                  #label: '= methods'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   422
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   423
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   424
                                              )
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   425
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   426
                                                  #name: 'classChangesButton'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   427
                                                  #layout: #(#LayoutFrame 455 0.0 2 0.0 465 0 13 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   428
                                                  #label: ' '
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   429
                                                  #backgroundColor: #(#Color 50.0008 50.0008 50.0008)
b37202441764 revised
tz
parents: 1556
diff changeset
   430
                                                  #model: #doFilterType:
b37202441764 revised
tz
parents: 1556
diff changeset
   431
                                                  #actionValue: 'class'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   432
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   433
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   434
                                                  #name: 'classChangesLabel'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   435
                                                  #layout: #(#LayoutFrame 470 0 0 0.0 580 0 14 0)
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   436
                                                  #label: '= class changes'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   437
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   438
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   439
                                              )
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   440
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   441
                                                  #name: 'snapshotButton'
b37202441764 revised
tz
parents: 1556
diff changeset
   442
                                                  #layout: #(#LayoutFrame 258 0.0 16 0.0 268 0 27 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   443
                                                  #label: ' '
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   444
                                                  #backgroundColor: #(#Color 100.0 0.0 0.0)
b37202441764 revised
tz
parents: 1556
diff changeset
   445
                                                  #model: #doFilterType:
b37202441764 revised
tz
parents: 1556
diff changeset
   446
                                                  #actionValue: 'image'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   447
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   448
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   449
                                                  #name: 'snapshotLabel'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   450
                                                  #layout: #(#LayoutFrame 273 0 14 0.0 355 0 28 0)
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   451
                                                  #label: '= snapshots'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   452
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   453
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   454
                                              )
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   455
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   456
                                                  #name: 'fileInButton'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   457
                                                  #layout: #(#LayoutFrame 359 0.0 16 0.0 369 0 27 0)
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   458
                                                  #label: ' '
b37202441764 revised
tz
parents: 1556
diff changeset
   459
                                                  #backgroundColor: #(#Color 0.0 80.0 80.0)
1644
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
   460
                                                  #model: #doFilterSourceType:
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
   461
                                                  #actionValue: '* file*'
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   462
                                              )
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   463
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   464
                                                  #name: 'fileInLabel'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   465
                                                  #layout: #(#LayoutFrame 374 0 14 0.0 440 0 28 0)
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
   466
                                                  #label: '= filings'
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   467
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
b37202441764 revised
tz
parents: 1556
diff changeset
   468
                                                  #adjust: #left
b37202441764 revised
tz
parents: 1556
diff changeset
   469
                                              )
b37202441764 revised
tz
parents: 1556
diff changeset
   470
                                               #(#ActionButtonSpec
b37202441764 revised
tz
parents: 1556
diff changeset
   471
                                                  #name: 'checkInButton'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   472
                                                  #layout: #(#LayoutFrame 455 0.0 16 0.0 465 0 27 0)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   473
                                                  #label: ' '
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   474
                                                  #backgroundColor: #(#Color 0.0 0.0 100.0)
1644
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
   475
                                                  #model: #doFilterSourceType:
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
   476
                                                  #actionValue: '* checkin*'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   477
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   478
                                               #(#LabelSpec
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   479
                                                  #name: 'checkInLabel'
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   480
                                                  #layout: #(#LayoutFrame 470 0 14 0.0 550 0 28 0)
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   481
                                                  #label: '= check ins'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   482
                                                  #style: #(#FontDescription #helvetica #medium #roman 10)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   483
                                                  #adjust: #left
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   484
                                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   485
                                            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   486
                                        )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   487
                                    )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   488
                                  )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   489
                              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   490
                          )
1636
14e3ccc3e7c6 use Workspace
tz
parents: 1569
diff changeset
   491
                           #(#WorkspaceSpec
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   492
                              #name: 'changeTextEditor'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   493
                              #model: #valueOfChangeText
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   494
                              #hasHorizontalScrollBar: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   495
                              #hasVerticalScrollBar: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   496
                              #miniScrollerHorizontal: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   497
                              #isReadOnly: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   498
                          )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   499
                        )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   500
                    )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   501
                    #handles: #(#Any 0.5 1.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   502
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   503
                 #(#UISubSpecification
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   504
                    #name: 'windowSpecForInfoBar'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   505
                    #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   506
                    #majorKey: #ToolApplicationModel
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   507
                    #minorKey: #windowSpecForInfoBar
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   508
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   509
              )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   510
          )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   511
      )
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   512
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   513
    "Modified: / 18.5.1998 / 13:18:27 / cg"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   514
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   515
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   516
!NewChangesBrowser class methodsFor:'list specs'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   517
1641
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   518
tableColumnsForChangeAttributes
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   519
    "This resource specification was automatically generated
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   520
     by the DataSetBuilder of ST/X."
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   521
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   522
    "Do not manually edit this!! If it is corrupted,
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   523
     the DataSetBuilder may not be able to read the specification."
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   524
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   525
    "
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   526
     DataSetBuilder new openOnClass:NewChangesBrowser andSelector:#tableColumnsForChangeAttributes
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   527
    "
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   528
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   529
    <resource: #tableColumns>
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   530
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   531
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   532
    ^ #(
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   533
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   534
           #rendererType: #rowSelector
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   535
           #backgroundSelector: #listColor
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   536
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   537
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   538
           #label: 'Change'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   539
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   540
           #model: #string
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   541
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   542
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   543
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   544
           #label: 'Category'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   545
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   546
           #model: #category
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   547
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   548
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   549
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   550
           #label: 'Delta Info'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   551
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   552
           #model: #delta
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   553
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   554
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   555
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   556
           #label: 'Time Stamp'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   557
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   558
           #model: #timeStamp
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   559
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   560
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   561
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   562
           #label: 'Type'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   563
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   564
           #model: #type
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   565
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   566
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   567
        #(#DataSetColumnSpec
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   568
           #label: 'Positions'
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   569
           #labelAlignment: #left
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   570
           #model: #positions
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   571
           #canSelect: false
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   572
       )
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
   573
     )
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   574
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   575
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   576
!NewChangesBrowser class methodsFor:'menu specs'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   577
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   578
menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   579
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   580
     by the MenuEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   581
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   582
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   583
     the MenuEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   584
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   585
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   586
     MenuEditor new openOnClass:NewChangesBrowser andSelector:#menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   587
     (Menu new fromLiteralArrayEncoding:(NewChangesBrowser menu)) startUp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   588
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   589
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   590
    <resource: #menu>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   591
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   592
    ^
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   593
     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   594
       #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   595
          
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   596
           #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   597
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   598
                #label: 'About'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   599
                #activeHelpKey: #about
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   600
                #labelImage: #(#ResourceRetriever nil #menuIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   601
                #submenuChannel: #menuAbout
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   602
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   603
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   604
                #label: 'File'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   605
                #activeHelpKey: #file
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   606
                #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   607
                 #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   608
                    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   609
                     #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   610
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   611
                          #label: 'Reload'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   612
                          #value: #doReload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   613
                          #activeHelpKey: #fileReload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   614
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   615
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   616
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   617
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   618
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   619
                       #(#MenuItem
1556
tz
parents: 1554
diff changeset
   620
                          #label: 'Load...'
tz
parents: 1554
diff changeset
   621
                          #value: #doLoad
tz
parents: 1554
diff changeset
   622
                          #activeHelpKey: #fileLoad
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   623
                          #enabled: #valueOfNotSaving
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   624
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   625
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   626
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   627
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   628
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   629
                          #label: 'Save'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   630
                          #value: #doSave
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   631
                          #activeHelpKey: #fileSave
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   632
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   633
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   634
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   635
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   636
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   637
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   638
                          #label: 'Browse Class'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   639
                          #value: #doBrowseClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   640
                          #activeHelpKey: #fileBrowseClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   641
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   642
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   643
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   644
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   645
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   646
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   647
                          #label: 'Exit'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   648
                          #value: #closeRequest
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   649
                          #activeHelpKey: #fileExit
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   650
                          #enabled: #valueOfNotSaving
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   651
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   652
                    ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   653
                    nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   654
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   655
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   656
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   657
                #label: 'Apply'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   658
                #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   659
                 #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   660
                    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   661
                     #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   662
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   663
                          #label: 'Line'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   664
                          #value: #doApply
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   665
                          #activeHelpKey: #applyLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   666
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   667
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   668
                       #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   669
                          #label: '-'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   670
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   671
                       #(#MenuItem
ffea21e237ed revised
tz
parents: 1545
diff changeset
   672
                          #label: 'All'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   673
                          #value: #doApplyAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
   674
                          #activeHelpKey: #applyAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
   675
                          #enabled: #valueOfNotReading
ffea21e237ed revised
tz
parents: 1545
diff changeset
   676
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   677
                       #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   678
                          #label: 'To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   679
                          #value: #doApplyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   680
                          #activeHelpKey: #applyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   681
                          #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   682
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   683
                       #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   684
                          #label: 'All For Class'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   685
                          #value: #doApplyAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
   686
                          #activeHelpKey: #applyForClassToEnd
ffea21e237ed revised
tz
parents: 1545
diff changeset
   687
                          #enabled: #valueOfHavingChangeSelection
ffea21e237ed revised
tz
parents: 1545
diff changeset
   688
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   689
                       #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   690
                          #label: 'For Class To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   691
                          #value: #doApplyForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   692
                          #activeHelpKey: #applyForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   693
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   694
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   695
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   696
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   697
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   698
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   699
                          #label: 'From Last Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   700
                          #value: #doApplyFromLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   701
                          #activeHelpKey: #applyFromLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   702
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   703
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   704
                    ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   705
                    nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   706
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   707
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   708
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   709
                #label: 'Delete'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   710
                #activeHelpKey: #edit
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   711
                #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   712
                 #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   713
                    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   714
                     #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   715
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   716
                          #label: 'Line'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   717
                          #value: #doDelete
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   718
                          #activeHelpKey: #deleteLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   719
                          #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   720
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   721
                       #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   722
                          #label: '-'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   723
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   724
                       #(#MenuItem
ffea21e237ed revised
tz
parents: 1545
diff changeset
   725
                          #label: 'All'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   726
                          #value: #doDeleteAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
   727
                          #activeHelpKey: #deleteAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
   728
                          #enabled: #valueOfNotReading
ffea21e237ed revised
tz
parents: 1545
diff changeset
   729
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   730
                       #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   731
                          #label: 'To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   732
                          #value: #doDeleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   733
                          #activeHelpKey: #deleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   734
                          #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   735
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   736
                       #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   737
                          #label: 'All For Class'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   738
                          #value: #doDeleteAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
   739
                          #activeHelpKey: #applyForClassToEnd
ffea21e237ed revised
tz
parents: 1545
diff changeset
   740
                          #enabled: #valueOfHavingChangeSelection
ffea21e237ed revised
tz
parents: 1545
diff changeset
   741
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   742
                       #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   743
                          #label: 'For Class To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   744
                          #value: #doDeleteForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   745
                          #activeHelpKey: #deleteForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   746
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   747
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   748
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   749
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   750
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   751
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   752
                          #label: 'Compress'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   753
                          #value: #doCompress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   754
                          #activeHelpKey: #deleteCompress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   755
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   756
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   757
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   758
                          #label: 'Compress For Class'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   759
                          #value: #doCompressForClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   760
                          #activeHelpKey: #deleteCompressForClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   761
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   762
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   763
                    ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   764
                    nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   765
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   766
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   767
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   768
                #label: 'Test'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   769
                #activeHelpKey: #test
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   770
                #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   771
                 #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   772
                    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   773
                     #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   774
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   775
                          #label: 'Find Last Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   776
                          #value: #doFindSnapshot:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   777
                          #activeHelpKey: #testFindLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   778
                          #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   779
                          #argument: 'last'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   780
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   781
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   782
                          #label: 'Find Next Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   783
                          #value: #doFindSnapshot:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   784
                          #activeHelpKey: #testFindNextSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   785
                          #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   786
                          #argument: 'next'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   787
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   788
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   789
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   790
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   791
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   792
                          #label: 'Compare With Current Version'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   793
                          #value: #doCompare
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   794
                          #activeHelpKey: #testCompareWithCurrentVersion
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   795
                          #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   796
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   797
                    ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   798
                    nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   799
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   800
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   801
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   802
                #label: 'Settings'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   803
                #activeHelpKey: #settings
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   804
                #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   805
                 #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   806
                    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   807
                     #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   808
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   809
                          #label: 'Auto Update'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   810
                          #activeHelpKey: #settingsAutoUpdate
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   811
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   812
                          #indication: #autoUpdateMode:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   813
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   814
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   815
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   816
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   817
                       #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   818
                          #label: 'Private As Separate'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   819
                          #activeHelpKey: #settingsPrivateAsSeparate
ffea21e237ed revised
tz
parents: 1545
diff changeset
   820
                          #enabled: #valueOfNotReading
ffea21e237ed revised
tz
parents: 1545
diff changeset
   821
                          #indication: #privateAsSeparate:
ffea21e237ed revised
tz
parents: 1545
diff changeset
   822
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   823
                       #(#MenuItem
ffea21e237ed revised
tz
parents: 1545
diff changeset
   824
                          #label: '-'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   825
                      )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   826
                       #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   827
                          #label: 'Columns'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   828
                          #activeHelpKey: #settingsColumns
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   829
                          #submenu: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   830
                           #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   831
                              
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   832
                               #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   833
                                 #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   834
                                    #label: 'Category'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   835
                                    #activeHelpKey: #settingsColumnsCategory
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   836
                                    #indication: #categoryColumn:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   837
                                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   838
                                 #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   839
                                    #label: 'Delta Info'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   840
                                    #activeHelpKey: #settingsColumnsDeltaInfo
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   841
                                    #indication: #deltaInfoColumn:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   842
                                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   843
                                 #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   844
                                    #label: 'Type'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   845
                                    #activeHelpKey: #settingsColumnsType
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   846
                                    #indication: #typeColumn:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   847
                                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   848
                                 #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   849
                                    #label: 'Time Stamp'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   850
                                    #activeHelpKey: #settingsColumnsTimeStamp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   851
                                    #indication: #timeStampColumn:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   852
                                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   853
                                 #(#MenuItem
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   854
                                    #label: 'Positions'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   855
                                    #activeHelpKey: #settingsColumnsPosition
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   856
                                    #indication: #positionsColumn:
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   857
                                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   858
                              ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   859
                              nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   860
                          )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   861
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   862
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   863
                          #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   864
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   865
                       #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   866
                          #label: 'Fonts'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   867
                          #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   868
                          #submenuChannel: #menuFont
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   869
                      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   870
                    ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   871
                    nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   872
                )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   873
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   874
             #(#MenuItem
1568
b37202441764 revised
tz
parents: 1556
diff changeset
   875
                #label: 'History'
b37202441764 revised
tz
parents: 1556
diff changeset
   876
                #submenuChannel: #menuHistory
b37202441764 revised
tz
parents: 1556
diff changeset
   877
            )
b37202441764 revised
tz
parents: 1556
diff changeset
   878
             #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   879
                #label: 'Help'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   880
                #startGroup: #right
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   881
                #activeHelpKey: #help
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   882
                #submenuChannel: #menuHelp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   883
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   884
          ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   885
          nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   886
      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   887
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   888
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   889
menuTable
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   890
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   891
     by the MenuEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   892
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   893
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   894
     the MenuEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   895
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   896
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   897
     MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuTable
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   898
     (Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuTable)) startUp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   899
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   900
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   901
    <resource: #menu>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   902
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   903
    ^
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   904
     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   905
       #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   906
          
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   907
           #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   908
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   909
                #label: 'Apply'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   910
                #value: #doApply
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   911
                #activeHelpKey: #applyLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   912
                #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   913
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   914
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   915
                #label: 'Apply To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   916
                #value: #doApplyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   917
                #activeHelpKey: #applyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   918
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   919
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   920
             #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   921
                #label: 'Apply All For Class'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   922
                #value: #doApplyAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
   923
                #activeHelpKey: #applyForClassToEnd
ffea21e237ed revised
tz
parents: 1545
diff changeset
   924
                #enabled: #valueOfHavingChangeSelection
ffea21e237ed revised
tz
parents: 1545
diff changeset
   925
            )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   926
             #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   927
                #label: 'Apply For Class To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   928
                #value: #doApplyForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   929
                #activeHelpKey: #applyForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   930
                #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   931
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   932
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   933
                #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   934
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   935
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   936
                #label: 'Delete'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   937
                #value: #doDelete
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   938
                #activeHelpKey: #deleteLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   939
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   940
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   941
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   942
                #label: 'Delete To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   943
                #value: #doDeleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   944
                #activeHelpKey: #deleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   945
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   946
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   947
             #(#MenuItem
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
   948
                #label: 'Delete All For Class'
ffea21e237ed revised
tz
parents: 1545
diff changeset
   949
                #value: #doDeleteAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
   950
                #activeHelpKey: #applyForClassToEnd
ffea21e237ed revised
tz
parents: 1545
diff changeset
   951
                #enabled: #valueOfHavingChangeSelection
ffea21e237ed revised
tz
parents: 1545
diff changeset
   952
            )
ffea21e237ed revised
tz
parents: 1545
diff changeset
   953
             #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   954
                #label: 'Delete For Class To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   955
                #value: #doDeleteForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   956
                #activeHelpKey: #deleteForClassToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   957
                #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   958
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   959
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   960
                #label: '-'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   961
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   962
             #(#MenuItem
1556
tz
parents: 1554
diff changeset
   963
                #label: 'Browse Class'
tz
parents: 1554
diff changeset
   964
                #value: #doBrowseClass
tz
parents: 1554
diff changeset
   965
                #activeHelpKey: #fileBrowseClass
tz
parents: 1554
diff changeset
   966
                #enabled: #valueOfHavingChangeSelection
tz
parents: 1554
diff changeset
   967
            )
tz
parents: 1554
diff changeset
   968
             #(#MenuItem
tz
parents: 1554
diff changeset
   969
                #label: '-'
tz
parents: 1554
diff changeset
   970
            )
tz
parents: 1554
diff changeset
   971
             #(#MenuItem
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   972
                #label: 'Compress For Class'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   973
                #value: #doCompressForClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   974
                #activeHelpKey: #deleteCompressForClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   975
                #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   976
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   977
          ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   978
          nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   979
      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   980
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   981
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   982
menuToolbar
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   983
    "This resource specification was automatically generated
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   984
     by the MenuEditor of ST/X."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   985
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   986
    "Do not manually edit this!! If it is corrupted,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   987
     the MenuEditor may not be able to read the specification."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   988
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   989
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   990
     MenuEditor new openOnClass:NewChangesBrowser andSelector:#menuToolbar
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   991
     (Menu new fromLiteralArrayEncoding:(NewChangesBrowser menuToolbar)) startUp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   992
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   993
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   994
    <resource: #menu>
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   995
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   996
    ^
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   997
     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   998
       #(#Menu
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
   999
          
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1000
           #(
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1001
             #(#MenuItem
1556
tz
parents: 1554
diff changeset
  1002
                #label: 'Load'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1003
                #isButton: true
1556
tz
parents: 1554
diff changeset
  1004
                #value: #doLoad
tz
parents: 1554
diff changeset
  1005
                #activeHelpKey: #fileLoad
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1006
                #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1007
                #labelImage: #(#ResourceRetriever nil #loadIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1008
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1009
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1010
                #label: 'Save'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1011
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1012
                #value: #doSave
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1013
                #activeHelpKey: #fileSave
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1014
                #enabled: #valueOfNotSaving
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1015
                #labelImage: #(#ResourceRetriever nil #saveIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1016
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1017
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1018
                #label: ''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1019
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1020
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1021
                #label: 'Compress'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1022
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1023
                #value: #doCompress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1024
                #activeHelpKey: #deleteCompress
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1025
                #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1026
                #labelImage: #(#ResourceRetriever nil #compressIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1027
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1028
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1029
                #label: ''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1030
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1031
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1032
                #label: 'Apply'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1033
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1034
                #value: #doApply
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1035
                #activeHelpKey: #applyLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1036
                #enabled: #valueOfHavingChangeSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1037
                #labelImage: #(#ResourceRetriever nil #applyIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1038
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1039
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1040
                #label: 'Apply To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1041
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1042
                #value: #doApplyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1043
                #activeHelpKey: #applyToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1044
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1045
                #labelImage: #(#ResourceRetriever nil #applyToEndIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1046
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1047
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1048
                #label: 'Apply From Last Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1049
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1050
                #value: #doApplyFromLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1051
                #activeHelpKey: #applyFromLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1052
                #enabled: #valueOfNotReading
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1053
                #labelImage: #(#ResourceRetriever nil #applyFromLastSnapshotIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1054
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1055
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1056
                #label: ''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1057
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1058
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1059
                #label: 'Delete'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1060
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1061
                #value: #doDelete
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1062
                #activeHelpKey: #deleteLine
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1063
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1064
                #labelImage: #(#ResourceRetriever nil #deleteIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1065
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1066
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1067
                #label: 'Delete To End'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1068
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1069
                #value: #doDeleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1070
                #activeHelpKey: #deleteToEnd
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1071
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1072
                #labelImage: #(#ResourceRetriever nil #deleteToEndIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1073
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1074
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1075
                #label: ''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1076
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1077
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1078
                #label: 'Find Last Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1079
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1080
                #value: #doFindSnapshot:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1081
                #activeHelpKey: #testFindLastSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1082
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1083
                #argument: 'last'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1084
                #labelImage: #(#ResourceRetriever nil #findLastSnapshotIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1085
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1086
             #(#MenuItem
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1087
                #label: 'Find Next Snapshot'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1088
                #isButton: true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1089
                #value: #doFindSnapshot:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1090
                #activeHelpKey: #testFindNextSnapshot
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1091
                #enabled: #valueOfHavingSelection
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1092
                #argument: 'next'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1093
                #labelImage: #(#ResourceRetriever nil #findNextSnapshotIcon)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1094
            )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1095
          ) nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1096
          nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1097
      )
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1098
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1099
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1100
!NewChangesBrowser methodsFor:'accesssing - columns'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1101
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1102
categoryColumn
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1103
    "returns whether the column for the category attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1104
1553
eaeafd6f8cbe checkin from browser
tz
parents: 1546
diff changeset
  1105
    ^CategoryColumn ? (CategoryColumn := false)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1106
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1107
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1108
categoryColumn: aBoolean
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1109
    "sets whether the column for the category attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1110
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1111
    self changeColumn: 'Category' add: (CategoryColumn := aBoolean)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1112
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1113
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1114
deltaInfoColumn
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1115
    "returns whether the column for the delta info attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1116
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1117
    ^DeltaInfoColumn ? (DeltaInfoColumn := false)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1118
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1119
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1120
deltaInfoColumn: aBoolean
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1121
    "sets whether the column for the delta info attribute of the changes is shown; and updates"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1122
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1123
    self changeColumn: 'Delta Info' add: (DeltaInfoColumn := aBoolean).
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1124
    (self window notNil and: [DeltaInfoColumn]) ifTrue: [self doReload]
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1125
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1126
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1127
positionsColumn
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1128
    "returns whether the column for the position attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1129
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1130
    ^PositionsColumn ? (PositionsColumn := false)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1131
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1132
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1133
positionsColumn: aBoolean
b37202441764 revised
tz
parents: 1556
diff changeset
  1134
    "sets whether the column for the positions attribute of the changes is shown"
b37202441764 revised
tz
parents: 1556
diff changeset
  1135
b37202441764 revised
tz
parents: 1556
diff changeset
  1136
    self changeColumn: 'Positions' add: (PositionsColumn := aBoolean)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1137
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1138
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1139
timeStampColumn
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1140
    "returns whether the column for the time stamp attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1141
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1142
    ^TimeStampColumn ? (TimeStampColumn := false)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1143
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1144
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1145
timeStampColumn: aBoolean
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1146
    "sets whether the column for the time stamp attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1147
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1148
    self changeColumn: 'Time Stamp' add: (TimeStampColumn := aBoolean)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1149
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1150
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1151
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1152
typeColumn
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1153
    "returns whether the column for the type attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1154
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1155
    ^TypeColumn ? (TypeColumn := false)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1156
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1157
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1158
typeColumn: aBoolean
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1159
    "sets whether the column for the type attribute of the changes is shown"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1160
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1161
    self changeColumn: 'Type' add: (TypeColumn := aBoolean)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1162
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1163
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1164
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1165
!NewChangesBrowser methodsFor:'accesssing - views'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1166
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1167
changeTextEditor
b37202441764 revised
tz
parents: 1556
diff changeset
  1168
    "returns the view of the changeTextEditor"
b37202441764 revised
tz
parents: 1556
diff changeset
  1169
b37202441764 revised
tz
parents: 1556
diff changeset
  1170
    ^builder componentAt: #changeTextEditor
b37202441764 revised
tz
parents: 1556
diff changeset
  1171
b37202441764 revised
tz
parents: 1556
diff changeset
  1172
b37202441764 revised
tz
parents: 1556
diff changeset
  1173
b37202441764 revised
tz
parents: 1556
diff changeset
  1174
!
b37202441764 revised
tz
parents: 1556
diff changeset
  1175
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1176
filterField
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1177
    "returns the view of the filterField"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1178
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1179
    ^builder componentAt: #filterField
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1180
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1181
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1182
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1183
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1184
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1185
filterLabel
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1186
    "returns the view of the filterLabel"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1187
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1188
    ^builder componentAt: #filterLabel
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1189
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1190
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1191
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1192
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1193
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1194
readProgressIndicator
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1195
    "returns the view of the readProgressIndicator"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1196
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1197
    ^builder componentAt: #readProgressIndicator
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1198
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1199
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1200
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1201
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1202
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1203
!NewChangesBrowser methodsFor:'aspects'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1204
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1205
listOfChangeColumns
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1206
    "initializes (during the startup) and returns the value holder for the columns"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1207
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1208
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1209
    (holder := builder bindingAt:#listOfChangeColumns) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1210
        builder aspectAt:#listOfChangeColumns put:(holder := List new).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1211
        self changeColumn: nil add: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1212
        self changeColumn: 'Change' add: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1213
        self categoryColumn: self categoryColumn.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1214
        self timeStampColumn: self timeStampColumn.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1215
        self typeColumn: self typeColumn.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1216
        self deltaInfoColumn: self deltaInfoColumn.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1217
        self positionsColumn: self positionsColumn.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1218
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1219
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1220
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1221
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1222
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1223
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1224
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1225
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1226
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1227
listOfChanges
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1228
    "returns the value holder for the changes"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1229
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1230
    |holder| 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1231
    (holder := builder bindingAt:#listOfChanges) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1232
        builder aspectAt:#listOfChanges put:(holder := List new)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1233
    ].   
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1234
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1235
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1236
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1237
selectionOfChange
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1238
    "returns the value holder for the selected change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1239
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1240
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1241
    (holder := builder bindingAt:#selectionOfChange) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1242
        builder aspectAt:#selectionOfChange put:(holder :=  ValueHolder new).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1243
    ].                                           
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1244
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1245
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1246
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1247
valueOfChangeText
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1248
    "returns the value holder for the source code of the selected change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1249
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1250
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1251
    (holder := builder bindingAt:#valueOfChangeText) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1252
        builder aspectAt:#valueOfChangeText put:(holder :=  ValueHolder new).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1253
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1254
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1255
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1256
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1257
valueOfFilter
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1258
    "returns the value holder for the string of the filter"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1259
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1260
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1261
    (holder := builder bindingAt:#valueOfFilter) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1262
        builder aspectAt:#valueOfFilter put:(holder :=  ValueHolder new).
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1263
        holder addDependent: self
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1264
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1265
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1266
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1267
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1268
valueOfHavingChangeSelection
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1269
    "returns whether the selected change can be applied as value holder"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1270
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1271
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1272
    (holder := builder bindingAt:#valueOfHavingChangeSelection) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1273
        builder aspectAt:#valueOfHavingChangeSelection put:(holder :=  false asValue).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1274
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1275
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1276
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1277
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1278
valueOfHavingSelection
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1279
    "returns whether a change is selected as value holder"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1280
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1281
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1282
    (holder := builder bindingAt:#valueOfHavingSelection) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1283
        builder aspectAt:#valueOfHavingSelection put:(holder :=  false asValue).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1284
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1285
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1286
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1287
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1288
valueOfNotReading
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1289
    "returns whether it is not reading or compressing as value holder"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1290
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1291
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1292
    (holder := builder bindingAt:#valueOfReading) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1293
        builder aspectAt:#valueOfReading put:(holder :=  true asValue).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1294
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1295
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1296
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1297
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1298
valueOfNotSaving
b37202441764 revised
tz
parents: 1556
diff changeset
  1299
    "returns whether it is not saving as value holder"
b37202441764 revised
tz
parents: 1556
diff changeset
  1300
b37202441764 revised
tz
parents: 1556
diff changeset
  1301
    |holder|
b37202441764 revised
tz
parents: 1556
diff changeset
  1302
    (holder := builder bindingAt:#valueOfNotSaving) isNil ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  1303
        builder aspectAt:#valueOfNotSaving put:(holder :=  true asValue).
b37202441764 revised
tz
parents: 1556
diff changeset
  1304
    ].
b37202441764 revised
tz
parents: 1556
diff changeset
  1305
    ^ holder
b37202441764 revised
tz
parents: 1556
diff changeset
  1306
!
b37202441764 revised
tz
parents: 1556
diff changeset
  1307
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1308
valueOfReadProgress
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1309
    "returns the stage of reading or compressing as value holder"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1310
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1311
    |holder|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1312
    (holder := builder bindingAt:#valueOfReadProgress) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1313
        builder aspectAt:#valueOfReadProgress put:(holder :=  ValueHolder with: 0).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1314
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1315
    ^ holder
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1316
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1317
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1318
!NewChangesBrowser methodsFor:'callbacks'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1319
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1320
changeSelected: lineNr
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1321
    "fetches the source code of the change and shows it in the codeView"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1322
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1323
    |aStream sawExcla chunk selectedRow changeNr|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1324
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1325
    lineNr == 0 ifTrue: [^nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1326
    changeNr := changes indexOf: (self listOfChanges at: lineNr).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1327
    aStream := self streamForChange: (changes at: changeNr).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1328
    aStream isNil ifTrue:[^ self].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1329
    sawExcla := aStream peekFor:(aStream class chunkSeparator).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1330
    chunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1331
    sawExcla ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1332
        chunk := aStream nextChunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1333
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1334
    aStream close.        
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1335
    self valueOfChangeText value:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1336
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1337
    self updateChannels
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1338
! !
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1339
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1340
!NewChangesBrowser methodsFor:'change & update'!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1341
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1342
update:something with:aParameter from:changedObject
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1343
    "evaluates the filterCompletionBlock after returning the filter string"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1344
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1345
    super update:something with:aParameter from:changedObject.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1346
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1347
    changedObject == self valueOfFilter 
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1348
    ifTrue: 
1636
14e3ccc3e7c6 use Workspace
tz
parents: 1569
diff changeset
  1349
    [                           
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1350
        filterCompletionBlock value: changedObject value. 
b37202441764 revised
tz
parents: 1556
diff changeset
  1351
        self listOfChanges size > 0 ifTrue: [self addToHistory: changedObject value -> #doFilter:] 
b37202441764 revised
tz
parents: 1556
diff changeset
  1352
    ]
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1353
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1354
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1355
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1356
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1357
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1358
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1359
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1360
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1361
updateChannels
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1362
    "updates my channels"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1363
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1364
    |change|           
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1365
    (change := self selectionOfChange value) notNil
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1366
    ifTrue:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1367
    [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1368
        self valueOfHavingSelection value: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1369
        self valueOfHavingChangeSelection value: 
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1370
            ((change type = 'method') or: [(change type = 'class')])
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1371
    ]
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1372
    ifFalse:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1373
    [
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1374
        self valueOfHavingSelection value: false.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1375
        self valueOfHavingChangeSelection value: false
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1376
    ]
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1377
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1378
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1379
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1380
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1381
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1382
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1383
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1384
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1385
!NewChangesBrowser methodsFor:'compiler interface'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1386
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1387
wantChangeLog
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1388
    "sent by the compiler to ask if a changeLog entry should
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1389
     be written. Return false here."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1390
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1391
    ^ false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1392
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1393
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1394
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1395
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1396
!NewChangesBrowser methodsFor:'error handling'!
b37202441764 revised
tz
parents: 1556
diff changeset
  1397
b37202441764 revised
tz
parents: 1556
diff changeset
  1398
correctableError:aString position:relPos to:relEndPos from:aCompiler
b37202441764 revised
tz
parents: 1556
diff changeset
  1399
    "compiler notifys us of an error - this should really not happen since
b37202441764 revised
tz
parents: 1556
diff changeset
  1400
     changes ought to be correct (did someone edit the changes file ??).
b37202441764 revised
tz
parents: 1556
diff changeset
  1401
     Show the bad change in the codeView and let codeView hilight the error;
b37202441764 revised
tz
parents: 1556
diff changeset
  1402
     no corrections allowed here therefore return false"
b37202441764 revised
tz
parents: 1556
diff changeset
  1403
b37202441764 revised
tz
parents: 1556
diff changeset
  1404
    self error:aString position:relPos to:relEndPos from:aCompiler.
b37202441764 revised
tz
parents: 1556
diff changeset
  1405
    ^ false
b37202441764 revised
tz
parents: 1556
diff changeset
  1406
!
b37202441764 revised
tz
parents: 1556
diff changeset
  1407
b37202441764 revised
tz
parents: 1556
diff changeset
  1408
error:aString position:relPos to:relEndPos from:aCompiler
b37202441764 revised
tz
parents: 1556
diff changeset
  1409
    "compiler notifys us of an error - this should really not happen since
b37202441764 revised
tz
parents: 1556
diff changeset
  1410
     changes ought to be correct (did someone edit the changes file ??).
b37202441764 revised
tz
parents: 1556
diff changeset
  1411
     Show the bad change in the codeView and let codeView hilight the error"
b37202441764 revised
tz
parents: 1556
diff changeset
  1412
b37202441764 revised
tz
parents: 1556
diff changeset
  1413
    |action|
b37202441764 revised
tz
parents: 1556
diff changeset
  1414
b37202441764 revised
tz
parents: 1556
diff changeset
  1415
    (skipSignal notNil) ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  1416
b37202441764 revised
tz
parents: 1556
diff changeset
  1417
        self changeTextEditor highlightingErrorPosition:relPos to:relEndPos do:[
b37202441764 revised
tz
parents: 1556
diff changeset
  1418
            |box|
b37202441764 revised
tz
parents: 1556
diff changeset
  1419
b37202441764 revised
tz
parents: 1556
diff changeset
  1420
            "
b37202441764 revised
tz
parents: 1556
diff changeset
  1421
             start dialog - make certain cleanup is done
b37202441764 revised
tz
parents: 1556
diff changeset
  1422
            "
b37202441764 revised
tz
parents: 1556
diff changeset
  1423
            action := OptionBox 
b37202441764 revised
tz
parents: 1556
diff changeset
  1424
                          request:aString
b37202441764 revised
tz
parents: 1556
diff changeset
  1425
                          label:'Error'
b37202441764 revised
tz
parents: 1556
diff changeset
  1426
                          form:(WarningBox iconBitmap)
b37202441764 revised
tz
parents: 1556
diff changeset
  1427
                          buttonLabels:#('cancel' 'skip' 'continue')
b37202441764 revised
tz
parents: 1556
diff changeset
  1428
                          values:#(#abort #skip #continue)
b37202441764 revised
tz
parents: 1556
diff changeset
  1429
                          default:#continue.
b37202441764 revised
tz
parents: 1556
diff changeset
  1430
        ].
b37202441764 revised
tz
parents: 1556
diff changeset
  1431
b37202441764 revised
tz
parents: 1556
diff changeset
  1432
        action == #abort ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  1433
            Object abortSignal raise.
b37202441764 revised
tz
parents: 1556
diff changeset
  1434
            ^ false
b37202441764 revised
tz
parents: 1556
diff changeset
  1435
        ].
b37202441764 revised
tz
parents: 1556
diff changeset
  1436
        action == #skip ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  1437
            skipSignal raise.
b37202441764 revised
tz
parents: 1556
diff changeset
  1438
            ^ false
b37202441764 revised
tz
parents: 1556
diff changeset
  1439
        ].
b37202441764 revised
tz
parents: 1556
diff changeset
  1440
        ^  false 
b37202441764 revised
tz
parents: 1556
diff changeset
  1441
    ].
b37202441764 revised
tz
parents: 1556
diff changeset
  1442
    ^self changeTextEditor error:aString position:relPos to:relEndPos from:aCompiler
b37202441764 revised
tz
parents: 1556
diff changeset
  1443
b37202441764 revised
tz
parents: 1556
diff changeset
  1444
!
b37202441764 revised
tz
parents: 1556
diff changeset
  1445
b37202441764 revised
tz
parents: 1556
diff changeset
  1446
warning:aString position:relPos to:relEndPos from:aCompiler
b37202441764 revised
tz
parents: 1556
diff changeset
  1447
    "compiler notifys us of a warning - ignore it"
b37202441764 revised
tz
parents: 1556
diff changeset
  1448
b37202441764 revised
tz
parents: 1556
diff changeset
  1449
    ^ self
b37202441764 revised
tz
parents: 1556
diff changeset
  1450
b37202441764 revised
tz
parents: 1556
diff changeset
  1451
! !
b37202441764 revised
tz
parents: 1556
diff changeset
  1452
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1453
!NewChangesBrowser methodsFor:'help'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1454
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1455
defaultInfoLabel
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1456
    "returns the default label for the info bar"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1457
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1458
    changeFileName asFilename exists ifTrue: [^changeFileName].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1459
    ^'No change file name defined.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1460
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1461
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1462
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1463
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1464
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1465
!NewChangesBrowser methodsFor:'initialization'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1466
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1467
initialize
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1468
    "initializes the instance variables"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1469
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1470
    super initialize.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1471
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1472
    changes           := List new.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1473
    self changeFileName: ObjectMemory nameForChanges. 
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1474
    AutoUpdate        := AutoUpdate ? false.                                     
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1475
    PrivateAsSeparate := PrivateAsSeparate ? false.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1476
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1477
    ObjectMemory addDependent:self.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1478
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1479
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1480
!NewChangesBrowser methodsFor:'menu modes'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1481
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1482
autoUpdateMode
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1483
    "returns whether autoUpdate is on/off"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1484
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1485
    ^AutoUpdate
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1486
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1487
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1488
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1489
autoUpdateMode: aMode
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1490
    "sets the autoUpdate to aMode"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1491
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1492
    AutoUpdate := aMode
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1493
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1494
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1495
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1496
privateAsSeparate
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1497
    "returns whether private classes are handled as separate changes"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1498
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1499
    ^PrivateAsSeparate
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1500
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1501
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1502
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1503
privateAsSeparate: aMode
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1504
    "sets the PrivateAsSeparate to aMode"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1505
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1506
    PrivateAsSeparate := aMode
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1507
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1508
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1509
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1510
!NewChangesBrowser methodsFor:'private'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1511
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1512
applyChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1513
    "applies aChange"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1514
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1515
    |aStream nm applyAction changeNr|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1516
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1517
    aStream := self streamForChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1518
    aStream isNil ifTrue:[^ self].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1519
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1520
    nm := self classNameOfChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1521
    nm notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1522
        |cls|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1523
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1524
        cls := Smalltalk at:(nm asSymbol) ifAbsent:[].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1525
        cls notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1526
            cls isLoaded ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1527
                cls autoload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1528
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1529
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1530
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1531
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1532
    applyAction := [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1533
        |sig|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1534
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1535
        (skipSignal notNil) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1536
            sig := skipSignal
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1537
        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1538
            sig := Object abortSignal
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1539
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1540
        sig catch:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1541
            |reader doItChunk methodsForChunk|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1542
1556
tz
parents: 1554
diff changeset
  1543
            "/ a followup methodsFor: chunk...
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1544
            aChange followUp ifTrue:[
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1545
                methodsForChunk := aChange chunk.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1546
            ] ifFalse:[
1556
tz
parents: 1554
diff changeset
  1547
                doItChunk := aStream nextChunk.   "/ an empty chunk sometimes...
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1548
                doItChunk notEmpty ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1549
                    Compiler evaluate:doItChunk notifying:self.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1550
                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1551
                    methodsForChunk := aStream nextChunk.   "/ the real one
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1552
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1553
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1554
            methodsForChunk notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1555
                Class methodRedefinitionSignal handle:[:ex |
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1556
                    ex proceedWith:#keep
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1557
                ] do:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1558
                    reader := Compiler evaluate:methodsForChunk notifying:self.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1559
                    reader fileInFrom:aStream notifying:self passChunk:false single:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1560
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1561
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1562
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1563
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1564
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1565
    "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1566
    "/ if I am showing the changes file, dont update it
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1567
    "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1568
    changeFileName = ObjectMemory nameForChanges ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1569
        Class withoutUpdatingChangesDo:applyAction
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1570
    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1571
        applyAction value
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1572
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1573
    aStream close
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1574
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1575
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1576
autoSelectChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1577
    "selects aChange"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1578
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1579
    self class autoSelectNext ifTrue:[         
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1580
        ((self listOfChanges indexOf: aChange) <= self listOfChanges size) ifTrue:[
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1581
            self selectionOfChange value: aChange.  
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1582
            self changeSelected:(self listOfChanges indexOf: aChange).
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1583
            self updateChannels.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1584
            ^ self
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1585
        ]
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1586
    ].         
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1587
    self updateChannels.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1588
    self unselectChange
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1589
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1590
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1591
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1592
autoSelectLast
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1593
    "selects the last change"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1594
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1595
    self autoSelectChange: (self listOfChanges at: self listOfChanges size ifAbsent: nil).
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1596
    self updateChannels.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1597
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1598
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1599
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1600
autoSelectOrEnd:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1601
    "selects aChange or the last"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1602
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1603
    |last|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1604
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1605
    last := self listOfChanges size.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1606
    aChange notNil ifTrue:[  
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1607
        self autoSelectChange:aChange
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1608
    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1609
        self selectionOfChange value: (self listOfChanges at: last ifAbsent: nil).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1610
        self changeSelected: last
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1611
    ].
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1612
    self updateChannels
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1613
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1614
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1615
changeColumn: aColumnLabel add: addOrRemove
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1616
    "adds or removes a attribute column to the table"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1617
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1618
    |newListOfChangeColumns|
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1619
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1620
    newListOfChangeColumns := self listOfChangeColumns asOrderedCollection.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1621
    addOrRemove
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1622
    ifTrue:
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1623
    [    
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1624
        newListOfChangeColumns add: 
1641
4c430e7eb617 table columns formatted
tz
parents: 1636
diff changeset
  1625
            ((self class tableColumnsForChangeAttributes collect: [:i| i decodeAsLiteralArray]) detect: [:column| column label = aColumnLabel])
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1626
    ]
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1627
    ifFalse:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1628
    [
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1629
        newListOfChangeColumns remove: 
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  1630
            (self listOfChangeColumns detect: [:column| column label = aColumnLabel] ifNone: nil) ifAbsent: nil
1553
eaeafd6f8cbe checkin from browser
tz
parents: 1546
diff changeset
  1631
    ].
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  1632
    self listOfChangeColumns contents: newListOfChangeColumns.
1553
eaeafd6f8cbe checkin from browser
tz
parents: 1546
diff changeset
  1633
    self autoSelectLast
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1634
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1635
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1636
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1637
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1638
changeFileName:aFileName
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1639
    "sets the name of the file with the changes"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1640
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1641
    changeFileName := (Filename currentDirectory asAbsoluteFilename construct: aFileName) name.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1642
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1643
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1644
checkClassIsLoaded:aClass
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1645
    "returns true if aClass is loaded"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1646
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1647
    |cls|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1648
    aClass isMeta ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1649
        cls := aClass soleInstance
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1650
    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1651
        cls := aClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1652
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1653
    cls isLoaded ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1654
        (self confirm:(cls name , ' is an autoloaded class.\I can only compare the methods texts if its loaded first.\\Load the class first ?') withCRs)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1655
        ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1656
            cls autoload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1657
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1658
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1659
    ^ cls isLoaded
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1660
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1661
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1662
checkIfFileHasChanged
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1663
    "checks if changes file has changed"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1664
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1665
    |f info|
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1666
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1667
    Processor removeTimedBlock:autoUpdateBlock.   
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1668
    f := changeFileName asFilename.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1669
    (info := f info) isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1670
        self newLabel:'unaccessable'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1671
    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1672
        (info modified) > changeFileTimestamp ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1673
            self newLabel:'outdated'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1674
            AutoUpdate ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1675
                self doReload
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1676
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1677
        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1678
            self newLabel:''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1679
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1680
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1681
    Processor addTimedBlock:autoUpdateBlock afterSeconds:5.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1682
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1683
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1684
classNameOfChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1685
    "returns the classname of aChange 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1686
     (for classChanges (i.e. xxx class), the non-metaClassName (i.e. xxx) is returned)"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1687
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1688
    |name|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1689
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1690
    name := self fullClassNameOfChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1691
    name isNil ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1692
    (name endsWith:' class') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1693
        ^ name copyWithoutLast:6
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1694
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1695
    ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1696
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1697
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1698
compareChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1699
    "compares aChange with the current version"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1700
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1701
    |aStream chunk sawExcla parseTree thisClass cat oldSource newSource
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1702
     parser sel oldMethod outcome showDiff d t1 t2 selector isLoaded
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1703
     method beep|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1704
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1705
    aStream := self streamForChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1706
    aStream isNil ifTrue:[^ self].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1707
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1708
    showDiff := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1709
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1710
    aChange followUp ifFalse:[
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1711
        sawExcla := aStream peekFor:(aStream class chunkSeparator).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1712
        chunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1713
    ] ifTrue:[
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1714
        chunk := aChange chunk.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1715
        sawExcla := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1716
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1717
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1718
    beep := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1719
    sawExcla ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1720
        outcome := 'Cannot compare this change\(i.e. this is not a method change)!!'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1721
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1722
        parseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1723
        (parseTree notNil and:[parseTree isMessage]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1724
            ((selector := parseTree selector) == #removeSelector:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1725
                thisClass := (parseTree receiver evaluate).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1726
                thisClass isBehavior ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1727
                    (self checkClassIsLoaded:thisClass) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1728
                        selector := (parseTree arg1 evaluate).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1729
                        (thisClass includesSelector:selector) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1730
                            outcome := 'Change removes the #' , selector , ' method from ' , thisClass name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1731
                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1732
                            outcome := 'Change has no effect\(there is no method for #' , selector , ' in ' , thisClass name , ')'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1733
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1734
                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1735
                        beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1736
                        outcome := 'Cannot compare this change (compare requires class to be loaded)!!'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1737
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1738
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1739
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1740
            selector == #category: ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1741
                parseTree receiver isMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1742
                    parseTree receiver selector == #compiledMethodAt: ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1743
                        (method := parseTree receiver evaluate) isMethod ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1744
                            method category = parseTree arg1 evaluate ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1745
                                outcome := 'Change has no effect\(same category)'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1746
                            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1747
                                outcome := 'Category is different (''' , method category , ''' vs. ''' , parseTree arg1 evaluate , ''')'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1748
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1749
                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1750
                            beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1751
                            outcome := 'There is no such method!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1752
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1753
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1754
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1755
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1756
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1757
    ] ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1758
        parseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1759
        (parseTree notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1760
         and:[parseTree ~~ #Error
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1761
         and:[parseTree isMessage]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1762
            (parseTree selector == #methodsFor:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1763
                thisClass := (parseTree receiver evaluate).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1764
                thisClass isBehavior ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1765
                    (isLoaded := self checkClassIsLoaded:thisClass) ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1766
                        outcome := 'Cannot compare this change\(compare requires class to be loaded)!!'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1767
                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1768
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1769
                    cat := parseTree arg1 evaluate.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1770
                    newSource := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1771
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1772
                    parser := Parser parseMethod:newSource in:thisClass.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1773
                    (parser notNil and:[parser ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1774
                        sel := parser selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1775
                        oldMethod := thisClass compiledMethodAt:sel.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1776
                        oldMethod notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1777
                            (oldMethod category = cat) ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1778
                                Transcript showCR:'Category changed.'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1779
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1780
                            oldSource := oldMethod source.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1781
                            (oldSource = newSource) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1782
                                outcome := 'Same source.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1783
                            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1784
                                oldSource isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1785
                                    beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1786
                                    outcome := 'No source for compare.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1787
                                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1788
                                    "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1789
                                    "/ compare for tabulator <-> space changes
1556
tz
parents: 1554
diff changeset
  1790
                                    "/ before showing diff...
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1791
                                    "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1792
                                    t1 := oldSource asCollectionOfLines collect:[:s | s withTabsExpanded].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1793
                                    t2 := newSource asCollectionOfLines collect:[:s | s withTabsExpanded].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1794
                                    t1 = t2 ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1795
                                        outcome := 'Same source.'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1796
                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1797
                                        outcome := 'Source changed!!'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1798
                                        showDiff := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1799
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1800
                                        "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1801
                                        "/ check if only historyLine diffs
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1802
                                        "/
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1803
                                        (HistoryManager notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1804
                                        and:[HistoryManager isActive]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1805
                                            (HistoryManager withoutHistoryLines:newSource)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1806
                                            =
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1807
                                            (HistoryManager withoutHistoryLines:oldSource)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1808
                                            ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1809
                                                outcome := 'Same source (history only).'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1810
                                                showDiff := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1811
                                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1812
                                        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1813
                                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1814
                                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1815
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1816
                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1817
                            isLoaded ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1818
                                beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1819
                                outcome := 'Method does not exist!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1820
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1821
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1822
                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1823
                        outcome := 'Change unparsable!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1824
                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1825
                    (showDiff and:[oldSource notNil and:[newSource notNil]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1826
                        d := DiffTextView 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1827
                                openOn:oldSource label:'Current version (in image)'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1828
                                and:newSource label:'Change version'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1829
                        d label:'method differences'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1830
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1831
                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1832
                    beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1833
                    outcome := 'Class does not exist!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1834
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1835
            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1836
                beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1837
                outcome := 'Not comparable!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1838
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1839
        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1840
            beep := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1841
            outcome := 'Not comparable!!'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1842
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1843
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1844
    aStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1845
    showDiff ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1846
        beep ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1847
            self warn:outcome withCRs.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1848
        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1849
            self information:outcome withCRs.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1850
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1851
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1852
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1853
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1854
compressForClass:aClassNameOrNil
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1855
    "compresses the list of changes; 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1856
     this replaces multiple method-changes by the last (i.e. the most recent) change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1857
     If the class argument is nil, compress for all classes.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1858
     otherwise, only changes for that class are compressed."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1859
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1860
    |aStream searchIndex anyMore deleteSet index  
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1861
     str snapshotProto snapshotPrefix snapshotNameIndex fileName|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1862
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1863
    aStream := FileStream readonlyFileNamed:changeFileName.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1864
    aStream isNil ifTrue:[^ self].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1865
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1866
    aClassNameOrNil isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1867
        self newLabel:'compressing...'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1868
    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1869
        self newLabel:'compressing for ' , aClassNameOrNil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1870
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1871
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1872
    CompressSnapshotInfo == true ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1873
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1874
         get a prototype snapshot record (to be independent of
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1875
         the actual format ..
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1876
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1877
        str := WriteStream on:String new.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1878
        Class addChangeRecordForSnapshot:'foo' to:str.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1879
        snapshotProto := str contents.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1880
        snapshotPrefix := snapshotProto copyTo:10.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1881
        snapshotNameIndex := snapshotProto findString:'foo'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1882
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1883
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1884
    self valueOfNotReading value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1885
    self valueOfHavingSelection value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1886
    self valueOfHavingChangeSelection value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1887
    self valueOfReadProgress value: 0.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1888
    self readProgressIndicator raise.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1889
    self filterLabel label: 'Comp:'; redraw.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1890
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1891
    self withExecuteCursorDo:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1892
        |numChanges classes selectors types excla sawExcla
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1893
         changeNr chunk aParseTree parseTreeChunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1894
         thisClass thisSelector codeChunk codeParser
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1895
         compressThis oldValue|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1896
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1897
        numChanges := changes size.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1898
        classes := Array new:numChanges.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1899
        selectors := Array new:numChanges.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1900
        types := Array new:numChanges.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1901
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1902
        "starting at the end, get the change class and change selector;
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1903
         collect all in classes / selectors"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1904
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1905
        changeNr := numChanges.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1906
        excla := aStream class chunkSeparator.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1907
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1908
        [changeNr >= 1] whileTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1909
            oldValue := self valueOfReadProgress value.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1910
                self valueOfReadProgress value: (100 - ((aStream position/aStream size) * 100) rounded).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1911
                oldValue ~~ self valueOfReadProgress value
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1912
                    ifTrue: [self readProgressIndicator redrawEdges;redraw].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1913
            aStream position:(changes at: changeNr) position.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1914
            sawExcla := aStream peekFor:excla.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1915
            chunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1916
            sawExcla ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1917
                "optimize a bit if multiple methods for same category arrive"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1918
                (chunk = parseTreeChunk) ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1919
                    aParseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1920
                    parseTreeChunk := chunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1921
                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1922
                (aParseTree notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1923
                and:[(aParseTree ~~ #Error) 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1924
                and:[aParseTree isMessage]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1925
                    (aParseTree selector == #methodsFor:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1926
                        thisClass := (aParseTree receiver evaluate).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1927
                        codeChunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1928
                        codeParser := Parser 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1929
                                          parseMethodSpecification:codeChunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1930
                                          in:thisClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1931
                                          ignoreErrors:true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1932
                                          ignoreWarnings:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1933
                        (codeParser notNil and:[codeParser ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1934
                            selectors at:changeNr put:(codeParser selector).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1935
                            classes at:changeNr put:thisClass.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1936
                            types at:changeNr put:#methodsFor
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1937
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1938
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1939
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1940
            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1941
                aParseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1942
                parseTreeChunk := chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1943
                (aParseTree notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1944
                and:[(aParseTree ~~ #Error) 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1945
                and:[aParseTree isMessage]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1946
                    (aParseTree selector == #removeSelector:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1947
                        selectors at:changeNr put:(aParseTree arg1 value ).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1948
                        classes at:changeNr put:(aParseTree receiver evaluate).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1949
                        types at:changeNr put:#removeSelector
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1950
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1951
                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1952
                    CompressSnapshotInfo == true ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1953
                        (chunk startsWith:snapshotPrefix) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1954
                            str := chunk readStream position:snapshotNameIndex.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1955
                            fileName := str upTo:(Character space).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1956
                            "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1957
                             kludge to allow use of match-check below
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1958
                            "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1959
                            selectors at:changeNr put:snapshotPrefix.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1960
                            classes at:changeNr put:fileName.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1961
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1962
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1963
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1964
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1965
            changeNr := changeNr - 1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1966
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1967
        aStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1968
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1969
        "for all changes, look for another class/selector occurence later
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1970
         in the list and, if there is one, add change number to the delete set"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1971
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1972
        deleteSet := OrderedCollection new.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1973
        changeNr := 1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1974
        [changeNr < changes size] whileTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1975
            thisClass := classes at:changeNr.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1976
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1977
            compressThis := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1978
            aClassNameOrNil isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1979
                compressThis := true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1980
            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1981
                "/ skipping unloaded/unknown classes
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1982
                thisClass isBehavior ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1983
                    thisClass isMeta ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1984
                        compressThis := aClassNameOrNil = thisClass soleInstance name. 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1985
                    ] ifFalse:[
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1986
                        compressThis := aClassNameOrNil = thisClass name.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1987
                        (PrivateAsSeparate not and: [thisClass isPrivate])
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1988
                            ifTrue:[compressThis := aClassNameOrNil = thisClass owningClass name]
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1989
                    ]
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  1990
                 ]
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1991
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1992
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1993
            compressThis ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1994
                thisSelector := selectors at:changeNr.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1995
                searchIndex := changeNr.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1996
                anyMore := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1997
                [anyMore] whileTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1998
                    searchIndex := classes indexOf:thisClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  1999
                                        startingAt:(searchIndex + 1).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2000
                    (searchIndex ~~ 0) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2001
                        ((selectors at:searchIndex) == thisSelector) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2002
                            thisClass notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2003
                                deleteSet add:changeNr.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2004
                                anyMore := false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2005
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2006
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2007
                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2008
                        anyMore := false      
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2009
                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2010
                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2011
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2012
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2013
            changeNr := changeNr + 1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2014
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2015
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2016
        "finally delete what has been found"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2017
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2018
        (deleteSet size > 0) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2019
            index := deleteSet size.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2020
            [index > 0] whileTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2021
                self silentDeleteChange: (changes at: (deleteSet at:index)).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2022
                index := index - 1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2023
            ].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2024
            self setChangeList
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2025
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2026
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2027
    self valueOfNotReading value: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2028
    self filterField raise.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2029
    self filterLabel label: 'Filter:'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2030
    self newLabel: ''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2031
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2032
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2033
contractClass:className selector:selector to:maxLen
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2034
    |s l|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2035
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2036
    s := className , ' ', selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2037
    s size > maxLen ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2038
        l := maxLen - 1 - selector size max:20.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2039
        s := (className contractTo:l) , ' ' , selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2040
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2041
        s size > maxLen ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2042
            l := maxLen - 1 - className size max:20.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2043
            s := className , ' ', (selector contractTo:l).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2044
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2045
            s size > maxLen ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2046
                s := (className contractTo:(maxLen // 2 - 1)) , ' ' , (selector contractTo:maxLen // 2)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2047
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2048
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2049
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2050
    ^ s
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2051
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2052
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2053
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2054
deleteChangesFrom:start to:stop
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2055
    "deletes a range of changes"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2056
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2057
    self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2058
    stop to:start by:-1 do:[:changeNr|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2059
        self silentDeleteChange:(self listOfChanges at: changeNr)
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2060
    ].
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2061
    self setChangeList
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2062
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2063
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2064
fullClassNameOfChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2065
    "returns the full classname of aChange 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2066
     (for classChanges (i.e. xxx class), a string ending in ' class' is returned.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2067
     - since parsing ascii methods is slow, keep result cached in 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2068
       changeClassNames for the next query"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2069
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2070
    |chunk aParseTree recTree sel name arg1Tree isMeta prevMethodDefNr
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2071
     words changeStream fullParseTree ownerTree ownerName oldDollarSetting|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2072
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2073
    aChange isNil ifTrue:[^ nil].
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2074
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2075
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2076
     first look, if not already known
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2077
    "
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2078
    name := aChange className.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2079
    name notNil ifTrue:[^ name].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2080
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2081
    prevMethodDefNr := changes indexOf: aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2082
    [(changes at:prevMethodDefNr) followUp] whileTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2083
        prevMethodDefNr := prevMethodDefNr - 1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2084
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2085
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2086
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2087
     get the chunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2088
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2089
    chunk := (changes at:prevMethodDefNr) chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2090
    chunk isNil ifTrue:[^ nil].       "mhmh - empty"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2091
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2092
    (chunk startsWith:'''---') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2093
        words := chunk asCollectionOfWords.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2094
        words size > 2 ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2095
            (words at:2) = 'checkin' ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2096
                name := words at:3.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2097
                aChange className: name.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2098
                ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2099
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2100
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2101
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2102
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2103
    "/ fix it - otherwise, it cannot be parsed
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2104
    (chunk endsWith:'primitiveDefinitions:') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2105
        chunk := chunk , ''''''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2106
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2107
    (chunk endsWith:'primitiveFunctions:') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2108
        chunk := chunk , ''''''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2109
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2110
    (chunk endsWith:'primitiveVariables:') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2111
        chunk := chunk , ''''''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2112
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2113
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2114
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2115
     use parser to construct a parseTree
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2116
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2117
    oldDollarSetting := Parser allowDollarInIdentifier.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2118
    [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2119
        Parser allowDollarInIdentifier:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2120
        aParseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2121
    ] valueNowOrOnUnwindDo:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2122
        Parser allowDollarInIdentifier:oldDollarSetting
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2123
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2124
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2125
    (aParseTree isNil or:[aParseTree == #Error]) ifTrue:[
1556
tz
parents: 1554
diff changeset
  2126
        ^ nil        "seems strange... (could be a comment)"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2127
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2128
    aParseTree isMessage ifFalse:[
1556
tz
parents: 1554
diff changeset
  2129
        ^ nil        "very strange... (whats that ?)"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2130
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2131
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2132
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2133
     ask parser for selector
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2134
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2135
    sel := aParseTree selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2136
    recTree := aParseTree receiver.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2137
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2138
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2139
     is it a method-change, methodRemove or comment-change ?
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2140
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2141
    (#(#'methodsFor:' 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2142
       #'privateMethodsFor:' 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2143
       #'protectedMethodsFor:' 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2144
       #'publicMethodsFor:' 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2145
       #'removeSelector:' 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2146
       #'comment:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2147
       #'primitiveDefinitions:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2148
       #'primitiveFunctions:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2149
       #'primitiveVariables:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2150
       #'renameCategory:to:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2151
       #'instanceVariableNames:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2152
    ) includes:sel) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2153
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2154
         yes, the className is the receiver
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2155
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2156
        (recTree notNil and:[recTree ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2157
            isMeta := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2158
            recTree isUnaryMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2159
                (recTree selector ~~ #class) ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2160
                "id class methodsFor:..."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2161
                recTree := recTree receiver.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2162
                isMeta := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2163
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2164
            recTree isPrimary ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2165
                name := recTree name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2166
                isMeta ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2167
                    name := name , ' class'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2168
                ].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2169
                aChange className: name.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2170
                ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2171
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2172
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2173
        "more strange things"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2174
        ^ nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2175
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2176
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2177
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2178
     is it a change in a class-description ?
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2179
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2180
    (('subclass:*' match:sel) 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2181
    or:[('variable*subclass:*' match:sel)]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2182
        "/ must parse the full changes text, to get
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2183
        "/ privacy information.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2184
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2185
        changeStream := self streamForChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2186
        changeStream notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2187
            chunk := changeStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2188
            changeStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2189
            fullParseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2190
            (fullParseTree isNil or:[fullParseTree == #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2191
                fullParseTree := nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2192
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2193
            fullParseTree isMessage ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2194
                fullParseTree := nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2195
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2196
            "/ actually, the nil case cannot happen
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2197
            fullParseTree notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2198
                aParseTree := fullParseTree.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2199
                sel := aParseTree selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2200
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2201
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2202
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2203
        arg1Tree := aParseTree arg1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2204
        (arg1Tree notNil and:[arg1Tree isConstant]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2205
            name := arg1Tree value asString.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2206
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2207
            "/ is it a private-class ?
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2208
            ('*privateIn:' match:sel) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2209
                ownerTree := aParseTree args last.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2210
                ownerName := ownerTree name asString.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2211
                name := ownerName , '::' , name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2212
            ].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2213
            aChange className: name.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2214
            ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2215
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2216
        "very strange"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2217
        ^ nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2218
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2219
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2220
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2221
     is it a class remove ?
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2222
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2223
    (sel == #removeClass:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2224
        (recTree notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2225
        and:[recTree ~~ #Error
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2226
        and:[recTree isPrimary
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2227
        and:[recTree name = 'Smalltalk']]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2228
            arg1Tree := aParseTree arg1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2229
            (arg1Tree notNil and:[arg1Tree isPrimary]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2230
                name := arg1Tree name.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2231
                aChange className: name.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2232
                ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2233
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2234
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2235
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2236
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2237
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2238
     is it a method category change ?
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2239
    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2240
    ((sel == #category:)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2241
    or:[sel == #privacy:]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2242
        (recTree notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2243
        and:[recTree ~~ #Error
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2244
        and:[recTree isMessage
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2245
        and:[recTree selector == #compiledMethodAt:]]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2246
            isMeta := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2247
            recTree := recTree receiver.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2248
            recTree isUnaryMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2249
                (recTree selector ~~ #class) ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2250
                "id class "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2251
                recTree := recTree receiver
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2252
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2253
            recTree isPrimary ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2254
                isMeta ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2255
                    name := name , ' class'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2256
                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2257
                name := recTree name.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2258
                aChange className: name.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2259
                ^ name
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2260
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2261
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2262
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2263
    ^ nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2264
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2265
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2266
newLabel:how
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2267
    "sets the label"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2268
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2269
    how size = 0 ifTrue: [^self window label:self class label].
1556
tz
parents: 1554
diff changeset
  2270
    self window label:self class label, ' (', how, ')'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2271
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2272
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2273
readChangesFileInBackground:inBackground
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2274
    "reads the changes file, creates a list of header-lines (changeChunks)
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2275
     and a list of chunk-positions (changePositions).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2276
     Starting with 2.10.3, the entries are multi-col entries;
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2277
     the cols are:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2278
        1   delta (only if comparing)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2279
                '+' -> new method (w.r.t. current state)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2280
                '-' -> removed method (w.r.t. current state)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2281
                '?' -> class does not exist currently
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2282
                '=' -> change is same as current methods source
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2283
        2   class/selector
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2284
        3   type of change
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2285
                doit
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2286
                method
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2287
                category change
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2288
        4   timestamp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2289
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2290
     since comparing slows down startup time, it is now disabled by
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2291
     default and can be enabled via a toggle."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2292
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2293
    |aStream maxLen i f|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2294
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2295
    self valueOfNotReading value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2296
    self valueOfHavingSelection value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2297
    self valueOfHavingChangeSelection value: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2298
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2299
    editingClassSource := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2300
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2301
    maxLen := 60.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2302
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2303
    f := changeFileName asFilename.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2304
    aStream :=  f readStream.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2305
    aStream isNil ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2306
1556
tz
parents: 1554
diff changeset
  2307
    self newLabel:'updating...'.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2308
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2309
    i := f info.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2310
    changeFileTimestamp := i modified.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2311
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2312
    self valueOfReadProgress value: 0.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2313
    self readProgressIndicator raise.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2314
    self filterLabel label: 'Read:'; redraw.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2315
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2316
    self withReadCursorDo:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2317
        |myProcess myPriority|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2318
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2319
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2320
         this is a time consuming operation (especially, if reading an
1556
tz
parents: 1554
diff changeset
  2321
         NFS-mounted directory; therefore lower my priority...
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2322
        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2323
        inBackground ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2324
            myProcess := Processor activeProcess.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2325
            myPriority := myProcess priority.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2326
            myProcess priority:(Processor userBackgroundPriority).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2327
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2328
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2329
        [
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2330
            |excla timeStampInfo lastChange|
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2331
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2332
            excla := aStream class chunkSeparator.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2333
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2334
            [aStream atEnd] whileFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2335
                |change changeDelta changeString changeType changeCategory
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2336
                 line s l changeClass sawExcla category 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2337
                 chunkText chunkPos sel oldValue|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2338
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2339
                change := Change new.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2340
                "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2341
                 get a chunk (separated by excla)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2342
                "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2343
                oldValue := self valueOfReadProgress value.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2344
                self valueOfReadProgress value: (((aStream position/aStream size) * 100) rounded).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2345
                oldValue ~~ self valueOfReadProgress value
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2346
                    ifTrue: [self readProgressIndicator redrawEdges;redraw].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2347
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2348
                aStream skipSeparators.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2349
                chunkPos := aStream position.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2350
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2351
                sawExcla := aStream peekFor:excla.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2352
                chunkText := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2353
                chunkText notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2354
                    |index headerLine cls|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2355
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2356
                    (chunkText startsWith:'''---- timestamp ') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2357
                        timeStampInfo := (chunkText copyFrom:16 to:(chunkText size - 6)) withoutSpaces.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2358
                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2359
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2360
                        "
1556
tz
parents: 1554
diff changeset
  2361
                         only first line is saved in changeChunks...
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2362
                        "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2363
                        index := chunkText indexOf:(Character cr).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2364
                        (index ~~ 0) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2365
                            chunkText := chunkText copyTo:(index - 1).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2366
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2367
                            "take care for comment changes - must still be a
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2368
                             valid expression for classNameOfChange: to work"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2369
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2370
                            (chunkText endsWith:'comment:''') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2371
                                chunkText := chunkText , '...'''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2372
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2373
                            (chunkText endsWith:'primitiveDefinitions:''') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2374
                                sel := 'primitiveDefinitions:'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2375
                                chunkText := chunkText copyWithoutLast:1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2376
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2377
                            (chunkText endsWith:'primitiveVariables:''') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2378
                                sel := 'primitiveVariables:'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2379
                                chunkText := chunkText copyWithoutLast:1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2380
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2381
                            (chunkText endsWith:'primitiveFunctions:''') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2382
                                sel := 'primitiveFunctions:'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2383
                                chunkText := chunkText copyWithoutLast:1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2384
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2385
                        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2386
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2387
                        change chunk: chunkText.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2388
                        change position: chunkPos. 
b37202441764 revised
tz
parents: 1556
diff changeset
  2389
                        lastChange notNil ifTrue: [lastChange lastPosition: chunkPos - 1].
b37202441764 revised
tz
parents: 1556
diff changeset
  2390
                        lastChange := change.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2391
                        change timeStamp: timeStampInfo.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2392
                        change followUp: false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2393
                        headerLine := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2394
                        changeDelta := ' '.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2395
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2396
                        sawExcla ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2397
                            (chunkText startsWith:'''---- snap') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2398
                                changeType := ''.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2399
                                headerLine := chunkText.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2400
                                changeString := (chunkText contractTo:maxLen).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2401
                                timeStampInfo := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2402
                            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2403
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2404
                                |p cls|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2405
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2406
                                headerLine := chunkText , ' (doIt)'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2407
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2408
                                "
1556
tz
parents: 1554
diff changeset
  2409
                                 first, assume doIt - then lets have a more detailed look...
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2410
                                "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2411
                                ((chunkText startsWith:'''---- file')
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2412
                                or:[(chunkText startsWith:'''---- check')]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2413
                                    changeType := ''.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2414
                                    timeStampInfo := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2415
                                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2416
                                    changeType := 'doIt'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2417
                                ].    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2418
                                changeString := (chunkText contractTo:maxLen).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2419
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2420
                                p := Parser parseExpression:chunkText inNameSpace:Smalltalk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2421
                                (p notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2422
                                 and:[p ~~ #Error
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2423
                                 and:[p isMessage]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2424
                                    sel := p selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2425
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2426
                                (sel == #removeSelector:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2427
                                    p receiver isUnaryMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2428
                                        cls := p receiver receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2429
                                        changeClass := (Smalltalk classNamed:cls) class.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2430
                                        cls := cls , ' class'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2431
                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2432
                                        cls := p receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2433
                                        changeClass := (Smalltalk classNamed:cls)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2434
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2435
                                    sel := (p args at:1) evaluate.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2436
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2437
                                    DeltaInfoColumn ifTrue:[
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2438
                                        (changeClass isNil or:[changeClass isLoaded not]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2439
                                            changeDelta := '?'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2440
                                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2441
                                            (changeClass implements:sel asSymbol) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2442
                                                changeDelta := '-'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2443
                                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2444
                                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2445
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2446
                                    changeType := 'remove'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2447
                                    changeString := self contractClass:cls selector:sel to:maxLen.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2448
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2449
                                (p ~~ #Error
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2450
                                and:[p isMessage 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2451
                                and:[p receiver isMessage
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2452
                                and:[p receiver selector == #compiledMethodAt:]]]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2453
                                    p receiver receiver isUnaryMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2454
                                        cls := p receiver receiver receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2455
                                        changeClass := (Smalltalk classNamed:cls) class.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2456
                                        cls := cls , ' class'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2457
                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2458
                                        cls := p receiver receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2459
                                        changeClass := (Smalltalk classNamed:cls)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2460
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2461
                                    (sel == #category:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2462
                                        sel := (p receiver args at:1) evaluate.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2463
                                        changeType := '(category change)'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2464
                                        changeString := self contractClass:cls selector:sel to:maxLen.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2465
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2466
                                    (sel == #privacy:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2467
                                        sel := (p receiver args at:1) evaluate.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2468
                                        changeType := 'privacy change'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2469
                                        changeString := self contractClass:cls selector:sel to:maxLen.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2470
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2471
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2472
                                (#(#'subclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2473
                                  #'variableSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2474
                                  #'variableByteSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2475
                                  #'variableWordSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2476
                                  #'variableLongSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2477
                                  #'variableFloatSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2478
                                  #'variableDoubleSubclass:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2479
                                  #'primitiveDefinitions:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2480
                                  #'primitiveFunctions:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2481
                                  #'primitiveVariables:'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2482
                                 ) includes:sel) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2483
                                    changeType := 'class definition'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2484
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2485
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2486
                        ] ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2487
                            |done first p className cls text methodPos|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2488
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2489
                            "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2490
                             method definitions actually consist of
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2491
                             two (or more) chunks; skip next chunk(s)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2492
                             up to an empty one.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2493
                             The system only writes one chunk,
1556
tz
parents: 1554
diff changeset
  2494
                             and we cannot handle more in this ChangesBrowser....
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2495
                            "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2496
                            className := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2497
                            p := Parser parseExpression:chunkText inNameSpace:Smalltalk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2498
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2499
                            (p notNil and:[p ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2500
                                sel := p selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2501
                                (sel == #methodsFor:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2502
                                    p receiver isUnaryMessage ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2503
                                        className := p receiver receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2504
                                        changeClass := (Smalltalk classNamed:className) class.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2505
                                        className := className , ' class'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2506
                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2507
                                        className := p receiver name.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2508
                                        changeClass := Smalltalk classNamed:className
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2509
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2510
                                    category := (p args at:1) evaluate.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2511
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2512
                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2513
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2514
                            done := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2515
                            first := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2516
                            [done] whileFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2517
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2518
                                changeDelta := ' '.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2519
                                methodPos := aStream position.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2520
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2521
                                text := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2522
                                text isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2523
                                    done := true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2524
                                ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2525
                                    done := text isEmpty
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2526
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2527
                                done ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2528
                                    first ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2529
                                        change := Change new.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2530
                                        change chunk: chunkText.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2531
                                        change string:changeString.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2532
                                        change position: methodPos. 
b37202441764 revised
tz
parents: 1556
diff changeset
  2533
                                        lastChange notNil ifTrue: [lastChange lastPosition: methodPos - 1].
b37202441764 revised
tz
parents: 1556
diff changeset
  2534
                                        lastChange := change.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2535
                                        change timeStamp: timeStampInfo.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2536
                                        change followUp: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2537
                                        editingClassSource := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2538
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2539
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2540
                                    first := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2541
                                    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2542
                                     try to find the selector
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2543
                                    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2544
                                    sel := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2545
                                    className notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2546
                                        p := Parser 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2547
                                                 parseMethodSpecification:text
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2548
                                                 in:nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2549
                                                 ignoreErrors:true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2550
                                                 ignoreWarnings:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2551
                                        (p notNil and:[p ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2552
                                            sel := p selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2553
                                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2554
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2555
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2556
                                    sel isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2557
                                        changeString := (chunkText contractTo:maxLen).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2558
                                        changeType := 'change'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2559
                                        headerLine := chunkText , ' (change)'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2560
                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2561
                                        changeString :=  self contractClass:className selector:sel to:maxLen.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2562
                                        changeType := 'method definition'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2563
                                        changeCategory := category.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2564
                                        headerLine := className , ' ' , sel , ' ' , '(change category: ''' , category , ''')'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2565
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2566
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2567
                                    DeltaInfoColumn ifTrue:[ 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2568
                                        changeClass isNil ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2569
                                            changeClass isMeta ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2570
                                                cls := changeClass soleInstance
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2571
                                            ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2572
                                                cls := changeClass
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2573
                                            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2574
                                        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2575
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2576
                                        (changeClass isNil or:[cls isLoaded not]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2577
                                            changeDelta := '?'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2578
                                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2579
                                            (changeClass implements:sel asSymbol) ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2580
                                                changeDelta := '+'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2581
                                            ] ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2582
                                                |m currentText t1 t2|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2583
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2584
                                                m := changeClass compiledMethodAt:sel asSymbol.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2585
                                                currentText := m source.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2586
                                                currentText notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2587
                                                    text asString = currentText asString ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2588
                                                        changeDelta := '='
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2589
                                                    ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2590
                                                        t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2591
                                                        t2 := text asCollectionOfLines collect:[:s | s withTabsExpanded].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2592
                                                        t1 = t2 ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2593
                                                            changeDelta := '='
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2594
                                                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2595
                                                    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2596
                                                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2597
                                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2598
                                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2599
                                    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2600
                                    change delta:changeDelta.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2601
                                    change string:changeString.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2602
                                    change type:changeType.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2603
                                    change category: changeCategory.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2604
                                    change timeStamp:timeStampInfo.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2605
                                    changes add:change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2606
                                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2607
                                changeString := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2608
                                headerLine := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2609
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2610
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2611
                        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2612
                        changeString notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2613
                            change delta:changeDelta.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2614
                            change string:changeString.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2615
                            change type:changeType.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2616
                            change timeStamp:timeStampInfo.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2617
                            changes add:change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2618
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2619
                        ] ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2620
                            headerLine notNil ifTrue:[     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2621
                                changes add: change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2622
                            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2623
                        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2624
                    ]
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2625
                ]. 
b37202441764 revised
tz
parents: 1556
diff changeset
  2626
                change lastPosition: aStream position.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2627
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2628
            modified := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2629
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2630
        ] valueNowOrOnUnwindDo:[ 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2631
            aStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2632
            inBackground ifTrue:[myProcess priority:myPriority].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2633
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2634
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2635
    self setChangeList.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2636
    self valueOfNotReading value: true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2637
    self filterField raise.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2638
    self filterLabel label: 'Filter:'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2639
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2640
    self checkIfFileHasChanged. 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2641
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2642
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2643
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2644
selectorOfMethodChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2645
    "returns the selector of the method change, or nil if it is not a method change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2646
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2647
    |source parser sel|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2648
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2649
    source := self sourceOfMethodChange:aChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2650
    source isNil ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2651
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2652
    parser := Parser 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2653
                parseMethod:source 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2654
                in:nil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2655
                ignoreErrors:true 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2656
                ignoreWarnings:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2657
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2658
    (parser notNil and:[parser ~~ #Error]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2659
        sel := parser selector.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2660
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2661
    ^ sel
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2662
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2663
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2664
setChangeList
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2665
    "sets the list of changes into the list for the table by evaluating filterCompletionBlock"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2666
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2667
    self unselectChange.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2668
    filterCompletionBlock value: self valueOfFilter value.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2669
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2670
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2671
silentDeleteChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2672
    "delete aChange do not update changeListView"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2673
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2674
    modified := true.      
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2675
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2676
    changes remove:aChange
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2677
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2678
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2679
silentDeleteChangesFor:aClassName from:start to:stop
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2680
    "deletes changes for aChange in the range [start,stop]
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2681
     and returns the number of the deleted changes"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2682
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2683
    |index numDeleted clsName|
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2684
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2685
    numDeleted := 0.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2686
    index := stop.          
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2687
    [index >= start] whileTrue:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2688
    [                                         
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2689
        ((clsName := self classNameOfChange:(self listOfChanges at: index)) notNil and:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2690
        [(clsName = aClassName or: [PrivateAsSeparate not and: [(clsName upTo: $:) = aClassName]])])
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2691
        ifTrue:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2692
        [     
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2693
            self silentDeleteChange:(self listOfChanges at: index).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2694
            numDeleted := numDeleted + 1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2695
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2696
        index := index - 1
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2697
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2698
    ^ numDeleted
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2699
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2700
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2701
sourceOfMethodChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2702
    "returns the source code of the method change, or nil if it is not a method change."
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2703
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2704
    |aStream chunk sawExcla parseTree sourceChunk|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2705
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2706
    aStream := self streamForChange:aChange. 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2707
    aStream isNil ifTrue:[^ nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2708
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2709
    aChange followUp ifFalse:[
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2710
        sawExcla := aStream peekFor:(aStream class chunkSeparator).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2711
        chunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2712
    ] ifTrue:[
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2713
        chunk := aChange chunk.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2714
        sawExcla := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2715
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2716
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2717
    sawExcla ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2718
        parseTree := Parser parseExpression:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2719
        (parseTree notNil and:[parseTree isMessage]) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2720
            (parseTree selector == #methodsFor:) ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2721
                sourceChunk := aStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2722
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2723
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2724
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2725
    aStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2726
    ^ sourceChunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2727
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2728
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2729
streamForChange:aChange
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2730
    "returns the stream for aChange"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2731
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2732
    |aStream|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2733
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2734
    aStream := FileStream readonlyFileNamed:changeFileName.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2735
    aStream isNil ifTrue:[^ nil].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2736
    aStream position:aChange position.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2737
    ^ aStream
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2738
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2739
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2740
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2741
unselectChange
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2742
    "unselects the current change"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2743
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2744
    self selectionOfChange value: nil.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2745
    self valueOfChangeText value: nil
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2746
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2747
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2748
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2749
withSelectedChangeDo:aBlock
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2750
    "just a helper, check for a selected change and evaluate aBlock
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2751
     with busy cursor"
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2752
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2753
    |change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2754
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2755
    (change := self selectionOfChange value) notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2756
    ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2757
        self withExecuteCursorDo:[aBlock value:change]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2758
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2759
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2760
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2761
!NewChangesBrowser methodsFor:'startup / release'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2762
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2763
closeRequest
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2764
    "asks for saving before closing"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2765
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2766
    self valueOfNotSaving value ifFalse: [^nil].
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2767
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2768
    modified ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2769
        (OptionBox 
1636
14e3ccc3e7c6 use Workspace
tz
parents: 1569
diff changeset
  2770
              request:(resources at:'Changes list was modified!!') withCRs
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2771
              label:'Changes Browser'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2772
              form:(WarningBox iconBitmap)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2773
              buttonLabels:#('Cancel' ' Waste it and proceed ')
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2774
              values:#(#abort #ignore)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2775
              default:#save
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2776
        ) == #abort ifTrue:[^self].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2777
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2778
    super closeRequest
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2779
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2780
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2781
postOpenWith:aBuilder
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2782
    "starts reading the changes from the file and
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2783
     builds entryCompletionBlock for the filterField before opening"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2784
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2785
    super postOpenWith:aBuilder.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2786
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2787
    builder namedComponents do: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2788
    [:aView|    
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2789
        aView allSubViewsDo: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2790
        [:v|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2791
            v redraw
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2792
        ] 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2793
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2794
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2795
    autoUpdateBlock := [self checkIfFileHasChanged].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2796
    Processor addTimedBlock:autoUpdateBlock afterSeconds:5.  
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2797
    self updateInfoLabel.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2798
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2799
    self filterField entryCompletionBlock:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2800
    (filterCompletionBlock := [:value|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2801
        |filter filters i changesCopy|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2802
        self unselectChange.
1636
14e3ccc3e7c6 use Workspace
tz
parents: 1569
diff changeset
  2803
        filter := self filterField contents.
14e3ccc3e7c6 use Workspace
tz
parents: 1569
diff changeset
  2804
        (filters := filter asArrayOfSubstrings) size > 0 ifTrue: 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2805
        [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2806
            i := 0.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2807
            changesCopy := changes copy.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2808
            filters do: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2809
            [:filter|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2810
                i := i + 1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2811
                changesCopy contents: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2812
                    (changesCopy select: [:row| 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2813
                        filter match: (row string asArrayOfSubstrings at: i ifAbsent: [''''])])
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2814
            ].            
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2815
            self listOfChanges contents: changesCopy
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2816
        ] 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2817
        ifFalse: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2818
        [
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2819
            self listOfChanges contents: changes
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2820
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2821
        self autoSelectLast.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2822
    ]).
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2823
1642
fe1782133921 handle errorSignal, if closing before completion of reading
tz
parents: 1641
diff changeset
  2824
    Object errorSignal handle: [:ex|] do: [self readChangesFileInBackground:true].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2825
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2826
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2827
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2828
uninitialize
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2829
    "removes the autoUpdateBlock from the Processor and myself from the ObjectMemory"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2830
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2831
    Processor removeTimedBlock:autoUpdateBlock.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2832
    ObjectMemory removeDependent:self
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2833
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2834
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2835
!NewChangesBrowser methodsFor:'user actions'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2836
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2837
doApply
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2838
    "applies the selected change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2839
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2840
    self withSelectedChangeDo:[:change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2841
        skipSignal := nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2842
        self applyChange:change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2843
        self autoSelectChange: (self listOfChanges at: (self listOfChanges indexOf: change) ifAbsent: nil)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2844
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2845
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2846
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2847
doApplyAll
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2848
    "applies all changes"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2849
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2850
    self withExecuteCursorDo:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2851
        |change|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2852
        self unselectChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2853
        skipSignal isNil ifTrue:[skipSignal := Signal new].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2854
        1 to:self listOfChanges size do:[:changeNr |
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2855
            self selectionOfChange value:(change := self listOfChanges at: changeNr).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2856
            self applyChange:change
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2857
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2858
        self autoSelectLast
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2859
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2860
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2861
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2862
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2863
doApplyAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2864
    "applies all changes having the same class like the selected one"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2865
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2866
    self doApplyForClassToEndFrom: 1
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2867
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2868
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2869
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2870
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2871
doApplyForClassToEnd
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2872
    "applies all changes having the same class like the selected one from the selected to the end"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2873
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2874
    self doApplyForClassToEndFrom: (self listOfChanges indexOf: self selectionOfChange value)
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2875
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2876
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2877
doApplyForClassToEndFrom: start
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2878
    "applies changes with same class like the selected one from start to end"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2879
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2880
    self withSelectedChangeDo:[:change|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2881
        |classNameToApply thisClassName lastChange change2|
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2882
        (classNameToApply := self classNameOfChange:change) notNil 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2883
        ifTrue:
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2884
        [             
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2885
            self unselectChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2886
            skipSignal isNil ifTrue:[skipSignal := Signal new].
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2887
            start to:self listOfChanges size do:
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2888
            [:changeNr|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2889
                change2 := self listOfChanges at: changeNr.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2890
                ((thisClassName := self classNameOfChange:change2) notNil and:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2891
                [thisClassName = classNameToApply or:
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2892
                [PrivateAsSeparate not and: [(thisClassName upTo: $:) = classNameToApply]]])
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2893
                ifTrue:
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2894
                [                           
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2895
                    self selectionOfChange value: change2.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2896
                    self applyChange:change2.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2897
                    lastChange := change2
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2898
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2899
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2900
            self autoSelectChange:lastChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2901
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2902
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2903
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2904
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2905
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2906
doApplyFromLastSnapshot
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2907
    "applies all changes made since the last snapshot"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2908
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2909
    self autoSelectLast.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2910
    (self doFindSnapshot: 'last') ifTrue: [self doApplyToEnd]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2911
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2912
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2913
doApplyToEnd
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2914
    "applies all changes from selected one to be end"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2915
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2916
    self withSelectedChangeDo:[:change|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2917
        self unselectChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2918
        skipSignal isNil ifTrue:[skipSignal := Signal new].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2919
        (self listOfChanges indexOf: change) to: self listOfChanges size do:[:changeNr|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2920
            self selectionOfChange value:(self listOfChanges at: changeNr).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2921
            self applyChange:(self listOfChanges at: changeNr)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2922
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2923
        self autoSelectChange:self listOfChanges last
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2924
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2925
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2926
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2927
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2928
doBrowseClass
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2929
    "opens a System Browser on the class of a change (and selector)"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2930
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2931
    |className cls isMeta|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2932
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2933
    className := self fullClassNameOfChange:self selectionOfChange value.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2934
    className notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2935
        isMeta := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2936
        (className endsWith:' class') ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2937
            className := className copyWithoutLast:6.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2938
            isMeta := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2939
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2940
        (cls := Smalltalk classNamed:className) notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2941
            isMeta ifTrue:[cls := cls class].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2942
            SystemBrowser 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2943
                openInClass:cls 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2944
                selector:(self selectorOfMethodChange:self selectionOfChange value)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2945
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2946
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2947
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2948
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2949
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2950
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2951
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2952
doCompare
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2953
    "compares a change with the current system version"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2954
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2955
    |change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2956
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2957
    (change := self selectionOfChange value) notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2958
        self withExecuteCursorDo:[self compareChange:change]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2959
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2960
    self newLabel:''
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2961
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2962
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2963
doCompress
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2964
    "compresses the changes, i.e. replaces multiple changes by the last change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2965
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2966
    |changesSizeBefore|
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2967
    (changesSizeBefore := changes size) == 0 ifTrue: [^self warn: 'Nothing to compress!!'].
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2968
    self setChangeList.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2969
    self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2970
    self compressForClass:nil.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2971
    self setChangeList.    
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2972
    self updateInfoLabel.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2973
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2974
    self information: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2975
        'Compression Rate:   ', (((changesSizeBefore - changes size)/changesSizeBefore) * 100) rounded printString, '%\' withCRs,
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  2976
        'Obselete Changes: ', (changesSizeBefore - changes size) printString, ' from ', changesSizeBefore printString
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2977
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2978
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2979
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2980
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2981
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2982
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2983
doCompressForClass
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  2984
    "compresses changes for the selected class.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2985
     this replaces multiple method-changes by the last (i.e. the most recent) change."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2986
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2987
    self withSelectedChangeDo:[:change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2988
        | classNameToCompress |
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2989
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2990
        (classNameToCompress := self classNameOfChange:change) notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2991
            self compressForClass:classNameToCompress.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2992
            filterCompletionBlock value: self valueOfFilter value.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2993
            self autoSelectLast
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2994
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2995
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2996
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2997
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2998
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  2999
doDelete
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3000
    "deletes the selected change"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3001
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3002
    |change selectionIndex|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3003
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3004
    (change := self selectionOfChange value) notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3005
        selectionIndex := self listOfChanges indexOf: change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3006
        self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3007
        self silentDeleteChange:change.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3008
        self listOfChanges remove:change.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3009
        self autoSelectOrEnd: (self listOfChanges at: selectionIndex ifAbsent: [nil]).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3010
    ]
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3011
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3012
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3013
doDeleteAll
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3014
    "deletes all changes"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3015
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3016
    self unselectChange.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3017
    self deleteChangesFrom:1 to: self listOfChanges size.
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3018
    self autoSelectOrEnd: nil
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3019
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3020
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3021
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3022
doDeleteAllForClass
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3023
    "deletes all changes having the same class like the selected one"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3024
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3025
    self doDeleteForClassToEndFrom: 1
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3026
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3027
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3028
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3029
doDeleteForClassToEnd
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3030
    "deletes all changes having the same class like the selected one from the selected to the end"
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3031
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3032
    self withSelectedChangeDo:[:change|
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3033
        self doDeleteForClassToEndFrom: (self listOfChanges indexOf: change)
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3034
    ]
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3035
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3036
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3037
!
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3038
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3039
doDeleteForClassToEndFrom: start
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3040
    "deletes changes with same class like the selected one from start to end"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3041
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3042
    self withSelectedChangeDo:[:change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3043
        |classNameToDelete|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3044
        (classNameToDelete := self classNameOfChange:change) notNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3045
            self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3046
            self silentDeleteChangesFor:classNameToDelete 
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3047
                                   from:start
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3048
                                     to:self listOfChanges size.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3049
            self setChangeList.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3050
            self autoSelectOrEnd: nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3051
        ]
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3052
    ].
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3053
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3054
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3055
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3056
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3057
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3058
doDeleteToEnd
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3059
    "deletes all changes from selected one to be end"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3060
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3061
    |changeNr|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3062
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3063
    changeNr := (self listOfChanges indexOf: self selectionOfChange value).
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3064
    changeNr ~~ 0 ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3065
        self deleteChangesFrom:changeNr to: self listOfChanges size.
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3066
        self unselectChange.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3067
        self autoSelectOrEnd: nil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3068
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3069
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3070
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3071
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3072
doFilter: aFilterString
b37202441764 revised
tz
parents: 1556
diff changeset
  3073
    "filter the changes with aFilterString"
b37202441764 revised
tz
parents: 1556
diff changeset
  3074
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3075
    self selectionOfChange value: nil.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3076
    self valueOfFilter value: aFilterString withoutNotifying: self.
b37202441764 revised
tz
parents: 1556
diff changeset
  3077
    self valueOfFilter changed.
b37202441764 revised
tz
parents: 1556
diff changeset
  3078
    self autoSelectLast
b37202441764 revised
tz
parents: 1556
diff changeset
  3079
!
b37202441764 revised
tz
parents: 1556
diff changeset
  3080
1644
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
  3081
doFilterSourceType: aFilterStringTypeString
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
  3082
    "filter the source changes with aFilterStringTypeString"
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3083
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3084
    self selectionOfChange value: nil.
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3085
    self listOfChanges contents: #().
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3086
    self valueOfFilter value: '' withoutNotifying: self.
1644
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
  3087
    self listOfChanges contents: (changes select: [:change| change type = 'source' and: [aFilterStringTypeString match: change string]]).
16586a2c52b2 filter problems fixed
tz
parents: 1642
diff changeset
  3088
    self autoSelectLast
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3089
b37202441764 revised
tz
parents: 1556
diff changeset
  3090
!
b37202441764 revised
tz
parents: 1556
diff changeset
  3091
b37202441764 revised
tz
parents: 1556
diff changeset
  3092
doFilterType: aFilterTypeString
b37202441764 revised
tz
parents: 1556
diff changeset
  3093
    "filter the changes with aFilterTypeString"
b37202441764 revised
tz
parents: 1556
diff changeset
  3094
1569
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3095
    self selectionOfChange value: nil.
96d29b2efc76 revised
tz
parents: 1568
diff changeset
  3096
    self valueOfFilter value: '' withoutNotifying: self.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3097
    self listOfChanges contents: (changes select: [:change| change type = aFilterTypeString]).
b37202441764 revised
tz
parents: 1556
diff changeset
  3098
    self autoSelectLast
b37202441764 revised
tz
parents: 1556
diff changeset
  3099
b37202441764 revised
tz
parents: 1556
diff changeset
  3100
!
b37202441764 revised
tz
parents: 1556
diff changeset
  3101
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3102
doFindSnapshot: what
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3103
    "finds the last made snapshot and selects it"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3104
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3105
    self listOfChanges detect: [:change| change type = 'image'] ifNone: [^self warn: 'No snapshot found!!'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3106
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3107
    self withSelectedChangeDo:[:change|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3108
        |snapshotNr snapshotFound|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3109
        snapshotNr := self listOfChanges indexOf: change.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3110
        snapshotFound := false.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3111
        [snapshotNr > 0 and: [snapshotFound not]] 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3112
        whileTrue: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3113
        [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3114
            what = 'last'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3115
            ifTrue:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3116
            [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3117
                snapshotNr := snapshotNr - 1.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3118
                snapshotNr == 0 ifTrue: [snapshotNr := self listOfChanges size].   
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3119
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3120
            ifFalse:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3121
            [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3122
                snapshotNr := snapshotNr + 1.
1556
tz
parents: 1554
diff changeset
  3123
                snapshotNr > self listOfChanges size ifTrue: [snapshotNr := 1].
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3124
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3125
            (self listOfChanges at: snapshotNr ifAbsent: [^self autoSelectChange: (what = 'last' ifTrue: [self listOfChanges last] ifFalse: [self listOfChanges first])]) type = 'image'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3126
            ifTrue: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3127
            [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3128
                snapshotFound := true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3129
                self autoSelectChange:(self listOfChanges at: snapshotNr)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3130
            ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3131
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3132
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3133
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3134
1556
tz
parents: 1554
diff changeset
  3135
doLoad
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3136
    "opens a dialog for loading changes from a file"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3137
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3138
    |fileName|
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3139
    (fileName :=
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3140
        (FileSelectionBrowser
1556
tz
parents: 1554
diff changeset
  3141
            request: 'Load Changes List'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3142
            fileName: changeFileName
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3143
            withFileFilters: #('c*'))) notNil
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3144
    ifTrue:
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3145
    [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3146
        changeFileName := fileName.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3147
        changes removeAll.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3148
        self readChangesFileInBackground:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3149
        self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3150
        Processor addTimedBlock:autoUpdateBlock afterSeconds:5.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3151
        self updateInfoLabel.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3152
        self autoSelectLast
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3153
    ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3154
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3155
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3156
doReload
1546
ffea21e237ed revised
tz
parents: 1545
diff changeset
  3157
    "reloads the changes from the file"
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3158
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3159
    changes removeAll.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3160
    self unselectChange.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3161
    self readChangesFileInBackground:true.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3162
    self autoSelectLast
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3163
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3164
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3165
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3166
doSave
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3167
    "write back the changes file. To avoid problems when the disk is full
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3168
     or a crash occurs while writing (well, or someone kills us), 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3169
     first write the stuff to a new temporary file. If this works ok,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3170
     rename the old change-file to a .bak file and finally rename the
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3171
     tempfile back to the change-file. 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3172
     That way, if anything happens, either the original file is left unchanged,
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3173
     or we have at least a backup of the previous change file."
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3174
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3175
    |inStream outStream tempfile stamp f| 
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3176
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3177
    self valueOfNotReading value ifFalse: [^nil].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3178
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3179
    editingClassSource ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3180
        (self confirm:'You are editing a classes sourceFile (not a changeFile) !!\Are you certain, you want to overwrite it ?' withCRs)
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3181
        ifFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3182
            ^ false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3183
        ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3184
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3185
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3186
    tempfile := Filename newTemporaryIn:nil.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3187
    tempfile exists ifTrue:[tempfile remove].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3188
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3189
    outStream := tempfile writeStream.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3190
    outStream isNil ifTrue:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3191
        self warn:'Cannot create temporary file in current directory.'.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3192
        ^ false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3193
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3194
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3195
    inStream := FileStream readonlyFileNamed:changeFileName.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3196
    inStream isNil ifTrue:[^ false].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3197
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3198
    self withCursor:(Cursor write) do:[
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3199
        |excla sawExcla done first chunk
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3200
         nChanges "{Class:SmallInteger}" |
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3201
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3202
        Stream writeErrorSignal handle:[:ex |
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3203
            self warn:('Could not update the changes file.\\' , ex errorString) withCRs.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3204
            ^ false
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3205
        ] do:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3206
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3207
            self valueOfNotSaving value: false.
b37202441764 revised
tz
parents: 1556
diff changeset
  3208
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3209
            excla := inStream class chunkSeparator.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3210
            nChanges := changes size.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3211
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3212
            1 to:nChanges do:[:index |     
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3213
                inStream position: (changes at: index) position.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3214
                sawExcla := inStream peekFor:excla.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3215
                chunk := inStream nextChunk.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3216
b37202441764 revised
tz
parents: 1556
diff changeset
  3217
                (chunk notNil
b37202441764 revised
tz
parents: 1556
diff changeset
  3218
                and:[(chunk startsWith:'''---- snap') not]) ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  3219
                    (stamp := (changes at:index) timeStamp) notNil ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  3220
                        outStream nextPutAll:'''---- timestamp ' , stamp , ' ----'''.
b37202441764 revised
tz
parents: 1556
diff changeset
  3221
                        outStream nextPut:excla; cr.
b37202441764 revised
tz
parents: 1556
diff changeset
  3222
                    ].
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3223
                ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3224
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3225
                sawExcla ifTrue:[     
b37202441764 revised
tz
parents: 1556
diff changeset
  3226
                    outStream nextPut:excla.   
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3227
                    outStream nextChunkPut:chunk.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3228
                    outStream cr; cr.
b37202441764 revised
tz
parents: 1556
diff changeset
  3229
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3230
                    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3231
                     a method-definition chunk - skip followups
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3232
                    "
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3233
                    done := false.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3234
                    first := true.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3235
                    [done] whileFalse:[
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3236
                        chunk := inStream nextChunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3237
                        chunk isNil ifTrue:[
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3238
                            outStream cr; cr.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3239
                            done := true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3240
                        ] ifFalse:[
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3241
                            chunk isEmpty ifTrue:[
b37202441764 revised
tz
parents: 1556
diff changeset
  3242
                                outStream space; nextChunkPut:chunk; cr; cr.
b37202441764 revised
tz
parents: 1556
diff changeset
  3243
                                done := true.
b37202441764 revised
tz
parents: 1556
diff changeset
  3244
                            ] ifFalse:[
b37202441764 revised
tz
parents: 1556
diff changeset
  3245
                                first ifFalse:[
b37202441764 revised
tz
parents: 1556
diff changeset
  3246
                                    outStream cr; cr.
b37202441764 revised
tz
parents: 1556
diff changeset
  3247
                                ].
b37202441764 revised
tz
parents: 1556
diff changeset
  3248
                                outStream nextChunkPut:chunk.
b37202441764 revised
tz
parents: 1556
diff changeset
  3249
                            ].
b37202441764 revised
tz
parents: 1556
diff changeset
  3250
                        ].
b37202441764 revised
tz
parents: 1556
diff changeset
  3251
                        first := false.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3252
                    ].
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3253
                ] ifFalse:[
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3254
                    outStream nextChunkPut:chunk.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3255
                    outStream cr
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3256
                ]
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3257
            ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3258
            outStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3259
            inStream close.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3260
        ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3261
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3262
        f := changeFileName asFilename.
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3263
        f renameTo:(f withSuffix:'bak').
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3264
        tempfile renameTo:changeFileName.
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3265
        self doReload.
b37202441764 revised
tz
parents: 1556
diff changeset
  3266
        modified := false.
b37202441764 revised
tz
parents: 1556
diff changeset
  3267
        self valueOfNotSaving value: true.
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3268
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3269
    ^ true
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3270
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3271
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3272
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3273
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3274
!NewChangesBrowser::Change methodsFor:'accessing'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3275
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3276
category
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3277
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3278
    ^category
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3279
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3280
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3281
category: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3282
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3283
    category := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3284
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3285
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3286
chunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3287
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3288
    ^chunk
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3289
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3290
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3291
chunk: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3292
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3293
    chunk := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3294
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3295
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3296
className
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3297
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3298
    ^className
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3299
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3300
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3301
className: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3302
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3303
    className := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3304
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3305
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3306
delta
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3307
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3308
    delta size = 0 ifTrue: [^''].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3309
    delta = '='    ifTrue: [^'Current'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3310
    delta = '?'    ifTrue: [^'No class'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3311
    delta = '-'    ifTrue: [^'Removed'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3312
    delta = '+'    ifTrue: [^'New'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3313
    ^delta
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3314
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3315
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3316
delta: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3317
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3318
    delta := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3319
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3320
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3321
followUp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3322
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3323
    ^followUp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3324
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3325
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3326
followUp: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3327
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3328
    followUp := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3329
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3330
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3331
lastPosition: aValue
b37202441764 revised
tz
parents: 1556
diff changeset
  3332
b37202441764 revised
tz
parents: 1556
diff changeset
  3333
    lastPosition := aValue
b37202441764 revised
tz
parents: 1556
diff changeset
  3334
!
b37202441764 revised
tz
parents: 1556
diff changeset
  3335
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3336
listColor
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3337
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3338
    (string at: 3) ~~ $- ifTrue: 
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3339
    [
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3340
        (self type = 'class') ifTrue: [^Color gray].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3341
        ^Color white
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3342
    ].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3343
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3344
    (string includesMatchString: '---- s') ifTrue: [^Color red].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3345
    (string includesMatchString: '---- f') ifTrue: [^Color cyan: 100 magenta: 20 yellow: 20].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3346
    (string includesMatchString: '---- c') ifTrue: [^Color blue].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3347
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3348
    ^Color white
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3349
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3350
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3351
position
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3352
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3353
    ^position
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3354
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3355
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3356
position: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3357
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3358
    position := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3359
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3360
1568
b37202441764 revised
tz
parents: 1556
diff changeset
  3361
positions
b37202441764 revised
tz
parents: 1556
diff changeset
  3362
b37202441764 revised
tz
parents: 1556
diff changeset
  3363
    ^position printString, ' - ', lastPosition printString
b37202441764 revised
tz
parents: 1556
diff changeset
  3364
!
b37202441764 revised
tz
parents: 1556
diff changeset
  3365
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3366
string
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3367
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3368
    ^string
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3369
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3370
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3371
string: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3372
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3373
    string := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3374
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3375
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3376
timeStamp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3377
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3378
    ^timeStamp
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3379
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3380
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3381
timeStamp: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3382
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3383
    timeStamp := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3384
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3385
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3386
type
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3387
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3388
    (type = 'doIt' or: [type = 'remove']) ifTrue: [^'class'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3389
    (type size = 0) ifTrue: [(string includesMatchString: '---- s') ifTrue: [^'image'] ifFalse: [^'source']].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3390
    (self category = nil) ifTrue: [^'class'].
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3391
    ^'method'
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3392
!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3393
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3394
type: aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3395
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3396
    type := aValue
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3397
! !
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3398
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3399
!NewChangesBrowser class methodsFor:'documentation'!
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3400
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3401
version
1647
44936f6d17ed geometry
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
  3402
    ^ '$Header: /cvs/stx/stx/libtool/NewChangesBrowser.st,v 1.12 1998-05-18 11:19:54 cg Exp $'
1545
e2d6f6ca36ef initial checkin
tz
parents:
diff changeset
  3403
! !