WorkspaceApplication.st
author Claus Gittinger <cg@exept.de>
Wed, 03 Mar 2004 22:35:30 +0100
changeset 5649 f6e8c040ffb0
parent 5547 65af7af97085
child 5681 53dba8c1cfa5
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5649
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
     1
"{ Encoding: utf8 }"
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
     2
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     3
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     4
 COPYRIGHT (c) 2001 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     5
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     6
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     7
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     8
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    10
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    11
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    12
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    13
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    14
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
"{ Package: 'stx:libtool' }"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
5303
fe0d2165b716 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5295
diff changeset
    17
MultiViewToolApplication subclass:#WorkspaceApplication
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
    18
	instanceVariableNames:'autoDefineVariables'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
    19
	classVariableNames:'LastFilterBlockString LastProcessingBlockString'
3222
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
    20
	poolDictionaries:''
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
    21
	category:'Interface-Smalltalk'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    24
!WorkspaceApplication class methodsFor:'documentation'!
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    25
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    26
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    27
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    28
 COPYRIGHT (c) 2001 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    29
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    30
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    31
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    32
 only in accordance with the terms of that license and with the
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    33
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    34
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    35
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    36
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    37
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    38
!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    39
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    40
documentation
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    41
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    42
    A simple wrapper around a WorkSpace-View, adding a pullDown menu.
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    43
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    44
    [author:]
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    45
        Claus Gittinger
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    46
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    47
! !
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
!WorkspaceApplication class methodsFor:'interface specs'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
windowSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    "This resource specification was automatically generated
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
     by the UIPainter of ST/X."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    "Do not manually edit this!! If it is corrupted,
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
     the UIPainter may not be able to read the specification."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
     UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
     WorkspaceApplication new openInterface:#windowSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
     WorkspaceApplication open
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    <resource: #canvas>
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    ^ 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
     #(#FullSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
        #name: #windowSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
        #window: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
       #(#WindowSpec
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
          #label: 'Workspace'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
          #name: 'Workspace'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
          #min: #(#Point 10 10)
3845
b4baee71ee18 no max size
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
    74
          #bounds: #(#Rectangle 13 23 445 264)
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
          #menu: #mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
        )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
        #component: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
       #(#SpecCollection
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
          #collection: #(
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    80
           #(#NoteBookViewSpec
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    81
              #name: 'NoteBook1'
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    82
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    83
              #model: #selectedWorkspaceIndexHolder
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    84
              #menu: #tabList
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    85
              #useIndex: true
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    86
              #accessTabMenuAction: #tabMenuAt:
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    87
              #canvas: #workspaceHolder
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    88
              #canvasInset: 0
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    89
              #canvasFrameLevel: 0
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    90
              #keepCanvasAlive: true
4369
9b496f6aa2a1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
    91
              #tabLevel: 1
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
    92
            )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
           )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
         
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
        )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
      )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
!WorkspaceApplication class methodsFor:'menu specs'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
    "This resource specification was automatically generated
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
     by the MenuEditor of ST/X."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
    "Do not manually edit this!! If it is corrupted,
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
     the MenuEditor may not be able to read the specification."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   108
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   109
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication mainMenu)) startUp
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
    <resource: #menu>
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    ^ 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
     #(#Menu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
        #(
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
         #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
            #label: 'File'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
            #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
            #submenu: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
           #(#Menu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
              #(
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
               #(#MenuItem
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   125
                  #label: 'New Workspace'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   126
                  #itemValue: #newWorkspace
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   127
                  #translateLabel: true
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   128
                )
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   129
               #(#MenuItem
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   130
                  #label: 'New SystemWorkspace'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   131
                  #itemValue: #newSystemWorkspace
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   132
                  #translateLabel: true
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
                  #label: '-'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
                  #label: 'Load File...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   139
                  #itemValue: #menuLoad
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
                  #label: '-'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
                  #label: 'Save As...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   147
                  #itemValue: #menuSaveAs
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   148
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   149
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   150
               #(#MenuItem
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   151
                  #enabled: #hasMultipleBuffersHolder
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   152
                  #label: 'Save all As...'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   153
                  #itemValue: #menuSaveAllAs
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   154
                  #translateLabel: true
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   155
                )
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   156
               #(#MenuItem
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
                  #label: '-'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
                  #label: 'Exit'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   161
                  #itemValue: #closeRequest
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
               )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
            )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
         #(#MenuItem
3736
687a0a8de66c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3722
diff changeset
   170
            #label: 'Buffers'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   171
            #nameKey: #Buffer
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   172
            #translateLabel: true
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   173
            #submenu: 
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   174
           #(#Menu
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   175
              #(
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   176
               #(#MenuItem
3222
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
   177
                  #label: 'Add Buffer'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   178
                  #itemValue: #addWorkspace
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   179
                  #translateLabel: true
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   180
                )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   181
               #(#MenuItem
4098
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   182
                  #enabled: #anyWorkspaceVariableIsDefined
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   183
                  #label: 'Add Buffer on Workspace Variables'
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   184
                  #itemValue: #addWorkspaceVariableInspector
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   185
                  #translateLabel: true
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   186
                )
aadc513a6f37 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4096
diff changeset
   187
               #(#MenuItem
4099
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   188
                  #label: 'Add Buffer on Global Variables'
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   189
                  #itemValue: #addGlobalVariableInspector
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   190
                  #translateLabel: true
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   191
                )
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   192
               #(#MenuItem
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   193
                  #label: 'Rename...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   194
                  #itemValue: #renameWorkspace
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   195
                  #translateLabel: true
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   196
                )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   197
               #(#MenuItem
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   198
                  #label: '-'
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   199
                )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   200
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   201
                  #enabled: #canRemoveWorkspace
