WorkspaceApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 04 Apr 2016 07:09:38 +0100
branchjv
changeset 16268 82848a0b6d70
parent 16256 65473fc50115
parent 16261 37d84328738a
child 16293 d6b477b1814a
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16259
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
     1
"{ Encoding: utf8 }"
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
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
"
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
"{ Package: 'stx:libtool' }"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
    16
"{ NameSpace: Smalltalk }"
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
    17
5303
fe0d2165b716 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5295
diff changeset
    18
MultiViewToolApplication subclass:#WorkspaceApplication
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
    19
	instanceVariableNames:'autoDefineVariables syntaxHolder poolsConsideredInDoIts
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
    20
		smalltalkMenuEnabledHolder clipBoardWatcherProcess
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
    21
		fetchClipboardLines cursorLineHolder cursorColHolder
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
    22
		modeLabelHolder toolBarView namespaceHolder
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
    23
		canChangeLanguageHolder cursorLineAndColumnInfoHolder
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
    24
		cursorLineAndColumnLabelHolder'
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    25
	classVariableNames:'LastFilterBlockString LastProcessingBlockString
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    26
		LastGeneratorBlockString LastTeaWaitTime DefaultToolBarVisible
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    27
		ClipBoardFetchingInstance LastLanguage MyWorkspaceOpened
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
    28
		LastNamespace LastSnippetFilename'
8315
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
    29
	poolDictionaries:''
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
    30
	category:'Interface-Smalltalk'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    33
!WorkspaceApplication class methodsFor:'documentation'!
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    34
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    35
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    36
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    37
 COPYRIGHT (c) 2001 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    38
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    39
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    40
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    41
 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
    42
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    43
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    44
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    45
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    46
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    47
!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    48
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    49
documentation
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    50
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    51
    A simple wrapper around a WorkSpace-View, adding a pullDown menu.
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    52
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    53
    [author:]
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    54
        Claus Gittinger
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    55
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    56
! !
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    58
!WorkspaceApplication class methodsFor:'defaults'!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    59
15833
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    60
default
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    61
    "a place where the default workspaceApplication could be hooked in;
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    62
     see SystemBrowser default and FileBrowser default on the intention..."
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    63
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    64
    ^ self
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    65
!
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    66
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    67
defaultEditToolbarVisible
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    68
    ^ UserPreferences current editToolbarVisibleInWorkspace
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    69
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    70
    "Created: / 14-07-2007 / 16:42:50 / cg"
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    71
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    72
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    73
defaultInfoVisible
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    74
    ^ UserPreferences current infoVisibleInWorkspace
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    75
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    76
    "Created: / 14-07-2007 / 16:43:21 / cg"
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    77
!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    78
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    79
defaultMyWorkspaceDotWspFile
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    80
    |stxFolder f |
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    81
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    82
    stxFolder := Filename homeDirectory / '.smalltalk'. 
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    83
    f := stxFolder / 'MyWorkspace.wsp'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    84
    f exists ifFalse:[
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    85
        stxFolder makeDirectory.
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    86
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    87
        f writingFileDo:[:s|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    88
            'MyWorkspace.wsp' asFilename exists ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    89
                s nextPutAll:('MyWorkspace.wsp' asFilename contentsAsString)   
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    90
            ] ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    91
                s nextPutLine: '"This is your personal workspace..."'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    92
                s nextPutLine: '"Edit and save as  ', f pathName , '"'.
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    93
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    94
                'MyWorkspaceSample.wsp' asFilename exists ifTrue:[
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    95
                    s nextPutAll:('MyWorkspaceSample.wsp' asFilename contentsAsString)   
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    96
                ]
12393
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    97
            ].
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    98
            s syncData.
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    99
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   100
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   101
    ^f
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   102
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   103
    "Created: / 21-06-2011 / 08:45:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10317
8ce783ef807d changed: #defaultMyWorkspaceDotWspFile
sr
parents: 10283
diff changeset
   104
    "Modified: / 14-07-2011 / 13:08:30 / Administrator"
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
   105
    "Modified: / 10-08-2011 / 21:40:31 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   106
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   107
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   108
defaultToolbarVisible
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   109
    ^ UserPreferences current toolbarVisibleInWorkspace
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   110
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   111
    "Created: / 14-07-2007 / 16:42:50 / cg"
8486
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   112
!
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   113
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   114
webServiceLinkName
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   115
    ^ '/workspace'
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   116
! !
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   117
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   118
!WorkspaceApplication class methodsFor:'help specs'!
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   119
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   120
flyByHelpSpec
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   121
    <resource: #help>
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   122
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
   123
    ^ super flyByHelpSpec addPairsFrom:#(
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   124
12479
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   125
#editCopy
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   126
'Copy the selected text to the clipboard'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   127
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   128
#editCut
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   129
'Cut the selected text to the clipboard'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   130
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   131
#editDelete
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   132
'Delete the selected text'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   133
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   134
#addTerminal
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   135
'Add a tab with an embedded console-terminal'
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   136
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   137
#addTerminalWindows
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   138
'Add a tab with an embedded console-terminal (windows users: ignore the no-echo bug, please)'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   139
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   140
#lineAndColumnLabel
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   141
'The text-cursor''s line and column number'
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   142
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   143
#columnLabel
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   144
'The text-cursor''s column number'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   145
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   146
#lineLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   147
'The text-cursor''s line number. Double-click to change'
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   148
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   149
#modeLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   150
'The editing mode (insert vs. overwrite). Right-click to change'
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   151
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   152
#editRedo
8709
8d38950dff4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8708
diff changeset
   153
'Redo'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   154
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   155
#doIndent
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   156
'Indent (shift right)'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   157
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   158
#doUndent
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   159
'Undent (shift left)'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   160
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   161
#languageSelection
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
   162
'Syntax for doits, syntax checks and coloring. Right-click for menu to change'
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   163
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   164
#namespaceSelection
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
   165
