Workspace.st
author Claus Gittinger <cg@exept.de>
Wed, 12 Jun 1996 14:57:41 +0200
changeset 762 832730063164
parent 693 8369529a2ac4
child 857 4990383442cc
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     1
"
5
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
     3
	      All Rights Reserved
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     4
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    11
"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    12
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    13
TextCollector subclass:#Workspace
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
    14
	instanceVariableNames:'doItAction codeStartPosition errorFgColor errorBgColor'
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
    15
	classVariableNames:'DefaultErrorForegroundColor DefaultErrorBackgroundColor'
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
    16
	poolDictionaries:''
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
    17
	category:'Interface-Workspace'
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    18
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
    19
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    20
!Workspace class methodsFor:'documentation'!
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    21
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    22
copyright
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    23
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    24
 COPYRIGHT (c) 1989 by Claus Gittinger
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
    25
	      All Rights Reserved
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    26
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    27
 This software is furnished under a license and may be used
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    28
 only in accordance with the terms of that license and with the
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    30
 be provided or otherwise made available to, or used by, any
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    31
 other person.  No title to or ownership of the software is
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    32
 hereby transferred.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    33
"
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    34
!
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    35
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    36
documentation
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    37
"
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    38
    a view for editable text which can evaluate expressions.
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    39
    I.e. its basically a view for editable text, with added
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    40
    'doIt', 'printIt' and 'inspectIt' functions on the popup-menu.
125
claus
parents: 123
diff changeset
    41
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
    42
    The action to be performed on doIt is defined by a block,
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
    43
    which can be defined by the owner of this view.
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
    44
    (thus you can put a workspace into more complex widgets, and
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
    45
     control what should happen on 'doIt').
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
    46
578
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    47
    A useful default action is automatically defined, which simply 
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    48
    evaluates the selection as a smalltalk expression. 
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    49
    (but, a lisp or prolog workspace would define its own action,
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    50
     to call for another compiler/interpreter  ...)
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    51
123
claus
parents: 121
diff changeset
    52
claus
parents: 121
diff changeset
    53
    Caveat:
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    54
        in this version, Workspace does not yet support doIt in MVC setups.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    55
        For now, simulate this by setting the doItAction, to notify the
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    56
        model manually about the doIt.
123
claus
parents: 121
diff changeset
    57
claus
parents: 121
diff changeset
    58
578
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    59
    [instance variables:]
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    60
121
claus
parents: 119
diff changeset
    61
      doItAction      <Block>         block to evaluate for doIt
123
claus
parents: 121
diff changeset
    62
121
claus
parents: 119
diff changeset
    63
      errorFgColor    <Color>         fg-Color to be used when highlighting errors 
claus
parents: 119
diff changeset
    64
claus
parents: 119
diff changeset
    65
      errorBgColor    <Color>         bg-Color to be used when highlighting errors
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
    66
578
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    67
      codeStartPosition               private temporary
121
claus
parents: 119
diff changeset
    68
578
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    69
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    70
    [styleSheet values:]
121
claus
parents: 119
diff changeset
    71
claus
parents: 119
diff changeset
    72
      codeErrorSelectionForegroundColor     fg color to highlight errors
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    73
                                            (default: selection fg)
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    74
121
claus
parents: 119
diff changeset
    75
      codeErrorSelectionBackgroundColor     bg color to highlight errors
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
    76
                                            (default: selection bg)
578
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    77
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    78
    [see also:]
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    79
        Workspace EditTextView 
5b82bc433c14 commentary
Claus Gittinger <cg@exept.de>
parents: 489
diff changeset
    80
        Parser ByteCodeCompiler
583
2ec13b7ceba5 documentation
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
    81
2ec13b7ceba5 documentation
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
    82
    [author:]
2ec13b7ceba5 documentation
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
    83
        Claus Gittinger
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    84
"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    85
! !
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    86
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    87
!Workspace class methodsFor:'defaults'!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    88
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    89
updateStyleCache
444
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    90
    "extract values from the styleSheet and cache them in class variables"
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    91
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    92
    <resource: #style (#codeErrorSelectionForegroundColor
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    93
                       #codeErrorSelectionBackgroundColor)>
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    94
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    95
    DefaultErrorForegroundColor := StyleSheet colorAt:'codeErrorSelectionForegroundColor'.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
    96
    DefaultErrorBackgroundColor := StyleSheet colorAt:'codeErrorSelectionBackgroundColor'.