3222
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
   202
                  #label: 'Remove Buffer'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   203
                  #itemValue: #removeWorkspace
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   204
                  #translateLabel: true
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   205
                )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   206
               )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   207
              nil
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   208
              nil
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   209
            )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   210
          )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   211
         #(#MenuItem
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
            #label: 'Edit'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
            #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
            #submenu: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
           #(#Menu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
              #(
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   218
                  #enabled: #hasSelectionInActiveWorkspace
4591
083328c16498 editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents: 4542
diff changeset
   219
                  #label: 'Cut'
083328c16498 editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents: 4542
diff changeset
   220
                  #itemValue: #cutSelection
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   221
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   224
                  #enabled: #hasSelectionInActiveWorkspace
4591
083328c16498 editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents: 4542
diff changeset
   225
                  #label: 'Copy'
083328c16498 editMenu: order is cut-copy-paste (as in windows)
Claus Gittinger <cg@exept.de>
parents: 4542
diff changeset
   226
                  #itemValue: #copySelection
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
                  #label: 'Paste'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   231
                  #itemValue: #paste
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
                )
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   234
               #(#MenuItem
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   235
                  #enabled: #hasHistory
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   236
                  #label: 'Paste Last'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   237
                  #itemValue: #pasteLastDoIt
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   238
                  #translateLabel: true
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   239
                  #submenuChannel: #pasteRecentDoItMenu
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   240
                )
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   241
               #(#MenuItem
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   242
                  #label: '-'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   243
                )
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   244
               #(#MenuItem
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   245
                  #label: 'Select All'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   246
                  #itemValue: #selectAll
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   247
                  #translateLabel: true
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   248
                )
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   249
               #(#MenuItem
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   250
                  #label: '-'
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   251
                )
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   252
               #(#MenuItem
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   253
                  #label: 'Filter Text...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   254
                  #itemValue: #filterText
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   255
                  #translateLabel: true
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   256
                )
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   257
               #(#MenuItem
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   258
                  #label: 'Process Text...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   259
                  #itemValue: #processText
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   260
                  #translateLabel: true
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   261
                )
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   262
               #(#MenuItem
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   263
                  #label: '-'
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   264
                )
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   265
               #(#MenuItem
4829
1ba6f569e4dd menu label
Claus Gittinger <cg@exept.de>
parents: 4790
diff changeset
   266
                  #label: 'Web Services'
4480
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   267
                  #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   268
                  #submenu: 
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   269
                 #(#Menu
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   270
                    #(
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   271
                     #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   272
                        #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   273
                        #label: 'Google Spell'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   274
                        #itemValue: #googleSpellingSuggestion
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   275
                        #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   276
                      )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   277
                     #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   278
                        #label: 'Translate'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   279
                        #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   280
                        #submenu: 
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   281
                       #(#Menu
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   282
                          #(
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   283
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   284
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   285
                              #label: 'English -> German'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   286
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   287
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   288
                              #argument: 'en_de'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   289
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   290
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   291
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   292
                              #label: 'English -> French'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   293
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   294
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   295
                              #argument: 'en_fr'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   296
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   297
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   298
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   299
                              #label: 'English -> Spanish'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   300
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   301
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   302
                              #argument: 'en_es'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   303
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   304
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   305
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   306
                              #label: 'English -> Portuguese'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   307
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   308
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   309
                              #argument: 'en_pt'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   310
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   311
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   312
                              #label: '-'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   313
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   314
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   315
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   316
                              #label: 'German -> English'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   317
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   318
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   319
                              #argument: 'de_en'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   320
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   321
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   322
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   323
                              #label: 'French -> English'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   324
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   325
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   326
                              #argument: 'fr_en'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   327
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   328
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   329
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   330
                              #label: 'Spanish -> English'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   331
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   332
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   333
                              #argument: 'es_en'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   334
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   335
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   336
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   337
                              #label: 'Portuguese -> English'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   338
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   339
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   340
                              #argument: 'pt_en'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   341
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   342
                           #(#MenuItem
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   343
                              #enabled: #hasSelectionInActiveWorkspace
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   344
                              #label: 'Russian -> English'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   345
                              #itemValue: #babelFishTranslate:
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   346
                              #translateLabel: true
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   347
                              #argument: 'ru_en'
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   348
                            )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   349
                           )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   350
                          nil
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   351
                          nil
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   352
                        )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   353
                      )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   354
                     )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   355
                    nil
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   356
                    nil
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   357
                  )