'Namespace for doits. Right-click for menu to change'
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   166
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   167
#menuSave
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   168
'Save the page''s contents in the original file'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   170
#menuSaveAs
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   171
'Ask for a file and save the page''s contents there'
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   172
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   173
#snippedPaste
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   174
'Paste the selected snippet''s text into the text'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   175
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   176
#snippedDefine
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   177
'Add the above definition to the list of snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   178
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   179
#snippedRemove
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   180
'Remove the above selected snippet from the list of snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   181
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   182
#snippedKey
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   183
'The key of the snippet. This is the abbreviation you will have to type before pressing Shift-Space'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   184
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   185
#snippedList
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   186
'The list of defined snippets.'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   187
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   188
#snippedText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   189
'The text of the snippet. This is the text that will be inserted when pressing Shift-Space'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   190
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   191
)
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   192
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   193
    "Modified: / 08-07-2011 / 08:29:51 / cg"
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   194
! !
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   195
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   196
!WorkspaceApplication class methodsFor:'interface specs'!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   197
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   198
manageSnippetsDialogSpec
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   199
    "This resource specification was automatically generated
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   200
     by the UIPainter of ST/X."
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   201
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   202
    "Do not manually edit this!! If it is corrupted,
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   203
     the UIPainter may not be able to read the specification."
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   204
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   205
    "
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   206
     UIPainter new openOnClass:WorkspaceApplication andSelector:#manageSnippetsDialogSpec
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   207
     WorkspaceApplication new openInterface:#manageSnippetsDialogSpec
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   208
    "
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   209
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   210
    <resource: #canvas>
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   211
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   212
    ^ 
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   213
    #(FullSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   214
       name: manageSnippetsDialogSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   215
       window: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   216
      (WindowSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   217
         label: 'Manage Snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   218
         name: 'Manage Snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   219
         min: (Point 10 10)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   220
         bounds: (Rectangle 0 0 379 590)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   221
         menu: manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   222
       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   223
       component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   224
      (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   225
         collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   226
          (LabelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   227
             label: 'Snippet:'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   228
             name: 'Label1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   229
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   230
             translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   231
             adjust: left
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   232
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   233
          (VariableVerticalPanelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   234
             name: 'VariableVerticalPanel1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   235
             layout: (LayoutFrame 0 0 30 0 0 1 -80 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   236
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   237
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   238
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   239
                (SequenceViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   240
                   name: 'List1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   241
                   activeHelpKey: snippedList
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   242
                   model: selectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   243
                   hasHorizontalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   244
                   hasVerticalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   245
                   useIndex: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   246
                   sequenceList: listOfSnippets
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   247
                 )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   248
                (ViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   249
                   name: 'Box1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   250
                   component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   251
                  (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   252
                     collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   253
                      (TextEditorSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   254
                         name: 'TextEditor1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   255
                         layout: (LayoutFrame 0 0 30 0 0 1 0 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   256
                         activeHelpKey: snippedText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   257
                         model: selectedSnippetsText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   258
                         hasHorizontalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   259
                         hasVerticalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   260
                         acceptChannel: snippetTextAcceptHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   261
                         modifiedChannel: snippetTextModified
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   262
                         hasKeyboardFocusInitially: false
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   263
                         viewClassName: ''
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   264
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   265
                      (LabelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   266
                         label: 'Snippet Key:'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   267
                         name: 'Label2'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   268
                         layout: (LayoutFrame 0 0 2 0 100 0 28 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   269
                         translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   270
                         adjust: left
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   271
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   272
                      (InputFieldSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   273
                         name: 'EntryField1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   274
                         layout: (LayoutFrame 100 0.0 2 0 0 1.0 28 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   275
                         activeHelpKey: snippedKey
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   276
                         model: selectedSnippetsKeyHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   277
                         immediateAccept: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   278
                         acceptOnReturn: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   279
                         acceptOnTab: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   280
                         acceptOnPointerLeave: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   281
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   282
                      )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   283
                    
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   284
                   )
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   285
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   286
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   287
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   288
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   289
             handles: (Any 0.5 1.0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   290
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   291
          (HorizontalPanelViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   292
             name: 'ButtonPanel'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   293
             layout: (LayoutFrame 0 0 -70 1 0 1 -40 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   294
             horizontalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   295
             verticalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   296
             horizontalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   297
             verticalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   298
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   299
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   300
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   301
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   302
                   label: 'Define'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   303
                   name: 'DefineButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   304
                   activeHelpKey: snippedDefine
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   305
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   306
                   model: defineSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   307
                   enableChannel: defineEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   308
                   extent: (Point 125 22)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   309
                 )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   310
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   311
                   label: 'Remove'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   312
                   name: 'RemoveButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   313
                   activeHelpKey: snippedRemove
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   314
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   315
                   model: removeSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   316
                   enableChannel: removeEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   317
                   extent: (Point 125 22)
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
   318
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   319
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   320
                   label: 'Paste'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   321
                   name: 'PasteButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   322
                   activeHelpKey: snippedPaste
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   323
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   324
                   model: pasteSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   325
                   enableChannel: pasteEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   326
                   extent: (Point 125 22)
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   327
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   328
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   329
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   330
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   331
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   332
          (DividerSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   333
             name: 'Separator1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   334
             layout: (LayoutFrame 0 0.0 557 0 0 1.0 561 0)
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   335
           )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   336
          (HorizontalPanelViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   337
             name: 'CloseButtonPanel'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   338
             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   339
             horizontalLayout: fitSpace
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   340
             verticalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   341
             horizontalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   342
             verticalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   343
             reverseOrderIfOKAtLeft: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   344
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   345
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   346
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   347
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   348
                   label: 'Close'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   349
                   name: 'Button1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   350
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   351
                   model: cancel
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   352
                   extent: (Point 373 22)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   353
                 )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   354
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   355
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   356
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   357
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   358
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   359
        
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   360
       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   361
     )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   362
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   363
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   364
toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   365
    "This resource specification was automatically generated
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   366
     by the UIPainter of ST/X."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   367
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   368
    "Do not manually edit this!! If it is corrupted,
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   369
     the UIPainter may not be able to read the specification."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   370
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   371
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   372
     UIPainter new openOnClass:WorkspaceApplication andSelector:#toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   373
     WorkspaceApplication new openInterface:#toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   374
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   375
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   376
    <resource: #canvas>
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   377
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   378
    ^ 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   379
     #(FullSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   380
        name: toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   381
        window: 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   382
       (WindowSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   383
          label: 'Toolbar'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   384
          name: 'Toolbar'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   385
          min: (Point 10 10)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   386
          bounds: (Rectangle 0 0 728 48)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   387
        )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   388
        component: 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   389
       (SpecCollection
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   390
          collection: (
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   391
           (MenuPanelSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   392
              name: 'ToolBarMenu'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   393
              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   394
              level: 0
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   395
              visibilityChannel: toolBarVisibleHolder
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   396
              menu: toolBarMenu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   397
              textDefault: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   398
            )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   399
           )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   400
         
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   401
        )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   402
      )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   403
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   404
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   405
windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   406
    "This resource specification was automatically generated
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   407
     by the UIPainter of ST/X."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   408
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   409
    "Do not manually edit this!! If it is corrupted,
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   410
     the UIPainter may not be able to read the specification."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   411
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   412
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   413
     UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   414
     WorkspaceApplication new openInterface:#windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   415
     WorkspaceApplication open
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   416
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   417
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   418
    <resource: #canvas>
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   419
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   420
    ^ 
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   421
    #(FullSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   422
       name: windowSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   423
       window: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   424
      (WindowSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   425
         label: 'Workspace'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   426
         name: 'Workspace'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   427
         min: (Point 10 10)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   428
         bounds: (Rectangle 0 0 640 480)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   429
         menu: mainMenu
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   430
       )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   431
       component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   432
      (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   433
         collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   434
          (ViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   435
             name: 'ToolBar'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   436
             layout: (LayoutFrame 0 0 0 0 0 1 32 0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   437
             level: #'application.toolbarLevel'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   438
             visibilityChannel: toolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   439
             component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   440
            (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   441
               collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   442
                (ActionButtonSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   443
                   label: 'hideToolBarIcon'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   444
                   name: 'HideToolBarButton'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   445
                   layout: (LayoutFrame 0 0 0 0 13 0 0 1)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   446
                   activeHelpKey: hideToolBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   447
                   hasCharacterOrientedLabel: false
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   448
                   translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   449
                   model: hideToolbar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   450
                   postBuildCallback: hideToolBarButtonCreated:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   451
                 )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   452
                (NonScrollableArbitraryComponentSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   453
                   name: 'ToolBarView'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   454
                   layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   455
                   visibilityChannel: toolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   456
                   component: toolBarView
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   457
                 )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   458
                )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   459
              
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   460
             )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   461
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   462
          (ViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   463
             name: 'EditToolBar'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   464
             layout: (LayoutFrame 0 0 32 0 0 1 64 0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   465
             visibilityChannel: editToolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   466
             component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   467
            (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   468
               collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   469
                (ActionButtonSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   470
                   label: 'hideToolBarIcon'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   471
                   name: 'HideEditToolBarButton'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   472
                   layout: (LayoutFrame 0 0 0 0 13 0 0 1)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   473
                   activeHelpKey: hideEditToolBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   474
                   hasCharacterOrientedLabel: false
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   475
                   translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   476
                   model: hideEditToolbar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   477
                   postBuildCallback: hideToolBarButtonCreated:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   478
                 )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   479
                (MenuPanelSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   480
                   name: 'EditToolBar1'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   481
                   layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   482
                   visibilityChannel: editToolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   483
                   menu: editToolBarMenu
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   484
                   textDefault: true
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   485
                 )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   486
                )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   487
              
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   488
             )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   489
           )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   490
          (NoteBookViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   491
             name: 'NoteBook'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   492
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -26 1.0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   493
             model: selectedWorkspaceIndexHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   494
             menu: tabList
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   495
             useIndex: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   496
             accessTabMenuAction: tabMenuAt:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   497
             translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   498
             destroyTabAction: destroyTab:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   499
             canvas: workspaceHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   500
             canvasInset: 0
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   501
             keepCanvasAlive: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   502
             tabLevel: 1
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   503
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   504
          (UISubSpecification
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   505
             name: 'infoBarSubSpec'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   506
             layout: (LayoutFrame 0 0.0 -26 1 -16 1.0 0 1.0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   507
             level: #'infobar.level'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   508
             visibilityChannel: infoVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   509
             majorKey: WorkspaceApplication
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   510
             minorKey: windowSpecForInfoBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   511
             keepSpaceForOSXResizeHandleH: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   512
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   513
          )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   514
        
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   515
       )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   516
     )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   517
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   518
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   519
windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   520
    "This resource specification was automatically generated
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   521
     by the UIPainter of ST/X."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   522
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   523
    "Do not manually edit this!! If it is corrupted,
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   524
     the UIPainter may not be able to read the specification."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   525
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   526
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   527
     UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   528
     WorkspaceApplication new openInterface:#windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   529
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   530
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   531
    <resource: #canvas>
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   532
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   533
    ^ 
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   534
    #(FullSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   535
       name: windowSpecForInfoBar
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   536
       window: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   537
      (WindowSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   538
         label: 'Info Bar'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   539
         name: 'Info Bar'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   540
         bounds: (Rectangle 0 0 473 30)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   541
       )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   542
       component: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   543
      (SpecCollection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   544
         collection: (
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   545
          (ViewSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   546
             name: 'infoView'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   547
             layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   548
             component: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   549
            (SpecCollection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   550
               collection: (
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   551
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   552
                   name: 'infoLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   553
                   layout: (LayoutFrame 0 0.0 0 0.0 -220 1.0 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   554
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   555
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   556
                   labelChannel: infoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   557
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   558
                   adjust: left
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   559
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   560
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   561
                   name: 'namespaceInfoLabelHolder'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   562
                   layout: (LayoutFrame -220 1.0 0 0.0 -136 1.0 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   563
                   activeHelpKey: namespaceSelection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   564
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   565
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   566
                   labelChannel: namespaceInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   567
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   568
                   adjust: left
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
   569
                   menu: namespaceInfoLabelMenuHolder
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   570
                 )
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   571
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   572
                   name: 'LanguageLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   573
                   layout: (LayoutFrame -136 1.0 0 0.0 -65 1.0 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   574
                   activeHelpKey: languageSelection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   575
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   576
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   577
                   labelChannel: languageInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   578
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   579
                   adjust: left
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   580
                   menu: languageInfoLabelMenu
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   581
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   582
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   583
                   name: 'ModeLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   584
                   layout: (LayoutFrame -65 1 0 0.0 -50 1 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   585
                   activeHelpKey: modeLabel
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   586
                   level: -1
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   587
                   translateLabel: true
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   588
                   labelChannel: modeLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   589
                   postBuildCallback: postBuildEditModeInfoLabel:
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   590
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   591
                (LabelSpec
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   592
                   name: 'CursorLineAndColLabel'
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   593
                   layout: (LayoutFrame -50 1 0 0.0 0 1 0 1.0)
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   594
                   activeHelpKey: lineAndColumnLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   595
                   level: -1
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
   596
                   labelChannel: cursorLineAndColumnLabelHolder
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   597
                   adjust: left
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   598
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   599
                )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   600
              
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   601
             )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   602
           )
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   603
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   604
        
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   605
       )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   606
     )
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   607
! !
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   608
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   609
!WorkspaceApplication class methodsFor:'menu specs'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   610
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   611
bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   612
    "This resource specification was automatically generated
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   613
     by the MenuEditor of ST/X."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   614
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   615
    "Do not manually edit this!! If it is corrupted,
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   616
     the MenuEditor may not be able to read the specification."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   617
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   618
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   619
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   620
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   621
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication bufferAddMenuSlice)) startUp
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   622
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   623
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   624
    <resource: #menu>
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   625
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   626
    ^
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   627
     #(Menu
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   628
	(
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   629
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   630
	    label: 'Terminal'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   631
	    itemValue: addTerminal
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   632
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   633
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   634
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   635
	    label: 'Web Browser'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   636
	    itemValue: addWebBrowser
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   637
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   638
	    isVisible: isWebBrowserAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   639
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   640
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   641
	    enabled: isSQLWorkspaceAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   642
	    label: 'SQL Workspace'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   643
	    itemValue: addSQLWorkspace
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   644
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   645
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   646
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   647
	    label: 'Tea Timer'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   648
	    itemValue: addTeaTimer
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   649
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   650
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   651
	 (MenuItem
12032
37dea732aec1 changed: #bufferAddMenuSlice
Claus Gittinger <cg@exept.de>
parents: 12028
diff changeset
   652
            label: 'Stopwatch'
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   653
	    itemValue: addStopWatch
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   654
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   655
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   656
	 )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   657
	nil
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   658
	nil
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   659
      )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   660
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   661
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   662
bufferMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   663
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   664
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   665
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   666
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   667
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   668
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   669
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   670
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#bufferMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   671
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication bufferMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   672
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   673
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   674
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   675
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   676
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   677
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   678
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   679
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   680
            label: 'Add Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   681
            itemValue: addWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   682
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   683
            shortcutKey: Ctrlt
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   684
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   685
         (MenuItem
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   686
            label: '-'
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   687
            isVisible: thisIsASmalltalkWorkspace
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   688
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   689
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   690
            label: 'Add Buffer on MyWorkspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   691
            itemValue: addMyWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   692
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   693
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   694
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   695
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   696
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   697
            label: 'Add Buffer on Workspace Variables'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   698
            itemValue: addWorkspaceVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   699
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   700
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   701
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   702
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   703
            label: 'Add Buffer on Global Variables'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   704
            itemValue: addGlobalVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   705
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   706
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   707
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   708
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   709
            label: 'Add Buffer on Namespace...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   710
            itemValue: addNamespaceInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   711
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   712
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   713
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   714
         (MenuItem
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   715
            label: 'Add Buffer on SharedPool...'
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   716
            itemValue: addSharedPoolInspector
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   717
            translateLabel: true
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   718
            isVisible: thisIsASmalltalkWorkspace
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   719
          )
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   720
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   721
            label: 'Add Buffer on Class Variables'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   722
            itemValue: addClassVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   723
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   724
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   725
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   726
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   727
            label: '-'
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   728
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   729
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   730
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   731
            label: 'Add Evaluation Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   732
            itemValue: addEvaluationWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   733
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   734
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   735
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   736
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   737
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   738
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   739
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   740
            label: 'Menu Slice'
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   741
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   742
            submenuChannel: bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   743
            isMenuSlice: true
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   744
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   745
         (MenuItem
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   746
            label: '-'
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   747
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   748
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   749
            label: 'Rename...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   750
            itemValue: renameWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   751
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   752
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   753
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   754
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   755
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   756
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   757
            enabled: canRemoveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   758
            label: 'Remove Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   759
            itemValue: removeWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   760
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   761
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   762
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   763
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   764
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   765
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   766
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   767
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   768
editMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   769
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   770
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   771
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   772
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   773
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   774
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   775
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   776
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   777
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#editMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   778
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication editMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   779
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   780
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   781
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   782
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   783
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   784
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   785
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   786
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   787
            enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   788
            label: 'Cut'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   789
            itemValue: cutSelection
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   790
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   791
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   792
            enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   793
            label: 'Copy'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   794
            itemValue: copySelection
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   795
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   796
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   797
            label: 'Paste'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   798
            itemValue: paste
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   799
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   800
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   801
            enabled: hasHistory
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   802
            label: 'Paste Last'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   803
            itemValue: pasteLastDoIt
8492
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
   804
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   805
            submenuChannel: pasteRecentDoItMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   806
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   807
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   808
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   809
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   810
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   811
            enabled: hasSelectionInActiveWorkspace
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   812
            label: 'Copy as Snippet...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   813
            itemValue: addSelectionToSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   814
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   815
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   816
            enabled: selectedWorkspaceIsTextView
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   817
            label: 'Paste Snippet...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   818
            itemValue: pasteSnippet
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   819
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   820
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   821
            enabled: selectedWorkspaceIsTextView
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   822
            label: 'Manage Snippets...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   823
            itemValue: manageSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   824
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   825
         (MenuItem
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   826
            label: '-'
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   827
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   828
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   829
            label: 'Select All'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   830
            itemValue: selectAll
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   831
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   832
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   833
            label: '-'
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   834
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   835
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   836
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   837
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   838
            label: 'Filter Text...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   839
            itemValue: filterText
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   840
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   841
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   842
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   843
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   844
            label: 'Process Text...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   845
            itemValue: processText
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   846
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   847
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   848
         (MenuItem
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   849
            label: 'Generate Text...'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   850
            itemValue: generateText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   851
          )
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   852
         (MenuItem
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   853
            label: 'Compare Text Against...'
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   854
            itemValue: compareTextAgainst
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   855
          )
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   856
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   857
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   858
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   859
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   860
            label: 'Services'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   861
            submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   862
           (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   863
              (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   864
               (MenuItem
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   865
                  label: 'Autofetch Selection'
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   866
                  itemValue: autoFetchSelection:
11627
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   867
                  hideMenuOnActivated: false
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   868
                  indication: autoFetchSelection
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   869
                )
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   870
               (MenuItem
11627
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   871
                  enabled: autoFetchSelection
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   872
                  label: 'Insert as Line (Append CR)'
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   873
                  hideMenuOnActivated: false
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   874
                  indication: autoFetchSelectionLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   875
                )
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   876
               (MenuItem
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   877
                  label: '-'
9635
aaaff033bfba changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 9632
diff changeset
   878
                  isVisible: thisIsASmalltalkWorkspace
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   879
                )
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   880
               (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   881
                  enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   882
                  label: 'Google Spell'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   883
                  itemValue: googleSpellingSuggestion
7876
3e9f6e7b9ff2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7866
diff changeset
   884
                  isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   885
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   886
               (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   887
                  enabled: hasSelectionInActiveWorkspace
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   888
                  label: 'Translate (babelFish)'
7876
3e9f6e7b9ff2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7866
diff changeset
   889
                  isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   890
                  submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   891
                 (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   892
                    (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   893
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   894
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   895
                        label: 'English -> German'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   896
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   897
                        argument: 'en_de'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   898
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   899
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   900
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   901
                        label: 'English -> French'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   902
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   903
                        argument: 'en_fr'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   904
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   905
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   906
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   907
                        label: 'English -> Spanish'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   908
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   909
                        argument: 'en_es'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   910
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   911
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   912
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   913
                        label: 'English -> Portuguese'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   914
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   915
                        argument: 'en_pt'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   916
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   917
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   918
                        label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   919
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   920
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   921
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   922
                        label: 'German -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   923
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   924
                        argument: 'de_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   925
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   926
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   927
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   928
                        label: 'French -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   929
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   930
                        argument: 'fr_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   931
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   932
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   933
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   934
                        label: 'Spanish -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   935
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   936
                        argument: 'es_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   937
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   938
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   939
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   940
                        label: 'Portuguese -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   941
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   942
                        argument: 'pt_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   943
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   944
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   945
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   946
                        label: 'Russian -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   947
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   948
                        argument: 'ru_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   949
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   950
                     )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   951
                    nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   952
                    nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   953
                  )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   954
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   955
               )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   956
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   957
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   958
            )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   959
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   960
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   961
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   962
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   963
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   964
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   965
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   966
editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   967
    "This resource specification was automatically generated
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   968
     by the MenuEditor of ST/X."
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   969
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   970
    "Do not manually edit this!! If it is corrupted,
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   971
     the MenuEditor may not be able to read the specification."
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   972
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   973
    "
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   974
     MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   975
     (Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   976
    "
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   977
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   978
    <resource: #menu>
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   979
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   980
    ^ 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   981
     #(Menu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   982
        (
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   983
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   984
            label: 'Insert'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   985
            itemValue: editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   986
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   987
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   988
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   989
            label: 'Overwrite'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   990
            itemValue: editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   991
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   992
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   993
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   994
            label: 'Insert Selecting'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   995
            itemValue: editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   996
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   997
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   998
         )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   999
        nil
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1000
        nil
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1001
      )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1002
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1003
    "Created: / 22-01-2011 / 11:50:05 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1004
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1005
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1006
editToolBarMenu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1007
    "This resource specification was automatically generated
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1008
     by the MenuEditor of ST/X."
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1009
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1010
    "Do not manually edit this!! If it is corrupted,
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1011
     the MenuEditor may not be able to read the specification."
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1012
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1013
    "
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1014
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#editToolBarMenu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1015
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication editToolBarMenu)) startUp
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1016
    "
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1017
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1018
    <resource: #menu>
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1019
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1020
    ^ 
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1021
     #(Menu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1022
        (
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1023
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1024
            activeHelpKey: editCut
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1025
            label: 'Cut'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1026
            itemValue: cutSelection
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1027
            translateLabel: true
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1028
            labelImage: (ResourceRetriever ToolbarIconLibrary cut16x16Icon)
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1029
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1030
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1031
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1032
            activeHelpKey: editCopy
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1033
            label: 'Copy'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1034
            itemValue: copySelection
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1035
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1036
            labelImage: (ResourceRetriever ToolbarIconLibrary copy16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1037
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1038
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1039
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1040
            activeHelpKey: editPaste
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1041
            label: 'Paste'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1042
            itemValue: paste
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1043
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1044
            labelImage: (ResourceRetriever ToolbarIconLibrary paste16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1045
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1046
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1047
         (MenuItem
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1048
            label: '-'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1049
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1050
         (MenuItem
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1051
            activeHelpKey: editUndo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1052
            label: 'Undo'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1053
            itemValue: undo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1054
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1055
            labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1056
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1057
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1058
         (MenuItem
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1059
            activeHelpKey: editRedo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1060
            label: 'Redo'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1061
            itemValue: redo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1062
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1063
            labelImage: (ResourceRetriever ToolbarIconLibrary redo16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1064
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1065
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1066
         (MenuItem
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1067
            label: '-'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1068
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1069
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1070
            activeHelpKey: editSearch
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1071
            label: 'Search'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1072
            itemValue: search
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1073
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1074
            labelImage: (ResourceRetriever ToolbarIconLibrary search16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1075
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1076
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1077
         (MenuItem
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1078
            label: '-'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1079
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1080
         (MenuItem
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1081
            activeHelpKey: doUndent
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1082
            label: 'Undent'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1083
            itemValue: undent
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1084
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1085
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1086
            labelImage: (ResourceRetriever ToolbarIconLibrary undent16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1087
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1088
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1089
            activeHelpKey: doIndent
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1090
            label: 'Indent'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1091
            itemValue: indent
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1092
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1093
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1094
            labelImage: (ResourceRetriever ToolbarIconLibrary indent16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1095
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1096
         )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1097
        nil
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1098
        nil
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1099
      )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1100
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1101
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1102
executionMenu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1103
    "This resource specification was automatically generated
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1104
     by the MenuEditor of ST/X."
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1105
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1106
    "Do not manually edit this!! If it is corrupted,
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1107
     the MenuEditor may not be able to read the specification."
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1108
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1109
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1110
    "
8492
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
  1111
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#executionMenu
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
  1112
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication executionMenu)) startUp
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1113
    "
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1114
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1115
    <resource: #menu>
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1116
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1117
    ^ 
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1118
     #(Menu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1119
        (
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1120
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1121
            enabled: hasHistory
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1122
            label: 'Redo Last'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1123
            itemValue: redoLastDoIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1124
            submenuChannel: redoRecentDoItMenu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1125
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1126
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1127
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1128
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1129
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1130
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1131
            label: 'DoIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1132
            itemValue: doIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1133
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1134
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1135
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1136
            label: 'PrintIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1137
            itemValue: printIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1138
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1139
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1140
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1141
            label: 'InspectIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1142
            itemValue: inspectIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1143
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1144
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1145
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1146
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1147
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1148
            enabled: hasSelectionInActiveWorkspace
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1149
            label: 'TimeIt'
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1150
            itemValue: timeIt
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1151
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1152
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1153
            enabled: hasSelectionInActiveWorkspace
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1154
            label: 'SpyOnIt (Transcript)'
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1155
            itemValue: spyOnIt
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1156
          )
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1157
         (MenuItem
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1158
            enabled: hasSelectionInActiveWorkspace
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1159
            label: 'ProfileIt (Visual)'
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1160
            itemValue: profileIt
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1161
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1162
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1163
            label: '-'
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1164
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1165
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1166
            enabled: hasSelectionInActiveWorkspace
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1167
            label: 'Browse Class'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1168
            itemValue: browseIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1169
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1170
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1171
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1172
            label: 'Browse Implementors of It'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1173
            itemValue: browseImplementorsOfIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1174
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1175
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1176
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1177
            label: 'Browse References to It'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1178
            itemValue: browseReferencesToIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1179
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1180
         )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1181
        nil
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1182
        nil
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1183
      )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1184
!
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1185
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1186
fileMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1187
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1188
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1189
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1190
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1191
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1192
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1193
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1194
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1195
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#fileMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1196
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication fileMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1197
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1198
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1199
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1200
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1201
    ^
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1202
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1203
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1204
         (MenuItem
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1205
            label: 'Connect...'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1206
            itemValue: menuSQLConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1207
            translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1208
            isVisible: isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1209
          )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1210
         (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1211
            label: '-'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1212
            isVisible: isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1213
          )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1214
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1215
            label: 'New Workspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1216
            itemValue: newWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1217
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1218
            shortcutKey: Ctrln
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1219
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1220
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1221
            label: 'New Tab'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1222
            itemValue: addWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1223
            translateLabel: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1224
            isVisible: false
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1225
            shortcutKey: Ctrlt
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1226
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1227
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1228
            label: 'New SystemWorkspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1229
            itemValue: newSystemWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1230
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  1231
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1232
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1233
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1234
            label: 'New EvaluationWorkspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1235
            itemValue: newEvaluationWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1236
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  1237
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1238
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1239
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1240
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1241
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1242
         (MenuItem
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1243
            label: 'Open File...'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1244
            itemValue: menuLoad
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1245
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1246
            shortcutKey: Ctrlo
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1247
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1248
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1249
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1250
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1251
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1252
            label: 'Save'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1253
            itemValue: menuSave
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1254
            translateLabel: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1255
            shortcutKey: Ctrls
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1256
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1257
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1258
            label: 'Save As...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1259
            itemValue: menuSaveAs
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1260
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1261
            shortcutKey: SaveAs
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1262
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1263
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1264
            enabled: hasMultipleBuffersHolder
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1265
            label: 'Save all As...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1266
            itemValue: menuSaveAllAs
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1267
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1268
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1269
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1270
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1271
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1272
         (MenuItem
8529
8d2391313df2 disable print item, if there is nothing to print
Claus Gittinger <cg@exept.de>
parents: 8508
diff changeset
  1273
            enabled: hasTextInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1274
            label: 'Print...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1275
            itemValue: menuPrint
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1276
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1277
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1278
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1279
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1280
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1281
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1282
            label: 'Exit'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1283
            itemValue: closeRequest
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1284
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1285
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1286
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1287
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1288
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1289
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1290
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1291
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1292
helpMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1293
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1294
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1295
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1296
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1297
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1298
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1299
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1300
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1301
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#helpMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1302
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication helpMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1303
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1304
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1305
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1306
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1307
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1308
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1309
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1310
         (MenuItem
15384
196b596fa7e3 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15294
diff changeset
  1311
            label: 'Workspace Documentation'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1312
            itemValue: openDocumentation
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1313
          )
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1314
         (MenuItem
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1315
            label: 'Editing Text'
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1316
            itemValue: openEditingDocumentation
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1317
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1318
         (MenuItem
8315
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1319
            label: 'Documentation on Smalltalk/X'
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1320
            itemValue: openSTXDocumentation
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1321
          )
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1322
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1323
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1324
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1325
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1326
            label: 'About this Application...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1327
            itemValue: openAboutThisApplication
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1328
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1329
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1330
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1331
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1332
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1333
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1334
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1335
languageInfoLabelMenu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1336
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1337
     by the MenuEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1338
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1339
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1340
     the MenuEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1341
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1342
    "
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1343
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1344
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication workspaceMenu)) startUp
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1345
    "
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1346
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1347
    <resource: #menu>
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1348
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1349
    ^ 
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1350
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1351
                    (
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1352
                     (MenuItem
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1353
                        label: 'Language List Slice'
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1354
                        translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1355
                        submenuChannel: languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1356
                        isMenuSlice: true
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1357
                      )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1358
                     )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1359
                    nil
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1360
                    nil
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1361
                  )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1362
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1363
    "Created: / 24-12-2010 / 02:03:59 / cg"
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1364
!
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1365
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1366
mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1367
    "This resource specification was automatically generated
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1368
     by the MenuEditor of ST/X."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1369
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1370
    "Do not manually edit this!! If it is corrupted,
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1371
     the MenuEditor may not be able to read the specification."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1372
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1373
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1374
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1375
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1376
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication mainMenu)) startUp
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1377
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1378
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1379
    <resource: #menu>
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1380
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1381
    ^ 
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1382
     #(Menu
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1383
        (
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1384
         (MenuItem
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1385
            label: 'File'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1386
            submenuChannel: fileMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1387
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1388
         (MenuItem
8147
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1389
            label: 'Buffers'
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1390
            submenuChannel: bufferMenu
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1391
          )
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1392
         (MenuItem
8146
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1393
            label: 'Edit'
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1394
            submenuChannel: editMenu
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1395
          )
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1396
         (MenuItem
7651
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1397
            label: 'View'
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1398
            submenuChannel: viewMenu
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1399
          )
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1400
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1401
            label: 'Bookmarks'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1402
            submenuChannel: bookmarkMenu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1403
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1404
         (MenuItem
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1405
            label: 'Execute'
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1406
            isVisible: executeMenuVisible
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1407
            submenuChannel: executionMenu
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1408
          )
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1409
         (MenuItem
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1410
            label: 'Workspace'
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1411
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1412
            submenuChannel: workspaceMenu
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1413
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1414
         (MenuItem
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  1415
            enabled: smalltalkMenuEnabledHolder
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1416
            label: 'Smalltalk'
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1417
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1418
            submenuChannel: smalltalkMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1419
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1420
         (MenuItem
7461
605ae97c85db support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 7441
diff changeset
  1421
            label: 'MENU_Help'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1422
            submenuChannel: helpMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1423
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1424
         )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1425
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1426
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1427
      )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1428
!
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  1429
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1430
manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1431
    "This resource specification was automatically generated
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1432
     by the MenuEditor of ST/X."
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1433
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1434
    "Do not manually edit this!! If it is corrupted,
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1435
     the MenuEditor may not be able to read the specification."
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1436
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1437
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1438
    "
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1439
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1440
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication manageSnippetDialogMenuSpec)) startUp
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1441
    "
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1442
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1443
    <resource: #menu>
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1444
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1445
    ^ 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1446
     #(Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1447
        (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1448
         (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1449
            label: 'File'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1450
            submenu: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1451
           (Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1452
              (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1453
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1454
                  label: 'Open Snippet File...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1455
                  itemValue: menuOpenSnippetFile
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1456
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1457
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1458
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1459
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1460
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1461
                  label: 'Save As Snipped File...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1462
                  itemValue: menuSaveSnippetFileAs
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1463
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1464
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1465
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1466
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1467
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1468
                  label: 'Close'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1469
                  itemValue: closeSnippetDialog
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1470
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1471
               )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1472
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1473
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1474
            )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1475
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1476
         (MenuItem
15392
5d9d4650b23f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15384
diff changeset
  1477
            label: 'MENU_Help'
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1478
            startGroup: conditionalRight
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1479
            submenu: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1480
           (Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1481
              (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1482
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1483
                  label: 'Documentation'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1484
                  itemValue: openSnippetDocumentation
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1485
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1486
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1487
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1488
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1489
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1490
                  label: 'About this Application...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1491
                  itemValue: openAboutThisApplication
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1492
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1493
               )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1494
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1495
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1496
            )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1497
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1498
         )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1499
        nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1500
        nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1501
      )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1502
!
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1503
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1504
smalltalkMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1505
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1506
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1507
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1508
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1509
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1510
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1511
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1512
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1513
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#smalltalkMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1514
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication smalltalkMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1515
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1516
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1517
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1518
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1519
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1520
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1521
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1522
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1523
            enabled: hasSelectionInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1524
            label: 'FileIn Text'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1525
            itemValue: fileInText
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1526
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1527
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1528
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1529
            enabled: hasSelectionInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1530
            label: 'ChangeList on Text'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1531
            itemValue: changesBrowserOnText
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1532
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1533
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1534
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1535
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1536
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1537
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1538
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1539
            label: 'Add Global Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1540
            itemValue: addGlobalVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1541
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1542
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1543
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1544
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1545
            label: 'Remove Global Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1546
            itemValue: removeGlobalVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1547
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1548
          )
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1549
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1550
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1551
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1552
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1553
            enabled: selectedWorkspaceIsTextView
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1554
            label: 'Add SharedPool...'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1555
            itemValue: addSharedPool
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1556
            translateLabel: true
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1557
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1558
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1559
            enabled: selectedWorkspaceIsTextView
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1560
            label: 'Remove SharedPool...'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1561
            itemValue: removeSharedPool
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1562
            translateLabel: true
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1563
          )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1564
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1565
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1566
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1567
      )
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1568
!
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1569
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1570
toolBarMenu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1571
    "This resource specification was automatically generated
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1572
     by the MenuEditor of ST/X."
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1573
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1574
    "Do not manually edit this!! If it is corrupted,
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1575
     the MenuEditor may not be able to read the specification."
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1576
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1577
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1578
    "
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1579
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#toolBarMenu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1580
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication toolBarMenu)) startUp
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1581
    "
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1582
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1583
    <resource: #menu>
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1584
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1585
    ^ 
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1586
     #(Menu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1587
        (
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1588
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1589
            label: ''
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1590
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1591
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1592
            label: 'Add Buffer'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1593
            itemValue: addWorkspace
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1594
            isButton: true
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1595
            labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon)
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1596
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1597
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1598
            label: '-'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1599
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1600
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1601
            activeHelpKey: menuSaveOrSaveAs
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1602
            label: 'Save Text'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1603
            itemValue: menuSave
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1604
            isButton: true
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  1605
            labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1606
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1607
         (MenuItem
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1608
            label: '-'
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1609
            isVisible: doItMenuButtonVisible
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1610
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1611
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1612
            activeHelpKey: #'help_doIt'
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1613
            label: 'DoIt'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1614
            itemValue: doIt
7789
c9f1c54da8be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7744
diff changeset
  1615
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1616
            isVisible: doItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1617
            labelImage: (ResourceRetriever ToolbarIconLibrary doItIcon)
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1618
          )
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1619
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1620
            activeHelpKey: #'help_printIt'
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1621
            label: 'PrintIt'
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1622
            itemValue: printIt
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1623
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1624
            isVisible: printItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1625
            labelImage: (ResourceRetriever ToolbarIconLibrary printItIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1626
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1627
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1628
            activeHelpKey: #'help_inspectIt'
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1629
            label: 'InspectIt'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1630
            itemValue: inspectIt
7789
c9f1c54da8be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7744
diff changeset
  1631
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1632
            isVisible: inspectItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1633
            labelImage: (ResourceRetriever ToolbarIconLibrary inspectItIcon)
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1634
          )
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1635
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1636
            activeHelpKey: #'help_browseIt'
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1637
            label: 'BrowseIt'
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1638
            itemValue: browseIt
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1639
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1640
            isVisible: browseItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1641
            labelImage: (ResourceRetriever ToolbarIconLibrary browseItIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1642
          )
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1643
         (MenuItem
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1644
            activeHelpKey: #'help_profileIt'
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1645
            label: 'ProfileIt'
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1646
            itemValue: profileIt
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1647
            isButton: true
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1648
            isVisible: profileItMenuButtonVisible
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1649
            labelImage: (ResourceRetriever ToolbarIconLibrary profileItIcon)
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1650
          )
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1651
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1652
            activeHelpKey: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1653
            label: 'Web Browser'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1654
            itemValue: addWebBrowser
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1655
            isButton: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1656
            startGroup: right
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1657
            isVisible: isWebBrowserAvailable
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1658
            labelImage: (ResourceRetriever ToolbarIconLibrary webKit22x22)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1659
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1660
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1661
            activeHelpKey: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1662
            label: 'Terminal'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1663
            itemValue: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1664
            isButton: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1665
            startGroup: right
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1666
            labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1667
          )
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1668
         )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1669
        nil
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1670
        nil
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1671
      )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1672
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1673
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1674
workspaceMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1675
    "This resource specification was automatically generated
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1676
     by the MenuEditor of ST/X."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1677
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1678
    "Do not manually edit this!! If it is corrupted,
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1679
     the MenuEditor may not be able to read the specification."
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1680
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1681
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1682
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1683
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#workspaceMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1684
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication workspaceMenu)) startUp
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1685
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1686
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1687
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1688
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1689
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1690
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1691
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1692
         (MenuItem
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1693
            label: 'Language List Slice'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1694
            submenuChannel: languageListMenuSlice
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1695
            isMenuSlice: true
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1696
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1697
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1698
            label: '-'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1699
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1700
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1701
            label: 'Namespace for DoIt'
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  1702
            submenuChannel: namespaceInfoLabelMenuHolder
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1703
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1704
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1705
            label: '-'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1706
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1707
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1708
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1709
            label: 'Add Workspace Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1710
            itemValue: addWorkspaceVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1711
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1712
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1713
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1714
            label: 'Remove Workspace Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1715
            itemValue: removeWorkspaceVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1716
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1717
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1718
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1719
            label: 'Remove all Workspace Variables...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1720
            itemValue: removeAllWorkspaceVariables
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1721
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1722
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1723
            label: '-'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1724
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1725
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1726
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1727
            label: 'Inspect Workspace Variables'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1728
            itemValue: inspectWorkspaceVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1729
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1730
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1731
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1732
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1733
         (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1734
            label: 'Autodefine Variables'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1735
            submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1736
           (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1737
              (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1738
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1739
                  label: 'As Workspace Variable'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1740
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1741
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1742
                  choiceValue: workspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1743
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1744
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1745
                  label: 'As DoIt Variable'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1746
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1747
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1748
                  choiceValue: doIt
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1749
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1750
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1751
                  label: '-'
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1752
                )
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1753
               (MenuItem
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1754
                  label: 'Do not Autodefine'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1755
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1756
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1757
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1758
               )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1759
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1760
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1761
            )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1762
          )
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1763
         (MenuItem
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1764
            label: '-'
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1765
          )
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1766
         (MenuItem
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1767
            label: 'Terminate Processes Forked Here'
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1768
            itemValue: terminateBackgroundProcesses
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1769
          )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1770
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1771
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1772
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1773
      )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1774
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1775
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1776
!WorkspaceApplication class methodsFor:'private'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1777
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1778
createWorkspaceView
13585
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1779
    | view |
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1780
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1781
    view := (UserPreferences current useCodeView2In:#Workspace)
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  1782
                ifTrue:[Tools::CodeView2 new]
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  1783
                ifFalse:[HVScrollableView for:Workspace].
13585
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1784
    ^ view
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1785
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1786
    "Modified: / 27-09-2013 / 10:23:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1787
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1788
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1789
!WorkspaceApplication class methodsFor:'special startup'!
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1790
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1791
openEvaluationWorkspace
11728
eb5cf1a80189 comment/format in: #openEvaluationWorkspace
Stefan Vogel <sv@exept.de>
parents: 11725
diff changeset
  1792
    |wsApp needRemove|
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1793
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1794
    needRemove := true.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1795
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1796
    wsApp := self new.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1797
    wsApp allButOpen.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1798
    wsApp window extent:400@500.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1799
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1800
    wsApp addEvaluationWorkspace.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1801
    wsApp removeWorkspace:1.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1802
    wsApp renameWorkspace:1 to:'Evaluator'.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1803
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1804
    wsApp openWindow.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1805
    wsApp selectedWorkspaceIndexHolder value:1.
7849
e3e01db99dd9 open methods return the just created ws
Claus Gittinger <cg@exept.de>
parents: 7848
diff changeset
  1806
    ^ wsApp
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1807
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1808
    "
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1809
     self openEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1810
    "
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1811
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1812
    "Created: / 13-10-2006 / 12:14:13 / cg"
7849
e3e01db99dd9 open methods return the just created ws
Claus Gittinger <cg@exept.de>
parents: 7848
diff changeset
  1813
    "Modified: / 25-09-2007 / 21:00:45 / cg"
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1814
!
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1815
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1816
openForSinglePageDoing:aBlock
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1817
    |wsApp needRemove|
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1818
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1819
    needRemove := true.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1820
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1821
    wsApp := self new.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1822
    wsApp allButOpen.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1823
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1824
    (wsApp builder componentAt:'NoteBook') destroyTabAction:nil.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1825
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1826
    wsApp window height:500.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1827
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1828
    aBlock value:wsApp.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1829
    wsApp removeWorkspace:1.  "/ the original Workspace
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1830
    "/ wsApp renameWorkspace:1 to:'LICENCE README'.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1831
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1832
    wsApp openWindow.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1833
    wsApp selectedWorkspaceIndexHolder value:1.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1834
    ^ wsApp
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1835
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1836
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1837
     self openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1838
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1839
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1840
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1841
openMyWorkspace
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1842
    |ws|
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1843
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1844
    "/ openMyWorkspace_new leads to an error in root /, which we dont understand...
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1845
    ws := self openMyWorkspace_new.
12699
a9d7394a503e class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12639
diff changeset
  1846
    "/ self openMyWorkspace_old.
a9d7394a503e class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12639
diff changeset
  1847
    MyWorkspaceOpened := true.
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1848
    ^ ws
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1849
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1850
    "
10562
8eaae2fb2aa6 changed: #openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 10394
diff changeset
  1851
      WorkspaceApplication openMyWorkspace
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1852
    "
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1853
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1854
    "Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1855
    "Modified: / 14-07-2011 / 13:12:04 / Administrator"
10562
8eaae2fb2aa6 changed: #openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 10394
diff changeset
  1856
    "Modified (comment): / 09-08-2011 / 22:59:13 / cg"
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1857
!
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1858
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1859
openMyWorkspace_new
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1860
    "open showing tabs for ALL bookmarked workspace files"
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1861
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1862
    |workspace|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1863
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1864
"/    workspace := self openWith: nil.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1865
"/    workspace enqueueDelayedAction:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1866
"/        Error handle:[:ex |
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1867
"/            "/ no time to debug that stuff now...
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1868
"/            Dialog information:'Error in bookmark handling: ',ex description
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1869
"/        ] do:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1870
"/            BookmarkList forWorkspace myWorkspaces do:[:bookmark|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1871
"/                workspace switchToBookmarkEntry: bookmark
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1872
"/            ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1873
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1874
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1875
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1876
"/        ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1877
"/        workspace selectedWorkspaceIndexHolder value: 1.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1878
"/    ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1879
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1880
    workspace := self new.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1881
    workspace allButOpen.
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1882
    workspace initialSyntax:SmalltalkLanguage instance.
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1883
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1884
    Error handle:[:ex |
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1885
        ex reject.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1886
        "/ no time to debug that stuff now...
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1887
        Dialog information:'Error in bookmark handling: ',ex description
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1888
    ] do:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1889
        BookmarkList forWorkspace myWorkspaces do:[:bookmark|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1890
            workspace switchToBookmarkEntry: bookmark
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1891
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1892
    ].
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1893
    workspace selectedWorkspaceIndexHolder value: 1.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1894
    workspace openWindow.
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1895
    ^ workspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1896
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1897
    "
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1898
     WorkspaceApplication openMyWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1899
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1900
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1901
    "Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1902
    "Created: / 14-07-2011 / 13:11:32 / Administrator"
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1903
    "Modified: / 26-04-2012 / 12:45:50 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1904
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1905
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1906
openMyWorkspace_old
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1907
    "open showing the single file: MyWorkspace.wsp"
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1908
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1909
    ^ self openOnFile:'MyWorkspace.wsp'
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1910
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1911
    "
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1912
     self openMyWorkspace.
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1913
    "
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1914
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1915
    "Created: / 21-06-2011 / 08:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1916
    "Modified (comment): / 28-09-2011 / 07:48:07 / cg"
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1917
!
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1918
6022
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1919
openOnFile:aFilename
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1920
    "launch a new workspace on the contents of some file"
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1921
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1922
    |ws|
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1923
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1924
    ws := self openWith:nil.
8369
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1925
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1926
    "/ let the ws load the file - instead of the caller.
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1927
    "/ so the error dialog is shown in its context, 
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1928
    "/ and the caller (Launcher) is not blocked.
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1929
    ws enqueueDelayedAction:[ws loadFile:aFilename].
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  1930
"/    ws loadFile:aFilename.
6022
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1931
    ^ ws
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1932
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1933
    "
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1934
     WorkspaceApplication openOnFile:'Makefile'
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1935
    "
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1936
!
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  1937
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1938
openSystemWorkspace
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  1939
    ^ self new openSystemWorkspace.
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1940
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1941
    "
7850
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  1942
     |ws b|
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  1943
     ws := self openSystemWorkspace.
7853
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1944
     ws addMyWorkspace.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1945
     ws selectedWorkspaceIndexHolder value:(ws workspaces size).
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1946
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
7850
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  1947
     ws selectedWorkspace 
7851
a6c81764dcfd example-comment
Claus Gittinger <cg@exept.de>
parents: 7850
diff changeset
  1948
        add:(b := Button label:'DoIt' action:[ws doIt. b destroy])
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1949
    "
7853
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1950
    "
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1951
     |ws b|
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1952
     ws := self new.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1953
     ws open. 
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1954
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  1955
    "
7612
42b1c57c6cc7 Private.wsp and MyWorkspace.wsp
Claus Gittinger <cg@exept.de>
parents: 7544
diff changeset
  1956
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1957
    "Modified: / 14-02-2010 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1958
    "Modified: / 05-07-2011 / 15:34:40 / cg"
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1959
!
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1960
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1961
openWith:initialText
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1962
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1963
     The workspace will be opened in smalltalk syntax mode"
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1964
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1965
    ^ self openWith:initialText selected:false
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1966
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1967
    "
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1968
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1969
    "
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1970
!
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1971
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1972
openWith:initialText selected:selectedBoolean
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1973
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1974
     The workspace will be opened in smalltalk syntax mode"
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1975
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1976
    |workspace|
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1977
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1978
    workspace := self new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1979
    workspace open.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1980
    workspace selectedWorkspace contents:initialText selected:selectedBoolean.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1981
    ^ workspace
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1982
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1983
    "
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1984
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1985
    "
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1986
!
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1987
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1988
openWith:initialText selected:selectedBoolean title:titleString
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1989
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  1990
     The workspace will be opened in smalltalk syntax mode"
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1991
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1992
    |workspace|
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1993
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1994
    workspace := self new.
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1995
    workspace open.
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  1996
    titleString notNil ifTrue:[workspace setLabel:titleString].
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  1997
    workspace selectedWorkspace contents:initialText selected:selectedBoolean.
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1998
    ^ workspace
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  1999
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2000
    "
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2001
     WorkspaceApplication 
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2002
        openWith:'Transcript showCR:''hello world''' 
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2003
        selected:false
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2004
        title:'hello'
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2005
    "
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2006
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2007
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2008
openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2009
    "open a workspaceApp with a single initial pane, showing global variables.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2010
     Same as Smalltalk inspect, but looks nicer..."
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2011
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2012
    ^ self openForSinglePageDoing:[:wsApp | wsApp addNamespaceInspectorFor:Smalltalk]
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2013
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2014
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2015
     self openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2016
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2017
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2018
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2019
openWithText:initialText
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2020
    "like openWith, but will set the language to 'text', so it is not incorrectly syntax highlighted"
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2021
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2022
    |ws|
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2023
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2024
    ws := self openWith:initialText selected:false.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2025
    ws syntax:nil.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2026
    ^ ws.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2027
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2028
    "
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2029
     WorkspaceApplication openWithText:'foo 1 2 3 4'
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2030
    "
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2031
!
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2032
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2033
openWithWorkspaceVariableInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2034
    "open a workspaceApp with a single initial pane, showing workspace variables.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2035
     Same as Workspace workspaceVariables inspect, but looks nicer..."
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2036
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2037
    ^ self openForSinglePageDoing:[:wsApp | wsApp addWorkspaceVariableInspector]
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2038
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2039
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2040
     self openWithWorkspaceVariableInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2041
    "
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2042
! !
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2043
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2044
!WorkspaceApplication class methodsFor:'startup'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2045
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2046
open
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2047
    "/ the very first open opens a MyWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2048
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2049
    (MyWorkspaceOpened == true) ifTrue:[
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2050
        ^ self openRegularWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2051
    ] ifFalse:[
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2052
        ^ self openMyWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2053
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2054
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2055
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2056
     MyWorkspaceOpened := nil.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2057
     WorkspaceApplication open.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2058
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2059
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2060
    "Created: / 21-06-2011 / 09:03:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2061
    "Modified (comment): / 05-07-2011 / 15:23:53 / cg"
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2062
!
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2063
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2064
openRegularWorkspace
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2065
    "/ always open a normal MyWorkspace
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2066
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2067
    ^ super open
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2068
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2069
    "
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2070
     MyWorkspaceOpened := nil.
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2071
     WorkspaceApplication open.
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2072
    "
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2073
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2074
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2075
!WorkspaceApplication methodsFor:'aspects'!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2076
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2077
autoDefineVariables
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2078
    autoDefineVariables isNil ifTrue:[
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2079
        autoDefineVariables := ValueHolder new.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2080
        (UserPreferences current autoDefineWorkspaceVariables) ifTrue:[
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  2081
            autoDefineVariables value:#workspace.
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2082
        ] ifFalse:[
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2083
            autoDefineVariables value:#doIt.
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2084
        ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2085
        autoDefineVariables onChangeSend:#autoDefineVariablesChanged to:self.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2086
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2087
    ^ autoDefineVariables.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2088
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2089
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2090
bookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2091
    |ws app|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2092
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2093
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2094
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2095
        ^ BookmarkList forWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2096
    ].
11725
0b626c2b4b2d Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11713
diff changeset
  2097
    (ws isApplicationSubView) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2098
        app := ws application.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2099
        (app respondsTo:#bookmarks) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2100
            ^ app bookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2101
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2102
        (app respondsTo:#bookmarkListHolder) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2103
            ^ app bookmarkListHolder value
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2104
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2105
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2106
    ^ BookmarkList new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2107
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2108
    "Created: / 20-06-2011 / 22:23:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2109
    "Modified: / 21-06-2011 / 08:13:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2110
    "Modified (format): / 05-07-2011 / 14:21:10 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2111
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2112
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2113
browseItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2114
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2115
    ^ self browseItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2116
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2117
    "Modified: / 17-12-2013 / 16:34:59 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2118
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2119
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2120
browseItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2121
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2122
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2123
    "Created: / 17-12-2013 / 16:34:04 / cg"
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2124
!
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2125
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2126
canChangeLanguageHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2127
    "return/create the 'canChangeLanguageHolder' value holder (automatically generated)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2128
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2129
    canChangeLanguageHolder isNil ifTrue:[
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2130
	canChangeLanguageHolder := ValueHolder with: true.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2131
    ].
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2132
    ^ canChangeLanguageHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2133
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2134
    "Modified: / 10-05-2012 / 23:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2135
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2136
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2137
canChangeLanguageHolder:something
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2138
    "set the 'canChangeLanguageHolder' value holder (automatically generated)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2139
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2140
    canChangeLanguageHolder := something.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2141
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2142
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2143
cursorColHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2144
    cursorColHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2145
        cursorColHolder := IndirectValue for:(ValueHolder with:1)
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2146
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2147
    ^ cursorColHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2148
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2149
    "Created: / 22-01-2011 / 11:36:00 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2150
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2151
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2152
cursorColLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2153
    ^ BlockValue 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2154
            with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]]
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2155
            argument:self cursorColHolder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2156
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2157
    "Created: / 22-01-2011 / 11:36:08 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2158
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2159
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2160
cursorLineAndColumnLabelHolder
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2161
    cursorLineAndColumnLabelHolder isNil ifTrue:[
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2162
        cursorLineAndColumnLabelHolder := IndirectValue for:(ValueHolder with:1)
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2163
    ].
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2164
    ^ cursorLineAndColumnLabelHolder
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2165
!
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2166
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2167
cursorLineHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2168
    cursorLineHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2169
        cursorLineHolder := IndirectValue for:(ValueHolder with:1)
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2170
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2171
    ^ cursorLineHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2172
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2173
    "Created: / 22-01-2011 / 11:35:22 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2174
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2175
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2176
cursorLineLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2177
    ^ BlockValue 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2178
            with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]]
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2179
            argument:self cursorLineHolder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2180
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2181
    "Modified: / 22-01-2011 / 11:42:56 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2182
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2183
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2184
doItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2185
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2186
    ^ self doItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2187
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2188
    "Modified: / 17-12-2013 / 16:35:05 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2189
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2190
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2191
doItMenuButtonVisible
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2192
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2193
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2194
    "Created: / 17-12-2013 / 16:34:10 / cg"
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2195
!
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2196
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2197
hasHistory
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2198
    ^ Workspace doItHistory notEmptyOrNil.
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2199
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2200
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2201
hasInfoLabel
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2202
    ^ true
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2203
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2204
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2205
inspectItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2206
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2207
    ^ self inspectItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2208
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2209
    "Modified: / 17-12-2013 / 16:35:17 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2210
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2211
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2212
inspectItMenuButtonVisible
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2213
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2214
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2215
    "Created: / 17-12-2013 / 16:34:17 / cg"
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2216
!
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2217
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2218
languageInfoLabelHolder
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2219
    ^ BlockValue
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2220
        with:[:syntax | 
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2221
                syntax notNil ifTrue:[
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2222
                    "'Syntax: ',"syntax name 
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2223
                ] ifFalse:[
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  2224
                    'Text'
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2225
                ]
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2226
             ]
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2227
        argument:self syntaxHolder
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2228
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  2229
    "Modified: / 19-07-2012 / 16:53:30 / cg"
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2230
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2231
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2232
modeLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2233
    modeLabelHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2234
        modeLabelHolder := IndirectValue for:(ValueHolder with:'I')
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2235
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2236
    ^ modeLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2237
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2238
    "Created: / 22-01-2011 / 11:37:25 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2239
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2240
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2241
namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2242
    namespaceHolder isNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2243
        namespaceHolder := self defaultNameSpaceForDoIts asValue.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2244
        namespaceHolder onChangeSend:#setNameSpaceForDoIts to:self
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2245
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2246
    ^ namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2247
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2248
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2249
namespaceInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2250
    ^ BlockValue
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2251
        with:[:ns | 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2252
                ns notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2253
                    ns name
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2254
                ] ifFalse:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2255
                    ''
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2256
                ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2257
             ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2258
        argument:self namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2259
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2260
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2261
printItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2262
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2263
    ^ self printItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2264
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2265
    "Modified: / 17-12-2013 / 16:35:11 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2266
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2267
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2268
printItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2269
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2270
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2271
    "Created: / 17-12-2013 / 16:34:23 / cg"
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2272
!
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2273
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2274
profileItMenuButtonVisible
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2275
    ^ self thisIsASmalltalkWorkspace
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2276
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2277
    "Created: / 17-12-2013 / 16:34:04 / cg"
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2278
!
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2279
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2280
setWindowLabel: label 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2281
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2282
    self setWindowLabel: label language: self syntaxHolder value
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2283
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2284
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2285
setWindowLabel: label language: language
11624
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2286
    |languageName|
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2287
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2288
    language notNil ifTrue:[
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2289
	languageName := ' - ', language name.
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2290
    ] ifFalse:[
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2291
	languageName := ''.
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2292
    ].
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2293
    self window label:label, ' - ' , languageName
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2294
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2295
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2296
smalltalkMenuEnabledHolder
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2297
    smalltalkMenuEnabledHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2298
        smalltalkMenuEnabledHolder := ValueHolder with:true.
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2299
    ].
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2300
    ^ smalltalkMenuEnabledHolder
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2301
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2302
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2303
syntax:aProgrammingLanguageOrNil
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2304
    "the argument must sth. like SmalltalkLanguage"
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2305
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2306
    self syntaxHolder value:aProgrammingLanguageOrNil
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2307
!
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2308
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2309
syntaxHolder
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2310
    syntaxHolder isNil ifTrue:[
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2311
        syntaxHolder := self defaultEvaluatorSyntax asValue.
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2312
        syntaxHolder onChangeSend:#setCompilerForSyntax to:self
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2313
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2314
    ^ syntaxHolder
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2315
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2316
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2317
toolBarView
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2318
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2319
    toolBarView isNil ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2320
        toolBarView := SubCanvas new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2321
        toolBarView level: 0.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2322
        toolBarView client: self spec: #toolBarSpec builder: builder.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2323
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2324
    ^toolBarView
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2325
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2326
    "Created: / 10-06-2011 / 22:52:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2327
    "Modified: / 11-06-2011 / 00:06:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2328
! !
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2329
4358
b0023a5ca3b8 category change
Claus Gittinger <cg@exept.de>
parents: 4313
diff changeset
  2330
!WorkspaceApplication methodsFor:'aspects-queries'!
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2331
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2332
anyWorkspaceVariableIsDefined
6267
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2333
    ^ Workspace anyWorkspaceVariableIsDefined
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2334
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2335
    "Modified: / 20-04-2005 / 11:57:59 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2336
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2337
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2338
canAddBookmark
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2339
16259
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2340
    | ws |
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2341
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2342
    ws := self selectedWorkspace scrolledView.
16259
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2343
    ws isTextView ifFalse:[^ true].
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2344
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2345
    ^ ws defaultFileNameForFileDialog notNil.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2346
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2347
    "Created: / 20-06-2011 / 22:43:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2348
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2349
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2350
isSQLWorkspaceAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2351
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2352
    ^(Smalltalk at:#'SQL::WorkspacePage') notNil
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2353
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2354
    "Created: / 10-05-2012 / 18:49:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2355
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2356
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2357
isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2358
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2359
    builder isNil ifTrue:[self createBuilder].
14168
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2360
    ^ builder bindings at: #isSQLWorkspaceSelected ifAbsentPut: [
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2361
        BlockValue
14168
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2362
            with:[:ignored|
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2363
                self selectedWorkspaceApplication isKindOf: (Smalltalk at:#'SQL::WorkspacePage')
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2364
            ]
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2365
            argument: self selectedWorkspaceIndexHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2366
    ]
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2367
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2368
    "Created: / 11-05-2012 / 09:41:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
14168
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2369
    "Modified: / 27-03-2014 / 16:38:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2370
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2371
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2372
isWebBrowserAvailable
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2373
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2374
    ^(Smalltalk at:#WebKitView) notNil
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2375
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2376
    "Created: / 11-06-2011 / 00:30:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2377
!
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2378
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2379
selectedWorkspaceIsTextView
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2380
    ^ self selectedWorkspacesTextView notNil
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2381
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2382
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2383
!WorkspaceApplication methodsFor:'autofetch selection'!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2384
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2385
autoFetchSelection
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2386
    ^ clipBoardWatcherProcess notNil
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2387
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2388
    "Created: / 16-11-2010 / 14:55:39 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2389
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2390
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2391
autoFetchSelection:aBoolean
14746
02985a863ca2 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14724
diff changeset
  2392
    Screen current isWindowsPlatform ifTrue:[
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2393
        aBoolean ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2394
            self startClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2395
        ] ifFalse:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2396
            self stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2397
        ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2398
        ^ self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2399
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2400
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2401
    aBoolean ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2402
        self window windowGroup addPreEventHook:self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2403
        device addSelectionHandler:self
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2404
    ] ifFalse:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2405
        self window windowGroup removePreEventHook:self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2406
        device removeSelectionHandler:self
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2407
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2408
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2409
    "Created: / 16-11-2010 / 14:34:15 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2410
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2411
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2412
autoFetchSelectionLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2413
    fetchClipboardLines isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2414
        fetchClipboardLines := ValueHolder with:true
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2415
    ].
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2416
    ^ fetchClipboardLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2417
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2418
    "Created: / 04-02-2011 / 17:52:34 / cg"
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2419
!
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2420
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2421
itemFromClipboard
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2422
    |text|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2423
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2424
    text := self window getClipboardText.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2425
    (text notNil and:[text isString]) ifTrue:[
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2426
        self autoFetchSelectionLines value ifTrue:[
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2427
            text := text , Character cr
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2428
        ].
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2429
        self paste:text.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2430
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2431
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2432
    "Created: / 16-11-2010 / 14:44:26 / cg"
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2433
    "Modified: / 04-02-2011 / 17:53:46 / cg"
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2434
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2435
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2436
startClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2437
    clipBoardWatcherProcess isNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2438
        ClipBoardFetchingInstance notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2439
            ClipBoardFetchingInstance stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2440
        ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2441
        clipBoardWatcherProcess := 
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2442
            [
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2443
                [true] whileTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2444
                    self waitForClipBoardToChange.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2445
                ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2446
            ] newProcess.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2447
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2448
        clipBoardWatcherProcess resume.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2449
        ClipBoardFetchingInstance := self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2450
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2451
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2452
    "Created: / 16-11-2010 / 14:35:55 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2453
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2454
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2455
stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2456
    |p|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2457
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2458
    (p := clipBoardWatcherProcess) notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2459
        ClipBoardFetchingInstance := nil.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2460
        clipBoardWatcherProcess := nil.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2461
        p terminate
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2462
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2463
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2464
    "Created: / 16-11-2010 / 14:36:12 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2465
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2466
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2467
waitForClipBoardToChange
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2468
    |prev|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2469
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2470
    prev := self window getClipboardText.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2471
    [ 
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2472
        Delay waitForSeconds:0.2.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2473
        self window getClipboardText = prev
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2474
    ] whileTrue.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2475
    self itemFromClipboard.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2476
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2477
    "Created: / 16-11-2010 / 14:44:05 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2478
! !
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2479
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2480
!WorkspaceApplication methodsFor:'defaults'!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2481
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2482
defaultEvaluatorSyntax
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2483
    LastLanguage notNil ifTrue:[^ LastLanguage].
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2484
    ^ SmalltalkLanguage instance.
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2485
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2486
    "Modified: / 01-12-2010 / 12:21:41 / cg"
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2487
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2488
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2489
defaultFileNameForLoad
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2490
   ^ 'file.wsp'
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2491
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2492
    "Created: / 25-10-2006 / 14:56:10 / cg"
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2493
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2494
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2495
defaultFileNameForSave
8324
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2496
    |ws|
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2497
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2498
    ws := self selectedWorkspace scrolledView.
8324
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2499
    ws isTextView ifFalse:[
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2500
        "/ eval-ws
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2501
        ^ super defaultFileNameForSave
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2502
    ].
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2503
    ^ ws defaultFileNameForFileDialog ? super defaultFileNameForSave
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2504
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2505
    "Modified: / 22-01-2011 / 12:01:27 / cg"
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2506
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2507
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2508
defaultFileNameForSaveAll
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2509
   ^ 'file.wsp'
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2510
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2511
    "Created: / 25-10-2006 / 14:56:04 / cg"
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2512
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2513
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2514
defaultNameSpaceForDoIts
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2515
    LastNamespace notNil ifTrue:[^ LastNamespace].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2516
    ^ Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2517
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2518
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2519
defaultPatternLoad
8032
d4099cd34621 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7944
diff changeset
  2520
   ^ '*.wsp; *.txt; *.rc'
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2521
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2522
    "Created: / 25-10-2006 / 14:57:25 / cg"
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2523
!
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2524
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2525
executeMenuVisible 
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2526
    ^ self thisIsASmalltalkWorkspace
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2527
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2528
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2529
thisIsASmalltalkWorkspace
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2530
    "can be redefined in a subclass to disable smalltalk-specific menu items
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2531
     (expecco uses workspaces as scratchpads)"
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2532
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2533
    ^ true
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2534
! !
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2535
9372
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2536
!WorkspaceApplication methodsFor:'drag & drop'!
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2537
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2538
droppedFile:aFilename in:aComponent
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2539
    "this is a notification from my textView component"
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2540
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2541
    self 
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2542
        renameWorkspace:(self selectedWorkspaceIndexHolder value)
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2543
        to:aFilename asFilename baseName
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2544
! !
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2545
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2546
!WorkspaceApplication methodsFor:'help'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2547
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2548
flyByHelpSpec
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2549
    "/ dynamically adjust the menuSave item's flyByhelpText
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2550
    ^ self updateHelpSpec:(super flyByHelpSpec)
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2551
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2552
    "Created: / 05-07-2011 / 15:42:25 / cg"
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2553
!
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2554
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2555
updateHelpSpec:aSpec
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2556
    |file ws|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2557
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2558
    "/ dynamically adjust the menuSave item's flyByhelpText
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2559
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2560
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2561
        file := ws defaultFileNameForFileDialog.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2562
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2563
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2564
    aSpec
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2565
        at:#menuSaveOrSaveAs 
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2566
        put:(file isNil ifTrue:[aSpec at:#menuSaveAs] ifFalse:[aSpec at:#menuSave]).
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2567
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2568
    OperatingSystem isMSWINDOWSlike ifTrue:[
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2569
        aSpec
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2570
            at:#addTerminal 
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2571
            put:(aSpec at:#addTerminalWindows).
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2572
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2573
    ].
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2574
    ^ aSpec
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2575
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2576
    "Created: / 06-07-2011 / 16:32:13 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2577
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2578
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2579
!WorkspaceApplication methodsFor:'initialization & release'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2580
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2581
closeRequest
6636
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  2582
    "asks for permission before closing"
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  2583
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  2584
    (self askIfAnyModified:'Text in %1 was not saved. Close anyway ?' yesButton:'Close') ifFalse:[
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2585
        ^ self
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2586
    ].
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2587
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2588
    ^ super closeRequest
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2589
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2590
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2591
initialSyntax: aLanguage
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2592
    self syntaxHolder value: aLanguage.
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2593
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2594
    "Created: / 26-04-2012 / 12:26:48 / cg"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2595
!
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2596
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2597
postBuildEditModeInfoLabel:aLabel
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2598
    aLabel menuHolder:self; menuMessage:#editModeInfoLabelMenu.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2599
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2600
    "Created: / 22-01-2011 / 11:32:57 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2601
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2602
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2603
postBuildWith:aBuilder
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2604
    super postBuildWith:aBuilder.
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2605
    self setCompilerForSyntax.
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2606
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2607
    self infoVisibilityChanged.         "/ force geometry update
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2608
    self autoDefineVariablesChanged.    "/ force workspaceView update
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2609
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2610
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2611
postOpenWith:aBuilder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2612
    self windowGroup addPreEventHook:self.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2613
    super postOpenWith:aBuilder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2614
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2615
    "Created: / 22-01-2011 / 12:09:20 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  2616
    "Modified: / 08-02-2011 / 21:33:49 / cg"
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2617
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2618
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2619
processEvent:anEvent
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2620
    "filter double click in line-label.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2621
     Return true, if I have eaten the event"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2622
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2623
    anEvent isButtonMultiPressEvent ifTrue:[
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2624
        anEvent view name = 'CursorLineLabel' ifTrue:[
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2625
            self selectedWorkspace scrolledView gotoLine.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2626
            ^ true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2627
        ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2628
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2629
    ^ false
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2630
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2631
    "Created: / 22-01-2011 / 12:10:01 / cg"
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2632
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2633
4359
35995cc972f7 category change
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  2634
!WorkspaceApplication methodsFor:'menu-actions'!
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2635
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2636
askForFilterBlock:message template:template rememberIn:nameOfClassVar
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2637
    |filterBlockString filterBlock dialog textHolder classVarValue|
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2638
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2639
    classVarValue := self class classVarAt:nameOfClassVar ifAbsent:nil.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2640
    classVarValue isNil ifTrue:[
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2641
        self class classVarAt:nameOfClassVar put:template. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2642
        classVarValue := template.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2643
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2644
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2645
    textHolder := ValueHolder new.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2646
    dialog := Dialog 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2647
                 forRequestText:(resources string:message)
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  2648
                 editViewClass:CodeView
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2649
                 lines:25 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2650
                 columns:70
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2651
                 initialAnswer:classVarValue
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2652
                 model:textHolder.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2653
    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
  2654
    dialog open.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2655
    dialog accepted ifFalse:[^ nil].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2656
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2657
    filterBlockString := textHolder value.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2658
    self class classVarAt:nameOfClassVar put:filterBlockString. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2659
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2660
    filterBlock := Parser evaluate:filterBlockString.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2661
    filterBlock isBlock ifFalse:[
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  2662
        self error:'bad input for block' mayProceed:true.
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2663
        ^ nil
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2664
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2665
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2666
    ^ filterBlock
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2667
!
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2668
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2669
autoDefineVariablesChanged
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2670
    |autoDefine|
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2671
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2672
    autoDefine := autoDefineVariables value.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2673
    UserPreferences current autoDefineWorkspaceVariables:(autoDefine == #workspace).
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2674
    workspaces do:[:each |
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2675
        each autoDefineVariables:autoDefine
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2676
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2677
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2678
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2679
basicInspectIt
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2680
    self inspectIt:true
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2681
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2682
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2683
browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2684
    self selectedWorkspacesTextView browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2685
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2686
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2687
browseIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2688
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2689
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2690
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2691
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2692
        ws browseIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2693
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2694
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2695
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2696
browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2697
    self selectedWorkspacesTextView browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2698
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2699
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2700
clearHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2701
    Workspace clearDoItHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2702
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2703
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2704
compareTextAgainst
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2705
    |ws otherText thisText|
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2706
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2707
    ws := self selectedWorkspace scrolledView.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2708
    ws isTextView ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2709
        ^ self 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2710
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2711
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2712
    ws hasSelection ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2713
        thisText := ws selectionAsString.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2714
    ] ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2715
        thisText := ws contents asString.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2716
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2717
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2718
    otherText := Dialog requestText:'Paste other text below:'.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2719
    otherText isEmptyOrNil ifTrue:[^ self ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2720
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2721
    DiffTextView 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2722
        openOn: thisText label: 'Workspace' 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2723
        and: otherText label: 'Other Text' 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2724
        title: 'Comparing Workspace Contents'
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2725
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2726
    "Created: / 04-05-2012 / 15:35:32 / cg"
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2727
!
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2728
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2729
doIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2730
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2731
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2732
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2733
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2734
        ws doIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2735
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2736
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2737
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2738
inspectIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2739
    self inspectIt:false
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2740
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2741
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
  2742
inspectIt:isBasicInspector
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
  2743
    |ws|
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2744
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2745
    ws := self selectedWorkspacesTextView.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2746
    ws isNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2747
        "there is none - i.e. it is a HTMLDocumentView"
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2748
        ^ self.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2749
    ].
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2750
    ws
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2751
        do:(ws selection) 
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2752
        withValueDo:[:result | 
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
  2753
                        self addInspectorOn:result basic:isBasicInspector suppressPseudoSlots:false
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2754
                    ]
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2755
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2756
"/    self selectedWorkspace inspectIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2757
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2758
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2759
inspectWorkspaceVariables
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2760
    |wsvars|
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2761
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2762
    wsvars := Workspace workspaceVariables.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2763
    wsvars size == 0 ifTrue:[
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2764
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2765
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2766
    ].
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2767
    wsvars inspect
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2768
!
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2769
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2770
loadFile:aFileName encoding:encodingSymbolOrNil label:label
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2771
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2772
    "This small hack allows programmers to have their own
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2773
    MyWorkspace.wsp in their ~/.smalltalk directory"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2774
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2775
    | f |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2776
    f := aFileName asFilename.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2777
    (f exists not and:[f isAbsolute not]) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2778
    f := Filename homeDirectory / '.smalltalk' / f pathName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2779
    f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2780
        (aFileName = 'MyWorkspace.wsp') 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2781
            ifTrue:
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2782
                [| s|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2783
                s := f writeStream.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2784
                [s nextPutAll:'"Edit and save as  ', f pathName , '"']
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2785
                    ensure:[s close]]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2786
            ifFalse:
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2787
                [f := aFileName asFilename]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2788
    ]].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2789
    ^super loadFile:f pathName encoding:encodingSymbolOrNil label:label
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2790
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2791
    "Created: / 23-12-2009 / 10:13:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2792
    "Modified: / 11-02-2010 / 10:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2793
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2794
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2795
manageSnippets
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2796
    |bindings listOfSnippets removeAction pasteAction
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2797
     hasSelectionHolder removeEnabledHolder pasteEnabledHolder
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2798
     selectedSnippetHolder selectedSnippetsTextHolder selectedSnippetsKeyHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2799
     selectedSnippetsName
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2800
     snippetsDictionary defineEnabledHolder defineAction 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2801
     snippetTextAcceptHolder snippetTextModifiedHolder
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2802
     loadFileAction saveFileAction|
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2803
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2804
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2805
    snippetsDictionary isEmptyOrNil ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2806
        Dialog information:(resources string:'No Snippets to Manage').
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2807
        ^ self.
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2808
    ].
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2809
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2810
    listOfSnippets := List withAll:(snippetsDictionary keysSorted).
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2811
    selectedSnippetsTextHolder := ValueHolder with:''.
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2812
    selectedSnippetsKeyHolder := ValueHolder with:''. 
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2813
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2814
    selectedSnippetHolder := nil asValue.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2815
    selectedSnippetHolder 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2816
        onChangeEvaluate:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2817
            (selectedSnippetHolder value) isNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2818
                selectedSnippetsName := nil.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2819
                selectedSnippetsTextHolder value:''.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2820
                selectedSnippetsKeyHolder value:nil.   
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2821
            ] ifFalse:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2822
                selectedSnippetsName := listOfSnippets at:(selectedSnippetHolder value).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2823
                selectedSnippetsKeyHolder value:selectedSnippetsName.   
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2824
                selectedSnippetsTextHolder value:(snippetsDictionary at:selectedSnippetsName).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2825
            ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2826
        ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2827
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2828
    hasSelectionHolder := BlockValue with:[:m | m value notNil] argument:selectedSnippetHolder.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2829
    removeEnabledHolder := hasSelectionHolder.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2830
    pasteEnabledHolder := hasSelectionHolder.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2831
    defineEnabledHolder := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2832
            BlockValue 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2833
                with:[:key :text|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2834
                    key notEmptyOrNil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2835
                    and:[(snippetsDictionary includesKey:key) not
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2836
                         or:[ (snippetsDictionary at:key) ~= text]]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2837
                ] 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2838
                argument: selectedSnippetsKeyHolder argument: selectedSnippetsTextHolder.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2839
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2840
    removeAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2841
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2842
            snippetsDictionary removeKey:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2843
            listOfSnippets remove:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2844
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2845
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2846
    pasteAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2847
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2848
            |text|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2849
            text := snippetsDictionary at:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2850
            self paste:text
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2851
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2852
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2853
    defineAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2854
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2855
            |originalText newText key|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2856
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2857
            key := selectedSnippetsKeyHolder value.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2858
            key notEmptyOrNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2859
                originalText := snippetsDictionary at:key ifAbsent:nil. "/ selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2860
                newText := selectedSnippetsTextHolder value withoutTrailingSeparators.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2861
                originalText ~= newText ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2862
                    snippetsDictionary at: key put: newText.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2863
                    snippetTextModifiedHolder value:false.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2864
                ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2865
            ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2866
            defineEnabledHolder recomputeValue.
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
  2867
        ].
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2868
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2869
    loadFileAction :=
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2870
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2871
            |file fileSnippets|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2872
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2873
            file := Dialog requestFileName:'Load Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt').
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2874
            file notEmptyOrNil ifTrue:[
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2875
                LastSnippetFilename := file.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2876
                file asFilename readingFileDo:[:s |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2877
                    fileSnippets := (Object readFrom:s onError:#()) decodeAsLiteralArray.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2878
                ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2879
                fileSnippets notEmptyOrNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2880
                    snippetsDictionary declareAllFrom:fileSnippets.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2881
                    listOfSnippets contents:(snippetsDictionary keysSorted).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2882
                    selectedSnippetHolder value:nil.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2883
                    selectedSnippetsTextHolder value:''.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2884
                    selectedSnippetsKeyHolder value:''. 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2885
                ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2886
            ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2887
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2888
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2889
    saveFileAction :=
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2890
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2891
            |file|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2892
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2893
            file := Dialog requestFileName:'Save Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt').
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2894
            file notEmptyOrNil ifTrue:[
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2895
                LastSnippetFilename := file.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2896
                file asFilename writingFileDo:[:s |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2897
                    s nextPutLine:'#( Dictionary'.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2898
                    snippetsDictionary keys asSortedCollection do:[:k |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2899
                        k storeOn:s.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2900
                        s spaces:2.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2901
                        (snippetsDictionary at:k) storeOn:s.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2902
                        s cr.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2903
                    ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2904
                    s nextPutLine:')'.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2905
                ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2906
            ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2907
        ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2908
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2909
    bindings := IdentityDictionary new.
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2910
    bindings at:#listOfSnippets put:listOfSnippets.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2911
    bindings at:#selectedSnippet put:selectedSnippetHolder asValue.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2912
    bindings at:#selectedSnippetsKeyHolder put:selectedSnippetsKeyHolder.
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2913
    bindings at:#selectedSnippetsText put:selectedSnippetsTextHolder.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2914
    bindings at:#removeSelectedSnippet put:removeAction.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2915
    bindings at:#pasteSelectedSnippet put:pasteAction.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2916
    bindings at:#defineSelectedSnippet put:defineAction.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2917
    bindings at:#removeEnabled put:removeEnabledHolder.
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
  2918
    bindings at:#pasteEnabled put:pasteEnabledHolder.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2919
    bindings at:#defineEnabled put:defineEnabledHolder.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2920
    bindings at:#menuOpenSnippetFile put:loadFileAction.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2921
    bindings at:#menuSaveSnippetFileAs put:saveFileAction.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2922
    bindings at:#closeSnippetDialog put:[:a :menu | menu topView closeRequest].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2923
    bindings at:#snippetTextAcceptHolder put:(snippetTextAcceptHolder := TriggerValue new).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2924
    bindings at:#snippetTextModified put:(snippetTextModifiedHolder := TriggerValue new).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2925
    bindings at:#openSnippetDocumentation put:[self halt. self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE'].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2926
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2927
    snippetTextModifiedHolder onChangeEvaluate:[snippetTextAcceptHolder value:true. defineEnabledHolder recomputeValue ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2928
    selectedSnippetsKeyHolder onChangeEvaluate:[defineEnabledHolder recomputeValue ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2929
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2930
    self openDialogInterface:#manageSnippetsDialogSpec withBindings:bindings
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2931
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2932
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2933
menuSQLConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2934
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2935
    self selectedWorkspaceApplication menuConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2936
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2937
    "Created: / 11-05-2012 / 10:00:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2938
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2939
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2940
menuSave
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2941
    |ws file|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2942
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2943
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2944
    ws isTextView ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2945
        self shouldImplement:'Functionality not yet implemented'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2946
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2947
    file := ws defaultFileNameForFileDialog.
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2948
    file 
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2949
        ifNil:[
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2950
            self menuSaveAs.
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2951
            ^ self
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2952
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2953
    ws saveAs:file doAppend:false.
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2954
    ws isCodeView2 ifTrue:[
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2955
        ws beUnmodified
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2956
    ]
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2957
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2958
    "Created: / 21-06-2011 / 11:42:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2959
    "Modified (format): / 05-07-2011 / 15:44:27 / cg"
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  2960
    "Modified: / 08-10-2011 / 12:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2961
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2962
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2963
newEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2964
    self class openEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2965
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2966
    "Created: / 13-10-2006 / 12:19:47 / cg"
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2967
!
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  2968
3334
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2969
newSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2970
    self class openSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2971
!
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  2972
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2973
openDocumentation
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2974
    "opens the documentation file"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2975
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2976
    self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2977
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2978
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2979
openEditingDocumentation
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2980
    "opens the documentation file"
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2981
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2982
    self openHTMLDocument: 'tools/codeeditor.html'
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2983
!
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  2984
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  2985
pasteAndExecute:aString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  2986
    self paste:aString.
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2987
    self printIt
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2988
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2989
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2990
pasteSnippet
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2991
    |allSnippets snippetToPaste snippetsDictionary|
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2992
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2993
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2994
    snippetsDictionary isEmptyOrNil ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2995
        Dialog information:(resources string:'No Snippet to Paste').
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2996
        ^ self.
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2997
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2998
    allSnippets := snippetsDictionary keysSorted.
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2999
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3000
    snippetToPaste := Dialog 
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3001
                choose:(resources string:'Paste Snippet:')
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3002
                fromList:allSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3003
                lines:10.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3004
    snippetToPaste isNil ifTrue:[
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3005
        ^ self
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3006
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3007
    self paste:(snippetsDictionary at:snippetToPaste) withCRs.
9616
77c1a65b95d4 changed: #pasteSniplet
Claus Gittinger <cg@exept.de>
parents: 9569
diff changeset
  3008
77c1a65b95d4 changed: #pasteSniplet
Claus Gittinger <cg@exept.de>
parents: 9569
diff changeset
  3009
    "Modified: / 29-10-2010 / 10:21:29 / cg"
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3010
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3011
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3012
printIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3013
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3014
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3015
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3016
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3017
        ws printIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3018
    ]
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  3019
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  3020
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3021
profileIt
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3022
    self selectedWorkspacesTextView profileIt
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3023
!
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3024
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3025
redoLastDoIt
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3026
    |s|
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3027
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3028
    s := self lastDoItsString.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3029
    s notNil ifTrue:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3030
        self pasteAndExecute:s
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3031
    ]
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3032
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3033
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3034
removeAllWorkspaceVariables
5846
d959a98a0047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5804
diff changeset
  3035
    (Dialog confirm:(resources string:'Do you really want to remove all Workspace Variables ?'))
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3036
    ifTrue:[
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3037
        Workspace removeAllWorkspaceVariables
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3038
   ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3039
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3040
4284
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3041
removeGlobalVariable
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3042
    |name nameKey selection value|
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3043
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3044
    selection := self selectedWorkspacesTextView selection ? ''.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3045
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3046
    name := Dialog 
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3047
                request:'Remove Global Variable:'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3048
                initialAnswer:(selection asString string)
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3049
                okLabel:'Remove'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3050
                title:'Remove Global'.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3051
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3052
    name size == 0 ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3053
    nameKey := name asSymbolIfInterned.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3054
    nameKey isNil ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3055
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3056
    (Smalltalk includesKey:nameKey) ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3057
        self warn:('No such Global Binding: ''%1''.' bindWith:name).
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3058
        ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3059
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3060
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3061
    value := Smalltalk at:nameKey.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3062
    value notNil ifTrue:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3063
        (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
  3064
        ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3065
            ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3066
        ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3067
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3068
    Smalltalk at:nameKey put:nil.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3069
    Smalltalk removeKey:nameKey
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3070
!
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3071
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3072
removeSharedPool
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3073
    |poolToRemove|
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3074
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3075
    poolsConsideredInDoIts isEmptyOrNil ifTrue:[
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3076
        Dialog information:'No pools have been added yet'.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3077
        ^ self.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3078
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3079
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3080
    poolToRemove := Dialog 
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3081
                choose:'Pool to Remove (No longer known in doIt-Evaluations):'
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3082
                fromList:(poolsConsideredInDoIts asOrderedCollection sort)
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3083
                lines:10.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3084
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3085
    poolToRemove isNil ifTrue:[
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3086
        ^ self
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3087
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3088
    poolsConsideredInDoIts remove:poolToRemove.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3089
    workspaces do:[:eachWs |    
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3090
        |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3091
        ws := self workspaceViewOfView:eachWs.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3092
        ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3093
            ws poolsConsideredInDoIts:poolsConsideredInDoIts.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3094
        ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3095
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3096
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3097
    "Modified: / 24-11-2006 / 12:44:16 / cg"
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3098
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3099
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3100
removeWorkspaceVariable
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3101
    |name selection wsVarNames|
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3102
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3103
    wsVarNames := Workspace workspaceVariableNames.
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3104
    wsVarNames isEmpty ifTrue:[
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3105
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3106
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3107
    ].
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3108
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3109
    selection := self selectedWorkspacesTextView selection ? ''.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3110
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3111
    name := Dialog 
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3112
                request:'Variable to remove:'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3113
                initialAnswer:(selection asString string)
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3114
                okLabel:'Remove'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3115
                title:'Enter Variable Name'
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3116
                list:(wsVarNames asOrderedCollection sort).      
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3117
    name isEmptyOrNil ifTrue:[
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3118
        ^ self
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3119
    ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3120
    Workspace removeWorkspaceVariable:name.
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3121
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3122
    "Modified: / 20-04-2005 / 11:56:28 / cg"
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3123
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3124
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3125
renameWorkspace:wsIndex to:newName
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3126
    |tabList|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3127
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3128
    tabList := self tabList.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3129
    tabList notEmpty ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3130
        tabList at:wsIndex put:newName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3131
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3132
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3133
        self setWindowLabel: newName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3134
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3135
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3136
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3137
setCompilerForSyntax
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3138
    |selectedWorkspace ws|
11654
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3139
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3140
    (selectedWorkspace := self selectedWorkspace) notNil ifTrue:[
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3141
        (ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3142
            self setCompilerForSyntaxIn:ws.
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3143
        ]
11654
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3144
    ].
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3145
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3146
    "Modified: / 26-09-2012 / 11:55:59 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3147
!
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3148
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3149
setCompilerForSyntaxIn:aWorkspace
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3150
    |compilerClass language|
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3151
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3152
    language := self syntaxHolder value.
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3153
    language isSymbol ifTrue:[
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3154
        language := ProgrammingLanguage named:language  
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3155
    ].
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3156
    language isNil ifTrue:[
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3157
        compilerClass := nil
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3158
    ] ifFalse:[
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3159
        compilerClass := (language evaluatorClass "self compilerClassForSyntaxName:syntax").
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3160
    ].
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3161
    [
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3162
        "/ could be a non-text view (VT100Terminal)
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3163
        aWorkspace compilerClass:compilerClass.
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3164
        aWorkspace editedLanguage:language.
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3165
    ] on:MessageNotUnderstood do:[].
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3166
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3167
    self smalltalkMenuEnabledHolder value:(language notNil and:[language isSmalltalk]).
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3168
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3169
    "Created: / 08-02-2011 / 21:32:39 / cg"
10602
242c8aaa2611 use evaluatorClass, not compilerClass
vrany
parents: 10568
diff changeset
  3170
    "Modified: / 17-08-2011 / 08:47:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3171
    "Modified: / 28-09-2012 / 19:55:18 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3172
!
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3173
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3174
setNameSpaceForDoIts
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3175
    |selectedWorkspace ws|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3176
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3177
    (selectedWorkspace := self selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3178
        (ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3179
            (self compilerClassOf:selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3180
                ws nameSpaceForDoits:(self namespaceHolder value).
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3181
            ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3182
        ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3183
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3184
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3185
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3186
spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3187
    self selectedWorkspacesTextView spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3188
!
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3189
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3190
switchToBookmarkEntry: bookmark
11829
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3191
    | ws file app |
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3192
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3193
    ws := self selectedWorkspace scrolledView.
11725
0b626c2b4b2d Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11713
diff changeset
  3194
    (ws isApplicationSubView) ifTrue:[
11829
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3195
        ((app := ws application) respondsTo:#switchToBookmarkEntry:) ifTrue:[
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3196
            app switchToBookmarkEntry: bookmark
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3197
        ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3198
        ^ self.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3199
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3200
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3201
    bookmark isFileBookmark ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3202
        file := bookmark path asFilename.
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3203
        (ws isTextView not or:[ws contents notEmpty]) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3204
            self addWindow: (self createWorkspace) named:  file withoutSuffix baseName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3205
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3206
        file exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3207
            Transcript showCR:('Bookmarked workspace file no longer exists: %1' bindWith:file)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3208
        ] ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3209
            self loadFile: file.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3210
        ].
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3211
        ^ self.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3212
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3213
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3214
    "Created: / 20-06-2011 / 22:45:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3215
    "Modified: / 21-06-2011 / 08:18:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3216
    "Modified: / 28-09-2011 / 07:44:53 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3217
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3218
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3219
terminateBackgroundProcesses
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3220
    Processor activeProcess terminateAllSubprocessesInGroup
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3221
!
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3222
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3223
timeIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3224
    self selectedWorkspacesTextView timeIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3225
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3226
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3227
!WorkspaceApplication methodsFor:'menu-actions-adding'!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3228
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3229
addBookmark
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3230
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3231
    self menuAddBookmarkTo: self bookmarks root.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3232
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3233
    "Created: / 20-06-2011 / 22:34:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3234
    "Modified: / 21-06-2011 / 08:56:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3235
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3236
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3237
addClassVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3238
    |v|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3239
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3240
    ClassVariablesInspectorView isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3241
        self error:'Missing class: "ClassVariablesInspectorView"'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3242
        ^ self.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3243
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3244
    v := self addInspectorOn:Smalltalk inspectorClass:ClassVariablesInspectorView suppressPseudoSlots:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3245
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3246
    v fieldListLabel:'Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3247
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Class Variables'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3248
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3249
    "Modified: / 22-10-2006 / 11:28:14 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3250
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3251
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3252
addEvaluationWorkspace
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3253
    ^ self addWindow:(self createEvaluationWorkspace) named:'Eval%1'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3254
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3255
    "Modified: / 13-10-2006 / 12:16:35 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3256
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3257
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3258
addGlobalVariable
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3259
    |name nameKey selection|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3260
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3261
    selection := self selectedWorkspacesTextView selection ? ''.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3262
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3263
    name := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3264
                request:'Name of new Global Variable:'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3265
                initialAnswer:(selection asString string)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3266
                okLabel:'Add'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3267
                title:'Enter Variable Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3268
    name size == 0 ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3269
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3270
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3271
    nameKey := name asSymbol.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3272
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3273
    (Smalltalk includesKey:nameKey) ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3274
        self warn:'Global named ''' , name , ''' already exists.'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3275
        ^ self.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3276
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3277
    Smalltalk at:nameKey put:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3278
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3279
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3280
addGlobalVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3281
    ^ self addNamespaceInspectorFor:Smalltalk
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3282
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3283
    "Modified: / 29-05-2007 / 19:08:58 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3284
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3285
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3286
addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3287
    |inspectorClass|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3288
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3289
    isBasicInspector ifFalse:[
12737
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3290
        "/ Inspector2 does not work yet!!
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3291
        "(Tools::Inspector2 notNil and:[UserPreferences current useInspector2])" false ifTrue:[
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3292
            inspectorClass := Tools::Inspector2.
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3293
        ] ifFalse:[
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3294
            inspectorClass := aValue inspectorClass.
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3295
        ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3296
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3297
    inspectorClass isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3298
        inspectorClass := InspectorView
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3299
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3300
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3301
    ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3302
        addInspectorOn:aValue 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3303
        inspectorClass:inspectorClass 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3304
        suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3305
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3306
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3307
addInspectorOn:aValue inspectorClass:inspectorClass suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3308
    |view resultString|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3309
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3310
    view := inspectorClass new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3311
    view suppressPseudoSlots:suppressPseudoSlots.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3312
    view inspect:aValue.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3313
    "/ v allowFollow:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3314
    aValue isBehavior ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3315
        resultString := aValue name
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3316
    ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3317
        resultString := aValue classNameWithArticle
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3318
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3319
    self addWindow:view named:('Inspecting: ' , resultString).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3320
    ^ view
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3321
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3322
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3323
addMyWorkspace
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3324
    |ws f|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3325
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3326
    self 
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3327
        addWindow:(ws := self createWorkspaceView)
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3328
        named:'My Workspace'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3329
        asFirst:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3330
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3331
    f := Filename homeDirectory / 'MyWorkspace.wsp'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3332
    f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3333
        f := Filename homeDirectory / '.smalltalk' / 'MyWorkspace.wsp'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3334
        f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3335
            f := 'MyWorkspace.wsp' asFilename 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3336
        ]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3337
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3338
    f exists ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3339
        self loadFile:f label:'My Workspace'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3340
    ] ifFalse:[
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3341
        ws defaultFileNameForFileDialog: f pathName.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3342
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3343
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3344
    "Modified: / 21-06-2010 / 08:40:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3345
    "Modified: / 05-07-2011 / 15:39:08 / cg"
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3346
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3347
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3348
addNamespaceInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3349
    |ns|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3350
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3351
    ns := Dialog requestNameSpace:'Namespace' initialAnswer:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3352
    ns isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3353
    ^ self addNamespaceInspectorFor:(Smalltalk at:ns asSymbol)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3354
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3355
    "Created: / 29-05-2007 / 19:10:50 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3356
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3357
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3358
addNamespaceInspectorFor:aNameSpaceOrSharedPool
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3359
    |v label|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3360
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3361
    SmalltalkInspectorView isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3362
        self error:'Missing class: "SmalltalkInspectorView"'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3363
        ^ nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3364
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3365
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3366
    v := self 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3367
            addInspectorOn:aNameSpaceOrSharedPool 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3368
            inspectorClass:SmalltalkInspectorView 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3369
            suppressPseudoSlots:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3370
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3371
    v fieldListLabel:'Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3372
    aNameSpaceOrSharedPool == Smalltalk ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3373
        label := 'Smalltalk (Globals)'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3374
    ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3375
        aNameSpaceOrSharedPool isSharedPool ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3376
            label := aNameSpaceOrSharedPool name,' (SharedPool)'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3377
        ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3378
            label := aNameSpaceOrSharedPool name,' (Namespace)'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3379
        ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3380
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3381
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3382
    self 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3383
        renameWorkspace:(self selectedWorkspaceIndexHolder value) 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3384
        to:label.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3385
    ^ v
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3386
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3387
    "Created: / 29-05-2007 / 19:08:45 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3388
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3389
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3390
addSQLWorkspace
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3391
    |page view |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3392
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3393
    page := (Smalltalk at:#'SQL::WorkspacePage') new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3394
    view := ApplicationSubView new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3395
    view client:page spec:#windowSpec.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3396
    self addWindow:view named:'SQL Workspace %1'.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3397
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3398
    "Created: / 10-05-2012 / 18:48:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3399
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3400
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3401
addSelectionToSnippets
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3402
    |selection snippetsBaseName snippetsName nr snippetsDictionary|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3403
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3404
    selection := (self selectedWorkspacesTextView selection ? '') asString.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3405
    selection isEmpty ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3406
        Dialog information:(resources string:'Nothing Selected').
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3407
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3408
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3409
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3410
    snippetsBaseName := Dialog request:(resources string:'Name of Snippet:').
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3411
    snippetsBaseName isNil ifTrue:[
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3412
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3413
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3414
    snippetsBaseName isEmpty ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3415
        snippetsBaseName := Time now asString.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3416
    ].
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3417
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3418
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3419
    snippetsName := snippetsBaseName.
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3420
    (snippetsDictionary includesKey:snippetsName) ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3421
        (Dialog confirm:(resources string:'Replace existing snippet named "%1" ?' with:snippetsName))
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3422
        ifFalse:[
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3423
            [snippetsDictionary includesKey:snippetsName] whileTrue:[
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3424
                nr := (nr ? 1) + 1.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3425
                snippetsName := (snippetsBaseName,'(%1)') bindWith:nr
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3426
            ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3427
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3428
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3429
    snippetsDictionary at:snippetsName put:selection
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3430
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3431
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3432
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3433
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3434
addSharedPool
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3435
    |allPools poolToAdd|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3436
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3437
    allPools := SharedPool allSubclasses collect:[:p | p name].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3438
    allPools removeAll:(poolsConsideredInDoIts ? #()).
9671
a441167cbacd changed: #addSharedPool
Claus Gittinger <cg@exept.de>
parents: 9653
diff changeset
  3439
    allPools sort.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3440
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3441
    poolToAdd := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3442
                choose:'Select a SharedPool to Add (To be known in doIt-Evaluations):'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3443
                fromList:allPools
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3444
                lines:15.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3445
    poolToAdd isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3446
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3447
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3448
    poolsConsideredInDoIts isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3449
        poolsConsideredInDoIts := (Set new).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3450
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3451
    poolsConsideredInDoIts add:poolToAdd.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3452
    workspaces do:[:eachWs |    
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3453
        |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3454
        ws := self workspaceViewOfView:eachWs.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3455
        ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3456
            ws poolsConsideredInDoIts:poolsConsideredInDoIts.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3457
        ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3458
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3459
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3460
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3461
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3462
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3463
addSharedPoolInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3464
    |pool|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3465
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3466
    pool := Dialog requestSharedPool:'SharedPool' title:nil initialAnswer:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3467
    pool isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3468
    ^ self addNamespaceInspectorFor:(Smalltalk at:pool asSymbol)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3469
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3470
    "Created: / 29-05-2007 / 19:10:50 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3471
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3472
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3473
addStopWatch
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3474
    |v clock|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3475
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3476
    v := View new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3477
    v viewBackground:Color white.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3478
    clock := ClockView in:v.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3479
    clock beStopWatch.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3480
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3481
    clock 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3482
        origin:[ 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3483
            |ext|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3484
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3485
            ext := (v height) min:(v width).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3486
            (v extent - ext) // 2
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3487
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3488
        extent:[        
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3489
            |ext|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3490
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3491
            ext := (v height) min:(v width).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3492
            ext @ ext
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3493
        ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3494
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3495
    self addWindow:v named:'StopWatch%1' tabIcon:(ToolbarIconLibrary clock13x13Icon).
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3496
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3497
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3498
addTeaTimer
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3499
    "you think that is a useless gimmick ?
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3500
     I use it in the office and as a wakeup clock timer"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3501
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3502
    |l dt tEnd dur answer confirmed confirmButton|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3503
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3504
    dt := LastTeaWaitTime ? (3*60).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3505
    answer := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3506
                request:'Delta-Time (seconds), Duration (n s/m/h) or End-Time (hh:mm:ss):' 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3507
                initialAnswer:(TimeDuration seconds:dt) printString.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3508
    answer isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3509
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3510
    "/ allow 3 formats:
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3511
    "/  hh:mm:ss       -> endTime
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3512
    "/  nnn s          -> x seconds
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3513
    "/  nnn m          -> x minutes
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3514
    "/  nnn h          -> x hours
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3515
    "/  nnn            -> seconds
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3516
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3517
    tEnd := Time readFromString:answer onError:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3518
    tEnd isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3519
        dur := TimeDuration readFromString:answer onError:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3520
        dur isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3521
            dt := Number readFromString:answer onError:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3522
            LastTeaWaitTime := dt.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3523
            tEnd := Timestamp now addSeconds:dt.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3524
        ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3525
            dt := dur asSeconds.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3526
            tEnd := Timestamp now + dur.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3527
        ].                
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3528
    ] ifFalse:[
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3529
        tEnd < Time now ifTrue:[
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3530
            (Dialog confirm:'Tomorrow ?') ifFalse:[^ self].
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3531
            tEnd := tEnd asTimestamp addDays:1.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3532
            dt := tEnd - Timestamp now.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3533
        ] ifFalse:[
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3534
            dt := tEnd - Time now.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3535
            tEnd := tEnd asTimestamp.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3536
        ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3537
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3538
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3539
    l := Label new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3540
    l sizeFixed:true.
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3541
    l label:'Waiting... [', dt printString, ']'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3542
    l viewBackground:Color red.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3543
    confirmButton := (Button label:'OK') action:[ confirmed := true. confirmButton beInvisible. ].
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3544
    confirmButton beInvisible.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3545
    l add:confirmButton.
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3546
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3547
    self addWindow:l named:'TeaTimer%1' tabIcon:(ToolbarIconLibrary clock13x13Icon).
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3548
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3549
    [
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3550
        Error handle:[ 
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3551
            self error:'check this, please'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3552
            #intentionallyLeftBlank
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3553
        ] do:[
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3554
            |remaining wg waitTime|
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3555
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3556
            waitTime := TimeDuration fromSeconds:1.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3557
            confirmed := false.
11480
2297d5c64763 changed:
Stefan Vogel <sv@exept.de>
parents: 11235
diff changeset
  3558
            [Timestamp now < tEnd ] whileTrue:[
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3559
                remaining := (tEnd - Timestamp now) roundTo:waitTime.
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3560
                l label:'Waiting... [', remaining printString, ']'.
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3561
                Delay waitFor:waitTime.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3562
            ].
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3563
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3564
            l label:'TEA is ready !!'.
12735
44e8ea95cd2f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12699
diff changeset
  3565
            self window topView raiseDeiconified.
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3566
            "/ could have been removed in the meantime....
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3567
            (wg := confirmButton windowGroup) notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3568
                confirmButton beVisible.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3569
                wg repairDamage.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3570
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3571
                [ confirmed ] whileFalse:[
12735
44e8ea95cd2f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12699
diff changeset
  3572
                    self window topView raiseDeiconified.
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3573
                    3 timesRepeat:[ l beep. Delay waitForSeconds:0.4 ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3574
                    Delay waitForSeconds:5.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3575
                ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3576
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3577
                l viewBackground:Color green.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3578
            ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3579
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3580
    ] fork.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3581
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3582
    "Modified: / 16-11-2010 / 14:54:05 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3583
    "Modified (comment): / 05-07-2011 / 14:30:48 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3584
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3585
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3586
addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3587
    | v termView |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3588
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3589
    (OperatingSystem isUNIXlike 
14457
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3590
            "/ mhm - xterm embedding seems to no longer work; the default from user prefs is therefore false
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3591
            and:[UserPreferences current useXTermViewIfAvailable 
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3592
            and:[XTermView notNil 
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3593
            and:[XTermView isAvailable]]]) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3594
        v := termView := XTermView new
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3595
    ] ifFalse:[
14457
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3596
        VT100TerminalView isNil ifTrue:[
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3597
            Dialog warn:('Missing class: ' , 'VT100TerminalView' allBold).
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3598
            AbortOperationRequest raise 
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3599
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3600
        v := (HVScrollableView for:VT100TerminalView).
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3601
        termView := v scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3602
        v autoHideScrollBars:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3603
        v horizontalMini:true.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3604
        "/ the startShell seems to realize the view, which is not allowed.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3605
        "/ do it later (after adding to myself)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3606
"/        termView startShellIn: Filename currentDirectory asString.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3607
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3608
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3609
    self addWindow:v named:'Terminal%1' tabIcon:(ToolbarIconLibrary console13x13Icon).
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3610
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3611
    termView shellTerminateAction:[ termView cr; nextPutLine:'*** shell terminated ***' allBold; cr.].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3612
    termView startShellIn: Filename currentDirectory asString.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3613
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3614
    "Modified: / 09-12-2010 / 23:22:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3615
    "Modified: / 05-07-2011 / 14:42:39 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3616
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3617
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3618
addWebBrowser
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3619
    |view browser|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3620
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3621
    browser := Tools::WebBrowserPage new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3622
    browser toolBarVisibleHolder value:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3623
    view := ApplicationSubView new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3624
    view client:browser spec:#windowSpec.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3625
    self addWindow:view named:'Web Browser %1'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3626
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3627
    "Created: / 10-06-2011 / 23:27:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3628
    "Modified (format): / 05-07-2011 / 14:30:59 / cg"
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3629
    "Modified: / 10-05-2012 / 18:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3630
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3631
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3632
addWorkspaceVariable
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3633
    |name selectedWorkspacesTextView selection|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3634
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3635
    selectedWorkspacesTextView := self selectedWorkspacesTextView.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3636
    selectedWorkspacesTextView notNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3637
        selection := selectedWorkspacesTextView selection.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3638
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3639
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3640
    name := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3641
                request:'Name of new Workspace Variable:'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3642
                initialAnswer:(selection ? '') asString string
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3643
                okLabel:'Add'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3644
                title:'Enter Variable Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3645
    name size == 0 ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3646
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3647
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3648
    Workspace addWorkspaceVariable:name.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3649
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3650
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3651
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3652
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3653
addWorkspaceVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3654
    |v|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3655
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3656
    v := self addInspectorOn:(Workspace workspaceVariables) basic:false suppressPseudoSlots:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3657
    v dereferenceValueHolders:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3658
    v fieldListLabel:'Name'.
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  3659
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Workspace Variables'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3660
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3661
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3662
menuAddBookmarkTo: folder
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3663
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3664
    | ws file |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3665
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3666
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3667
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3668
        file := ws defaultFileNameForFileDialog.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3669
        file ifNotNil:[folder add: (Bookmark forFile: file)].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3670
        folder model save.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3671
    ] ifFalse:[
11480
2297d5c64763 changed:
Stefan Vogel <sv@exept.de>
parents: 11235
diff changeset
  3672
        self shouldImplement
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3673
    ]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3674
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3675
    "Created: / 21-06-2011 / 08:56:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3676
! !
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3677
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3678
!WorkspaceApplication methodsFor:'menu-actions-editing'!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3679
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3680
babelFishTranslate:fromToModeString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3681
    "translate the selected text and paste it after the selection"
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3682
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3683
    SOAP::BabelFishClient isNil ifTrue:[
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3684
        Dialog information:'Sorry the SOAP-BabelFish translation-client is not available'.
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3685
        ^ self.
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3686
    ].
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3687
    self selectedWorkspace babelFishTranslate:fromToModeString
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3688
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3689
    "Modified: / 01-12-2010 / 12:24:34 / cg"
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3690
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3691
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3692
changesBrowserOnText
11713
3073bed82974 changed: #changesBrowserOnText
Claus Gittinger <cg@exept.de>
parents: 11654
diff changeset
  3693
    (UserPreferences current changeSetBrowserClass) 
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3694
        openOn:(ChangeSet fromStream:self selectedWorkspacesTextView contentsAsString readStream)
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3695
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3696
    "Created: / 27-08-2007 / 10:57:30 / cg"
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3697
!
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3698
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3699
editBookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3700
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3701
    BookmarkListEditor new
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3702
        bookmarkList: self bookmarks;
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3703
        open.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3704
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3705
    "Created: / 20-06-2011 / 22:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3706
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3707
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3708
editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3709
    self selectedWorkspace editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3710
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3711
    "Created: / 22-01-2011 / 11:51:12 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3712
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3713
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3714
editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3715
    self selectedWorkspace editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3716
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3717
    "Created: / 22-01-2011 / 11:52:52 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3718
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3719
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3720
editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3721
    self selectedWorkspace editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3722
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3723
    "Created: / 22-01-2011 / 11:52:15 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3724
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3725
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3726
fileInText
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3727
    "filein the selected workspace's contents as if read from a file"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3728
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3729
    self selectedWorkspacesTextView contentsAsString readStream fileIn
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3730
!
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3731
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3732
filterText
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3733
    "a filterblock is asked for, which is applied to the
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3734
     selected line range.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3735
     Each line for which the filter evaluats to false is removed"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3736
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3737
    |template filterBlock newList oldList answer nDeleted deletedLines
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3738
     prevLine nextLine line|
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3739
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3740
    template :=
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3741
'"/ general text filter;
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3742
"/ the following block should evaluate to true for all lines
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3743
"/ you want to KEEP.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3744
"/ Lines for which the block returns false, will be removed.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3745
"/ Beginner warning: Smalltalk know-how is useful here.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3746
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3747
[:line :lineNr :previousLine :nextLine|
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3748
     "/ any condition on line.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3749
     "/ Notice, that line might be a Text object (i.e. non-string),
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3750
     "/ so you may want to use ''line string''.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3751
     "/ 
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3752
     "/ Useful queries on the line are:
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3753
     "/     - size                   the length of the line
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3754
     "/     - hasChangeOfEmphasis    any bold, italic etc.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3755
     "/     - startsWith:someString
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3756
     "/     - endsWith:someString
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3757
     "/     - includesString:someString
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3758
     "/     - pattern match: 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3759
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3760
     "/ example filters
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3761
     "/
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3762
     "/ -------- removes all empty lines ---------------
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3763
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3764
     "/ line size > 0
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3765
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3766
     "/ -------- removes all lines which do not end with some suffix ----------
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3767
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3768
     "/ (line asLowercase endsWith:''foo'') not
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3769
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3770
     "/ -------- removes duplicates ----------
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3771
     "/
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3772
     "/ (line = nextLine) not
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3773
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3774
     "/ dummy filter (keeps all lines)
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3775
     "/
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3776
     true
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3777
]
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3778
'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3779
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3780
    filterBlock := self askForFilterBlock:'Filter block (to remove lines):'
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3781
                        template:template
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3782
                        rememberIn:#LastFilterBlockString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3783
    filterBlock isNil ifTrue:[^ self].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3784
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3785
    oldList := self selectedWorkspacesTextView list.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3786
    newList := StringCollection new.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3787
    deletedLines := OrderedCollection new.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3788
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3789
    oldList notEmptyOrNil ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3790
        line := nil.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3791
        nextLine := oldList at: 1.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3792
        1 to: oldList size do:[:lineNr |
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3793
            prevLine := line.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3794
            line := nextLine.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3795
            nextLine := oldList at: lineNr + 1 ifAbsent: nil.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3796
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3797
            (filterBlock 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3798
                value:(line ? '') 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3799
                value: lineNr 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3800
                value: (prevLine ? '')  
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3801
                value: (nextLine ? '') 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3802
            ) ifTrue: [
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3803
                newList add: line
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3804
            ] ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3805
                deletedLines add: line.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3806
            ]
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3807
        ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3808
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3809
        newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3810
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3811
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3812
    nDeleted := deletedLines size.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3813
    nDeleted == 0 ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3814
        self information:'No lines were deleted.'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3815
        ^ self
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3816
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3817
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3818
    answer := OptionBox 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3819
                request:(resources 
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3820
                        string:'%1 lines remain (%2 deleted). Change text ?'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3821
                        with:newList size
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3822
                        with:nDeleted)
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3823
                buttonLabels:#( 'Cancel' 'No, Show Deleted' 'Yes, but Show Deleted' 'Yes')
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3824
                values:#(nil false yesAndShow true)
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3825
                default:true.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3826
    answer isNil ifTrue:[^ self].
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3827
    (answer ~~ true) ifTrue:[
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3828
        TextBox openOn:(deletedLines asStringCollection) title:'Filtered lines'.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3829
        (answer == false) ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3830
            ^ self.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3831
        ].
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3832
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3833
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3834
    self selectedWorkspacesTextView list:newList.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3835
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3836
    "Modified: / 04-05-2012 / 16:03:32 / cg"
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3837
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3838
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3839
generateText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3840
    "a generatorblock is asked for, which is evaluated to generate
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3841
     lines onto an output stream.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3842
     The generated text is inserted (or replaces the current selection)"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3843
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3844
    |template generatorBlock oldText outStream|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3845
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3846
    template :=
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3847
'"/ general text generator;
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3848
"/ the following block is called with a write stream argument
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3849
"/ and the generated text is inserted at the current cursor position
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3850
"/ or replaces the current selection.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3851
"/ Beginner warning: Smalltalk know-how is useful here.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3852
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3853
[:outputStream :selectedText |
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3854
     "/ example generators
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3855
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3856
     "/ -------- generates N empty lines ---------------
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3857
     "/
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3858
"/     |n|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3859
"/     n := Dialog requestNumber:''how many empty lines:''.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3860
"/     n timesRepeat:[ outputStream nextPutLine:'''' ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3861
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3862
     "/ -------- generates a table of binary numbers
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3863
     "/
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3864
"/     |n|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3865
"/     n := Dialog requestNumber:''how many numbers:''.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3866
"/     1 to:n do:[:i | outputStream nextPutLine:(i raisedTo:i) printString ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3867
]
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3868
'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3869
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3870
    generatorBlock := self askForFilterBlock:'Generator block (to insert text):'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3871
                        template:template
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3872
                        rememberIn:#LastGeneratorBlockString.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3873
    generatorBlock isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3874
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3875
    oldText := self selectedWorkspacesTextView selection.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3876
    outStream := '' writeStream.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3877
    generatorBlock
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3878
                value:outStream
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3879
                value:oldText.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3880
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3881
    self selectedWorkspacesTextView pasteOrReplace:(outStream contents).
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3882
!
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3883
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3884
googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3885
    self selectedWorkspacesTextView googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3886
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3887
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3888
indent
9810
fd0cc2c4930d changed:
Stefan Vogel <sv@exept.de>
parents: 9747
diff changeset
  3889
    self selectedWorkspacesTextView indentBy4.
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3890
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3891
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3892
pasteLastDoIt
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3893
    |s|
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3894
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3895
    s := self lastDoItsString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3896
    s notNil ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3897
        self paste:s
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3898
    ]
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3899
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3900
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3901
processText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3902
    "a block is asked for, which is applied to each line of the selected line range.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3903
     Each line is replaced by the corresponding output of the processing block"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3904
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3905
    |template filterBlock newList oldList answer nChanged changedLines flags|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3906
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3907
    template :=
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3908
'"/ general text processor;
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3909
"/ the following block should evaluate to a new line, 
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3910
"/ given the original line as argument.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3911
"/ Beginner warning: Smalltalk know-how is useful here.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3912
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3913
[:line |
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3914
     "/ any processing on line.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3915
     "/ Notice, that line might be a Text object (i.e. non-string),
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3916
     "/ 
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3917
     "/ Useful operations on the line are:
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3918
     "/     - '' .... '' ,                      concatenation of any prefix/suffix
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3919
     "/     - leftPaddedTo:size                 padding
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3920
     "/     - rightPaddedTo:size                padding
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3921
     "/     - copyTo:(size min:N)               
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3922
     "/     - asUppercase 
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3923
     "/     - asLowercase
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3924
     "/     - withoutSeparators                 remove whiteSpace
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3925
     "/     - asCollectionOfWords               words
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3926
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3927
     "/ makes everything bold
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3928
     "/
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3929
     "/ line allBold
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3930
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3931
     "/ first word only
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3932
     "/
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3933
     "/ line withoutSeparators asCollectionOfWords first
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3934
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3935
     "/ dummy filter (keeps all lines as-is)
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3936
     "/
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3937
     line
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3938
]
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3939
'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3940
    filterBlock := self askForFilterBlock:'Processing block:'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3941
                        template:template
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3942
                        rememberIn:#LastProcessingBlockString.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3943
    filterBlock isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3944
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3945
    oldList := self selectedWorkspacesTextView list.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3946
    oldList := oldList collect:[:lineOrNil | lineOrNil ? ''].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3947
    newList := oldList collect:[:line | |newLine|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3948
                newLine := line.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3949
                Error handle:[:ex |
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3950
                ] do:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3951
                    newLine := filterBlock value:line
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3952
                ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3953
                newLine
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3954
               ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3955
    newList := newList collect:[:line | (line isString and:[line size == 0]) ifTrue:[nil] ifFalse:[line]].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3956
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3957
    flags := (1 to:oldList size) collect:[:i | (oldList at:i) ~= (newList at:i)].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3958
    flags := flags select:[:flag | flag].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3959
    nChanged := flags size.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3960
    nChanged == 0 ifTrue:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3961
        self information:'No lines were changed.'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3962
        ^ self
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3963
    ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3964
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3965
    answer := Dialog confirmWithCancel:(resources 
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3966
                        string:'%1 lines changed. Change text ?'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3967
                        with:nChanged)
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3968
                labels:#( 'Cancel' 'No, Show Changed' 'Yes').
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3969
    answer isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3970
    answer ifFalse:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3971
        changedLines := (1 to:oldList size) select:[:i | (oldList at:i) ~= (newList at:i)].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3972
        changedLines := changedLines collect:[:i | (newList at:i)].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3973
        TextBox openOn:(changedLines asStringCollection) title:'Changed lines'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3974
        ^ self.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3975
    ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3976
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3977
    self selectedWorkspacesTextView list:newList.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3978
!
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3979
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3980
undent
9810
fd0cc2c4930d changed:
Stefan Vogel <sv@exept.de>
parents: 9747
diff changeset
  3981
    self selectedWorkspacesTextView undentBy4.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3982
! !
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3983
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3984
!WorkspaceApplication methodsFor:'menu-dynamic'!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3985
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3986
bookmarkMenu
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  3987
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  3988
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3989
    | menu item |
10283
04a0fd35630e changed: #bookmarkMenu
Claus Gittinger <cg@exept.de>
parents: 10277
diff changeset
  3990
04a0fd35630e changed: #bookmarkMenu
Claus Gittinger <cg@exept.de>
parents: 10277
diff changeset
  3991
    menu := self bookmarks asMenuUsingBuilder: (BookmarkMenuBuilder new resources:resources).
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3992
    menu hasItems ifTrue:[menu addSeparator].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3993
13432
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  3994
    item := MenuItem 
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  3995
                label:(resources string:'Add Bookmark')
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  3996
                itemValue:#addBookmark
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  3997
                enabled:[self canAddBookmark].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3998
    menu addItem: item.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3999
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4000
    menu addSeparator.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4001
    
13432
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4002
    item := MenuItem 
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4003
                label:(resources string:'Edit Bookmarks')
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4004
                itemValue:#editBookmarks.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4005
    menu addItem: item.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4006
    ^menu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4007
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4008
    "Created: / 20-06-2011 / 22:21:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4009
    "Modified: / 21-06-2011 / 08:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
11787
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4010
    "Modified: / 09-09-2012 / 13:25:48 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4011
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4012
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4013
editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4014
    ^ self class editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4015
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4016
    "Created: / 22-01-2011 / 11:50:35 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4017
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4018
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4019
languageListMenuSlice
16057
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4020
    "dynamicall generate a slice containing the available
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4021
     programming languages"
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4022
     
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4023
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4024
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4025
    |m allLanguages |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4026
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4027
    allLanguages := OrderedCollection new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4028
    ProgrammingLanguage allDo:[:eachLanguage |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4029
        eachLanguage isSmalltalk ifFalse:[
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4030
            allLanguages add:eachLanguage
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4031
        ]
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4032
    ].
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4033
    allLanguages sort:[:a :b | a name < b name].
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4034
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4035
    m := Menu new.
13914
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4036
    m addItem:((MenuItem 
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4037
                label:'Text'
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4038
                choice: #syntaxHolder
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4039
                choiceValue:nil)
13914
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4040
                itemValue:#syntaxChangedByUser).
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4041
    m addItem:((MenuItem
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4042
                label:'Smalltalk'
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4043
                choice:#syntaxHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4044
                choiceValue:SmalltalkLanguage instance)
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4045
                translateLabel:false;
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4046
                enabled: self canChangeLanguageHolder).
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  4047
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4048
"/    allLanguages notEmpty ifTrue:[
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4049
"/        m addItem:(MenuItem separator).
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4050
9304
6d9d835a55bf changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9301
diff changeset
  4051
        allLanguages do:[:eachLanguage |
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4052
            "JV@2012-02-18: Add language only iff it supports
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4053
             evaluation (most of then do, but some may not -
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4054
             such as Java)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4055
            (eachLanguage isJava not 
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4056
                "/ Java is funny - we don't have an evaluator for Java
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4057
                "/ but we have to define evaluatorClass to return GroovyEvaluator
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4058
                "/ to be able to inspect code in debugger/inspector. Hence this hack.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4059
                "/ We may need something like evaluatorClassForInspector/Debugger.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4060
                and:[eachLanguage evaluatorClass notNil
16057
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4061
                and:[true "eachLanguage evaluatorClass canUnderstand: #evaluate:in:receiver:notifying:logged:ifFail:"]
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4062
            ]) 
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4063
            ifTrue:[
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4064
                m addItem:((MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4065
                            label:(eachLanguage name)
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4066
                            choice:#syntaxHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4067
                            choiceValue:eachLanguage)
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4068
                            translateLabel:false;
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4069
                            enabled: self canChangeLanguageHolder).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4070
            ].
9304
6d9d835a55bf changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9301
diff changeset
  4071
        ].
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4072
"/    ].
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4073
    ^ m
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4074
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4075
    "Modified: / 04-02-2012 / 11:52:07 / cg"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4076
    "Modified: / 29-08-2013 / 12:18:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4077
!
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4078
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4079
makeRecentDoItsMenuFor:aSelector
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4080
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4081
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4082
    |doIts m cmdLabelLen|
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4083
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4084
    cmdLabelLen := 40.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4085
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4086
    doIts := Workspace doItHistory.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4087
    doIts size > 0 ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4088
        m := Menu new.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4089
        doIts do:[:doItEntry |
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4090
            |lines label item|
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4091
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4092
            lines := doItEntry withoutLeadingSeparators asStringCollection.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4093
            label := lines first.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4094
            (label size > cmdLabelLen) ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4095
                label := (label contractTo:cmdLabelLen)
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4096
            ]. 
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4097
            (lines size > 1) ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4098
                label := label , ' [...]'
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4099
            ].
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4100
            label := '''' , label , ''''.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4101
14594
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4102
            item := MenuItem label:label itemValue:aSelector argument:doItEntry.
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4103
            m addItem:item.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4104
        ].
11787
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4105
        m addSeparator.
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4106
        m addItem: (MenuItem new 
14594
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4107
                    label: (resources string:'Clear History') 
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4108
                    itemValue: #clearHistory
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4109
                    translateLabel:false;
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4110
                    activeHelpKey: #historyEmptyMenu ).
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4111
   ].
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4112
   ^ m
11787
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4113
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4114
    "Modified: / 09-09-2012 / 13:25:30 / cg"
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4115
!
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4116
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4117
namespaceInfoLabelMenu
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4118
    |m allNamespaces|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4119
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4120
    allNamespaces := NameSpace allNameSpaces asNewOrderedCollection.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4121
    allNamespaces sort:[:a :b | a name < b name].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4122
    allNamespaces remove:Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4123
    allNamespaces addFirst:Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4124
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4125
    m := Menu new.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4126
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4127
    allNamespaces do:[:eachNameSpace |
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4128
        m addItem:((MenuItem 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4129
                    label:(eachNameSpace name) 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4130
                    choice: #namespaceHolder
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4131
                    choiceValue:eachNameSpace)
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4132
                    translateLabel:false;
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4133
                    itemValue:#namespaceChangedByUser).
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4134
        eachNameSpace == Smalltalk ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4135
            m addSeparator
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4136
        ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4137
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4138
    ^ m
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4139
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4140
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4141
namespaceInfoLabelMenuHolder
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4142
    ^ [self namespaceInfoLabelMenu]
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4143
!
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4144
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4145
pasteRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4146
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4147
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4148
    ^ self recentDoItsMenuFor:#'paste:'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4149
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4150
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4151
recentDoItsMenuFor:aSelector
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4152
    <resource: #programMenu >
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4153
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4154
    ^ [
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4155
        self makeRecentDoItsMenuFor:aSelector
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4156
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4157
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4158
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4159
redoRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4160
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4161
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4162
    ^ self recentDoItsMenuFor:#'pasteAndExecute:'
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4163
! !
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4164
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4165
!WorkspaceApplication methodsFor:'private'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4166
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4167
askIfAnyModified:question yesButton:yesButtonText
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4168
    |someModifiedWorkspace index label|
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4169
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4170
    someModifiedWorkspace := workspaces detect:[:aView | self isModifiedWorkspace:aView]
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4171
                                        ifNone:nil.
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4172
    someModifiedWorkspace isNil ifTrue:[^ true].
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4173
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4174
    index := workspaces indexOf:someModifiedWorkspace.
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4175
    label := tabList at:index ifAbsent:'Edit Window'.
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4176
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4177
    (Dialog 
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4178
        confirm:(resources stringWithCRs:question with:label)
6636
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  4179
        yesLabel:(resources string:yesButtonText)
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  4180
        noLabel:(resources string:'Cancel'))
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4181
    ifTrue:[
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4182
        "/ reset modified flag so question is asked only once
6045
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4183
        workspaces 
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4184
            select:[:aView | (self isModifiedWorkspace:aView)]
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4185
            thenDo:[:eachModifiedTextView |
7662
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4186
                        eachModifiedTextView 
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4187
                                perform:#modified: with:false
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4188
                                ifNotUnderstood:[].
6045
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4189
                    ].
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4190
        ^ true
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4191
    ].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4192
    ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4193
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4194
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4195
compilerClassForSyntaxName:syntax
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4196
    syntax == #Smalltalk ifTrue:[
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4197
        ^ Compiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4198
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4199
    syntax == #JavaScript ifTrue:[
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4200
        ^ JavaScriptCompiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4201
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4202
    ^ Compiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4203
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4204
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4205
compilerClassOf:aWorkspace
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4206
    |compilerClass|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4207
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4208
    [    
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4209
        "/ catch, because it could be a non-edit view there (VT100, TeaTimer etc.)
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4210
        compilerClass := aWorkspace compilerClass. 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4211
    ] on:MessageNotUnderstood do:[].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4212
    ^ compilerClass
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4213
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4214
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4215
createEvaluationWorkspace
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4216
    |ws l b box resultView environmentView panel workspaceVariables timeLabel|
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4217
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4218
    workspaceVariables := Workspace workspaceVariables.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4219
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4220
    panel := VariableVerticalPanel new.
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4221
    panel showHandle:true.
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4222
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4223
      box := View new.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4224
      l := Label new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4225
      l label:(resources string:'Eval:').
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4226
      l layout:((0.0@0.0 corner:0.5@0.0) asLayout bottomOffset:22).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4227
      l adjust:#left.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4228
      box add:l.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4229
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4230
      ws := HVScrollableView for:Workspace.
7662
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4231
      ws scrolledView name:#'Workspace'.  
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4232
      ws autoDefineVariables:#workspace.
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4233
      ws layout:((0.0@0.0 corner:1.0@1.0) asLayout topOffset:22; bottomOffset:-22).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4234
      box add:ws.
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4235
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4236
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4237
      b label:'DoIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4238
      b layout:((0.25@1.0 corner:0.5@1.0) asLayout topOffset:-22).
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4239
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4240
      b action:[ws doIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4241
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4242
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4243
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4244
      b label:'InspectIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4245
      b layout:((0.5@1.0 corner:0.75@1.0) asLayout topOffset:-22).
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4246
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4247
      b action:[ws inspectIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4248
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4249
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4250
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4251
      b label:'BrowseIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4252
      b layout:((0.75@1.0 corner:1.0@1.0) asLayout topOffset:-22).
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4253
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4254
      b action:[ws browseIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4255
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4256
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4257
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4258
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4259
      box := View new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4260
      box add:(Label new label:(resources string:'Value:'); adjust:#left; layout:((0.0@0.0 corner:0.5@0.0) asLayout bottomOffset:22)).
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4261
      box add:(timeLabel := Label new label:''; adjust:#right; layout:((0.5@0.0 corner:1.0@0.0) asLayout bottomOffset:22)).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4262
      resultView := HVScrollableView for:TextCollector.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4263
      box add:(resultView layout:((0@0 corner:1.0@1.0) asLayout topOffset:22); yourself).
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4264
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4265
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4266
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4267
      box := View new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4268
      box add:(Label new label:(resources string:'Environment:'); adjust:#left; layout:((0.0@0.0 corner:1.0@0.0) asLayout bottomOffset:22)).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4269
      environmentView := DictionaryInspectorView new.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4270
      environmentView suppressPseudoSlots:true.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4271
      environmentView inspect:workspaceVariables.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4272
      environmentView dereferenceValueHolders:true.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4273
      environmentView fieldListLabel:'Variable'.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4274
      box add:(environmentView layout:((0@0 corner:1.0@1.0) asLayout topOffset:22); yourself).
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4275
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4276
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4277
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4278
"/     self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Eval'.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4279
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4280
    ws doItAction:[:theCode |
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4281
        |t result resultString|
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4282
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4283
        t := TimeDuration toRun:[
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4284
            result := ws executeDoIt:theCode.
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4285
        ].
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4286
        timeLabel label:(resources string:'Exec. Time: %1' with:t printString).
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4287
6752
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4288
        resultString := [
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4289
                            result storeString
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4290
                        ] on:Error do:[
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4291
                            result printString
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4292
                        ].  
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4293
                        
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4294
        resultView showCR:resultString.
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4295
        9 to:1 by:-1 do:[:h|
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4296
            (workspaceVariables includesKey:('_%1' bindWith:h-1)) ifTrue:[
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4297
                workspaceVariables 
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4298
                        at:('_%1' bindWith:h)
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4299
                        put:(workspaceVariables at:('_%1' bindWith:h-1)).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4300
            ].
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4301
        ].
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4302
        workspaceVariables at:'_0' put:(ValueHolder with:result).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4303
        environmentView doUpdate.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4304
        result.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4305
    ].
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4306
    panel relativeCorners:#(0.4 0.6 1.0).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4307
    ^ panel
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4308
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4309
    "Modified: / 24-11-2006 / 11:06:33 / cg"
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4310
!
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4311
5295
e3c5a7b20d9d refactored (added abstract superclass)
Claus Gittinger <cg@exept.de>
parents: 5262
diff changeset
  4312
createWorkspace
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4313
    |ws|
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4314
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4315
    ws := self createWorkspaceView.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4316
    ws autoDefineVariables:self autoDefineVariables value.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  4317
    ws poolsConsideredInDoIts:poolsConsideredInDoIts.
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4318
    ^ ws
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4319
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4320
    "Modified (format): / 05-07-2011 / 14:18:52 / cg"
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4321
    "Modified: / 18-03-2012 / 23:37:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4322
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4323
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4324
createWorkspaceView
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4325
    |ws language|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4326
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4327
    ws := self class createWorkspaceView.
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4328
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4329
    ws codeAspect: SyntaxHighlighter codeAspectExpression.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4330
    ws acceptAction:[:code | self menuSave ].
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4331
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4332
"/    (ws respondsTo:#languageHolder:) ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4333
"/        ws languageHolder:self syntaxHolder
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4334
"/    ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4335
    language := self syntaxHolder value ? Smalltalk programmingLanguage.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4336
    language notNil ifTrue:[
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4337
        ws compilerClass:(language evaluatorClass).
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  4338
        ws editedLanguage:language.
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4339
    ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4340
    ^ ws
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4341
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4342
    "Modified: / 19-07-2012 / 16:39:15 / cg"
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4343
    "Modified: / 21-08-2012 / 17:20:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4344
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4345
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4346
createWorkspaceViewForText
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4347
    "creates a language unaware workspace"
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4348
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4349
    |ws|
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4350
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4351
    ws := self class createWorkspaceView.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4352
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4353
    ws acceptAction:[:code | self menuSave ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4354
"/    (ws respondsTo:#languageHolder:) ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4355
"/        ws languageHolder:nil
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4356
"/    ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4357
    ws compilerClass:(Smalltalk programmingLanguage).
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4358
    ws editedLanguage:nil.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4359
    ws codeAspect:nil.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4360
    ^ ws
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4361
!
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4362
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4363
isModifiedWorkspace:aView 
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4364
    |view|
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4365
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4366
    aView isNil ifTrue:[
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4367
        ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4368
    ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4369
    view := self workspaceViewOfView:aView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4370
    (view isNil 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4371
        or:[ view modified not 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4372
        or:[ view contentsWasSaved 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4373
        or:[ view contents withoutSeparators isEmpty ]]]) 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4374
    ifTrue:[ 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4375
        ^ false 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4376
    ].
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4377
    ^ true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4378
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4379
    "Modified: / 03-06-2011 / 11:03:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4380
    "Modified (format): / 05-07-2011 / 15:01:08 / cg"
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4381
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4382
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4383
lastDoItsString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4384
    |history|
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  4385
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4386
    history := Workspace doItHistory.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4387
    history size > 0 ifFalse:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4388
        self selectedWorkspacesTextView flash.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4389
        ^ nil
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  4390
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4391
    ^ history first
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4392
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4393
14724
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4394
syntaxFromEvaluatorClass:aClass
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4395
    "knowing the evaluator class, determine the syntax highlighter class"
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4396
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4397
    aClass notNil ifTrue:[
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4398
        ProgrammingLanguage allDo:[:lang | 
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4399
            lang evaluatorClass = aClass ifTrue:[
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4400
                ^ lang
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4401
            ]
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4402
        ].
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4403
    ].
14724
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4404
    "Unknown language - should not happen :-)"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4405
    ^ nil
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4406
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4407
    "Created: / 26-04-2012 / 12:59:32 / cg"
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4408
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4409
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4410
workspaceSelectionChanged
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4411
    "attach line, col and mode holders to the current workspace window"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4412
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4413
    |compilerClass selectedWorkspace selectedWorkspaceApp |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4414
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4415
    "JV@2012-05-10: Modified to better support complex application models as tabs"
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4416
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4417
    super workspaceSelectionChanged.
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4418
5855
a91fbf8b707c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5852
diff changeset
  4419
    selectedWorkspace := self selectedWorkspace.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4420
    selectedWorkspaceApp  := self selectedWorkspaceApplication.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4421
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4422
    (selectedWorkspace notNil and:[selectedWorkspace isScrollWrapper]) ifTrue:[
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4423
        selectedWorkspace := selectedWorkspace scrolledView
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4424
    ].
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4425
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  4426
    compilerClass := self compilerClassOf: selectedWorkspaceApp ? selectedWorkspace.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4427
    self canChangeLanguageHolder value:
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4428
        (selectedWorkspaceApp ? selectedWorkspace respondsTo: #compilerClass:).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4429
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4430
    self syntaxHolder value:(self syntaxFromEvaluatorClass:compilerClass).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4431
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4432
    (selectedWorkspace notNil and:[ selectedWorkspace scrolledView isTextView or:[selectedWorkspaceApp notNil] ]) ifTrue:[
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  4433
        self cursorLineAndColumnLabelHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorLineAndColumnLabelHolder ifNotUnderstood:nil ).
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4434
        self cursorLineHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorLineHolder ifNotUnderstood:nil ).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4435
        self cursorColHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorColHolder ifNotUnderstood:nil ).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4436
        self modeLabelHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#modeLabelHolder ifNotUnderstood:nil ).
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4437
    ] ifFalse:[
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  4438
        self cursorLineAndColumnLabelHolder valueHolder:nil.
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4439
        self cursorLineHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4440
        self cursorColHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4441
        self modeLabelHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4442
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4443
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4444
    "Update toolbar"
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4445
    (selectedWorkspaceApp notNil 
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4446
    and:[ (selectedWorkspaceApp class respondsTo: #toolBarSpec) ]) ifTrue:[
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4447
        "/ client provides one
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4448
        self toolBarView client: selectedWorkspaceApp spec: #toolBarSpec
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4449
    ] ifFalse:[
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  4450
        "/ I provide it
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4451
        self toolBarView client: self spec: #toolBarSpec builder: builder.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4452
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4453
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4454
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4455
!WorkspaceApplication methodsFor:'special startup'!
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4456
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4457
openSystemWorkspace
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4458
    "create the tabs for the initial welcome system workspace"
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4459
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4460
    |path needRemove font|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4461
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4462
    needRemove := true.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4463
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4464
    self allButOpen.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4465
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4466
    (self builder componentAt:'NoteBook')
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4467
        destroyTabAction:[:tabIndex| self removeWorkspace:tabIndex].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4468
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4469
    self window extent:640@400.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4470
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4471
    path := (Smalltalk getSystemFileName:'README') ?  '../../README'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4472
    path := path asFilename.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4473
    path isReadable ifTrue:[
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4474
        self addWindow:(self createWorkspaceViewForText) named:'README' asFirst:false.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4475
        self loadFile:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4476
        self removeWorkspace:1.  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4477
        self renameWorkspace:1 to:'LICENCE README'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4478
        needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4479
    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4480
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4481
"/    path := (Smalltalk getSystemFileName:'doc/online/english/LICENCE_STX.html') ?  '../../doc/online/english/LICENCE_STX.html'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4482
"/    path asFilename exists ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4483
"/        self addWindow:(licenceView := HVScrollableView for:HTMLDocumentView) named:'License' asFirst:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4484
"/        licenceView homeDocument:'../../doc/online/english/LICENCE_STX.html'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4485
"/        licenceView updateLabelFlag:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4486
"/        needRemove ifTrue:[self removeWorkspace:1].  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4487
"/        needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4488
"/    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4489
16244
0f77fb868a55 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16057
diff changeset
  4490
    device platformName = 'X11' ifTrue:[
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4491
        font := Font family:'unifont' face:'medium' style:'roman' size:16 encoding:'iso10646-1'.
16244
0f77fb868a55 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16057
diff changeset
  4492
        font := font onDevice:device ifAbsent:nil.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4493
        font isNil ifTrue:[    
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4494
            font := Font family:'arial' face:'medium' style:'roman' size:12 encoding:'iso10646-1'.
16244
0f77fb868a55 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16057
diff changeset
  4495
            font := font onDevice:device ifAbsent:nil.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4496
        ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4497
    ] ifFalse:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4498
        "/ font := Font family:'Arial Unicode MS' face:'medium' style:'roman' size:10 encoding:'ms-ansi'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4499
        font := Font family:'arial' face:'medium' style:'roman' size:10 encoding:'ms-ansi'.
16244
0f77fb868a55 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 16057
diff changeset
  4500
        font := font onDevice:device ifAbsent:nil.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4501
    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4502
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4503
    #(  "/ file                     resourceKey             title                       forcedEncoding  type
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4504
        ('Hello_utf8.wsp'           HELLO_UTF_FILE          'Hello'                     #'utf8'         #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4505
        ('Welcome.wsp'              WELCOME_FILE            'This Release'              nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4506
"/        ('Setup.wsp'                SETUP_FILE              'Setup'                     nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4507
        ('Keyboard.wsp'             KEYBOARD_FILE           'Keyboard'                  nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4508
"/        ('GettingStarted.wsp'       GETTING_STARTED_FILE    'Getting Started'           nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4509
        ('../../doc/online/english/GettingStarted.html'   GETTING_STARTED_TML_FILE  'Getting Started'           nil             #html)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4510
        ('../../doc/books/JoyOfST/IntroToST.html'         INTRO_TO_ST_FILE          'Smalltalk Introduction'    nil             #html)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4511
    "/ if these are present, show them.
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4512
        ('Private.wsp'              PRIVATE_FILE            'Private Workspace'         nil             #code)
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4513
        ('MyWorkspace.wsp'          MYWORKSPACE_FILE        'My Workspace'              nil             #code)
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4514
        ('PackageLoading.wsp'       PACKAGELOADING_FILE     'Packages'                  nil             #code)
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4515
    ) do:[:tuple |
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4516
        |file resKey title forcedEncoding type pane encoding htmlView|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4517
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4518
        file := tuple at:1.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4519
        resKey := tuple at:2.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4520
        file := self resources string:resKey default:file.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4521
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4522
        title := tuple at:3.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4523
        forcedEncoding := tuple at:4.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4524
        type := tuple at:5.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4525
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4526
        path := Smalltalk getSystemFileName:file.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4527
        (path notNil and:[path asFilename isReadable]) ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4528
            type == #html ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4529
                self addWindow:(htmlView := HVScrollableView for:HTMLDocumentView) named:title asFirst:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4530
                htmlView homeDocument:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4531
                htmlView infoHolder:self infoLabelHolder.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4532
                htmlView updateTopViewsTitleFlag:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4533
            ] ifFalse:[
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4534
                type == #code ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4535
                    self addWindow:(pane := self createWorkspaceView) named:title asFirst:false.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4536
                ] ifFalse:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4537
                    self addWindow:(pane := self createWorkspaceViewForText) named:title asFirst:false.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4538
                ].
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4539
                forcedEncoding notNil ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4540
                    encoding := forcedEncoding.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4541
                    font notNil ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4542
                        pane font:font.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4543
                    ]
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4544
                ] ifFalse:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4545
                    encoding := CharacterEncoder guessEncodingOfFile:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4546
                    (encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4547
                        encoding := nil
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4548
                    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4549
                ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4550
                self loadFile:path encoding:encoding label:title.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4551
            ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4552
            needRemove ifTrue:[self removeWorkspace:1].  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4553
            needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4554
        ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4555
    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4556
    self openWindow.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4557
    self selectedWorkspaceIndexHolder value:2.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4558
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4559
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4560
     |ws b|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4561
     ws := self openSystemWorkspace.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4562
     ws addMyWorkspace.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4563
     ws selectedWorkspaceIndexHolder value:(ws workspaces size).
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4564
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4565
     ws selectedWorkspace 
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4566
        add:(b := Button label:'DoIt' action:[ws doIt. b destroy])
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4567
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4568
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4569
     |ws b|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4570
     ws := self new.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4571
     ws open. 
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4572
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4573
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4574
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4575
    "Modified: / 14-02-2010 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4576
    "Modified: / 05-07-2011 / 15:34:40 / cg"
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4577
! !
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4578
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4579
!WorkspaceApplication methodsFor:'user actions'!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4580
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4581
infoVisibilityChanged
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4582
    super infoVisibilityChanged.
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4583
    UserPreferences current infoVisibleInWorkspace:(self infoVisibleHolder value)
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4584
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4585
    "Created: / 14-07-2007 / 16:46:58 / cg"
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4586
!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4587
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4588
namespaceChangedByUser
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4589
    "remember as default for next new workspace"
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4590
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4591
    LastNamespace := self namespaceHolder value.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4592
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4593
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4594
syntaxChangedByUser
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4595
    "remember as default for next new workspace"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4596
    LastLanguage := self syntaxHolder value.
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4597
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4598
    "Created: / 26-04-2012 / 12:31:04 / cg"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4599
!
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4600
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4601
toolBarVisibilityChanged
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4602
    super toolBarVisibilityChanged.
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  4603
    UserPreferences current toolbarVisibleInWorkspace:(self toolBarVisibleHolder value).
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  4604
    UserPreferences current editToolbarVisibleInWorkspace:(self editToolBarVisibleHolder value).
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4605
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4606
    "Created: / 14-07-2007 / 16:45:31 / cg"
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4607
! !
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4608
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4609
!WorkspaceApplication class methodsFor:'documentation'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4610
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4611
version
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4612
    ^ '$Header$'
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4613
!
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4614
9059
3ed3d94ea9b7 added: #openSettingsDialog
Claus Gittinger <cg@exept.de>
parents: 8792
diff changeset
  4615
version_CVS
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4616
    ^ '$Header$'
10394
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4617
!
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4618
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4619
version_SVN
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4620
    ^ '$Id$'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4621
! !
12340
8332590c5a41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12032
diff changeset
  4622