444
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    97
ef26eba8c854 added style resource directive
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
    98
    "Modified: 1.3.1996 / 13:52:04 / cg"
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
    99
! !
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
   100
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   101
!Workspace class methodsFor:'getting a System Workspace'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   102
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
   103
open
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   104
    "launch a new workspace"
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   105
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   106
    |scr topView workspace f|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   107
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   108
    topView := StandardSystemView 
421
Claus Gittinger <cg@exept.de>
parents: 418
diff changeset
   109
                label:(self classResources string:'Workspace') 
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   110
                minExtent:(100 @ 100).
23
69f1ba57f67a *** empty log message ***
claus
parents: 15
diff changeset
   111
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   112
    scr := HVScrollableView for:self in:topView.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   113
    scr origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   114
    workspace := scr scrolledView.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   115
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   116
    "/ adjust topViews extent according to my font
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   117
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   118
    f := workspace font.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   119
    topView extent:((f widthOf:'x') * 40) @ (f height * 10).
7
15a9291b9bd0 *** empty log message ***
claus
parents: 5
diff changeset
   120
    topView open.
131
claus
parents: 125
diff changeset
   121
    ^ workspace
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   122
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   123
    "
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   124
     Workspace open
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   125
    "
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   126
421
Claus Gittinger <cg@exept.de>
parents: 418
diff changeset
   127
    "Modified: 27.2.1996 / 17:41:08 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   128
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   129
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   130
!Workspace methodsFor:'accessing'!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   131
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   132
doItAction
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   133
    "return the action to be performed when 'doIt' is selected"
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
   134
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   135
    ^ doItAction
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   136
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   137
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   138
doItAction:aOneArgBlock
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   139
    "define the action to be performed when 'doIt' is selected.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   140
     The block will be evaluated, passing the selection as a String argument. 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   141
     A default doItAction is set for you in the initialize method."
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   142
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   143
    doItAction := aOneArgBlock
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   144
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   145
    "Modified: 27.2.1996 / 15:31:37 / cg"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   146
! !
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   147
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   148
!Workspace methodsFor:'compiler interface'!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   149
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   150
currentSourceCode
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   151
    "special interface to compiler - called by parser
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   152
     to get the updated source code after a corrected error"
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   153
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   154
    ^ self contents
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   155
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   156
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   157
wantChangeLog
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   158
    "sent by the compiler to ask if a changeLog entry should
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   159
     be written. Return true here."
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   160
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   161
    ^ true
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   162
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   163
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   164
!Workspace methodsFor:'compiler interface - error handling'!
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   165
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   166
correctableError:aString position:relPos to:relEndPos from:aCompiler
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   167
    "compiler notifies us of a correctable error;
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   168
     hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort;
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   169
     this method should return true to the compiler if user wants the error
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   170
     to be corrected; false otherwise"
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   171
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   172
    |action|
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   173
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   174
    self highlightingErrorPosition:relPos to:relEndPos do:[
368
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   175
        action := OptionBox 
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   176
                      request:aString
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   177
                      label:'Error'
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   178
                      form:(WarningBox iconBitmap)
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   179
                      buttonLabels:#('cancel' 'correct' 'continue')
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   180
                      values:#(#abort #correct #continue)
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   181
                      default:#continue.
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   182
    ].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   183
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   184
    action == #abort ifTrue:[
368
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   185
        Object abortSignal raise.
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   186
        ^ false
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   187
    ].
368
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   188
    ^ action == #correct
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   189
53476ee1fbee checkin from browser
Claus Gittinger <cg@exept.de>
parents: 365
diff changeset
   190
    "Modified: 20.2.1996 / 20:48:52 / cg"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   191