defa79bbdaaa translation service
Claus Gittinger <cg@exept.de>
parents: 4474
diff changeset
   358
                )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
               )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
            )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
         #(#MenuItem
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   365
            #label: 'Workspace'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   366
            #translateLabel: true
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   367
            #submenu: 
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   368
           #(#Menu
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   369
              #(
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   370
               #(#MenuItem
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   371
                  #label: 'Add Workspace Variable...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   372
                  #itemValue: #addWorkspaceVariable
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   373
                  #translateLabel: true
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   374
                )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   375
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   376
                  #enabled: #anyWorkspaceVariableIsDefined
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   377
                  #label: 'Remove Workspace Variable...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   378
                  #itemValue: #removeWorkspaceVariable
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   379
                  #translateLabel: true
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   380
                )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   381
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   382
                  #enabled: #anyWorkspaceVariableIsDefined
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   383
                  #label: 'Remove all Workspace Variables...'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   384
                  #itemValue: #removeAllWorkspaceVariables
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   385
                  #translateLabel: true
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   386
                )
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   387
               #(#MenuItem
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   388
                  #label: '-'
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   389
                )
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   390
               #(#MenuItem
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   391
                  #enabled: #anyWorkspaceVariableIsDefined
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   392
                  #label: 'Inspect Workspace Variables'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   393
                  #itemValue: #inspectWorkspaceVariables
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   394
                  #translateLabel: true
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   395
                )
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   396
               #(#MenuItem
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   397
                  #label: '-'
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   398
                )
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   399
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   400
                  #label: 'Settings'
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   401
                  #translateLabel: true
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   402
                  #submenu: 
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   403
                 #(#Menu
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   404
                    #(
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   405
                     #(#MenuItem
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   406
                        #label: 'Autodefine as Workspace Variable'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   407
                        #translateLabel: true
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   408
                        #hideMenuOnActivated: false
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   409
                        #choice: #autoDefineVariables
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   410
                        #choiceValue: #workspace
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   411
                      )
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   412
                     #(#MenuItem
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   413
                        #label: 'Autodefine as DoIt Variable'
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   414
                        #translateLabel: true
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   415
                        #hideMenuOnActivated: false
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   416
                        #choice: #autoDefineVariables
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   417
                        #choiceValue: #doIt
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   418
                      )
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   419
                     #(#MenuItem
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   420
                        #label: 'Autodefine off'
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   421
                        #translateLabel: true
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   422
                        #hideMenuOnActivated: false
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   423
                        #choice: #autoDefineVariables
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   424
                      )
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   425
                     )
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   426
                    nil
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   427
                    nil
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   428
                  )
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   429
                )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   430
               )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   431
              nil
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   432
              nil
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   433
            )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   434
          )
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   435
         #(#MenuItem
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   436
            #label: 'Smalltalk'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   437
            #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   438
            #submenu: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
           #(#Menu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
              #(
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   442
                  #enabled: #hasSelectionInActiveWorkspace
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
                  #label: 'DoIt'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   444
                  #itemValue: #doIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   445
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   446
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   447
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   448
                  #enabled: #hasSelectionInActiveWorkspace
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
                  #label: 'PrintIt'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   450
                  #itemValue: #printIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   454
                  #enabled: #hasSelectionInActiveWorkspace
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
                  #label: 'InspectIt'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   456
                  #itemValue: #inspectIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   457
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   458
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   459
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   460
                  #label: '-'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   461
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   462
               #(#MenuItem
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   463
                  #enabled: #hasHistory
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   464
                  #label: 'Redo Last'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   465
                  #itemValue: #redoLastDoIt
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   466
                  #translateLabel: true
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   467
                  #submenuChannel: #redoRecentDoItMenu
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   468
                )
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   469
               #(#MenuItem
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   470
                  #label: '-'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   471
                )
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
   472
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   473
                  #enabled: #hasSelectionInActiveWorkspace
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   474
                  #label: 'TimeIt'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   475
                  #itemValue: #timeIt
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   476
                  #translateLabel: true
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   477
                )
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   478
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   479
                  #enabled: #hasSelectionInActiveWorkspace
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   480
                  #label: 'SpyOnIt'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   481
                  #itemValue: #spyOnIt
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   482
                  #translateLabel: true
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   483
                )
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   484
               #(#MenuItem
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   485
                  #label: '-'
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   486
                )
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
   487
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   488
                  #enabled: #hasSelectionInActiveWorkspace
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   489
                  #label: 'Browse Class'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   490
                  #itemValue: #browseIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
                )
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   493
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   494
                  #enabled: #hasSelectionInActiveWorkspace
3710
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
   495
                  #label: 'Browse Implementors of It'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   496
                  #itemValue: #browseImplementorsOfIt
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   497
                  #translateLabel: true
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   498
                )
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   499
               #(#MenuItem
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   500
                  #enabled: #hasSelectionInActiveWorkspace
3710
Claus Gittinger <cg@exept.de>
parents: 3667
diff changeset
   501
                  #label: 'Browse References to It'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   502
                  #itemValue: #browseReferencesToIt
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   503
                  #translateLabel: true
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   504
                )
4154
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   505
               #(#MenuItem
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   506
                  #label: '-'
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   507
                )
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   508
               #(#MenuItem
5262
99d5c5f7e4b8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5261
diff changeset
   509
                  #label: 'FileIn Text'
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   510
                  #itemValue: #fileInText
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   511
                  #translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   512
                )
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   513
               #(#MenuItem
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   514
                  #label: '-'
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   515
                )
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
   516
               #(#MenuItem
4154
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   517
                  #label: 'Add Global Variable...'
4284
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   518
                  #itemValue: #addGlobalVariable
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   519
                  #translateLabel: true
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   520
                )
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   521
               #(#MenuItem
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   522
                  #label: 'Remove Global Variable...'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   523
                  #itemValue: #removeGlobalVariable
4154
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   524
                  #translateLabel: true
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   525
                )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   526
               )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   527
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   528
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   529
            )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   530
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   531
         #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
            #label: 'Help'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
            #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
            #startGroup: #right
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   535
            #submenu: 
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
           #(#Menu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
              #(
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
                  #label: 'Documentation'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   540
                  #itemValue: #openDocumentation
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
               #(#MenuItem
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
                  #label: '-'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
               #(#MenuItem
