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