!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   192
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   193
error:aString position:relPos to:relEndPos asWarning:asWarning
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   194
    "compiler notifies us of an error; hilight the error (relPos to relEndPos) 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   195
     and show a Box asking for continue/abort."
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   196
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   197
    |answer|
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   198
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   199
    self highlightingErrorPosition:relPos to:relEndPos do:[
213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   200
        |box lbl|
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   201
213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   202
        WarningSignal isHandled ifTrue:[
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   203
            WarningSignal raiseErrorString:aString.
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   204
            ^ false
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   205
        ].
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   206
213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   207
        "
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   208
         ask if we should abort or continue
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   209
        "
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   210
        box := YesNoBox title:aString
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   211
                      yesText:(resources string:'continue')
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   212
                       noText:(resources string:'abort').
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   214
        asWarning ifTrue:[
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   215
            lbl := 'Compiler warning'
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   216
        ] ifFalse:[
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   217
            lbl := 'Compiler error'.
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   218
        ].
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   219
        box label:lbl.
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   220
        box form:(WarningBox iconBitmap).
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   221
        answer := box confirm.
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   222
    ].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   223
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   224
    "
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   225
     do the abort if we have to
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   226
    "
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   227
    answer ifFalse:[    
213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   228
        Object abortSignal raise.
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   229
    ].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   230
    ^ false
213
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   231
6286d3f36c14 raise warningSignal if handled (allows warnBoxes from compiler to be suppressed in debugger)
Claus Gittinger <cg@exept.de>
parents: 208
diff changeset
   232
    "Created: 24.11.1995 / 22:56:34 / cg"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   233
!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   234
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   235
error:aString position:relPos to:relEndPos from:aCompiler
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   236
    "compiler notifies us of an error; hilight the error (relPos to relEndPos) 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   237
     and show a Box asking for continue/abort."
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   238
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   239
    ^ self error:aString position:relPos to:relEndPos asWarning:false
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   240
!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   241
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   242
highlightingErrorPosition:relPos to:relEndPos do:aBlock
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   243
    "evaluate aBlock while some selection is shown highlighted with error colors."
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   244
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   245
    |absPosition fg bg|
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   246
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   247
    "
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   248
     change color of selection & hide cursor
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   249
    "
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   250
    fg := selectionFgColor.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   251
    bg := selectionBgColor.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   252
    selectionBgColor := errorBgColor.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   253
    selectionFgColor := errorFgColor.
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   254
    self hideCursor.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   255
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   256
    "
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   257
     select the text - relEndPos may be nil in which case the whole line is selected
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   258
     we have to adjust the positions given by the compiler, since they
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   259
     are relative to the texts start (the compiler did stream-read the code).
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   260
    "
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   261
    codeStartPosition isNil ifTrue:[codeStartPosition := 1].
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   262
    absPosition := codeStartPosition + relPos - 1.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   263
    relEndPos isNil ifTrue:[
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   264
	self selectLineWhereCharacterPosition:absPosition
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   265
    ] ifFalse:[
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   266
	self selectFromCharacterPosition:absPosition to:(codeStartPosition + relEndPos - 1)
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   267
    ].
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   268
    self makeSelectionVisible.
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   269
155
claus
parents: 146
diff changeset
   270
    device flush.
58
28815246bbc1 *** empty log message ***
claus
parents: 54
diff changeset
   271
59
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   272
    aBlock valueNowOrOnUnwindDo:[
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   273
	"
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   274
	 undo selection color change and show cursor again
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   275
	"
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   276
	selectionFgColor := fg.
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   277
	selectionBgColor := bg.
450ce95a72a4 *** empty log message ***
claus
parents: 58
diff changeset
   278
	self showCursor.
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   279
    ].
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   280
!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   281
116
claus
parents: 97
diff changeset
   282
warning:aString position:relPos to:relEndPos from:aCompiler 
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
   283
    "compiler notifies us of a warning - same behavior as error"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   284
95
7535cfca9509 *** empty log message ***
claus
parents: 79
diff changeset
   285
    self error:aString position:relPos to:relEndPos asWarning:true 
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   286
! !
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   287
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   288
!Workspace methodsFor:'events'!
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   289
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   290
keyPress:key x:x y:y
132
claus
parents: 131
diff changeset
   291