3282
c871f7928ff2 menu label
Claus Gittinger <cg@exept.de>
parents: 3236
diff changeset
   547
                  #label: 'About this Application...'
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   548
                  #itemValue: #openAboutThisApplication
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
                  #translateLabel: true
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   550
                )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
               )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
              nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   554
            )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   555
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   556
         )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   557
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   558
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   559
      )
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   560
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   561
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   562
tabMenu
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   563
    "This resource specification was automatically generated
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   564
     by the MenuEditor of ST/X."
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   565
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   566
    "Do not manually edit this!! If it is corrupted,
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   567
     the MenuEditor may not be able to read the specification."
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   568
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   569
    "
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   570
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#tabMenu
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   571
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication tabMenu)) startUp
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   572
    "
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   573
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   574
    <resource: #menu>
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   575
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   576
    ^ 
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   577
     #(#Menu
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   578
        #(
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   579
         #(#MenuItem
3222
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
   580
            #label: 'Add Buffer'
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   581
            #translateLabel: true
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   582
            "/ #triggerOnDown: true
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   583
            #value: #addWorkspace
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   584
          )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   585
         #(#MenuItem
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   586
            #label: 'Rename...'
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   587
            #translateLabel: true
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   588
            "/ #triggerOnDown: true
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   589
            #value: #renameWorkspace:
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   590
          )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   591
         #(#MenuItem
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   592
            #label: '-'
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   593
          )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   594
         #(#MenuItem
3222
b95c86b3b511 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3214
diff changeset
   595
            #label: 'Remove Buffer'
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   596
            #translateLabel: true
3651
65c74ea6803b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3648
diff changeset
   597
            "/ #triggerOnDown: true
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   598
            #value: #removeWorkspace:
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   599
            #enabled: #canRemoveWorkspace:
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   600
          )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   601
         )
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   602
        nil
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   603
        nil
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   604
      )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   605
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   606
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   607
!WorkspaceApplication class methodsFor:'special startup'!
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   608
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   609
openSystemWorkspace
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   610
    |wsApp path needRemove|
3345
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   611
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   612
    needRemove := true.
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   613
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   614
    wsApp := self new.
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   615
    wsApp allButOpen.
3337
46dd799d3446 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3336
diff changeset
   616
    wsApp window extent:640@400.
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   617
3345
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   618
    path := (Smalltalk getSystemFileName:'README') ?  '../../README'.
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   619
    path := path asFilename.
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   620
    path isReadable ifTrue:[
3345
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   621
        wsApp addWindow:(HVScrollableView for:Workspace) named:'README' asFirst:false.
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   622
        wsApp loadFile:path.
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   623
        wsApp removeWorkspace:1.  "/ the original Workspace
4183
029eae063c6e another info view
Claus Gittinger <cg@exept.de>
parents: 4154
diff changeset
   624
        wsApp renameWorkspace:1 to:'LICENCE README'.
3345
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   625
        needRemove := false.
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   626
    ].
3334
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   627
3346
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   628
"/    path := (Smalltalk getSystemFileName:'doc/online/english/LICENCE_STX.html') ?  '../../doc/online/english/LICENCE_STX.html'.
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   629
"/    path asFilename exists ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   630
"/        wsApp addWindow:(licenceView := HVScrollableView for:HTMLDocumentView) named:'License' asFirst:false.
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   631
"/        licenceView homeDocument:'../../doc/online/english/LICENCE_STX.html'.
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   632
"/        licenceView updateLabelFlag:false.
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   633
"/        needRemove ifTrue:[wsApp removeWorkspace:1].  "/ the original Workspace
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   634
"/        needRemove := false.
Claus Gittinger <cg@exept.de>
parents: 3345
diff changeset
   635