claus
parents: 131
diff changeset
   292
    <resource: #keyboard (#DoIt #InspectIt #PrintIt)>
claus
parents: 131
diff changeset
   293
131
claus
parents: 125
diff changeset
   294
    |cmd commands fKey|
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   295
32
b6c23dfd5663 *** empty log message ***
claus
parents: 23
diff changeset
   296
    (key == #DoIt)      ifTrue:[^ self doIt].
23
69f1ba57f67a *** empty log message ***
claus
parents: 15
diff changeset
   297
    (key == #InspectIt) ifTrue:[^ self inspectIt].
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   298
    (key == #PrintIt)   ifTrue:[^ self printIt].
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   299
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   300
    "
131
claus
parents: 125
diff changeset
   301
     Ctrl-Fn or Cmd-Fn evaluates a key-sequence (n = 0..99)
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   302
     (I added Ctrl-Fn, because some windowmanagers already use cmd-fn)
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   303
     see TextView>>keyPress:x:y:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   304
    "
131
claus
parents: 125
diff changeset
   305
    key isSymbol ifTrue:[
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   306
        (key startsWith:'CmdF') ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   307
            fKey := key copyFrom:4 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   308
        ] ifFalse:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   309
            (key startsWith:'CtrlF') ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   310
               fKey := key copyFrom:5 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   311
            ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   312
        ].
131
claus
parents: 125
diff changeset
   313
    ].
claus
parents: 125
diff changeset
   314
    fKey notNil ifTrue:[
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   315
        fKey := fKey asSymbol.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   316
        commands := Smalltalk at:#FunctionKeySequences ifAbsent:[nil].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   317
        commands notNil ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   318
            cmd := commands at:fKey ifAbsent:[nil].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   319
            cmd notNil ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   320
                AbortSignal "ErrorSignal" handle:[:ex |
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   321
                    self warn:'error occurred in keyboard macro'.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   322
                    ex return.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   323
                ] do:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   324
                    Parser evaluate:cmd asString
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   325
                           receiver:self
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   326
                          notifying:nil
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   327
                            compile:false.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   328
                ].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   329
                ^ self
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   330
            ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   331
        ]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   332
    ].
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   333
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   334
    super keyPress:key x:x y:y
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   335
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   336
    "
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   337
     example uses of function keys:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   338
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   339
     to set tab-distance to 4-cols,
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   340
     select the following:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   341
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   342
       self setTab4
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   343
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   344
     then, press shift-F2 to define the sequence;
95
7535cfca9509 *** empty log message ***
claus
parents: 79
diff changeset
   345
     press cmd-F2 to execute it 
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   346
     voila: you have set 4-tabs.
95
7535cfca9509 *** empty log message ***
claus
parents: 79
diff changeset
   347
     (some window managers (MWM, 4DWM have cmd-Fn redefined; use Ctrl-Fn then).
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   348
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   349
     to switch back, perform the same procedure with:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   350
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   351
        self setTab8
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   352
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   353
     Within the expression, 'self' is bound to the view. Thus, you can do
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   354
     all kinds of fancy things.
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   355
     For example:
95
7535cfca9509 *** empty log message ***
claus
parents: 79
diff changeset
   356
       if you like a browser to come up on the selection when pressing Cmd-F3:
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   357
       select:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   358
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   359
        |sel|
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   360
        sel := self selection asString withoutSeparators.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   361
        (Smalltalk includesKey:sel asSymbol) ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   362
            (Smalltalk at:sel asSymbol) isClass ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   363
                SystemBrowser browseClass:(Smalltalk at:sel asSymbol)
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   364
            ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   365
        ]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   366
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   367
     then, press shift-F3 to define the command.
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   368
     press cmd-F3 to execute it (select some classname before).
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   369
     (notice: on the Indy, Cmd-F3 is already used by the window manager)
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   370
95
7535cfca9509 *** empty log message ***
claus
parents: 79
diff changeset
   371
     if you like a file-include command on Cmd-F4:
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   372
     select:
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   373
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   374
        |sel|
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   375
        sel := self selection.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   376
        sel notNil ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   377
            sel := sel asString withoutSeparators.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   378
            s := FileStream readonlyFileNamed:sel.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   379
            s notNil ifTrue:[
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   380
                self paste:(s contents asString).
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   381
                s close
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   382
            ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   383
        ]
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   384
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   385
    this will paste the contents of the file at the current cusor position.