"/    ].
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   636
5649
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   637
    #(
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   638
        ('GettingStarted.wsp'   'Getting Started')
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   639
        ('Keyboard.wsp'         'Keyboard')
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   640
        ('Setup.wsp'            'Setup')
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   641
        ('Hello.wsp'            'Welcome')
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   642
    ) pairsDo:[:file :title |
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   643
        path := (Smalltalk getSystemFileName:file).
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   644
        (path notNil and:[path asFilename isReadable]) ifTrue:[
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   645
            wsApp addWindow:(HVScrollableView for:Workspace) named:title asFirst:false.
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   646
            wsApp loadFile:path "encoding:#'utf8' ".
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   647
            needRemove ifTrue:[wsApp removeWorkspace:1].  "/ the original Workspace
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   648
            needRemove := false.
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   649
        ].
3345
7ddc24baa0b5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3337
diff changeset
   650
    ].
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   651
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   652
    wsApp openWindow
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   653
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   654
    "
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   655
     self openSystemWorkspace
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   656
    "
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   657
!
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   658
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   659
openWith:initialText
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   660
    "launch a new workspace with some initial contents"
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   661
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   662
    ^ self openWith:initialText selected:false
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   663
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   664
    "
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   665
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   666
    "
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   667
!
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   668
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   669
openWith:initialText selected:selectedBoolean
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   670
    "launch a new workspace with some initial contents"
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   671
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   672
    |workspace|
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   673
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   674
    workspace := self new.
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   675
    workspace open.
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
   676
    workspace selectedWorkspace contents:initialText selected:selectedBoolean.
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   677
    ^ workspace
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   678
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   679
    "
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   680
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
   681
    "
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   682
! !
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   683
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   684
!WorkspaceApplication methodsFor:'aspects'!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   685
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   686
autoDefineVariables
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   687
    autoDefineVariables isNil ifTrue:[
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   688
        autoDefineVariables := ValueHolder new.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   689
        (UserPreferences current autoDefineWorkspaceVariables) ifTrue:[
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
   690
            autoDefineVariables value:#workspace.
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   691
        ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   692
        autoDefineVariables onChangeSend:#autoDefineVariablesChanged to:self.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   693
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   694
    ^ autoDefineVariables.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   695
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   696
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   697
hasHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   698
    ^ Workspace doItHistory size > 0.
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   699
! !
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   700
4358
b0023a5ca3b8 category change
Claus Gittinger <cg@exept.de>
parents: 4313
diff changeset
   701
!WorkspaceApplication methodsFor:'aspects-queries'!
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   702
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   703
anyWorkspaceVariableIsDefined
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   704
    ^ Workspace workspaceVariables size > 0
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   705
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   706
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   707
!WorkspaceApplication methodsFor:'initialization & release'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   708
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   709
closeRequest
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
   710
    (self askIfAnyModified:'Text was not saved. Close anyway ?' yesButton:'Close') ifFalse:[
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   711
        ^ self
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   712
    ].
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   713
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   714
    ^ super closeRequest
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   715
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   716
4359
35995cc972f7 category change
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   717
!WorkspaceApplication methodsFor:'menu-actions'!
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   718
4154
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   719
addGlobalVariable
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   720
    |name nameKey selection|
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   721
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   722
    selection := self selectedWorkspacesTextView selection ? ''.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   723
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   724
    name := Dialog 
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   725
                request:'Name of new Global Variable:'
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   726
                initialAnswer:(selection asString string)
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   727
                okLabel:'Add'
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   728
                title:'Enter Variable Name'.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   729
    name size == 0 ifTrue:[
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   730
        ^ self
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   731
    ].
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   732
    nameKey := name asSymbol.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   733
4284
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
   734
    (Smalltalk includesKey:nameKey) ifTrue:[
4154
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   735
        self warn:'Global named ''' , name , ''' already exists.'.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   736
        ^ self.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   737
    ].
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   738
    Smalltalk at:nameKey put:nil.
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   739
!
d243b609e104 +addGlobal in menu
Claus Gittinger <cg@exept.de>
parents: 4141
diff changeset
   740
4099
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   741
addGlobalVariableInspector
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   742
    |v|
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   743
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   744
    v := self addInspectorOn:(Smalltalk) basic:false suppressPseudoSlots:true.
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   745
    v fieldListLabel:'Name'.
4208
84260a3d6e20 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4183
diff changeset
   746
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Globals (Smalltalk)'.
4099
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   747
!
a7967641f3d7 global variables
Claus Gittinger <cg@exept.de>
parents: 4098
diff changeset
   748
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   749
addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   750
    |view cls resultString|
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   751
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   752
    isBasicInspector ifFalse:[
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   753
        cls := aValue inspectorClass.
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   754
    ].
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   755
    cls isNil ifTrue:[
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   756
        cls := InspectorView
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   757
    ].
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   758
    view := cls new.
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   759
    view suppressPseudoSlots:suppressPseudoSlots.
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   760
    view inspect:aValue.
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   761
    "/ v allowFollow:true.
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   762
    aValue isBehavior ifTrue:[
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   763
        resultString := aValue name
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   764
    ] ifFalse:[
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   765
        resultString := aValue classNameWithArticle
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   766
    ].
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   767
    self addWindow:view named:('Inspecting: ' , resultString).
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   768
    ^ view
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   769
!
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   770
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   771
addWorkspace
5295
e3c5a7b20d9d refactored (added abstract superclass)
Claus Gittinger <cg@exept.de>
parents: 5262
diff changeset
   772
    self addWindow:(self createWorkspace) named:'Workspace%1'
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   773
!
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   774
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   775
addWorkspaceVariable
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   776
    |name selection|
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   777
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   778
    selection := self selectedWorkspacesTextView selection ? ''.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   779
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   780
    name := Dialog 
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   781
                request:'Name of new Workspace Variable:'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   782
                initialAnswer:(selection asString string)
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   783
                okLabel:'Add'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   784
                title:'Enter Variable Name'.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   785
    name size == 0 ifTrue:[
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   786
        ^ self
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   787
    ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   788
    Workspace addWorkspaceVariable:name.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   789
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
   790
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   791
addWorkspaceVariableInspector
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   792
    |v|
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   793
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   794
    v := self addInspectorOn:(Workspace workspaceVariables) basic:false suppressPseudoSlots:true.
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   795
    v dereferenceValueHolders:true.
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   796
    v fieldListLabel:'Name'.
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   797
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Variables'.
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   798
!
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   799
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   800
askForFilterBlock:message template:template rememberIn:nameOfClassVar
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   801
    |filterBlockString filterBlock dialog textHolder classVarValue|
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   802
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   803
    classVarValue := self class classVarAt:nameOfClassVar ifAbsent:nil.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   804
    classVarValue isNil ifTrue:[
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   805
        self class classVarAt:nameOfClassVar put:template. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   806
        classVarValue := template.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   807
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   808
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   809
    textHolder := ValueHolder new.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   810
    dialog := Dialog 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   811
                 forRequestText:(resources string:message)
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   812
                 lines:25 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   813
                 columns:70
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   814
                 initialAnswer:classVarValue
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   815
                 model:textHolder.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   816
    dialog addButton:(Button label:'Template' action:[textHolder value:template. textHolder changed:#value.]).
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   817
    dialog open.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   818
    dialog accepted ifFalse:[^ nil].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   819
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   820
    filterBlockString := textHolder value.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   821
    self class classVarAt:nameOfClassVar put:filterBlockString. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   822
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   823
    filterBlock := Parser evaluate:filterBlockString.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   824
    filterBlock isBlock ifFalse:[
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   825
        self error:'bad input for filterBlock' mayProceed:true.
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   826
        ^ nil
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   827
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   828
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   829
    ^ filterBlock
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   830
!
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   831
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   832
autoDefineVariablesChanged
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   833
    |autoDefine|
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   834
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   835
    autoDefine := autoDefineVariables value.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   836
    UserPreferences current autoDefineWorkspaceVariables:(autoDefine == #workspace).
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   837
    workspaces do:[:each |
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   838
        each autoDefineVariables:autoDefine
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   839
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   840
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
   841
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   842
basicInspectIt
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   843
    self inspectIt:true
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   844
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   845
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   846
browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   847
    self selectedWorkspacesTextView browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   848
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   849
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   850
browseIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   851
    self selectedWorkspacesTextView browseIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   852
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   853
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   854
browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   855
    self selectedWorkspacesTextView browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   856
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
   857
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   858
clearHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   859
    Workspace clearDoItHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   860
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   861
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   862
doIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   863
    self selectedWorkspacesTextView doIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   864
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   865
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   866
inspectIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   867
    self inspectIt:false
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   868
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   869
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   870
inspectIt:isBasicInspector
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
   871
    |ws|
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   872
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   873
    ws := self selectedWorkspacesTextView.
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   874
    ws
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   875
        do:(ws selection) 
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   876
        withValueDo:[:result | 
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
   877
                        self addInspectorOn:result basic:isBasicInspector suppressPseudoSlots:false
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   878
                    ]
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   879
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
   880
"/    self selectedWorkspace inspectIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   881
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   882
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   883
inspectWorkspaceVariables
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   884
    |wsvars|
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   885
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   886
    wsvars := Workspace workspaceVariables.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   887
    wsvars size == 0 ifTrue:[
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   888
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   889
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   890
    ].
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   891
    wsvars inspect
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   892
!
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
   893
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   894
loadFile:aFileName 
5649
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   895
    self loadFile:aFileName encoding:nil
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   896
!
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   897
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   898
loadFile:aFileName encoding:encodingSymbol
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   899
    |file ws lbl|
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   900
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   901
    file := aFileName asFilename.
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   902
    ws := self selectedWorkspacesTextView.
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   903
    [
5649
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
   904
        ws contents:(file contents encodeFrom:encodingSymbol into:#'unicode').
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   905
    ] on:StreamError do:[:ex|
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   906
        Dialog warn:(resources string:'Cannot open %1: %2' with:file asString with:ex description).
5196
13f6e4eaac91 fix #loadFile: check if file exists
Michael Beyl <mb@exept.de>
parents: 5140
diff changeset
   907
        ^ self
13f6e4eaac91 fix #loadFile: check if file exists
Michael Beyl <mb@exept.de>
parents: 5140
diff changeset
   908
    ].
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   909
    ws modified:false.
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   910
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   911
    lbl := file withoutSuffix baseName.
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   912
    tabList size <= 1 ifTrue:[
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   913
        self window label:lbl.
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   914
    ] ifFalse:[
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   915
        tabList at:self selectedWorkspaceIndexHolder value put:lbl
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   916
    ]
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   917
!
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   918
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   919
menuLoad
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   920
    |file|
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   921
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   922
    (self askIfModified:'Text was modified. Load anyway ?' yesButton:'Load') ifFalse:[ ^ self].
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   923
4602
a961c37bd041 better save file dialog (use new dialog vs. use old dialog)
Claus Gittinger <cg@exept.de>
parents: 4591
diff changeset
   924
    file := Dialog requestFileName:'Load file' default:'file.wsp' pattern:'*.wsp'.
5490
722da73f31ed Handle file open errors
Stefan Vogel <sv@exept.de>
parents: 5358
diff changeset
   925
    file size ~~ 0 ifTrue:[
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
   926
        self loadFile:file
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   927
    ]
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   928
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   929
3334
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   930
newSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   931
    self class openSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   932
!
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
   933
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   934
openDocumentation
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   935
    "opens the documentation file"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   936
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   937
    self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   938
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   939
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   940
pasteAndExecute:aString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
   941
    self paste:aString.
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   942
    self printIt
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   943
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
   944
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   945
printIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
   946
    self selectedWorkspacesTextView printIt
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   947
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
   948
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   949
processText
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   950
    |template filterBlock newList oldList answer nChanged changedLines flags|
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   951
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   952
    template :=
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   953
'"/ general text processor;
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   954
"/ the following block should evaluate to a new line, 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   955
"/ given the original line as argument.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   956
"/ Beginner warning: Smalltalk know-how is useful here.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   957
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   958
[:line |
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   959
     "/ any processing on line.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   960
     "/ Notice, that line might be a Text object (i.e. non-string),
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   961
     "/ 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   962
     "/ Useful operations on the line are:
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   963
     "/     - '' .... '' ,                      concatenation of any prefix/suffix
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   964
     "/     - leftPaddedTo:size                 padding
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   965
     "/     - rightPaddedTo:size                padding
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   966
     "/     - copyTo:(size min:N)               
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   967
     "/     - asUppercase 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   968
     "/     - asLowercase
4141
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   969
     "/     - withoutSeparators                 remove whiteSpace
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   970
     "/     - asCollectionOfWords               words
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   971
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   972
     "/ makes everything bold
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   973
     "/
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   974
     "/ line allBold
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   975
4141
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   976
     "/ first word only
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   977
     "/
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   978
     "/ line withoutSeparators asCollectionOfWords first
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   979
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   980
     "/ dummy filter (keeps all lines as-is)
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   981
     "/
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   982
     line
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   983
]
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   984
'.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   985
    filterBlock := self askForFilterBlock:'Processing block:'
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   986
                        template:template
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   987
                        rememberIn:#LastProcessingBlockString.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   988
    filterBlock isNil ifTrue:[^ self].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   989
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   990
    oldList := self selectedWorkspacesTextView list.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
   991
    oldList := oldList collect:[:lineOrNil | lineOrNil ? ''].
4141
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   992
    newList := oldList collect:[:line | |newLine|
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   993
                newLine := line.
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   994
                Error handle:[:ex |
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   995
                ] do:[
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   996
                    newLine := filterBlock value:line
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   997
                ].
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   998
                newLine
31db488780da *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4136
diff changeset
   999
               ].
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1000
    newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1001
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1002
    flags := (1 to:oldList size) collect:[:i | (oldList at:i) ~= (newList at:i)].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1003
    flags := flags select:[:flag | flag].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1004
    nChanged := flags size.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1005
    nChanged == 0 ifTrue:[
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1006
        self information:'No lines were changed.'.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1007
        ^ self
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1008
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1009
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1010
    answer := Dialog confirmWithCancel:(resources 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1011
                        string:'%1 lines changed. Change text ?'
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1012
                        with:nChanged)
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1013
                labels:#( 'Cancel' 'No, Show Changed' 'Yes').
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1014
    answer isNil ifTrue:[^ self].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1015
    answer ifFalse:[
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1016
        changedLines := (1 to:oldList size) select:[:i | (oldList at:i) ~= (newList at:i)].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1017
        changedLines := changedLines collect:[:i | (newList at:i)].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1018
        TextBox openOn:(changedLines asStringCollection) title:'Changed lines'.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1019
        ^ self.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1020
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1021
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1022
    self selectedWorkspacesTextView list:newList.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1023
!
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  1024
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1025
redoLastDoIt
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1026
    |s|
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1027
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1028
    s := self lastDoItsString.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1029
    s notNil ifTrue:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1030
        self pasteAndExecute:s
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1031
    ]
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1032
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1033
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1034
removeAllWorkspaceVariables
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1035
    (Dialog confirm:'Do you really want to remove all Workspace Variables ?')
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1036
    ifTrue:[
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1037
        Workspace removeAllWorkspaceVariables
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1038
   ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1039
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1040
4284
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1041
removeGlobalVariable
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1042
    |name nameKey selection value|
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1043
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1044
    selection := self selectedWorkspacesTextView selection ? ''.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1045
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1046
    name := Dialog 
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1047
                request:'Remove Global Variable:'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1048
                initialAnswer:(selection asString string)
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1049
                okLabel:'Remove'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1050
                title:'Remove Global'.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1051
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1052
    name size == 0 ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1053
    nameKey := name asSymbolIfInterned.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1054
    nameKey isNil ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1055
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1056
    (Smalltalk includesKey:nameKey) ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1057
        self warn:('No such Global Binding: ''%1''.' bindWith:name).
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1058
        ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1059
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1060
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1061
    value := Smalltalk at:nameKey.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1062
    value notNil ifTrue:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1063
        (self confirm:('Global ''%1'' is currently bound to %2\\Remove Binding ?' bindWith:name with:value) withCRs)
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1064
        ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1065
            ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1066
        ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1067
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1068
    Smalltalk at:nameKey put:nil.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1069
    Smalltalk removeKey:nameKey
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1070
!
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  1071
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1072
removeWorkspaceVariable
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1073
    |name selection wsvars|
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1074
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1075
    wsvars := Workspace workspaceVariables.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1076
    wsvars size == 0 ifTrue:[
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1077
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1078
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1079
    ].
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1080
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1081
    selection := self selectedWorkspacesTextView selection ? ''.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1082
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1083
    name := Dialog 
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1084
                request:'Variable to remove:'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1085
                initialAnswer:(selection asString string)
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1086
                okLabel:'Remove'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1087
                title:'Enter Variable Name'
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  1088
                list:(wsvars keys asOrderedCollection sort).      
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1089
    name size == 0 ifTrue:[
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1090
        ^ self
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1091
    ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1092
    Workspace removeWorkspaceVariable:name.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1093
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1094
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1095
spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1096
    self selectedWorkspacesTextView spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1097
!
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1098
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1099
timeIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  1100
    self selectedWorkspacesTextView timeIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1101
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1102
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1103
!WorkspaceApplication methodsFor:'menu-actions-editing'!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1104
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1105
babelFishTranslate:fromToModeString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1106
    "translate the selected text and paste it after the selection"
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1107
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1108
    self selectedWorkspace babelFishTranslate:fromToModeString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1109
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1110
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1111
fileInText
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1112
    self selectedWorkspacesTextView contentsAsString readStream fileIn
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1113
!
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  1114
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1115
filterText
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1116
    |template filterBlock newList oldList answer nDeleted deletedLines|
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1117
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1118
    template :=
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1119
'"/ general text filter;
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1120
"/ the following block should evaluate to true for all lines
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1121
"/ you want to keep - lines for which the block returns false will be removed.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1122
"/ Beginner warning: Smalltalk know-how is useful here.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1123
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1124
[:line |
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1125
     "/ any condition on line.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1126
     "/ Notice, that line might be a Text object (i.e. non-string),
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1127
     "/ so you may want to use line string.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1128
     "/ 
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1129
     "/ Useful queries on the line are:
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1130
     "/     - size                   the length of the line
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1131
     "/     - hasChangeOfEmphasis    any bold, italic etc.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1132
     "/     - startsWith:someString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1133
     "/     - endsWith:someString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1134
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1135
     "/ example filter (removes all empty lines)
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1136
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1137
     "/ line size > 0
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1138
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1139
     "/ example filter (removes all lines which do not end with some suffix)
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1140
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1141
     "/ (line asLowercase endsWith:''foo'') not
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1142
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1143
     "/ dummy filter (keeps all lines)
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1144
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1145
     true
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1146
]
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1147
'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1148
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1149
    filterBlock := self askForFilterBlock:'Filter block:'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1150
                        template:template
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1151
                        rememberIn:#LastFilterBlockString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1152
    filterBlock isNil ifTrue:[^ self].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1153
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1154
    oldList := self selectedWorkspacesTextView list.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1155
    oldList := oldList collect:[:lineOrNil | lineOrNil ? ''].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1156
    newList := oldList select:filterBlock.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1157
    newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1158
    nDeleted := oldList size - newList size.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1159
    nDeleted == 0 ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1160
        self information:'No lines were deleted.'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1161
        ^ self
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1162
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1163
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1164
    answer := Dialog confirmWithCancel:(resources 
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1165
                        string:'%1 lines remain (%2 deleted). Change text ?'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1166
                        with:newList size
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1167
                        with:nDeleted)
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1168
                labels:#( 'Cancel' 'No, Show Deleted' 'Yes').
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1169
    answer isNil ifTrue:[^ self].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1170
    answer ifFalse:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1171
        deletedLines := oldList reject:filterBlock.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1172
        TextBox openOn:(deletedLines asStringCollection) title:'Filtered lines'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1173
        ^ self.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1174
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1175
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1176
    self selectedWorkspacesTextView list:newList.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1177
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1178
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1179
googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1180
    self selectedWorkspacesTextView googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1181
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1182
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1183
pasteLastDoIt
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1184
    |s|
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1185
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1186
    s := self lastDoItsString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1187
    s notNil ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1188
        self paste:s
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1189
    ]
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1190
! !
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  1191
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1192
!WorkspaceApplication methodsFor:'menu-dynamic'!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1193
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1194
pasteRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1195
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1196
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1197
    ^ self recentDoItsMenuFor:#'paste:'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1198
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1199
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1200
recentDoItsMenuFor:aSelector
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1201
    <resource: #programMenu >
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1202
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1203
    ^ [
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1204
        |doIts m classHistory currentClass|
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1205
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1206
        doIts := Workspace doItHistory.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1207
        doIts size > 0 ifTrue:[
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1208
            m := Menu new.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1209
            doIts do:[:doItEntry |
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1210
                |lines label item|
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1211
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1212
                label := doItEntry withoutLeadingSeparators asStringCollection first.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1213
                (label size > 20) ifTrue:[
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1214
                    label := (label contractTo:20)
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1215
                ] ifFalse:[
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1216
                    (lines size > 1) ifTrue:[
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1217
                        label := label , '...'
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1218
                    ].
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1219
                ].
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1220
                label := '''' , label , ''''.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1221
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1222
                item := MenuItem label:label.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1223
                m addItem:item.
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1224
                item value:aSelector.
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1225
                item argument:doItEntry.
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1226
            ].
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1227
            m addItem: (MenuItem new label:'-').
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1228
            m addItem: (MenuItem new 
5358
b122ec142dba checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5303
diff changeset
  1229
                        label: (resources string:'Clear History'); 
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1230
                        value: #clearHistory; 
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1231
                        activeHelpKey: #historyEmptyMenu;
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1232
                        translateLabel:true).
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1233
       ].
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1234
        m
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1235
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1236
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1237
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1238
redoRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1239
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1240
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1241
    ^ self recentDoItsMenuFor:#'pasteAndExecute:'
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1242
! !
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  1243
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1244
!WorkspaceApplication methodsFor:'private'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1245
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1246
askIfAnyModified:question yesButton:yesButtonText
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1247
    (workspaces contains:[:aView | self isModifiedWorkspace:aView]) ifFalse:[^ true].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1248
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1249
    (Dialog 
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1250
        confirm:(resources string:question) withCRs
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1251
        yesLabel:(resources at:yesButtonText)
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1252
        noLabel:(resources at:'Cancel'))
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1253
    ifTrue:[
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1254
        "/ reset modified flag so question is asked only once
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1255
        (workspaces select:[:aView | (self isModifiedWorkspace:aView)])
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1256
        do:[:eachModifiedTextView |
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1257
                eachModifiedTextView modified:false.
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1258
        ].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1259
        ^ true
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1260
    ].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1261
    ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1262
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1263
5295
e3c5a7b20d9d refactored (added abstract superclass)
Claus Gittinger <cg@exept.de>
parents: 5262
diff changeset
  1264
createWorkspace
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  1265
    |ws|
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  1266
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  1267
    ws := (HVScrollableView for:Workspace).
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  1268
    ws autoDefineVariables:autoDefineVariables.
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  1269
    ^ ws
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  1270
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  1271
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1272
isModifiedWorkspace:aView
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1273
    |view|
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1274
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1275
    view := self workspaceViewOfView:aView.
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1276
4313
a8553b7a090e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4284
diff changeset
  1277
    (view isNil
a8553b7a090e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4284
diff changeset
  1278
    or:[view modified not 
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1279
    or:[view contentsWasSaved
4313
a8553b7a090e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4284
diff changeset
  1280
    or:[view contents withoutSeparators isEmpty]]]) ifTrue:[
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1281
        ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1282
    ].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1283
    ^ true
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1284
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  1285
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1286
lastDoItsString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1287
    |history|
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  1288
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1289
    history := Workspace doItHistory.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1290
    history size > 0 ifFalse:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1291
        self selectedWorkspacesTextView flash.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1292
        ^ nil
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  1293
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  1294
    ^ history first
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1295
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1296
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1297
!WorkspaceApplication class methodsFor:'documentation'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1298
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1299
version
5649
f6e8c040ffb0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5547
diff changeset
  1300
    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.73 2004-03-03 21:35:30 cg Exp $'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1301
! !