60
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   386
    (select above expression, press Shift-F4,
f3c738c24ce6 mostly style
claus
parents: 59
diff changeset
   387
     then select any filename and press Cmd-F4)
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   388
        try it here: /etc/passwd 
38
4b9b70b2cc87 2.10.3 pre-final version
claus
parents: 32
diff changeset
   389
    "
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   390
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   391
    "Modified: 27.2.1996 / 15:11:09 / cg"
0
e6a541c1c0eb Initial revision
claus
parents:
diff changeset
   392
! !
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   393
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   394
!Workspace methodsFor:'execution'!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   395
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   396
doItWithValueDo:aBlock
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   397
    "helper for doIt, printIt and inspectIt. 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   398
     Evaluate the selection and, if all went well, evaluate the argument, 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   399
     aBlock with the value.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   400
     Most work is in preparing for proper cleanup in case of abort
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   401
     or other exception while the evaluation is performed.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   402
     (restore cursor, selectionColors etc.)"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   403
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   404
    |code value selLine selCol endLine endCol cLine cCol cleanUp|
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   405
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   406
    code := self selection.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   407
    code notNil ifTrue:[
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   408
        codeStartPosition := self characterPositionOfSelection.
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   409
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   410
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   411
         remember selection for later - if there is an error,
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   412
         the notification method will highlight it.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   413
         thus destroying the current selection
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   414
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   415
        selLine := selectionStartLine.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   416
        selCol := selectionStartCol.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   417
        endLine := selectionEndLine.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   418
        endCol := selectionEndCol.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   419
        cCol := cursorCol.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   420
        cLine := cursorLine.
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   421
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   422
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   423
         cleanup: restore previous selection and cursor positions
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   424
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   425
        cleanUp := [
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   426
                self selectFromLine:selLine col:selCol toLine:endLine col:endCol.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   427
                cLine notNil ifTrue:[
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   428
                    self cursorLine:cLine col:cCol
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   429
                ].
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   430
        ].
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   431
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   432
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   433
         perform the action.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   434
         Be careful to release the reference to the value;
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   435
         otherwise, we could keep lots of garbage from being freed
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   436
         until the view gets closed
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   437
        "
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   438
        self topView withExecuteCursorDo:[
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   439
            [
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   440
                AbortSignal handle:[:ex |
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   441
                     ex return
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   442
                ] do:[
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   443
                    doItAction notNil ifTrue:[
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   444
                        value := doItAction value:code asString.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   445
                        cleanUp value. cleanUp := nil.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   446
                        aBlock value:value.
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   447
                    ]
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   448
                ]
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   449
            ] valueNowOrOnUnwindDo:[
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   450
                cleanUp notNil ifTrue:[cleanUp value. cleanUp := nil].
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   451
                value := nil
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   452
            ]
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   453
        ].
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   454
    ]
257
605e68c1223f use new withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 237
diff changeset
   455
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   456
    "Modified: 27.2.1996 / 15:30:58 / cg"
201
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   457
! !
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   458
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   459
!Workspace methodsFor:'initialize / release'!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   460
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   461
initStyle
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   462
    super initStyle.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   463
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   464
    errorFgColor := DefaultErrorForegroundColor.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   465
    errorFgColor isNil ifTrue:[errorFgColor := selectionFgColor].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   466
    errorBgColor := DefaultErrorBackgroundColor.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   467
    errorBgColor isNil ifTrue:[
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   468
	device hasColors ifTrue:[
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   469
	    errorBgColor := Color red
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   470
	] ifFalse:[
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   471
	    errorBgColor := selectionBgColor
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   472
	]
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   473
    ].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   474
!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   475
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   476
initialize
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   477
    super initialize.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   478
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   479
    showMatchingParenthesis := true.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   480
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   481
    self initializeDoITAction.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   482
!
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   483
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   484
initializeDoITAction
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   485
    "set up the block to be evaluated for doIts.
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   486
     This is done here in a separate method to allow easier
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   487
     redefinition in subclasses"
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   488
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   489
    doItAction := [:theCode |
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   490
	Compiler 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   491
	    evaluate:theCode 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   492
	    in:nil 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   493
	    receiver:nil 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   494
	    notifying:self 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   495
	    logged:true 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   496
	    ifFail:nil 
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   497
    ].
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   498
! !
d2888811c664 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   499
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   500
!Workspace methodsFor:'menu & menu actions'!
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   501
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   502
doIt
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   503
    "user selected 'doIt' from menu; show a wait-cursor, evaluate the code
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   504
     and finally restore cursor; return result of evaluation"
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   505
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   506
    self doItWithValueDo:[:result | ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   507
!
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   508
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   509
editMenu
489
5816aa12fec8 resources
Claus Gittinger <cg@exept.de>
parents: 444
diff changeset
   510
    <resource: #keyboard (#DoIt #PrintIt #InspectIt)>
5816aa12fec8 resources
Claus Gittinger <cg@exept.de>
parents: 444
diff changeset
   511
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   512
    |m idx|
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   513
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   514
    m := super editMenu.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   515
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   516
    "
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   517
     workspaces support #doIt, #printIt and #inspectIt
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   518
     add them after paste.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   519
    "
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   520
    idx := m indexOf:#paste.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   521
    idx == 0 ifTrue:[idx := m indexOf:#pasteOrReplace].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   522
    idx ~~ 0 ifTrue:[
430
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   523
        m addLabels:(resources array:#('-' 'doIt' 'printIt' 'inspectIt'))
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   524
          selectors:#(nil doIt printIt inspectIt)
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   525
          accelerators:#(nil DoIt PrintIt InspectIt)
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   526
          after:idx
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   527
    ].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   528
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   529
    self hasSelection ifFalse:[
430
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   530
        m disableAll:#(printIt doIt inspectIt) 
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   531
    ].
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   532
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   533
    ^ m.
430
022b667e0d70 added accelerator display
Claus Gittinger <cg@exept.de>
parents: 421
diff changeset
   534
489
5816aa12fec8 resources
Claus Gittinger <cg@exept.de>
parents: 444
diff changeset
   535
    "Modified: 7.3.1996 / 13:14:15 / cg"
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   536
!
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   537
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   538
inspectIt
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   539
    "user selected 'inspectIt' from menu; use doIt to evaluate the code
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   540
     and start an inspector on the result"
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   541
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   542
    self doItWithValueDo:[:result | result inspect]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   543
!
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   544
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   545
printIt
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   546
    "user selected 'printIt' from menu; use doIt to evaluate the code
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   547
     and insert result of evaluation into my text.
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   548
     If the text is readOnly, do nothing."
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   549
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   550
    readOnly ifTrue:[
693
8369529a2ac4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   551
        self beep
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   552
    ] ifFalse:[ 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   553
        self doItWithValueDo:[:result | 
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   554
            self cursorLine:selectionEndLine col:(selectionEndCol + 1).
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   555
            self insertSelectedStringAtCursor:(result displayString "printString")
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   556
        ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   557
    ]
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   558
693
8369529a2ac4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   559
    "Modified: 28.5.1996 / 16:59:04 / cg"
418
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   560
! !
777061f25321 commentary
Claus Gittinger <cg@exept.de>
parents: 368
diff changeset
   561
206
2363a64a7c88 version at the end
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
   562
!Workspace class methodsFor:'documentation'!
2363a64a7c88 version at the end
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
   563
2363a64a7c88 version at the end
Claus Gittinger <cg@exept.de>
parents: 201
diff changeset
   564
version
693
8369529a2ac4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 658
diff changeset
   565
^ '$Header: /cvs/stx/stx/libwidg/Workspace.st,v 1.46 1996-05-28 14:59:29 cg Exp $'! !