WorkspaceApplication.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 19 Jul 2017 09:42:32 +0200
branchjv
changeset 17619 edb119820fcb
parent 17390 ce68ee978f93
child 18226 346376844040
permissions -rw-r--r--
Issue #154: Set window style using `#beToolWindow` to indicate that the minirunner window is kind of support tool rather than some X11 specific code (which does not work on Windows of course) See https://swing.fit.cvut.cz/projects/stx-jv/ticket/154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     1
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     2
 COPYRIGHT (c) 2001 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     3
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     4
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     5
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     6
 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
     7
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     8
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
     9
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    10
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    11
"
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libtool' }"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
    14
"{ NameSpace: Smalltalk }"
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
    15
5303
fe0d2165b716 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5295
diff changeset
    16
MultiViewToolApplication subclass:#WorkspaceApplication
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
    17
	instanceVariableNames:'autoDefineVariables syntaxHolder poolsConsideredInDoIts
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
    18
		smalltalkMenuEnabledHolder clipBoardWatcherProcess
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
    19
		fetchClipboardLines cursorLineHolder cursorColHolder
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
    20
		modeLabelHolder toolBarView namespaceHolder
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
    21
		canChangeLanguageHolder cursorLineAndColumnInfoHolder
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
    22
		cursorLineAndColumnLabelHolder'
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    23
	classVariableNames:'LastFilterBlockString LastProcessingBlockString
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    24
		LastGeneratorBlockString LastTeaWaitTime DefaultToolBarVisible
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
    25
		ClipBoardFetchingInstance LastLanguage MyWorkspaceOpened
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
    26
		LastNamespace LastSnippetFilename'
8315
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
    27
	poolDictionaries:''
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
    28
	category:'Interface-Smalltalk'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    31
!WorkspaceApplication class methodsFor:'documentation'!
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    32
5140
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    33
copyright
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    34
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    35
 COPYRIGHT (c) 2001 by eXept Software AG
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    36
              All Rights Reserved
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    37
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    38
 This software is furnished under a license and may be used
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    39
 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
    40
 inclusion of the above copyright notice.   This software may not
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    41
 be provided or otherwise made available to, or used by, any
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    42
 other person.  No title to or ownership of the software is
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    43
 hereby transferred.
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    44
"
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    45
!
36c7da05d814 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5098
diff changeset
    46
3191
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    47
documentation
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    48
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    49
    A simple wrapper around a WorkSpace-View, adding a pullDown menu.
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
    [author:]
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    52
        Claus Gittinger
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    53
"
52879128b8a3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3160
diff changeset
    54
! !
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    56
!WorkspaceApplication class methodsFor:'defaults'!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    57
15833
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    58
default
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    59
    "a place where the default workspaceApplication could be hooked in;
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    60
     see SystemBrowser default and FileBrowser default on the intention..."
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    61
b058e6078d5a class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15817
diff changeset
    62
    ^ self
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
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    65
defaultEditToolbarVisible
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    66
    ^ UserPreferences current editToolbarVisibleInWorkspace
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    67
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
    68
    "Created: / 14-07-2007 / 16:42:50 / cg"
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
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    71
defaultInfoVisible
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    72
    ^ UserPreferences current infoVisibleInWorkspace
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    73
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
    74
    "Created: / 14-07-2007 / 16:43:21 / cg"
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
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    77
defaultMyWorkspaceDotWspFile
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    78
    |stxFolder f |
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    79
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    80
    stxFolder := Filename homeDirectory / '.smalltalk'. 
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    81
    f := stxFolder / 'MyWorkspace.wsp'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    82
    f exists ifFalse:[
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    83
        stxFolder makeDirectory.
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    84
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    85
        f writingFileDo:[:s|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    86
            'MyWorkspace.wsp' asFilename exists ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    87
                s nextPutAll:('MyWorkspace.wsp' asFilename contentsAsString)   
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    88
            ] ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    89
                s nextPutLine: '"This is your personal workspace..."'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    90
                s nextPutLine: '"Edit and save as  ', f pathName , '"'.
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    91
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    92
                'MyWorkspaceSample.wsp' asFilename exists ifTrue:[
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    93
                    s nextPutAll:('MyWorkspaceSample.wsp' asFilename contentsAsString)   
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
    94
                ]
12393
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    95
            ].
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    96
            s syncData.
bb642aa76d80 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12340
diff changeset
    97
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    98
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
    99
    ^f
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
    "Created: / 21-06-2011 / 08:45:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10317
8ce783ef807d changed: #defaultMyWorkspaceDotWspFile
sr
parents: 10283
diff changeset
   102
    "Modified: / 14-07-2011 / 13:08:30 / Administrator"
10568
8e61bf8770f8 changed:
Claus Gittinger <cg@exept.de>
parents: 10562
diff changeset
   103
    "Modified: / 10-08-2011 / 21:40:31 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   104
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   105
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   106
defaultToolbarVisible
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   107
    ^ UserPreferences current toolbarVisibleInWorkspace
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   108
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   109
    "Created: / 14-07-2007 / 16:42:50 / cg"
8486
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   110
!
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   111
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   112
filterTemplate
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   113
    ^
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   114
'"/ general text filter;
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   115
"/ the following block should evaluate to true for all lines
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   116
"/ you want to KEEP.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   117
"/ Lines for which the block returns false, will be removed.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   118
"/ Beginner warning: Smalltalk know-how is useful here.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   119
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   120
[:line :lineNr :previousLine :nextLine|
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   121
     "/ any condition on line.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   122
     "/ Notice, that line might be a Text object (i.e. non-string),
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   123
     "/ so you may want to use ''line string''.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   124
     "/ 
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   125
     "/ Useful queries on the line are:
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   126
     "/     - size                   the length of the line
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   127
     "/     - hasChangeOfEmphasis    any bold, italic etc.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   128
     "/     - startsWith:someString
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   129
     "/     - endsWith:someString
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   130
     "/     - includesString:someString
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   131
     "/     - pattern match: 
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   132
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   133
     "/ example filters
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   134
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   135
     "/ -------- removes all empty lines ---------------
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   136
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   137
     "/ line size > 0
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   138
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   139
     "/ -------- removes all lines which do not end with some suffix ----------
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   140
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   141
     "/ (line asLowercase endsWith:''foo'') not
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   142
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   143
     "/ -------- removes duplicates ----------
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   144
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   145
     "/ (line = nextLine) not
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   146
17055
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   147
     "/ -------- keep lines which start with some suffix ----------
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   148
     "/
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   149
     "/ (line asLowercase startsWith:''foo'') 
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   150
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   151
     "/ -------- keep lines which include some substring ----------
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   152
     "/
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   153
     "/ (line asLowercase includesString:''foo'') 
594d3acd76f5 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17054
diff changeset
   154
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   155
     "/ dummy filter (keeps all lines)
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   156
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   157
     true
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   158
]
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   159
'.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   160
!
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   161
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   162
generatorTemplate
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   163
    ^
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   164
'"/ general text generator;
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   165
"/ the following block is called with a write stream argument
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   166
"/ and the generated text is inserted at the current cursor position
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   167
"/ or replaces the current selection.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   168
"/ Beginner warning: Smalltalk know-how is useful here.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   169
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   170
[:outputStream :selectedText |
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   171
     "/ example generators
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   172
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   173
     "/ -------- generates N empty lines ---------------
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   174
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   175
"/     |n|
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   176
"/     n := Dialog requestNumber:''how many empty lines:''.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   177
"/     n timesRepeat:[ outputStream nextPutLine:'''' ].
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   178
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   179
     "/ -------- generates a table of binary numbers
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   180
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   181
"/     |n|
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   182
"/     n := Dialog requestNumber:''how many numbers:''.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   183
"/     1 to:n do:[:i | outputStream nextPutLine:(i raisedTo:i) printString ].
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   184
]
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   185
'
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   186
!
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   187
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   188
textProcessorTemplate
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   189
    ^
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   190
'"/ general text processor;
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   191
"/ the following block should evaluate to a new line, 
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   192
"/ given the original line as argument.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   193
"/ Beginner warning: Smalltalk know-how is useful here.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   194
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   195
[:line |
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   196
     "/ any processing on line.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   197
     "/ Notice, that line might be a Text object (i.e. non-string),
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   198
     "/ 
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   199
     "/ Useful operations on the line are:
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   200
     "/     - '' .... '' ,                      concatenation of any prefix/suffix
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   201
     "/     - leftPaddedTo:size                 padding
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   202
     "/     - rightPaddedTo:size                padding
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   203
     "/     - copyTo:(size min:N)               
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   204
     "/     - asUppercase 
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   205
     "/     - asLowercase
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   206
     "/     - withoutSeparators                 remove whiteSpace
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   207
     "/     - asCollectionOfWords               words
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   208
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   209
     "/ makes everything bold
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   210
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   211
     "/ line allBold
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   212
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   213
     "/ first word only
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   214
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   215
     "/ line withoutSeparators asCollectionOfWords first
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   216
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   217
     "/ dummy filter (keeps all lines as-is)
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   218
     "/
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   219
     line
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   220
]
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   221
'
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   222
!
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
   223
8486
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   224
webServiceLinkName
238273ad7684 *** empty log message ***
sr
parents: 8394
diff changeset
   225
    ^ '/workspace'
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   226
! !
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
   227
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   228
!WorkspaceApplication class methodsFor:'help specs'!
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   229
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   230
flyByHelpSpec
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   231
    <resource: #help>
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   232
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
   233
    ^ super flyByHelpSpec addPairsFrom:#(
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   234
12479
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   235
#editCopy
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   236
'Copy the selected text to the clipboard'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   237
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   238
#editCut
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   239
'Cut the selected text to the clipboard'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   240
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   241
#editDelete
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   242
'Delete the selected text'
6b385e17ea14 tooltips
Claus Gittinger <cg@exept.de>
parents: 12393
diff changeset
   243
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   244
#addTerminal
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   245
'Add a tab with an embedded console-terminal'
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   246
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   247
#addTerminalWindows
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   248
'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
   249
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   250
#lineAndColumnLabel
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   251
'The text-cursor''s line and column number'
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   252
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   253
#columnLabel
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   254
'The text-cursor''s column number'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   255
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   256
#lineLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   257
'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
   258
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
   259
#modeLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   260
'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
   261
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   262
#editRedo
8709
8d38950dff4f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8708
diff changeset
   263
'Redo'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   264
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   265
#doIndent
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   266
'Indent (shift right)'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   267
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   268
#doUndent
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   269
'Undent (shift left)'
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   270
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   271
#languageSelection
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
   272
'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
   273
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   274
#namespaceSelection
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
   275
'Namespace for doits. Right-click for menu to change'
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   276
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   277
#menuSave
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   278
'Save the page''s contents in the original file'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   279
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   280
#menuSaveAs
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   281
'Ask for a file and save the page''s contents there'
14837
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
#snippedPaste
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   284
'Paste the selected snippet''s text into the text'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   285
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   286
#snippedDefine
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   287
'Add the above definition to the list of snippets'
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
#snippedRemove
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   290
'Remove the above selected snippet from the list of snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   291
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   292
#snippedKey
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   293
'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
   294
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   295
#snippedList
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   296
'The list of defined snippets.'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   297
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   298
#snippedText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   299
'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
   300
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   301
)
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
   302
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
   303
    "Modified: / 08-07-2011 / 08:29:51 / cg"
8708
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   304
! !
9945e36df506 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8529
diff changeset
   305
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   306
!WorkspaceApplication class methodsFor:'interface specs'!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   307
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   308
manageSnippetsDialogSpec
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   309
    "This resource specification was automatically generated
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   310
     by the UIPainter of ST/X."
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   311
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   312
    "Do not manually edit this!! If it is corrupted,
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   313
     the UIPainter may not be able to read the specification."
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   314
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   315
    "
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   316
     UIPainter new openOnClass:WorkspaceApplication andSelector:#manageSnippetsDialogSpec
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   317
     WorkspaceApplication new openInterface:#manageSnippetsDialogSpec
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   318
    "
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   319
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   320
    <resource: #canvas>
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   321
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   322
    ^ 
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   323
    #(FullSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   324
       name: manageSnippetsDialogSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   325
       window: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   326
      (WindowSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   327
         label: 'Manage Snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   328
         name: 'Manage Snippets'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   329
         min: (Point 10 10)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   330
         bounds: (Rectangle 0 0 379 590)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   331
         menu: manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   332
       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   333
       component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   334
      (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   335
         collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   336
          (LabelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   337
             label: 'Snippet:'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   338
             name: 'Label1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   339
             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   340
             translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   341
             adjust: left
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   342
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   343
          (VariableVerticalPanelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   344
             name: 'VariableVerticalPanel1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   345
             layout: (LayoutFrame 0 0 30 0 0 1 -80 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   346
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   347
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   348
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   349
                (SequenceViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   350
                   name: 'List1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   351
                   activeHelpKey: snippedList
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   352
                   model: selectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   353
                   hasHorizontalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   354
                   hasVerticalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   355
                   useIndex: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   356
                   sequenceList: listOfSnippets
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
                (ViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   359
                   name: 'Box1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   360
                   component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   361
                  (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   362
                     collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   363
                      (TextEditorSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   364
                         name: 'TextEditor1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   365
                         layout: (LayoutFrame 0 0 30 0 0 1 0 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   366
                         activeHelpKey: snippedText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   367
                         model: selectedSnippetsText
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   368
                         hasHorizontalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   369
                         hasVerticalScrollBar: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   370
                         acceptChannel: snippetTextAcceptHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   371
                         modifiedChannel: snippetTextModified
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   372
                         hasKeyboardFocusInitially: false
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   373
                         viewClassName: ''
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   374
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   375
                      (LabelSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   376
                         label: 'Snippet Key:'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   377
                         name: 'Label2'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   378
                         layout: (LayoutFrame 0 0 2 0 100 0 28 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   379
                         translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   380
                         adjust: left
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   381
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   382
                      (InputFieldSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   383
                         name: 'EntryField1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   384
                         layout: (LayoutFrame 100 0.0 2 0 0 1.0 28 0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   385
                         activeHelpKey: snippedKey
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   386
                         model: selectedSnippetsKeyHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   387
                         immediateAccept: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   388
                         acceptOnReturn: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   389
                         acceptOnTab: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   390
                         acceptOnPointerLeave: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   391
                       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   392
                      )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   393
                    
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   394
                   )
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   395
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   396
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   397
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   398
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   399
             handles: (Any 0.5 1.0)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   400
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   401
          (HorizontalPanelViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   402
             name: 'ButtonPanel'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   403
             layout: (LayoutFrame 0 0 -70 1 0 1 -40 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   404
             horizontalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   405
             verticalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   406
             horizontalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   407
             verticalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   408
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   409
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   410
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   411
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   412
                   label: 'Define'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   413
                   name: 'DefineButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   414
                   activeHelpKey: snippedDefine
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   415
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   416
                   model: defineSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   417
                   enableChannel: defineEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   418
                   extent: (Point 125 22)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   419
                 )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   420
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   421
                   label: 'Remove'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   422
                   name: 'RemoveButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   423
                   activeHelpKey: snippedRemove
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   424
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   425
                   model: removeSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   426
                   enableChannel: removeEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   427
                   extent: (Point 125 22)
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
   428
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   429
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   430
                   label: 'Paste'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   431
                   name: 'PasteButton'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   432
                   activeHelpKey: snippedPaste
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   433
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   434
                   model: pasteSelectedSnippet
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   435
                   enableChannel: pasteEnabled
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   436
                   extent: (Point 125 22)
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   437
                 )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   438
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   439
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   440
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   441
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   442
          (DividerSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   443
             name: 'Separator1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   444
             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
   445
           )
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   446
          (HorizontalPanelViewSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   447
             name: 'CloseButtonPanel'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   448
             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   449
             horizontalLayout: fitSpace
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   450
             verticalLayout: center
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   451
             horizontalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   452
             verticalSpace: 3
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   453
             reverseOrderIfOKAtLeft: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   454
             component: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   455
            (SpecCollection
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   456
               collection: (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   457
                (ActionButtonSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   458
                   label: 'Close'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   459
                   name: 'Button1'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   460
                   translateLabel: true
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   461
                   model: cancel
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   462
                   extent: (Point 373 22)
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   463
                 )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   464
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   465
              
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   466
             )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   467
           )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   468
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   469
        
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   470
       )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
   471
     )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   472
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   473
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   474
toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   475
    "This resource specification was automatically generated
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   476
     by the UIPainter of ST/X."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   477
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   478
    "Do not manually edit this!! If it is corrupted,
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   479
     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
   480
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   481
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   482
     UIPainter new openOnClass:WorkspaceApplication andSelector:#toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   483
     WorkspaceApplication new openInterface:#toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   484
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   485
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   486
    <resource: #canvas>
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   487
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   488
    ^ 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   489
     #(FullSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   490
        name: toolBarSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   491
        window: 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   492
       (WindowSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   493
          label: 'Toolbar'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   494
          name: 'Toolbar'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   495
          min: (Point 10 10)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   496
          bounds: (Rectangle 0 0 728 48)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   497
        )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   498
        component: 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   499
       (SpecCollection
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   500
          collection: (
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   501
           (MenuPanelSpec
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   502
              name: 'ToolBarMenu'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   503
              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
   504
              level: 0
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   505
              visibilityChannel: toolBarVisibleHolder
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   506
              menu: toolBarMenu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   507
              textDefault: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   508
            )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   509
           )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   510
         
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   511
        )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   512
      )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   513
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   514
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   515
windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   516
    "This resource specification was automatically generated
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   517
     by the UIPainter of ST/X."
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
    "Do not manually edit this!! If it is corrupted,
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   520
     the UIPainter may not be able to read the specification."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   521
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
     UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   524
     WorkspaceApplication new openInterface:#windowSpec
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   525
     WorkspaceApplication open
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
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   528
    <resource: #canvas>
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
    ^ 
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   531
    #(FullSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   532
       name: windowSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   533
       window: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   534
      (WindowSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   535
         label: 'Workspace'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   536
         name: 'Workspace'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   537
         min: (Point 10 10)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   538
         bounds: (Rectangle 0 0 640 480)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   539
         menu: mainMenu
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   540
       )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   541
       component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   542
      (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   543
         collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   544
          (ViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   545
             name: 'ToolBar'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   546
             layout: (LayoutFrame 0 0 0 0 0 1 32 0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   547
             level: #'application.toolbarLevel'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   548
             visibilityChannel: toolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   549
             component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   550
            (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   551
               collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   552
                (ActionButtonSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   553
                   label: 'hideToolBarIcon'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   554
                   name: 'HideToolBarButton'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   555
                   layout: (LayoutFrame 0 0 0 0 13 0 0 1)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   556
                   activeHelpKey: hideToolBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   557
                   hasCharacterOrientedLabel: false
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   558
                   translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   559
                   model: hideToolbar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   560
                   postBuildCallback: hideToolBarButtonCreated:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   561
                 )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   562
                (NonScrollableArbitraryComponentSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   563
                   name: 'ToolBarView'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   564
                   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
   565
                   visibilityChannel: toolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   566
                   component: toolBarView
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   567
                 )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   568
                )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   569
              
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   570
             )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   571
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   572
          (ViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   573
             name: 'EditToolBar'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   574
             layout: (LayoutFrame 0 0 32 0 0 1 64 0)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   575
             visibilityChannel: editToolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   576
             component: 
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   577
            (SpecCollection
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   578
               collection: (
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   579
                (ActionButtonSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   580
                   label: 'hideToolBarIcon'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   581
                   name: 'HideEditToolBarButton'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   582
                   layout: (LayoutFrame 0 0 0 0 13 0 0 1)
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   583
                   activeHelpKey: hideEditToolBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   584
                   hasCharacterOrientedLabel: false
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   585
                   translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   586
                   model: hideEditToolbar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   587
                   postBuildCallback: hideToolBarButtonCreated:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   588
                 )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   589
                (MenuPanelSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   590
                   name: 'EditToolBar1'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   591
                   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
   592
                   visibilityChannel: editToolBarVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   593
                   menu: editToolBarMenu
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   594
                   textDefault: true
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   595
                 )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   596
                )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   597
              
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   598
             )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   599
           )
15890
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   600
          (NoteBookViewSpec
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   601
             name: 'NoteBook'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   602
             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
   603
             model: selectedWorkspaceIndexHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   604
             menu: tabList
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   605
             useIndex: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   606
             accessTabMenuAction: tabMenuAt:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   607
             translateLabel: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   608
             destroyTabAction: destroyTab:
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   609
             canvas: workspaceHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   610
             canvasInset: 0
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   611
             keepCanvasAlive: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   612
             tabLevel: 1
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   613
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   614
          (UISubSpecification
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   615
             name: 'infoBarSubSpec'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   616
             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
   617
             level: #'infobar.level'
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   618
             visibilityChannel: infoVisibleHolder
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   619
             majorKey: WorkspaceApplication
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   620
             minorKey: windowSpecForInfoBar
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   621
             keepSpaceForOSXResizeHandleH: true
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   622
           )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   623
          )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   624
        
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   625
       )
30c9ab7ca3e7 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 15833
diff changeset
   626
     )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   627
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   628
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   629
windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   630
    "This resource specification was automatically generated
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   631
     by the UIPainter of ST/X."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   632
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   633
    "Do not manually edit this!! If it is corrupted,
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   634
     the UIPainter may not be able to read the specification."
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   635
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   636
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   637
     UIPainter new openOnClass:WorkspaceApplication andSelector:#windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   638
     WorkspaceApplication new openInterface:#windowSpecForInfoBar
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   639
    "
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   640
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   641
    <resource: #canvas>
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   642
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   643
    ^ 
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   644
    #(FullSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   645
       name: windowSpecForInfoBar
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   646
       window: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   647
      (WindowSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   648
         label: 'Info Bar'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   649
         name: 'Info Bar'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   650
         bounds: (Rectangle 0 0 473 30)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   651
       )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   652
       component: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   653
      (SpecCollection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   654
         collection: (
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   655
          (ViewSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   656
             name: 'infoView'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   657
             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
   658
             component: 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   659
            (SpecCollection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   660
               collection: (
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   661
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   662
                   name: 'infoLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   663
                   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
   664
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   665
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   666
                   labelChannel: infoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   667
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   668
                   adjust: left
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   669
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   670
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   671
                   name: 'namespaceInfoLabelHolder'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   672
                   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
   673
                   activeHelpKey: namespaceSelection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   674
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   675
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   676
                   labelChannel: namespaceInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   677
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   678
                   adjust: left
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
   679
                   menu: namespaceInfoLabelMenuHolder
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   680
                 )
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   681
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   682
                   name: 'LanguageLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   683
                   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
   684
                   activeHelpKey: languageSelection
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   685
                   level: -1
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   686
                   translateLabel: true
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   687
                   labelChannel: languageInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   688
                   resizeForLabel: false
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   689
                   adjust: left
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   690
                   menu: languageInfoLabelMenu
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   691
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   692
                (LabelSpec
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   693
                   name: 'ModeLabel'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   694
                   layout: (LayoutFrame -65 1 0 0.0 -50 1 0 1.0)
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   695
                   activeHelpKey: modeLabel
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   696
                   level: -1
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   697
                   translateLabel: true
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   698
                   labelChannel: modeLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   699
                   postBuildCallback: postBuildEditModeInfoLabel:
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   700
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   701
                (LabelSpec
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   702
                   name: 'CursorLineAndColLabel'
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   703
                   layout: (LayoutFrame -50 1 0 0.0 0 1 0 1.0)
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   704
                   activeHelpKey: lineAndColumnLabel
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   705
                   level: -1
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
   706
                   labelChannel: cursorLineAndColumnLabelHolder
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
   707
                   adjust: left
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   708
                 )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   709
                )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   710
              
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   711
             )
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
   712
           )
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   713
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   714
        
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   715
       )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
   716
     )
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   717
! !
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   718
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   719
!WorkspaceApplication class methodsFor:'menu specs'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   720
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   721
bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   722
    "This resource specification was automatically generated
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   723
     by the MenuEditor of ST/X."
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   724
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   725
    "Do not manually edit this!! If it is corrupted,
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   726
     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
   727
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   728
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   729
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   730
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   731
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication bufferAddMenuSlice)) startUp
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   732
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   733
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   734
    <resource: #menu>
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   735
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   736
    ^
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   737
     #(Menu
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   738
	(
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   739
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   740
	    label: 'Terminal'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   741
	    itemValue: addTerminal
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   742
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   743
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   744
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   745
	    label: 'Web Browser'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   746
	    itemValue: addWebBrowser
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   747
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   748
	    isVisible: isWebBrowserAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   749
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   750
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   751
	    enabled: isSQLWorkspaceAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   752
	    label: 'SQL Workspace'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   753
	    itemValue: addSQLWorkspace
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   754
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   755
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   756
	 (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   757
	    label: 'Tea Timer'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   758
	    itemValue: addTeaTimer
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   759
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   760
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   761
	 (MenuItem
12032
37dea732aec1 changed: #bufferAddMenuSlice
Claus Gittinger <cg@exept.de>
parents: 12028
diff changeset
   762
            label: 'Stopwatch'
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   763
	    itemValue: addStopWatch
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   764
	    translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   765
	  )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   766
	 )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   767
	nil
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
   768
	nil
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   769
      )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   770
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   771
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   772
bufferMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   773
    "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
   774
     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
   775
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   776
    "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
   777
     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
   778
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
     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
   781
     (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
   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
    <resource: #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
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   787
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   788
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   789
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   790
            label: 'Add Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   791
            itemValue: addWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   792
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   793
            shortcutKey: Ctrlt
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   794
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   795
         (MenuItem
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   796
            label: '-'
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   797
            isVisible: thisIsASmalltalkWorkspace
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   798
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   799
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   800
            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
   801
            itemValue: addMyWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   802
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   803
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   804
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   805
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   806
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   807
            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
   808
            itemValue: addWorkspaceVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   809
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   810
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   811
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   812
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   813
            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
   814
            itemValue: addGlobalVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   815
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   816
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   817
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   818
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   819
            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
   820
            itemValue: addNamespaceInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   821
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   822
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   823
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   824
         (MenuItem
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   825
            label: 'Add Buffer on SharedPool...'
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   826
            itemValue: addSharedPoolInspector
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   827
            translateLabel: true
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   828
            isVisible: thisIsASmalltalkWorkspace
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   829
          )
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
   830
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   831
            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
   832
            itemValue: addClassVariableInspector
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   833
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
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
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   837
            label: '-'
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   838
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   839
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   840
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   841
            label: 'Add Evaluation Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   842
            itemValue: addEvaluationWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   843
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
   844
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   845
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   846
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   847
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   848
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   849
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   850
            label: 'Menu Slice'
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   851
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   852
            submenuChannel: bufferAddMenuSlice
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
   853
            isMenuSlice: true
8111
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   854
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   855
         (MenuItem
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   856
            label: '-'
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   857
          )
4bee96da760c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8106
diff changeset
   858
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   859
            label: 'Rename...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   860
            itemValue: renameWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   861
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   862
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   863
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   864
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   865
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   866
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   867
            enabled: canRemoveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   868
            label: 'Remove Buffer'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   869
            itemValue: removeWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   870
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   871
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   872
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   873
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   874
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   875
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   876
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   877
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   878
editMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   879
    "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
   880
     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
   881
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   882
    "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
   883
     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
   884
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   885
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   886
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   887
     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
   888
     (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
   889
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   890
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   891
    <resource: #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
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   894
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   895
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   896
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   897
            enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   898
            label: 'Cut'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   899
            itemValue: cutSelection
17390
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
   900
            shortcutKey: Cut
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   901
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   902
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   903
            enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   904
            label: 'Copy'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   905
            itemValue: copySelection
17390
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
   906
            shortcutKey: Copy
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   907
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   908
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   909
            label: 'Paste'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   910
            itemValue: paste
17390
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
   911
            shortcutKey: Paste
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   912
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   913
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   914
            enabled: hasHistory
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   915
            label: 'Paste Last'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   916
            itemValue: pasteLastDoIt
8492
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
   917
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   918
            submenuChannel: pasteRecentDoItMenu
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
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   922
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   923
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   924
            enabled: hasSelectionInActiveWorkspace
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   925
            label: 'Copy as Snippet...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   926
            itemValue: addSelectionToSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   927
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   928
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   929
            enabled: selectedWorkspaceIsTextView
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   930
            label: 'Paste Snippet...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   931
            itemValue: pasteSnippet
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   932
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   933
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   934
            enabled: selectedWorkspaceIsTextView
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
   935
            label: 'Manage Snippets...'
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
   936
            itemValue: manageSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   937
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   938
         (MenuItem
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   939
            label: '-'
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   940
          )
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
   941
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   942
            label: 'Select All'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   943
            itemValue: selectAll
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   944
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   945
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   946
            label: '-'
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   947
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   948
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   949
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   950
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   951
            label: 'Filter Text...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   952
            itemValue: filterText
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   953
            isVisible: thisIsASmalltalkWorkspace
7865
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
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
   956
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   957
            label: 'Process Text...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   958
            itemValue: processText
8134
e2d9bc2a289e smalltalk functions only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8133
diff changeset
   959
            isVisible: thisIsASmalltalkWorkspace
7865
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
         (MenuItem
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   962
            label: 'Generate Text...'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   963
            itemValue: generateText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   964
          )
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
   965
         (MenuItem
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   966
            label: 'Compare Text Against...'
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   967
            itemValue: compareTextAgainst
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   968
          )
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
   969
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   970
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   971
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   972
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   973
            label: 'Services'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   974
            submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   975
           (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   976
              (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   977
               (MenuItem
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   978
                  label: 'Autofetch Selection'
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   979
                  itemValue: autoFetchSelection:
11627
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   980
                  hideMenuOnActivated: false
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   981
                  indication: autoFetchSelection
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   982
                )
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   983
               (MenuItem
11627
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   984
                  enabled: autoFetchSelection
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   985
                  label: 'Insert as Line (Append CR)'
cf7bec895444 changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 11624
diff changeset
   986
                  hideMenuOnActivated: false
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   987
                  indication: autoFetchSelectionLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   988
                )
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
   989
               (MenuItem
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   990
                  label: '-'
9635
aaaff033bfba changed: #editMenu
Claus Gittinger <cg@exept.de>
parents: 9632
diff changeset
   991
                  isVisible: thisIsASmalltalkWorkspace
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   992
                )
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
   993
               (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   994
                  enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   995
                  label: 'Google Spell'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   996
                  itemValue: googleSpellingSuggestion
7876
3e9f6e7b9ff2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7866
diff changeset
   997
                  isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   998
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
   999
               (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1000
                  enabled: hasSelectionInActiveWorkspace
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  1001
                  label: 'Translate (babelFish)'
7876
3e9f6e7b9ff2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7866
diff changeset
  1002
                  isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1003
                  submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1004
                 (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1005
                    (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1006
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1007
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1008
                        label: 'English -> German'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1009
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1010
                        argument: 'en_de'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1011
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1012
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1013
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1014
                        label: 'English -> French'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1015
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1016
                        argument: 'en_fr'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1017
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1018
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1019
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1020
                        label: 'English -> Spanish'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1021
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1022
                        argument: 'en_es'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1023
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1024
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1025
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1026
                        label: 'English -> Portuguese'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1027
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1028
                        argument: 'en_pt'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1029
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1030
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1031
                        label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1032
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1033
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1034
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1035
                        label: 'German -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1036
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1037
                        argument: 'de_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1038
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1039
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1040
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1041
                        label: 'French -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1042
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1043
                        argument: 'fr_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1044
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1045
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1046
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1047
                        label: 'Spanish -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1048
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1049
                        argument: 'es_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1050
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1051
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1052
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1053
                        label: 'Portuguese -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1054
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1055
                        argument: 'pt_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1056
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1057
                     (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1058
                        enabled: hasSelectionInActiveWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1059
                        label: 'Russian -> English'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1060
                        itemValue: babelFishTranslate:
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1061
                        argument: 'ru_en'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1062
                      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1063
                     )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1064
                    nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1065
                    nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1066
                  )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1067
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1068
               )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1069
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1070
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1071
            )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1072
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1073
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1074
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1075
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1076
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1077
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1078
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1079
editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1080
    "This resource specification was automatically generated
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1081
     by the MenuEditor of ST/X."
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1082
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1083
    "Do not manually edit this!! If it is corrupted,
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1084
     the MenuEditor may not be able to read the specification."
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1085
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1086
    "
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1087
     MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1088
     (Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1089
    "
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1090
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1091
    <resource: #menu>
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1092
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1093
    ^ 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1094
     #(Menu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1095
        (
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1096
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1097
            label: 'Insert'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1098
            itemValue: editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1099
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1100
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1101
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1102
            label: 'Overwrite'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1103
            itemValue: editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1104
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1105
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1106
         (MenuItem
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1107
            label: 'Insert Selecting'
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1108
            itemValue: editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1109
            translateLabel: true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1110
          )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1111
         )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1112
        nil
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1113
        nil
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1114
      )
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1115
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1116
    "Created: / 22-01-2011 / 11:50:05 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1117
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  1118
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1119
editToolBarMenu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1120
    "This resource specification was automatically generated
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1121
     by the MenuEditor of ST/X."
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1122
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1123
    "Do not manually edit this!! If it is corrupted,
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1124
     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
  1125
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1126
    "
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1127
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#editToolBarMenu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1128
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication editToolBarMenu)) startUp
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1129
    "
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1130
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1131
    <resource: #menu>
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1132
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1133
    ^ 
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1134
     #(Menu
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1135
        (
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1136
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1137
            activeHelpKey: editCut
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1138
            label: 'Cut'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1139
            itemValue: cutSelection
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1140
            translateLabel: true
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1141
            labelImage: (ResourceRetriever ToolbarIconLibrary cut16x16Icon)
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1142
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1143
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1144
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1145
            activeHelpKey: editCopy
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1146
            label: 'Copy'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1147
            itemValue: copySelection
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1148
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1149
            labelImage: (ResourceRetriever ToolbarIconLibrary copy16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1150
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1151
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1152
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1153
            activeHelpKey: editPaste
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1154
            label: 'Paste'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1155
            itemValue: paste
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1156
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1157
            labelImage: (ResourceRetriever ToolbarIconLibrary paste16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1158
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1159
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1160
         (MenuItem
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1161
            label: '-'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1162
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1163
         (MenuItem
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1164
            activeHelpKey: editUndo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1165
            label: 'Undo'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1166
            itemValue: undo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1167
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1168
            labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1169
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1170
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1171
         (MenuItem
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1172
            activeHelpKey: editRedo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1173
            label: 'Redo'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1174
            itemValue: redo
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1175
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1176
            labelImage: (ResourceRetriever ToolbarIconLibrary redo16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1177
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1178
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1179
         (MenuItem
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1180
            label: '-'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1181
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1182
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1183
            activeHelpKey: editSearch
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1184
            label: 'Search'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1185
            itemValue: search
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1186
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1187
            labelImage: (ResourceRetriever ToolbarIconLibrary search16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1188
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1189
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1190
         (MenuItem
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1191
            label: '-'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1192
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1193
         (MenuItem
8508
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1194
            activeHelpKey: doUndent
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1195
            label: 'Undent'
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1196
            itemValue: undent
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1197
            translateLabel: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1198
            isButton: true
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1199
            labelImage: (ResourceRetriever ToolbarIconLibrary undent16x16Icon)
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1200
          )
34480c5b32d2 more editMenu stuff
Claus Gittinger <cg@exept.de>
parents: 8506
diff changeset
  1201
         (MenuItem
8506
45f668254d30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8501
diff changeset
  1202
            activeHelpKey: doIndent
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1203
            label: 'Indent'
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1204
            itemValue: indent
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1205
            translateLabel: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1206
            isButton: true
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1207
            labelImage: (ResourceRetriever ToolbarIconLibrary indent16x16Icon)
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1208
          )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1209
         )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1210
        nil
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1211
        nil
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1212
      )
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1213
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  1214
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1215
executionMenu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1216
    "This resource specification was automatically generated
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1217
     by the MenuEditor of ST/X."
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1218
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1219
    "Do not manually edit this!! If it is corrupted,
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1220
     the MenuEditor may not be able to read the specification."
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1221
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1222
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1223
    "
8492
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
  1224
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#executionMenu
47ef3a4022d0 do not keep menu
sr
parents: 8491
diff changeset
  1225
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication executionMenu)) startUp
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1226
    "
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1227
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1228
    <resource: #menu>
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1229
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1230
    ^ 
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1231
     #(Menu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1232
        (
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1233
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1234
            enabled: hasHistory
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1235
            label: 'Redo Last'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1236
            itemValue: redoLastDoIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1237
            submenuChannel: redoRecentDoItMenu
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1238
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1239
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1240
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1241
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1242
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1243
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1244
            label: 'DoIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1245
            itemValue: doIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1246
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1247
         (MenuItem
17199
a58711b0efde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 17055
diff changeset
  1248
            enabled: hasSelectionInActiveWorkspaceAndEditorIsNotReadonly
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1249
            label: 'PrintIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1250
            itemValue: printIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1251
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1252
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1253
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1254
            label: 'InspectIt'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1255
            itemValue: inspectIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1256
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1257
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1258
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1259
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1260
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1261
            enabled: hasSelectionInActiveWorkspace
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1262
            label: 'TimeIt'
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1263
            itemValue: timeIt
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1264
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1265
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1266
            enabled: hasSelectionInActiveWorkspace
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1267
            label: 'SpyOnIt (Transcript)'
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1268
            itemValue: spyOnIt
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1269
          )
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1270
         (MenuItem
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1271
            enabled: hasSelectionInActiveWorkspace
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1272
            label: 'ProfileIt (Visual)'
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  1273
            itemValue: profileIt
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1274
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1275
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1276
            label: '-'
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1277
          )
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1278
         (MenuItem
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1279
            enabled: hasSelectionInActiveWorkspace
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1280
            label: 'Browse Class'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1281
            itemValue: browseIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1282
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1283
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1284
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1285
            label: 'Browse Implementors of It'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1286
            itemValue: browseImplementorsOfIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1287
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1288
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1289
            enabled: hasSelectionInActiveWorkspace
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1290
            label: 'Browse References to It'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1291
            itemValue: browseReferencesToIt
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1292
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1293
         )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1294
        nil
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1295
        nil
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1296
      )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1297
!
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1298
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1299
fileMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1300
    "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
  1301
     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
  1302
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1303
    "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
  1304
     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
  1305
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1306
7865
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
     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
  1309
     (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
  1310
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1311
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1312
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1313
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1314
    ^
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1315
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1316
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1317
         (MenuItem
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1318
            label: 'Connect...'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1319
            itemValue: menuSQLConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1320
            translateLabel: true
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1321
            isVisible: isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1322
          )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1323
         (MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1324
            label: '-'
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1325
            isVisible: isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1326
          )
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1327
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1328
            label: 'New Workspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1329
            itemValue: newWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1330
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1331
            shortcutKey: Ctrln
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1332
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1333
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1334
            label: 'New Tab'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1335
            itemValue: addWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1336
            translateLabel: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1337
            isVisible: false
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1338
            shortcutKey: Ctrlt
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1339
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1340
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1341
            label: 'New SystemWorkspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1342
            itemValue: newSystemWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1343
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  1344
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1345
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1346
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1347
            label: 'New EvaluationWorkspace'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1348
            itemValue: newEvaluationWorkspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1349
            translateLabel: true
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  1350
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1351
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1352
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1353
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1354
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1355
         (MenuItem
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  1356
            label: 'Open File...'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1357
            itemValue: menuLoad
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1358
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1359
            shortcutKey: Ctrlo
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1360
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1361
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1362
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1363
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1364
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1365
            label: 'Save'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1366
            itemValue: menuSave
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1367
            translateLabel: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1368
            shortcutKey: Ctrls
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1369
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1370
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1371
            label: 'Save As...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1372
            itemValue: menuSaveAs
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1373
            translateLabel: true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1374
            shortcutKey: SaveAs
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1375
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1376
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1377
            enabled: hasMultipleBuffersHolder
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1378
            label: 'Save all As...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1379
            itemValue: menuSaveAllAs
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1380
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1381
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1382
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1383
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1384
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1385
         (MenuItem
8529
8d2391313df2 disable print item, if there is nothing to print
Claus Gittinger <cg@exept.de>
parents: 8508
diff changeset
  1386
            enabled: hasTextInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1387
            label: 'Print...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1388
            itemValue: menuPrint
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1389
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1390
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1391
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1392
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1393
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1394
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1395
            label: 'Exit'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1396
            itemValue: closeRequest
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1397
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1398
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1399
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1400
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1401
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1402
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1403
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1404
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1405
helpMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1406
    "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
  1407
     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
  1408
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1409
    "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
  1410
     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
  1411
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1412
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1413
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1414
     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
  1415
     (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
  1416
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1417
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1418
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1419
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1420
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1421
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1422
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1423
         (MenuItem
15384
196b596fa7e3 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15294
diff changeset
  1424
            label: 'Workspace Documentation'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1425
            itemValue: openDocumentation
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1426
          )
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1427
         (MenuItem
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1428
            label: 'Editing Text'
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  1429
            itemValue: openEditingDocumentation
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1430
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1431
         (MenuItem
8315
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1432
            label: 'Documentation on Smalltalk/X'
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1433
            itemValue: openSTXDocumentation
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1434
          )
53b8e7d58534 +openSTXDocumentation
Claus Gittinger <cg@exept.de>
parents: 8292
diff changeset
  1435
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1436
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1437
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1438
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1439
            label: 'About this Application...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1440
            itemValue: openAboutThisApplication
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1441
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1442
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1443
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1444
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1445
      )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1446
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1447
9676
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1448
languageInfoLabelMenu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1449
    "This resource specification was automatically generated
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1450
     by the MenuEditor of ST/X."
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1451
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1452
    "Do not manually edit this!! If it is corrupted,
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1453
     the MenuEditor may not be able to read the specification."
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1454
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1455
    "
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1456
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1457
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication workspaceMenu)) startUp
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1458
    "
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1459
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1460
    <resource: #menu>
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1461
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1462
    ^ 
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1463
     #(Menu
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1464
                    (
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1465
                     (MenuItem
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1466
                        label: 'Language List Slice'
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1467
                        translateLabel: true
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1468
                        submenuChannel: languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1469
                        isMenuSlice: true
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1470
                      )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1471
                     )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1472
                    nil
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1473
                    nil
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1474
                  )
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1475
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1476
    "Created: / 24-12-2010 / 02:03:59 / cg"
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1477
!
Claus Gittinger <cg@exept.de>
parents: 9671
diff changeset
  1478
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1479
mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1480
    "This resource specification was automatically generated
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1481
     by the MenuEditor of ST/X."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1482
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1483
    "Do not manually edit this!! If it is corrupted,
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1484
     the MenuEditor may not be able to read the specification."
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1485
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1486
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1487
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1488
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#mainMenu
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1489
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication mainMenu)) startUp
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1490
    "
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1491
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1492
    <resource: #menu>
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1493
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1494
    ^ 
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1495
     #(Menu
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1496
        (
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1497
         (MenuItem
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1498
            label: 'File'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1499
            submenuChannel: fileMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1500
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1501
         (MenuItem
8147
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1502
            label: 'Buffers'
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1503
            submenuChannel: bufferMenu
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1504
          )
eeab5c4f8ec8 menu order:
Claus Gittinger <cg@exept.de>
parents: 8146
diff changeset
  1505
         (MenuItem
8146
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1506
            label: 'Edit'
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1507
            submenuChannel: editMenu
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1508
          )
47249d18de95 menu order:
Claus Gittinger <cg@exept.de>
parents: 8134
diff changeset
  1509
         (MenuItem
7651
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1510
            label: 'View'
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1511
            submenuChannel: viewMenu
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1512
          )
45321b7e15df workspaceApp refactored
Claus Gittinger <cg@exept.de>
parents: 7612
diff changeset
  1513
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1514
            label: 'Bookmarks'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1515
            submenuChannel: bookmarkMenu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1516
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1517
         (MenuItem
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1518
            label: 'Execute'
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1519
            isVisible: executeMenuVisible
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1520
            submenuChannel: executionMenu
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1521
          )
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1522
         (MenuItem
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1523
            label: 'Workspace'
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1524
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1525
            submenuChannel: workspaceMenu
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  1526
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1527
         (MenuItem
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  1528
            enabled: smalltalkMenuEnabledHolder
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1529
            label: 'Smalltalk'
8501
98f3aa3d2854 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8499
diff changeset
  1530
            isVisible: thisIsASmalltalkWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1531
            submenuChannel: smalltalkMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1532
          )
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  1533
         (MenuItem
7461
605ae97c85db support '?' as help (for now: controlled by resources)
Claus Gittinger <cg@exept.de>
parents: 7441
diff changeset
  1534
            label: 'MENU_Help'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1535
            submenuChannel: helpMenu
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1536
          )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1537
         )
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1538
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1539
        nil
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1540
      )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1541
!
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  1542
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1543
manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1544
    "This resource specification was automatically generated
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1545
     by the MenuEditor of ST/X."
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1546
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1547
    "Do not manually edit this!! If it is corrupted,
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1548
     the MenuEditor may not be able to read the specification."
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1549
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1550
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1551
    "
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1552
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#manageSnippetDialogMenuSpec
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1553
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication manageSnippetDialogMenuSpec)) startUp
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1554
    "
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1555
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1556
    <resource: #menu>
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1557
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1558
    ^ 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1559
     #(Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1560
        (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1561
         (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1562
            label: 'File'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1563
            submenu: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1564
           (Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1565
              (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1566
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1567
                  label: 'Open Snippet File...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1568
                  itemValue: menuOpenSnippetFile
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1569
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1570
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1571
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1572
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1573
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1574
                  label: 'Save As Snipped File...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1575
                  itemValue: menuSaveSnippetFileAs
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1576
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1577
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1578
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1579
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1580
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1581
                  label: 'Close'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1582
                  itemValue: closeSnippetDialog
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1583
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1584
               )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1585
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1586
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1587
            )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1588
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1589
         (MenuItem
15392
5d9d4650b23f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15384
diff changeset
  1590
            label: 'MENU_Help'
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1591
            startGroup: conditionalRight
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1592
            submenu: 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1593
           (Menu
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1594
              (
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1595
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1596
                  label: 'Documentation'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1597
                  itemValue: openSnippetDocumentation
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1598
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1599
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1600
                  label: '-'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1601
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1602
               (MenuItem
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1603
                  label: 'About this Application...'
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1604
                  itemValue: openAboutThisApplication
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1605
                )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1606
               )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1607
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1608
              nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1609
            )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1610
          )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1611
         )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1612
        nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1613
        nil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1614
      )
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1615
!
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  1616
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1617
smalltalkMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1618
    "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
  1619
     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
  1620
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1621
    "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
  1622
     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
  1623
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1624
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1625
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1626
     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
  1627
     (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
  1628
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1629
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1630
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1631
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1632
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1633
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1634
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1635
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1636
            enabled: hasSelectionInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1637
            label: 'FileIn Text'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1638
            itemValue: fileInText
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1639
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1640
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1641
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1642
            enabled: hasSelectionInActiveWorkspace
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1643
            label: 'ChangeList on Text'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1644
            itemValue: changesBrowserOnText
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1645
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1646
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1647
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1648
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1649
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1650
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1651
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1652
            label: 'Add Global Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1653
            itemValue: addGlobalVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1654
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1655
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1656
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1657
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1658
            label: 'Remove Global Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1659
            itemValue: removeGlobalVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1660
            translateLabel: true
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1661
          )
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1662
         (MenuItem
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1663
            label: '-'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1664
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1665
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1666
            enabled: selectedWorkspaceIsTextView
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1667
            label: 'Add SharedPool...'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1668
            itemValue: addSharedPool
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1669
            translateLabel: true
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1670
          )
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1671
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1672
            enabled: selectedWorkspaceIsTextView
8342
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1673
            label: 'Remove SharedPool...'
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1674
            itemValue: removeSharedPool
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1675
            translateLabel: true
7cd807ea1c19 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8324
diff changeset
  1676
          )
7865
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
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1679
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1680
      )
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1681
!
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1682
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1683
toolBarMenu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1684
    "This resource specification was automatically generated
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1685
     by the MenuEditor of ST/X."
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1686
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1687
    "Do not manually edit this!! If it is corrupted,
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1688
     the MenuEditor may not be able to read the specification."
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1689
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1690
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1691
    "
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1692
     MenuEditor new openOnClass:WorkspaceApplication andSelector:#toolBarMenu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1693
     (Menu new fromLiteralArrayEncoding:(WorkspaceApplication toolBarMenu)) startUp
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1694
    "
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1695
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1696
    <resource: #menu>
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1697
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1698
    ^ 
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1699
     #(Menu
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1700
        (
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1701
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1702
            label: ''
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1703
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1704
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1705
            label: 'Add Buffer'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1706
            itemValue: addWorkspace
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1707
            isButton: true
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1708
            labelImage: (ResourceRetriever ToolbarIconLibrary addBufferIcon)
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1709
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1710
         (MenuItem
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1711
            label: '-'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1712
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1713
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1714
            activeHelpKey: menuSaveOrSaveAs
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1715
            label: 'Save Text'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1716
            itemValue: menuSave
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1717
            isButton: true
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  1718
            labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1719
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1720
         (MenuItem
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1721
            label: '-'
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1722
            isVisible: doItMenuButtonVisible
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1723
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1724
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1725
            activeHelpKey: #'help_doIt'
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1726
            label: 'DoIt'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1727
            itemValue: doIt
7789
c9f1c54da8be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7744
diff changeset
  1728
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1729
            isVisible: doItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1730
            labelImage: (ResourceRetriever ToolbarIconLibrary doItIcon)
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1731
          )
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1732
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1733
            activeHelpKey: #'help_printIt'
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1734
            label: 'PrintIt'
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1735
            itemValue: printIt
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1736
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1737
            isVisible: printItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1738
            labelImage: (ResourceRetriever ToolbarIconLibrary printItIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1739
          )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1740
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1741
            activeHelpKey: #'help_inspectIt'
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1742
            label: 'InspectIt'
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1743
            itemValue: inspectIt
7789
c9f1c54da8be *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7744
diff changeset
  1744
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1745
            isVisible: inspectItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1746
            labelImage: (ResourceRetriever ToolbarIconLibrary inspectItIcon)
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1747
          )
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1748
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1749
            activeHelpKey: #'help_browseIt'
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1750
            label: 'BrowseIt'
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1751
            itemValue: browseIt
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1752
            isButton: true
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  1753
            isVisible: browseItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  1754
            labelImage: (ResourceRetriever ToolbarIconLibrary browseItIcon)
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1755
          )
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1756
         (MenuItem
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1757
            activeHelpKey: #'help_profileIt'
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1758
            label: 'ProfileIt'
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1759
            itemValue: profileIt
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1760
            isButton: true
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1761
            isVisible: profileItMenuButtonVisible
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1762
            labelImage: (ResourceRetriever ToolbarIconLibrary profileItIcon)
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1763
          )
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  1764
         (MenuItem
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1765
            activeHelpKey: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1766
            label: 'Web Browser'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1767
            itemValue: addWebBrowser
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1768
            isButton: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1769
            startGroup: right
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1770
            isVisible: isWebBrowserAvailable
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1771
            labelImage: (ResourceRetriever ToolbarIconLibrary webKit22x22)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1772
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1773
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1774
            activeHelpKey: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1775
            label: 'Terminal'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1776
            itemValue: addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1777
            isButton: true
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1778
            startGroup: right
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1779
            labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1780
          )
7658
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1781
         )
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1782
        nil
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1783
        nil
a0749bf9f21a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7651
diff changeset
  1784
      )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1785
!
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1786
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1787
workspaceMenu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1788
    "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
  1789
     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
  1790
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1791
    "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
  1792
     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
  1793
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1794
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1795
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1796
     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
  1797
     (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
  1798
    "
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1799
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1800
    <resource: #menu>
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1801
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1802
    ^ 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1803
     #(Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1804
        (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1805
         (MenuItem
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1806
            label: 'Language List Slice'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1807
            submenuChannel: languageListMenuSlice
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1808
            isMenuSlice: true
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1809
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1810
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1811
            label: '-'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1812
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1813
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1814
            label: 'Namespace for DoIt'
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  1815
            submenuChannel: namespaceInfoLabelMenuHolder
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1816
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1817
         (MenuItem
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1818
            label: '-'
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1819
          )
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  1820
         (MenuItem
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  1821
            enabled: selectedWorkspaceIsTextView
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1822
            label: 'Add Workspace Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1823
            itemValue: addWorkspaceVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1824
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1825
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1826
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1827
            label: 'Remove Workspace Variable...'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1828
            itemValue: removeWorkspaceVariable
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1829
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1830
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1831
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1832
            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
  1833
            itemValue: removeAllWorkspaceVariables
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1834
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1835
         (MenuItem
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1836
            label: '-'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1837
          )
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1838
         (MenuItem
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1839
            enabled: anyWorkspaceVariableIsDefined
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1840
            label: 'Inspect Workspace Variables'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1841
            itemValue: inspectWorkspaceVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1842
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1843
         (MenuItem
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1844
            label: '-'
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1845
          )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1846
         (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1847
            label: 'Autodefine Variables'
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1848
            submenu: 
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1849
           (Menu
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1850
              (
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1851
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1852
                  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
  1853
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1854
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1855
                  choiceValue: workspace
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1856
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1857
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1858
                  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
  1859
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1860
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1861
                  choiceValue: doIt
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1862
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1863
               (MenuItem
11799
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1864
                  label: '-'
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1865
                )
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1866
               (MenuItem
d7cfbe899937 changed: #workspaceMenu
Claus Gittinger <cg@exept.de>
parents: 11787
diff changeset
  1867
                  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
  1868
                  hideMenuOnActivated: false
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1869
                  choice: autoDefineVariables
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1870
                )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1871
               )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1872
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1873
              nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1874
            )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1875
          )
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1876
         (MenuItem
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1877
            label: '-'
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1878
          )
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1879
         (MenuItem
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1880
            label: 'Terminate Processes Forked Here'
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1881
            itemValue: terminateBackgroundProcesses
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  1882
          )
7865
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1883
         )
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1884
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1885
        nil
ae5b649724dd separated submenus into separate specs (for easier customization in subclasses)
Claus Gittinger <cg@exept.de>
parents: 7853
diff changeset
  1886
      )
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1887
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  1888
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1889
!WorkspaceApplication class methodsFor:'private'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1890
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1891
createWorkspaceView
13585
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1892
    | view |
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1893
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1894
    view := (UserPreferences current useCodeView2In:#Workspace)
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  1895
                ifTrue:[Tools::CodeView2 new]
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  1896
                ifFalse:[HVScrollableView for:Workspace].
13585
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1897
    ^ view
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1898
3e4d51ef27a2 Refactoring after moving codeAspect to EditTextView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 13581
diff changeset
  1899
    "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
  1900
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  1901
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1902
!WorkspaceApplication class methodsFor:'special startup'!
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  1903
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1904
openEvaluationWorkspace
11728
eb5cf1a80189 comment/format in: #openEvaluationWorkspace
Stefan Vogel <sv@exept.de>
parents: 11725
diff changeset
  1905
    |wsApp needRemove|
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1906
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1907
    needRemove := true.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1908
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1909
    wsApp := self new.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1910
    wsApp allButOpen.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1911
    wsApp window extent:400@500.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1912
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1913
    wsApp addEvaluationWorkspace.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1914
    wsApp removeWorkspace:1.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1915
    wsApp renameWorkspace:1 to:'Evaluator'.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1916
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1917
    wsApp openWindow.
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1918
    wsApp selectedWorkspaceIndexHolder value:1.
7849
e3e01db99dd9 open methods return the just created ws
Claus Gittinger <cg@exept.de>
parents: 7848
diff changeset
  1919
    ^ wsApp
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1920
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1921
    "
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1922
     self openEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1923
    "
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1924
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1925
    "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
  1926
    "Modified: / 25-09-2007 / 21:00:45 / cg"
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1927
!
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  1928
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1929
openForSinglePageDoing:aBlock
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1930
    |wsApp needRemove|
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1931
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1932
    needRemove := true.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1933
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1934
    wsApp := self new.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1935
    wsApp allButOpen.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1936
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1937
    (wsApp builder componentAt:'NoteBook') destroyTabAction:nil.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1938
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1939
    wsApp window height:500.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1940
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1941
    aBlock value:wsApp.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1942
    wsApp removeWorkspace:1.  "/ the original Workspace
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1943
    "/ wsApp renameWorkspace:1 to:'LICENCE README'.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1944
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1945
    wsApp openWindow.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1946
    wsApp selectedWorkspaceIndexHolder value:1.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1947
    ^ wsApp
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1948
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1949
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1950
     self openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1951
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1952
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  1953
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  1954
openMyWorkspace
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1955
    |ws|
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1956
17035
08beff53ae3e #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17014
diff changeset
  1957
    "/ openMyWorkspace_new leads to an error in root /, which we don't understand...
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1958
    ws := self openMyWorkspace_new.
12699
a9d7394a503e class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12639
diff changeset
  1959
    "/ self openMyWorkspace_old.
a9d7394a503e class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12639
diff changeset
  1960
    MyWorkspaceOpened := true.
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  1961
    ^ ws
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1962
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1963
    "
10562
8eaae2fb2aa6 changed: #openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 10394
diff changeset
  1964
      WorkspaceApplication openMyWorkspace
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1965
    "
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1966
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1967
    "Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1968
    "Modified: / 14-07-2011 / 13:12:04 / Administrator"
10562
8eaae2fb2aa6 changed: #openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 10394
diff changeset
  1969
    "Modified (comment): / 09-08-2011 / 22:59:13 / cg"
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1970
!
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1971
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  1972
openMyWorkspace_new
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1973
    "open showing tabs for ALL bookmarked workspace files"
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1974
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1975
    |workspace|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1976
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1977
"/    workspace := self openWith: nil.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1978
"/    workspace enqueueDelayedAction:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1979
"/        Error handle:[:ex |
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1980
"/            "/ no time to debug that stuff now...
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1981
"/            Dialog information:'Error in bookmark handling: ',ex description
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1982
"/        ] do:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1983
"/            BookmarkList forWorkspace myWorkspaces do:[:bookmark|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1984
"/                workspace switchToBookmarkEntry: bookmark
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1985
"/            ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1986
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1987
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1988
"/
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1989
"/        ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1990
"/        workspace selectedWorkspaceIndexHolder value: 1.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1991
"/    ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1992
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1993
    workspace := self new.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1994
    workspace allButOpen.
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  1995
    workspace initialSyntax:SmalltalkLanguage instance.
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1996
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1997
    Error handle:[:ex |
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1998
        ex reject.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  1999
        "/ no time to debug that stuff now...
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2000
        Dialog information:'Error in bookmark handling: ',ex description
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2001
    ] do:[
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2002
        BookmarkList forWorkspace myWorkspaces do:[:bookmark|
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2003
            workspace switchToBookmarkEntry: bookmark
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2004
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2005
    ].
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2006
    workspace selectedWorkspaceIndexHolder value: 1.
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2007
    workspace openWindow.
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2008
    ^ workspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2009
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2010
    "
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2011
     WorkspaceApplication openMyWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2012
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2013
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2014
    "Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  2015
    "Created: / 14-07-2011 / 13:11:32 / Administrator"
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2016
    "Modified: / 26-04-2012 / 12:45:50 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2017
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2018
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2019
openMyWorkspace_old
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2020
    "open showing the single file: MyWorkspace.wsp"
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  2021
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2022
    ^ self openOnFile:'MyWorkspace.wsp'
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2023
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2024
    "
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2025
     self openMyWorkspace.
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2026
    "
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2027
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2028
    "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
  2029
    "Modified (comment): / 28-09-2011 / 07:48:07 / cg"
8317
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2030
!
01fd5ecc91e9 +openMyWorkspace
Claus Gittinger <cg@exept.de>
parents: 8315
diff changeset
  2031
6022
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2032
openOnFile:aFilename
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2033
    "launch a new workspace on the contents of some file"
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2034
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2035
    |ws|
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2036
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2037
    ws := self openWith:nil.
8369
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2038
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2039
    "/ let the ws load the file - instead of the caller.
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2040
    "/ so the error dialog is shown in its context, 
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2041
    "/ and the caller (Launcher) is not blocked.
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2042
    ws enqueueDelayedAction:[ws loadFile:aFilename].
b06c42605499 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8350
diff changeset
  2043
"/    ws loadFile:aFilename.
6022
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2044
    ^ ws
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2045
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2046
    "
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2047
     WorkspaceApplication openOnFile:'Makefile'
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2048
    "
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2049
!
f2a53298475e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5985
diff changeset
  2050
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2051
openSystemWorkspace
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  2052
    ^ self new openSystemWorkspace.
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2053
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2054
    "
7850
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  2055
     |ws b|
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  2056
     ws := self openSystemWorkspace.
7853
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2057
     ws addMyWorkspace.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2058
     ws selectedWorkspaceIndexHolder value:(ws workspaces size).
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2059
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
7850
a637bd14a034 example-comment
Claus Gittinger <cg@exept.de>
parents: 7849
diff changeset
  2060
     ws selectedWorkspace 
7851
a6c81764dcfd example-comment
Claus Gittinger <cg@exept.de>
parents: 7850
diff changeset
  2061
        add:(b := Button label:'DoIt' action:[ws doIt. b destroy])
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2062
    "
7853
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2063
    "
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2064
     |ws b|
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2065
     ws := self new.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2066
     ws open. 
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2067
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
9b2c497d75cd *** empty log message ***
ab
parents: 7851
diff changeset
  2068
    "
7612
42b1c57c6cc7 Private.wsp and MyWorkspace.wsp
Claus Gittinger <cg@exept.de>
parents: 7544
diff changeset
  2069
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2070
    "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
  2071
    "Modified: / 05-07-2011 / 15:34:40 / cg"
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2072
!
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2073
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2074
openWith:initialText
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2075
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2076
     The workspace will be opened in smalltalk syntax mode"
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2077
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2078
    ^ self openWith:initialText selected:false
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2079
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2080
    "
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2081
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2082
    "
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2083
!
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2084
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2085
openWith:initialText selected:selectedBoolean
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2086
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2087
     The workspace will be opened in smalltalk syntax mode"
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2088
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2089
    |workspace|
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2090
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2091
    workspace := self new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2092
    workspace open.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2093
    workspace selectedWorkspace contents:initialText selected:selectedBoolean.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2094
    ^ workspace
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2095
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2096
    "
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2097
     WorkspaceApplication openWith:'Transcript showCR:''hello world'''
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2098
    "
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2099
!
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2100
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2101
openWith:initialText selected:selectedBoolean title:titleString
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2102
    "launch a new workspace with some initial contents.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2103
     The workspace will be opened in smalltalk syntax mode"
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2104
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2105
    |workspace|
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2106
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2107
    workspace := self new.
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2108
    workspace open.
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2109
    titleString notNil ifTrue:[workspace setLabel:titleString].
5098
663519a20afd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4985
diff changeset
  2110
    workspace selectedWorkspace contents:initialText selected:selectedBoolean.
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2111
    ^ workspace
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2112
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2113
    "
12639
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2114
     WorkspaceApplication 
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2115
        openWith:'Transcript showCR:''hello world''' 
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2116
        selected:false
6a0a5bf99236 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12479
diff changeset
  2117
        title:'hello'
4542
1881967c7262 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4509
diff changeset
  2118
    "
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2119
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2120
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2121
openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2122
    "open a workspaceApp with a single initial pane, showing global variables.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2123
     Same as Smalltalk inspect, but looks nicer..."
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2124
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2125
    ^ self openForSinglePageDoing:[:wsApp | wsApp addNamespaceInspectorFor:Smalltalk]
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2126
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2127
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2128
     self openWithGlobalsInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2129
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2130
!
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2131
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2132
openWithText:initialText
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2133
    "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
  2134
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2135
    |ws|
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2136
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2137
    ws := self openWith:initialText selected:false.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2138
    ws syntax:nil.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2139
    ^ ws.
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2140
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2141
    "
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2142
     WorkspaceApplication openWithText:'foo 1 2 3 4'
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2143
    "
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2144
!
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2145
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2146
openWithWorkspaceVariableInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2147
    "open a workspaceApp with a single initial pane, showing workspace variables.
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2148
     Same as Workspace workspaceVariables inspect, but looks nicer..."
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2149
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2150
    ^ self openForSinglePageDoing:[:wsApp | wsApp addWorkspaceVariableInspector]
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2151
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2152
    "
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2153
     self openWithWorkspaceVariableInspector
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  2154
    "
3332
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2155
! !
91e39add4561 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3282
diff changeset
  2156
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2157
!WorkspaceApplication class methodsFor:'startup'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2158
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2159
open
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2160
    "/ the very first open opens a MyWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2161
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2162
    (MyWorkspaceOpened == true) ifTrue:[
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2163
        ^ self openRegularWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2164
    ] ifFalse:[
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2165
        ^ self openMyWorkspace
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2166
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2167
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2168
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2169
     MyWorkspaceOpened := nil.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2170
     WorkspaceApplication open.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2171
    "
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2172
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2173
    "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
  2174
    "Modified (comment): / 05-07-2011 / 15:23:53 / cg"
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2175
!
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2176
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2177
openRegularWorkspace
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2178
    "/ always open a normal MyWorkspace
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2179
15608
0f4b14944011 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15409
diff changeset
  2180
    ^ super open
15234
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2181
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2182
    "
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2183
     MyWorkspaceOpened := nil.
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2184
     WorkspaceApplication open.
e00c67bae495 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15046
diff changeset
  2185
    "
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2186
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2187
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2188
!WorkspaceApplication methodsFor:'aspects'!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2189
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2190
autoDefineVariables
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2191
    autoDefineVariables isNil ifTrue:[
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2192
        autoDefineVariables := ValueHolder new.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2193
        (UserPreferences current autoDefineWorkspaceVariables) ifTrue:[
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  2194
            autoDefineVariables value:#workspace.
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2195
        ] ifFalse:[
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2196
            autoDefineVariables value:#doIt.
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2197
        ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2198
        autoDefineVariables onChangeSend:#autoDefineVariablesChanged to:self.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2199
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2200
    ^ autoDefineVariables.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2201
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2202
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2203
bookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2204
    |ws app|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2205
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2206
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2207
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2208
        ^ BookmarkList forWorkspace
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2209
    ].
11725
0b626c2b4b2d Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11713
diff changeset
  2210
    (ws isApplicationSubView) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2211
        app := ws application.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2212
        (app respondsTo:#bookmarks) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2213
            ^ app bookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2214
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2215
        (app respondsTo:#bookmarkListHolder) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2216
            ^ app bookmarkListHolder value
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2217
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2218
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2219
    ^ BookmarkList new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2220
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2221
    "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
  2222
    "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
  2223
    "Modified (format): / 05-07-2011 / 14:21:10 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2224
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2225
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2226
browseItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2227
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2228
    ^ self browseItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2229
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2230
    "Modified: / 17-12-2013 / 16:34:59 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2231
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2232
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2233
browseItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2234
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2235
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2236
    "Created: / 17-12-2013 / 16:34:04 / cg"
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2237
!
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2238
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2239
canChangeLanguageHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2240
    "return/create the 'canChangeLanguageHolder' value holder (automatically generated)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2241
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2242
    canChangeLanguageHolder isNil ifTrue:[
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2243
	canChangeLanguageHolder := ValueHolder with: true.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2244
    ].
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2245
    ^ canChangeLanguageHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2246
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2247
    "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
  2248
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2249
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2250
canChangeLanguageHolder:something
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2251
    "set the 'canChangeLanguageHolder' value holder (automatically generated)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2252
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2253
    canChangeLanguageHolder := something.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2254
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2255
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2256
cursorColHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2257
    cursorColHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2258
        cursorColHolder := IndirectValue for:(ValueHolder with:1)
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2259
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2260
    ^ cursorColHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2261
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2262
    "Created: / 22-01-2011 / 11:36:00 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2263
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2264
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2265
cursorColLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2266
    ^ BlockValue 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2267
            with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]]
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2268
            argument:self cursorColHolder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2269
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2270
    "Created: / 22-01-2011 / 11:36:08 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2271
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2272
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2273
cursorLineAndColumnLabelHolder
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2274
    cursorLineAndColumnLabelHolder isNil ifTrue:[
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2275
        cursorLineAndColumnLabelHolder := IndirectValue for:(ValueHolder with:1)
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2276
    ].
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  2277
    ^ cursorLineAndColumnLabelHolder
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2278
!
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  2279
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2280
cursorLineHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2281
    cursorLineHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2282
        cursorLineHolder := IndirectValue for:(ValueHolder with:1)
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2283
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2284
    ^ cursorLineHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2285
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2286
    "Created: / 22-01-2011 / 11:35:22 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2287
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2288
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2289
cursorLineLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2290
    ^ BlockValue 
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2291
            with:[:v | v isNil ifTrue:[''] ifFalse:[v printString]]
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2292
            argument:self cursorLineHolder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2293
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2294
    "Modified: / 22-01-2011 / 11:42:56 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2295
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2296
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2297
doItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2298
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2299
    ^ self doItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2300
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2301
    "Modified: / 17-12-2013 / 16:35:05 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2302
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2303
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2304
doItMenuButtonVisible
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2305
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2306
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2307
    "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
  2308
!
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2309
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2310
hasHistory
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2311
    ^ Workspace doItHistory notEmptyOrNil.
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2312
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2313
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2314
hasInfoLabel
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2315
    ^ true
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2316
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2317
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2318
inspectItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2319
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2320
    ^ self inspectItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2321
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2322
    "Modified: / 17-12-2013 / 16:35:17 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2323
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2324
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2325
inspectItMenuButtonVisible
8133
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2326
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2327
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2328
    "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
  2329
!
8b09d048b345 doIt button only in smalltalks workspace
Claus Gittinger <cg@exept.de>
parents: 8111
diff changeset
  2330
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2331
languageInfoLabelHolder
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2332
    ^ BlockValue
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2333
        with:[:syntax | 
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2334
                syntax notNil ifTrue:[
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2335
                    "'Syntax: ',"syntax name 
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2336
                ] ifFalse:[
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  2337
                    'Text'
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2338
                ]
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  2339
             ]
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2340
        argument:self syntaxHolder
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2341
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  2342
    "Modified: / 19-07-2012 / 16:53:30 / cg"
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2343
!
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2344
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2345
modeLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2346
    modeLabelHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2347
        modeLabelHolder := IndirectValue for:(ValueHolder with:'I')
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2348
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2349
    ^ modeLabelHolder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2350
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2351
    "Created: / 22-01-2011 / 11:37:25 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2352
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2353
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2354
namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2355
    namespaceHolder isNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2356
        namespaceHolder := self defaultNameSpaceForDoIts asValue.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2357
        namespaceHolder onChangeSend:#setNameSpaceForDoIts to:self
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2358
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2359
    ^ namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2360
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2361
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2362
namespaceInfoLabelHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2363
    ^ BlockValue
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2364
        with:[:ns | 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2365
                ns notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2366
                    ns name
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2367
                ] ifFalse:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2368
                    ''
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2369
                ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2370
             ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2371
        argument:self namespaceHolder
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2372
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2373
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2374
printItMenuButtonVisibile
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2375
    "/ typo in previous version
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2376
    ^ self printItMenuButtonVisible
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2377
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2378
    "Modified: / 17-12-2013 / 16:35:11 / cg"
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2379
!
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2380
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2381
printItMenuButtonVisible
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2382
    ^ self thisIsASmalltalkWorkspace
13728
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2383
01b72a80639e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13690
diff changeset
  2384
    "Created: / 17-12-2013 / 16:34:23 / cg"
8226
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2385
!
ad5a7ea9fbcd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8147
diff changeset
  2386
14060
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2387
profileItMenuButtonVisible
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2388
    ^ self thisIsASmalltalkWorkspace
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2389
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2390
    "Created: / 17-12-2013 / 16:34:04 / cg"
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2391
!
fef6bc962708 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13949
diff changeset
  2392
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2393
setWindowLabel: label 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2394
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2395
    self setWindowLabel: label language: self syntaxHolder value
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2396
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2397
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2398
setWindowLabel: label language: language
11624
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2399
    |languageName|
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2400
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2401
    language notNil ifTrue:[
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2402
	languageName := ' - ', language name.
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2403
    ] ifFalse:[
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2404
	languageName := ''.
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2405
    ].
5bc518c53f85 Care for nil language
Stefan Vogel <sv@exept.de>
parents: 11615
diff changeset
  2406
    self window label:label, ' - ' , languageName
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2407
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2408
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2409
smalltalkMenuEnabledHolder
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2410
    smalltalkMenuEnabledHolder isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2411
        smalltalkMenuEnabledHolder := ValueHolder with:true.
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2412
    ].
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2413
    ^ smalltalkMenuEnabledHolder
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2414
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2415
15046
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2416
syntax:aProgrammingLanguageOrNil
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2417
    "the argument must sth. like SmalltalkLanguage"
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2418
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2419
    self syntaxHolder value:aProgrammingLanguageOrNil
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2420
!
0441bc4caefc class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14837
diff changeset
  2421
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2422
syntaxHolder
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2423
    syntaxHolder isNil ifTrue:[
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2424
        syntaxHolder := self defaultEvaluatorSyntax asValue.
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2425
        syntaxHolder onChangeSend:#setCompilerForSyntax to:self
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2426
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  2427
    ^ syntaxHolder
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2428
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2429
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2430
toolBarView
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2431
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2432
    toolBarView isNil ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2433
        toolBarView := SubCanvas new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2434
        toolBarView level: 0.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2435
        toolBarView client: self spec: #toolBarSpec builder: builder.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2436
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2437
    ^toolBarView
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2438
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2439
    "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
  2440
    "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
  2441
! !
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2442
4358
b0023a5ca3b8 category change
Claus Gittinger <cg@exept.de>
parents: 4313
diff changeset
  2443
!WorkspaceApplication methodsFor:'aspects-queries'!
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  2444
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2445
anyWorkspaceVariableIsDefined
6267
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2446
    ^ Workspace anyWorkspaceVariableIsDefined
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2447
ebcb6b917498 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6266
diff changeset
  2448
    "Modified: / 20-04-2005 / 11:57:59 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2449
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2450
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2451
canAddBookmark
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2452
16259
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2453
    | ws |
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2454
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2455
    ws := self selectedWorkspace scrolledView.
16259
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2456
    ws isTextView ifFalse:[^ true].
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2457
bc7095fc6c42 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16244
diff changeset
  2458
    ^ ws defaultFileNameForFileDialog notNil.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2459
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2460
    "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
  2461
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2462
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2463
isSQLWorkspaceAvailable
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2464
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2465
    ^(Smalltalk at:#'SQL::WorkspacePage') notNil
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2466
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2467
    "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
  2468
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2469
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2470
isSQLWorkspaceSelected
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2471
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2472
    builder isNil ifTrue:[self createBuilder].
14168
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2473
    ^ builder bindings at: #isSQLWorkspaceSelected ifAbsentPut: [
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2474
        BlockValue
14168
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2475
            with:[:ignored|
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2476
                self selectedWorkspaceApplication isKindOf: (Smalltalk at:#'SQL::WorkspacePage')
f3b4d93f0481 class: WorkspaceApplication
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 14060
diff changeset
  2477
            ]
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2478
            argument: self selectedWorkspaceIndexHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2479
    ]
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2480
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2481
    "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
  2482
    "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
  2483
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  2484
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2485
isWebBrowserAvailable
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2486
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2487
    ^(Smalltalk at:#WebKitView) notNil
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2488
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2489
    "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
  2490
!
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2491
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2492
selectedWorkspaceIsTextView
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2493
    ^ self selectedWorkspacesTextView notNil
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2494
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2495
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2496
!WorkspaceApplication methodsFor:'autofetch selection'!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2497
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2498
autoFetchSelection
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2499
    ^ clipBoardWatcherProcess notNil
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2500
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2501
    "Created: / 16-11-2010 / 14:55:39 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2502
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2503
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2504
autoFetchSelection:aBoolean
14746
02985a863ca2 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14724
diff changeset
  2505
    Screen current isWindowsPlatform ifTrue:[
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2506
        aBoolean ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2507
            self startClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2508
        ] ifFalse:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2509
            self stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2510
        ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2511
        ^ self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2512
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2513
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2514
    aBoolean ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2515
        self window windowGroup addPreEventHook:self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2516
        device addSelectionHandler:self
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2517
    ] ifFalse:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2518
        self window windowGroup removePreEventHook:self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2519
        device removeSelectionHandler:self
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2520
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2521
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2522
    "Created: / 16-11-2010 / 14:34:15 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2523
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2524
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2525
autoFetchSelectionLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2526
    fetchClipboardLines isNil ifTrue:[
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2527
        fetchClipboardLines := ValueHolder with:true
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2528
    ].
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2529
    ^ fetchClipboardLines
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2530
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2531
    "Created: / 04-02-2011 / 17:52:34 / cg"
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2532
!
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2533
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2534
itemFromClipboard
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2535
    |text|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2536
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2537
    text := self window getClipboardText.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2538
    (text notNil and:[text isString]) ifTrue:[
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2539
        self autoFetchSelectionLines value ifTrue:[
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2540
            text := text , Character cr
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2541
        ].
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2542
        self paste:text.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2543
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2544
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2545
    "Created: / 16-11-2010 / 14:44:26 / cg"
9735
1b63cac6a018 class definition
Claus Gittinger <cg@exept.de>
parents: 9695
diff changeset
  2546
    "Modified: / 04-02-2011 / 17:53:46 / cg"
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2547
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2548
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2549
startClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2550
    clipBoardWatcherProcess isNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2551
        ClipBoardFetchingInstance notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2552
            ClipBoardFetchingInstance stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2553
        ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2554
        clipBoardWatcherProcess := 
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2555
            [
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2556
                [true] whileTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2557
                    self waitForClipBoardToChange.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2558
                ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2559
            ] newProcess.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2560
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2561
        clipBoardWatcherProcess resume.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2562
        ClipBoardFetchingInstance := self.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2563
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2564
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2565
    "Created: / 16-11-2010 / 14:35:55 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2566
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2567
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2568
stopClipboardWatcher
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2569
    |p|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2570
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2571
    (p := clipBoardWatcherProcess) notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2572
        ClipBoardFetchingInstance := nil.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2573
        clipBoardWatcherProcess := nil.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2574
        p terminate
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2575
    ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2576
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2577
    "Created: / 16-11-2010 / 14:36:12 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2578
!
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2579
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2580
waitForClipBoardToChange
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2581
    |prev|
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2582
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2583
    prev := self window getClipboardText.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2584
    [ 
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2585
        Delay waitForSeconds:0.2.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2586
        self window getClipboardText = prev
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2587
    ] whileTrue.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2588
    self itemFromClipboard.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2589
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2590
    "Created: / 16-11-2010 / 14:44:05 / cg"
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2591
! !
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  2592
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2593
!WorkspaceApplication methodsFor:'defaults'!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2594
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2595
defaultEvaluatorSyntax
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2596
    LastLanguage notNil ifTrue:[^ LastLanguage].
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2597
    ^ SmalltalkLanguage instance.
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2598
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  2599
    "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
  2600
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2601
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2602
defaultFileNameForLoad
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2603
   ^ 'file.wsp'
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2604
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2605
    "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
  2606
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2607
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2608
defaultFileNameForSave
8324
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2609
    |ws|
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2610
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2611
    ws := self selectedWorkspace scrolledView.
8324
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2612
    ws isTextView ifFalse:[
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2613
        "/ eval-ws
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2614
        ^ super defaultFileNameForSave
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2615
    ].
54fa3ea4a301 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8323
diff changeset
  2616
    ^ ws defaultFileNameForFileDialog ? super defaultFileNameForSave
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
    "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
  2619
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2620
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2621
defaultFileNameForSaveAll
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2622
   ^ 'file.wsp'
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2623
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2624
    "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
  2625
!
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2626
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2627
defaultNameSpaceForDoIts
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2628
    LastNamespace notNil ifTrue:[^ LastNamespace].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2629
    ^ Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2630
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  2631
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2632
defaultPatternLoad
8032
d4099cd34621 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7944
diff changeset
  2633
   ^ '*.wsp; *.txt; *.rc'
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2634
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2635
    "Created: / 25-10-2006 / 14:57:25 / cg"
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2636
!
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2637
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2638
executeMenuVisible 
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2639
    ^ self thisIsASmalltalkWorkspace
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2640
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2641
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2642
thisIsASmalltalkWorkspace
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  2643
    "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
  2644
     (expecco uses workspaces as scratchpads)"
7866
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2645
122d1ea32cb4 UI cleanup
Claus Gittinger <cg@exept.de>
parents: 7865
diff changeset
  2646
    ^ true
7474
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2647
! !
f18ef25a1ca6 refactored to allow for standAlone multiTab editors
Claus Gittinger <cg@exept.de>
parents: 7461
diff changeset
  2648
9372
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2649
!WorkspaceApplication methodsFor:'drag & drop'!
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2650
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2651
droppedFile:aFilename in:aComponent
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2652
    "this is a notification from my textView component"
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2653
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2654
    self 
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2655
        renameWorkspace:(self selectedWorkspaceIndexHolder value)
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2656
        to:aFilename asFilename baseName
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2657
! !
3727c6e226cf added: #droppedFile:in:
Claus Gittinger <cg@exept.de>
parents: 9341
diff changeset
  2658
17390
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  2659
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2660
!WorkspaceApplication methodsFor:'help'!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2661
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2662
flyByHelpSpec
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2663
    "/ dynamically adjust the menuSave item's flyByhelpText
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2664
    ^ self updateHelpSpec:(super flyByHelpSpec)
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2665
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2666
    "Created: / 05-07-2011 / 15:42:25 / cg"
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2667
!
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2668
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2669
updateHelpSpec:aSpec
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2670
    |file ws|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2671
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2672
    "/ dynamically adjust the menuSave item's flyByhelpText
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2673
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2674
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2675
        file := ws defaultFileNameForFileDialog.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2676
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2677
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2678
    aSpec
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2679
        at:#menuSaveOrSaveAs 
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2680
        put:(file isNil ifTrue:[aSpec at:#menuSaveAs] ifFalse:[aSpec at:#menuSave]).
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2681
10277
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2682
    OperatingSystem isMSWINDOWSlike ifTrue:[
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2683
        aSpec
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2684
            at:#addTerminal 
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2685
            put:(aSpec at:#addTerminalWindows).
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2686
757b33acd93c changed:
Claus Gittinger <cg@exept.de>
parents: 10220
diff changeset
  2687
    ].
10220
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2688
    ^ aSpec
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2689
068c79fa091c useless code removed
Claus Gittinger <cg@exept.de>
parents: 10169
diff changeset
  2690
    "Created: / 06-07-2011 / 16:32:13 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2691
! !
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2692
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2693
!WorkspaceApplication methodsFor:'initialization & release'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2694
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2695
closeRequest
6636
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  2696
    "asks for permission before closing"
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  2697
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  2698
    (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
  2699
        ^ self
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2700
    ].
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2701
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2702
    ^ super closeRequest
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2703
!
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2704
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2705
initialSyntax: aLanguage
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2706
    self syntaxHolder value: aLanguage.
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2707
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2708
    "Created: / 26-04-2012 / 12:26:48 / cg"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2709
!
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  2710
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2711
postBuildEditModeInfoLabel:aLabel
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2712
    aLabel menuHolder:self; menuMessage:#editModeInfoLabelMenu.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2713
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2714
    "Created: / 22-01-2011 / 11:32:57 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2715
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2716
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2717
postBuildWith:aBuilder
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  2718
    super postBuildWith:aBuilder.
9381
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2719
    self setCompilerForSyntax.
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2720
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2721
    self infoVisibilityChanged.         "/ force geometry update
7839c9193cfa added:5 methods
Claus Gittinger <cg@exept.de>
parents: 9372
diff changeset
  2722
    self autoDefineVariablesChanged.    "/ force workspaceView update
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2723
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2724
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2725
postOpenWith:aBuilder
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2726
    self windowGroup addPreEventHook:self.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2727
    super postOpenWith:aBuilder.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2728
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2729
    "Created: / 22-01-2011 / 12:09:20 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  2730
    "Modified: / 08-02-2011 / 21:33:49 / cg"
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2731
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2732
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2733
processEvent:anEvent
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2734
    "filter double click in line-label.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2735
     Return true, if I have eaten the event"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2736
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2737
    anEvent isButtonMultiPressEvent ifTrue:[
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2738
        anEvent view name = 'CursorLineLabel' ifTrue:[
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2739
            self selectedWorkspace scrolledView gotoLine.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2740
            ^ true
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2741
        ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2742
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2743
    ^ false
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2744
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  2745
    "Created: / 22-01-2011 / 12:10:01 / cg"
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2746
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2747
4359
35995cc972f7 category change
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  2748
!WorkspaceApplication methodsFor:'menu-actions'!
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2749
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2750
askForFilterBlock:message template:template rememberIn:nameOfClassVar
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2751
    |filterBlockString filterBlock dialog textHolder classVarValue|
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2753
    classVarValue := self class classVarAt:nameOfClassVar ifAbsent:nil.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2754
    classVarValue isNil ifTrue:[
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2755
        self class classVarAt:nameOfClassVar put:template. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2756
        classVarValue := template.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2757
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2758
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2759
    textHolder := ValueHolder new.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2760
    dialog := Dialog 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2761
                 forRequestText:(resources string:message)
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  2762
                 editViewClass:CodeView
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2763
                 lines:25 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2764
                 columns:70
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2765
                 initialAnswer:classVarValue
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2766
                 model:textHolder.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2767
    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
  2768
    dialog open.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2769
    dialog accepted ifFalse:[^ nil].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2770
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2771
    filterBlockString := textHolder value.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2772
    self class classVarAt:nameOfClassVar put:filterBlockString. 
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2773
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2774
    filterBlock := Parser evaluate:filterBlockString.
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2775
    filterBlock isBlock ifFalse:[
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  2776
        self error:'bad input for block' mayProceed:true.
3752
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2777
        ^ nil
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2778
    ].
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2779
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2780
    ^ filterBlock
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2781
!
79378c1f0faf filters and processors
Claus Gittinger <cg@exept.de>
parents: 3736
diff changeset
  2782
4474
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2783
autoDefineVariablesChanged
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2784
    |autoDefine|
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2785
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2786
    autoDefine := autoDefineVariables value.
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2787
    UserPreferences current autoDefineWorkspaceVariables:(autoDefine == #workspace).
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2788
    workspaces do:[:each |
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2789
        each autoDefineVariables:autoDefine
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2790
    ].
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2791
!
92facdb5ecc4 autoDefine as doIt added
Claus Gittinger <cg@exept.de>
parents: 4369
diff changeset
  2792
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2793
basicInspectIt
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2794
    self inspectIt:true
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2795
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2796
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2797
browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2798
    self selectedWorkspacesTextView browseImplementorsOfIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2799
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2800
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2801
browseIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2802
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2803
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2804
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2805
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2806
        ws browseIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2807
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2808
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2809
3383
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2810
browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2811
    self selectedWorkspacesTextView browseReferencesToIt
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2812
!
fb3b6909bd1a + browseReferencesToIt & browserImplementorsOfIt
Claus Gittinger <cg@exept.de>
parents: 3347
diff changeset
  2813
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2814
clearHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2815
    Workspace clearDoItHistory
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2816
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  2817
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2818
compareTextAgainst
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2819
    |ws otherText thisText|
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2820
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2821
    ws := self selectedWorkspace scrolledView.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2822
    ws isTextView ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2823
        ^ self 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2824
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2825
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2826
    ws hasSelection ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2827
        thisText := ws selectionAsString.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2828
    ] ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2829
        thisText := ws contents asString.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2830
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2831
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2832
    otherText := Dialog requestText:'Paste other text below:'.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2833
    otherText isEmptyOrNil ifTrue:[^ self ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2834
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2835
    DiffTextView 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2836
        openOn: thisText label: 'Workspace' 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2837
        and: otherText label: 'Other Text' 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2838
        title: 'Comparing Workspace Contents'
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2839
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2840
    "Created: / 04-05-2012 / 15:35:32 / cg"
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2841
!
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  2842
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2843
doIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2844
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2845
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2846
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2847
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2848
        ws doIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2849
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2850
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2851
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2852
inspectIt
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2853
    self inspectIt:false
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2854
!
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2855
4086
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
  2856
inspectIt:isBasicInspector
9f685ed7ad3f autodefine workspace variables
Claus Gittinger <cg@exept.de>
parents: 4031
diff changeset
  2857
    |ws|
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2858
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  2859
    ws := self selectedWorkspacesTextView.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2860
    ws isNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2861
        "there is none - i.e. it is a HTMLDocumentView"
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2862
        ^ self.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  2863
    ].
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2864
    ws
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2865
        do:(ws selection) 
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2866
        withValueDo:[:result | 
4096
1c393b3edbcd Workspace-Variable inspector
Claus Gittinger <cg@exept.de>
parents: 4086
diff changeset
  2867
                        self addInspectorOn:result basic:isBasicInspector suppressPseudoSlots:false
3196
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2868
                    ]
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2869
86540e27b2e0 inspecting
Claus Gittinger <cg@exept.de>
parents: 3195
diff changeset
  2870
"/    self selectedWorkspace inspectIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2871
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  2872
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2873
inspectWorkspaceVariables
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2874
    |wsvars|
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2875
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2876
    wsvars := Workspace workspaceVariables.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2877
    wsvars size == 0 ifTrue:[
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2878
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2879
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2880
    ].
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2881
    wsvars inspect
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2882
!
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  2883
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2884
loadFile:aFileName encoding:encodingSymbolOrNil label:label
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2885
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2886
    "This small hack allows programmers to have their own
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2887
    MyWorkspace.wsp in their ~/.smalltalk directory"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2888
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2889
    | f |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2890
    f := aFileName asFilename.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2891
    (f exists not and:[f isAbsolute not]) ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2892
    f := Filename homeDirectory / '.smalltalk' / f pathName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2893
    f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2894
        (aFileName = 'MyWorkspace.wsp') 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2895
            ifTrue:
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2896
                [| s|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2897
                s := f writeStream.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2898
                [s nextPutAll:'"Edit and save as  ', f pathName , '"']
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2899
                    ensure:[s close]]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2900
            ifFalse:
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2901
                [f := aFileName asFilename]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2902
    ]].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2903
    ^super loadFile:f pathName encoding:encodingSymbolOrNil label:label
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2904
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2905
    "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
  2906
    "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
  2907
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  2908
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2909
manageSnippets
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2910
    |bindings listOfSnippets removeAction pasteAction
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2911
     hasSelectionHolder removeEnabledHolder pasteEnabledHolder
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2912
     selectedSnippetHolder selectedSnippetsTextHolder selectedSnippetsKeyHolder
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2913
     selectedSnippetsName
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2914
     snippetsDictionary defineEnabledHolder defineAction 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2915
     snippetTextAcceptHolder snippetTextModifiedHolder
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2916
     loadFileAction saveFileAction|
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2917
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2918
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2919
    snippetsDictionary isEmptyOrNil ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2920
        Dialog information:(resources string:'No Snippets to Manage').
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2921
        ^ self.
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2922
    ].
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  2923
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  2924
    listOfSnippets := List withAll:(snippetsDictionary keysSorted).
15273
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2925
    selectedSnippetsTextHolder := ValueHolder with:''.
a6606b8ea2f6 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15234
diff changeset
  2926
    selectedSnippetsKeyHolder := ValueHolder with:''. 
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2927
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2928
    selectedSnippetHolder := nil asValue.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2929
    selectedSnippetHolder 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2930
        onChangeEvaluate:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2931
            (selectedSnippetHolder value) isNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2932
                selectedSnippetsName := nil.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2933
                selectedSnippetsTextHolder value:''.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2934
                selectedSnippetsKeyHolder value:nil.   
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2935
            ] ifFalse:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2936
                selectedSnippetsName := listOfSnippets at:(selectedSnippetHolder value).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2937
                selectedSnippetsKeyHolder value:selectedSnippetsName.   
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2938
                selectedSnippetsTextHolder value:(snippetsDictionary at:selectedSnippetsName).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2939
            ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2940
        ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2941
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  2942
    hasSelectionHolder := BlockValue with:[:m | m value notNil] argument:selectedSnippetHolder.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2943
    removeEnabledHolder := hasSelectionHolder.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  2944
    pasteEnabledHolder := hasSelectionHolder.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2945
    defineEnabledHolder := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2946
            BlockValue 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2947
                with:[:key :text|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2948
                    key notEmptyOrNil
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2949
                    and:[(snippetsDictionary includesKey:key) not
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2950
                         or:[ (snippetsDictionary at:key) ~= text]]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2951
                ] 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2952
                argument: selectedSnippetsKeyHolder argument: selectedSnippetsTextHolder.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2953
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2954
    removeAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2955
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2956
            snippetsDictionary removeKey:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2957
            listOfSnippets remove:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2958
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2959
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2960
    pasteAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2961
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2962
            |text|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2963
            text := snippetsDictionary at:selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2964
            self paste:text
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2965
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2966
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2967
    defineAction := 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2968
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2969
            |originalText newText key|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2970
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2971
            key := selectedSnippetsKeyHolder value.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2972
            key notEmptyOrNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2973
                originalText := snippetsDictionary at:key ifAbsent:nil. "/ selectedSnippetsName.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2974
                newText := selectedSnippetsTextHolder value withoutTrailingSeparators.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2975
                originalText ~= newText ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2976
                    snippetsDictionary at: key put: newText.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2977
                    snippetTextModifiedHolder value:false.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2978
                ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2979
            ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2980
            defineEnabledHolder recomputeValue.
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
  2981
        ].
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2982
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2983
    loadFileAction :=
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2984
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2985
            |file fileSnippets|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2986
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2987
            file := Dialog requestFileName:'Load Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt').
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2988
            file notEmptyOrNil ifTrue:[
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  2989
                LastSnippetFilename := file.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2990
                file asFilename readingFileDo:[:s |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2991
                    fileSnippets := (Object readFrom:s onError:#()) decodeAsLiteralArray.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2992
                ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2993
                fileSnippets notEmptyOrNil ifTrue:[
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2994
                    snippetsDictionary declareAllFrom:fileSnippets.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2995
                    listOfSnippets contents:(snippetsDictionary keysSorted).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2996
                    selectedSnippetHolder value:nil.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2997
                    selectedSnippetsTextHolder value:''.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2998
                    selectedSnippetsKeyHolder value:''. 
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  2999
                ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3000
            ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3001
        ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3002
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3003
    saveFileAction :=
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3004
        [
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3005
            |file|
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3006
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  3007
            file := Dialog requestFileName:'Save Snippet Definition File' default:(LastSnippetFilename ? 'snippets.txt').
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3008
            file notEmptyOrNil ifTrue:[
16260
8811cace9d67 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16259
diff changeset
  3009
                LastSnippetFilename := file.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3010
                file asFilename writingFileDo:[:s |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3011
                    s nextPutLine:'#( Dictionary'.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3012
                    snippetsDictionary keys asSortedCollection do:[:k |
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3013
                        k storeOn:s.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3014
                        s spaces:2.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3015
                        (snippetsDictionary at:k) storeOn:s.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3016
                        s cr.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3017
                    ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3018
                    s nextPutLine:')'.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3019
                ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3020
            ]
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3021
        ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3022
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3023
    bindings := IdentityDictionary new.
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3024
    bindings at:#listOfSnippets put:listOfSnippets.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3025
    bindings at:#selectedSnippet put:selectedSnippetHolder asValue.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3026
    bindings at:#selectedSnippetsKeyHolder put:selectedSnippetsKeyHolder.
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3027
    bindings at:#selectedSnippetsText put:selectedSnippetsTextHolder.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3028
    bindings at:#removeSelectedSnippet put:removeAction.
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3029
    bindings at:#pasteSelectedSnippet put:pasteAction.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3030
    bindings at:#defineSelectedSnippet put:defineAction.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3031
    bindings at:#removeEnabled put:removeEnabledHolder.
8286
acf03e4d7859 manage Sniplets
fm
parents: 8285
diff changeset
  3032
    bindings at:#pasteEnabled put:pasteEnabledHolder.
14837
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3033
    bindings at:#defineEnabled put:defineEnabledHolder.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3034
    bindings at:#menuOpenSnippetFile put:loadFileAction.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3035
    bindings at:#menuSaveSnippetFileAs put:saveFileAction.
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3036
    bindings at:#closeSnippetDialog put:[:a :menu | menu topView closeRequest].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3037
    bindings at:#snippetTextAcceptHolder put:(snippetTextAcceptHolder := TriggerValue new).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3038
    bindings at:#snippetTextModified put:(snippetTextModifiedHolder := TriggerValue new).
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3039
    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
  3040
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3041
    snippetTextModifiedHolder onChangeEvaluate:[snippetTextAcceptHolder value:true. defineEnabledHolder recomputeValue ].
d7de71154d37 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14830
diff changeset
  3042
    selectedSnippetsKeyHolder onChangeEvaluate:[defineEnabledHolder recomputeValue ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3043
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3044
    self openDialogInterface:#manageSnippetsDialogSpec withBindings:bindings
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3045
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3046
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3047
menuSQLConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3048
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3049
    self selectedWorkspaceApplication menuConnect
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3050
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3051
    "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
  3052
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3053
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3054
menuSave
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3055
    |ws file|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3056
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3057
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3058
    ws isTextView ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3059
        self shouldImplement:'Functionality not yet implemented'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3060
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3061
    file := ws defaultFileNameForFileDialog.
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3062
    file 
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3063
        ifNil:[
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3064
            self menuSaveAs.
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3065
            ^ self
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3066
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3067
    ws saveAs:file doAppend:false.
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3068
    ws isCodeView2 ifTrue:[
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3069
        ws beUnmodified
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3070
    ]
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3071
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3072
    "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
  3073
    "Modified (format): / 05-07-2011 / 15:44:27 / cg"
10786
2499584c6260 changed: #menuSave (support for CodeView2 accept/cancel bar)
vrany
parents: 10730
diff changeset
  3074
    "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
  3075
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3076
7403
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3077
newEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3078
    self class openEvaluationWorkspace
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3079
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3080
    "Created: / 13-10-2006 / 12:19:47 / cg"
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3081
!
73712386ea82 menu: open/add evaluation workspace
Claus Gittinger <cg@exept.de>
parents: 6865
diff changeset
  3082
3334
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3083
newSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3084
    self class openSystemWorkspace
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3085
!
3c6e88d38b59 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  3086
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3087
openDocumentation
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3088
    "opens the documentation file"
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3089
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3090
    self openHTMLDocument: 'tools/misc/TOP.html#WORKSPACE'
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3091
!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3092
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3093
openEditingDocumentation
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3094
    "opens the documentation file"
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3095
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3096
    self openHTMLDocument: 'tools/codeeditor.html'
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3097
!
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3098
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3099
pasteAndExecute:aString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3100
    self paste:aString.
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3101
    self printIt
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3102
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3103
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3104
pasteSnippet
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3105
    |allSnippets snippetToPaste snippetsDictionary|
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3106
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3107
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3108
    snippetsDictionary isEmptyOrNil ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3109
        Dialog information:(resources string:'No Snippet to Paste').
7944
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  3110
        ^ self.
3d185d0ca8e9 sharedPool inspection support
Claus Gittinger <cg@exept.de>
parents: 7931
diff changeset
  3111
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3112
    allSnippets := snippetsDictionary keysSorted.
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3113
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3114
    snippetToPaste := Dialog 
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3115
                choose:(resources string:'Paste Snippet:')
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3116
                fromList:allSnippets
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3117
                lines:10.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3118
    snippetToPaste isNil ifTrue:[
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3119
        ^ self
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3120
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3121
    self paste:(snippetsDictionary at:snippetToPaste) withCRs.
9616
77c1a65b95d4 changed: #pasteSniplet
Claus Gittinger <cg@exept.de>
parents: 9569
diff changeset
  3122
77c1a65b95d4 changed: #pasteSniplet
Claus Gittinger <cg@exept.de>
parents: 9569
diff changeset
  3123
    "Modified: / 29-10-2010 / 10:21:29 / cg"
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3124
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3125
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3126
printIt
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3127
    |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3128
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3129
    ws := self selectedWorkspacesTextView.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3130
    ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3131
        ws printIt
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3132
    ]
3193
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  3133
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  3134
12028
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3135
profileIt
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3136
    self selectedWorkspacesTextView profileIt
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3137
!
27d51297e836 added profileIt menu item
Claus Gittinger <cg@exept.de>
parents: 11829
diff changeset
  3138
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3139
redoLastDoIt
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3140
    |s|
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3141
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3142
    s := self lastDoItsString.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3143
    s notNil ifTrue:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3144
        self pasteAndExecute:s
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  3145
    ]
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3146
!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  3147
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3148
removeAllWorkspaceVariables
5846
d959a98a0047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5804
diff changeset
  3149
    (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
  3150
    ifTrue:[
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3151
        Workspace removeAllWorkspaceVariables
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3152
   ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3153
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3154
4284
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3155
removeGlobalVariable
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3156
    |name nameKey selection value|
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3157
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3158
    selection := self selectedWorkspacesTextView selection ? ''.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3159
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3160
    name := Dialog 
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3161
                request:'Remove Global Variable:'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3162
                initialAnswer:(selection asString string)
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3163
                okLabel:'Remove'
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3164
                title:'Remove Global'.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3165
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3166
    name size == 0 ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3167
    nameKey := name asSymbolIfInterned.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3168
    nameKey isNil ifTrue:[^ self].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3169
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3170
    (Smalltalk includesKey:nameKey) ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3171
        self warn:('No such Global Binding: ''%1''.' bindWith:name).
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3172
        ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3173
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3174
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3175
    value := Smalltalk at:nameKey.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3176
    value notNil ifTrue:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3177
        (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
  3178
        ifFalse:[
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3179
            ^ self.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3180
        ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3181
    ].
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3182
    Smalltalk at:nameKey put:nil.
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3183
    Smalltalk removeKey:nameKey
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3184
!
1fd90359b703 addGlobal fixed;
Claus Gittinger <cg@exept.de>
parents: 4267
diff changeset
  3185
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3186
removeSharedPool
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3187
    |poolToRemove|
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3188
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3189
    poolsConsideredInDoIts isEmptyOrNil ifTrue:[
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3190
        Dialog information:'No pools have been added yet'.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3191
        ^ self.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3192
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3193
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3194
    poolToRemove := Dialog 
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3195
                choose:'Pool to Remove (No longer known in doIt-Evaluations):'
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3196
                fromList:(poolsConsideredInDoIts asOrderedCollection sort)
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3197
                lines:10.
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3198
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3199
    poolToRemove isNil ifTrue:[
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3200
        ^ self
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3201
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3202
    poolsConsideredInDoIts remove:poolToRemove.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3203
    workspaces do:[:eachWs |    
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3204
        |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3205
        ws := self workspaceViewOfView:eachWs.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3206
        ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3207
            ws poolsConsideredInDoIts:poolsConsideredInDoIts.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3208
        ].
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3209
    ].
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3210
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3211
    "Modified: / 24-11-2006 / 12:44:16 / cg"
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3212
!
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  3213
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3214
removeWorkspaceVariable
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3215
    |name selection wsVarNames|
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3216
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3217
    wsVarNames := Workspace workspaceVariableNames.
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3218
    wsVarNames isEmpty ifTrue:[
3812
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3219
        Dialog information:'No Workspace Variables are defined'.
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3220
        ^ self
fef8f2db9662 menu item enablement
Claus Gittinger <cg@exept.de>
parents: 3752
diff changeset
  3221
    ].
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3222
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3223
    selection := self selectedWorkspacesTextView selection ? ''.
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3224
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3225
    name := Dialog 
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3226
                request:'Variable to remove:'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3227
                initialAnswer:(selection asString string)
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3228
                okLabel:'Remove'
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3229
                title:'Enter Variable Name'
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3230
                list:(wsVarNames asOrderedCollection sort).      
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3231
    name isEmptyOrNil ifTrue:[
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3232
        ^ self
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3233
    ].
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3234
    Workspace removeWorkspaceVariable:name.
6266
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3235
15c3122497ff *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
  3236
    "Modified: / 20-04-2005 / 11:56:28 / cg"
3722
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3237
!
0a1edec5d83b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3710
diff changeset
  3238
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3239
renameWorkspace:wsIndex to:newName
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3240
    |tabList|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3241
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3242
    tabList := self tabList.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3243
    tabList notEmpty ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3244
        tabList at:wsIndex put:newName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3245
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3246
    wsIndex == self selectedWorkspaceIndexHolder value ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3247
        self setWindowLabel: newName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3248
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3249
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3250
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3251
setCompilerForSyntax
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3252
    |selectedWorkspace ws|
11654
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3253
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3254
    (selectedWorkspace := self selectedWorkspace) notNil ifTrue:[
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3255
        (ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3256
            self setCompilerForSyntaxIn:ws.
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3257
        ]
11654
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3258
    ].
7ac01328f0ef changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11627
diff changeset
  3259
11811
41a4ebfe2da2 changed: #setCompilerForSyntax
Claus Gittinger <cg@exept.de>
parents: 11799
diff changeset
  3260
    "Modified: / 26-09-2012 / 11:55:59 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3261
!
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3262
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3263
setCompilerForSyntaxIn:aWorkspace
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3264
    |compilerClass language|
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3265
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3266
    language := self syntaxHolder value.
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3267
    language isSymbol ifTrue:[
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3268
        language := ProgrammingLanguage named:language  
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3269
    ].
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3270
    language isNil ifTrue:[
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3271
        compilerClass := nil
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3272
    ] ifFalse:[
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3273
        compilerClass := (language evaluatorClass "self compilerClassForSyntaxName:syntax").
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3274
    ].
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3275
    [
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3276
        "/ could be a non-text view (VT100Terminal)
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3277
        aWorkspace compilerClass:compilerClass.
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  3278
        aWorkspace editedLanguage:language.
11826
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3279
    ] on:MessageNotUnderstood do:[].
9f79ac78ed1f changed:
Claus Gittinger <cg@exept.de>
parents: 11811
diff changeset
  3280
11612
445864161db9 changed:
Claus Gittinger <cg@exept.de>
parents: 11496
diff changeset
  3281
    self smalltalkMenuEnabledHolder value:(language notNil and:[language isSmalltalk]).
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3282
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3283
    "Created: / 08-02-2011 / 21:32:39 / cg"
10602
242c8aaa2611 use evaluatorClass, not compilerClass
vrany
parents: 10568
diff changeset
  3284
    "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
  3285
    "Modified: / 28-09-2012 / 19:55:18 / cg"
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3286
!
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  3287
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3288
setNameSpaceForDoIts
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3289
    |selectedWorkspace ws|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3290
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3291
    (selectedWorkspace := self selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3292
        (ws := self workspaceViewOfView:selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3293
            (self compilerClassOf:selectedWorkspace) notNil ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3294
                ws nameSpaceForDoits:(self namespaceHolder value).
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3295
            ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3296
        ]
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3297
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3298
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  3299
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3300
spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3301
    self selectedWorkspacesTextView spyOnIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3302
!
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3303
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3304
switchToBookmarkEntry: bookmark
11829
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3305
    | ws file app |
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3306
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3307
    ws := self selectedWorkspace scrolledView.
11725
0b626c2b4b2d Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 11713
diff changeset
  3308
    (ws isApplicationSubView) ifTrue:[
11829
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3309
        ((app := ws application) respondsTo:#switchToBookmarkEntry:) ifTrue:[
2e8997ff4629 changed: #switchToBookmarkEntry:
Claus Gittinger <cg@exept.de>
parents: 11826
diff changeset
  3310
            app switchToBookmarkEntry: bookmark
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3311
        ].
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3312
        ^ self.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3313
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3314
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3315
    bookmark isFileBookmark ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3316
        file := bookmark path asFilename.
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3317
        (ws isTextView not or:[ws contents notEmpty]) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3318
            self addWindow: (self createWorkspace) named:  file withoutSuffix baseName.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3319
        ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3320
        file exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3321
            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
  3322
        ] ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3323
            self loadFile: file.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3324
        ].
10730
23c04d952143 much faster startup in openMyWorkspace_new
Claus Gittinger <cg@exept.de>
parents: 10602
diff changeset
  3325
        ^ self.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3326
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3327
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3328
    "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
  3329
    "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
  3330
    "Modified: / 28-09-2011 / 07:44:53 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3331
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3332
13413
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3333
terminateBackgroundProcesses
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3334
    Processor activeProcess terminateAllSubprocessesInGroup
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3335
!
1e726d57eeca class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12942
diff changeset
  3336
3384
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3337
timeIt
2be2f7e2a417 + timeIt & spyOnIt
Claus Gittinger <cg@exept.de>
parents: 3383
diff changeset
  3338
    self selectedWorkspacesTextView timeIt
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3339
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  3340
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3341
!WorkspaceApplication methodsFor:'menu-actions-adding'!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3342
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3343
addBookmark
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3344
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3345
    self menuAddBookmarkTo: self bookmarks root.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3346
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3347
    "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
  3348
    "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
  3349
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3350
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3351
addClassVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3352
    |v|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3353
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3354
    ClassVariablesInspectorView isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3355
        self error:'Missing class: "ClassVariablesInspectorView"'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3356
        ^ self.
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
    v := self addInspectorOn:Smalltalk inspectorClass:ClassVariablesInspectorView suppressPseudoSlots:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3359
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3360
    v fieldListLabel:'Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3361
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Class Variables'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3362
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3363
    "Modified: / 22-10-2006 / 11:28:14 / cg"
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
addEvaluationWorkspace
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3367
    ^ self addWindow:(self createEvaluationWorkspace) named:'Eval%1'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3368
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3369
    "Modified: / 13-10-2006 / 12:16:35 / cg"
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
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3372
addGlobalVariable
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3373
    |name nameKey selection|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3374
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3375
    selection := self selectedWorkspacesTextView selection ? ''.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3376
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3377
    name := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3378
                request:'Name of new Global Variable:'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3379
                initialAnswer:(selection asString string)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3380
                okLabel:'Add'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3381
                title:'Enter Variable Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3382
    name size == 0 ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3383
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3384
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3385
    nameKey := name asSymbol.
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
    (Smalltalk includesKey:nameKey) ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3388
        self warn:'Global named ''' , name , ''' already exists.'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3389
        ^ self.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3390
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3391
    Smalltalk at:nameKey put:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3392
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3393
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3394
addGlobalVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3395
    ^ self addNamespaceInspectorFor:Smalltalk
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3396
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3397
    "Modified: / 29-05-2007 / 19:08:58 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3398
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3399
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3400
addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3401
    |inspectorClass|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3402
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3403
    isBasicInspector ifFalse:[
12737
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3404
        "/ Inspector2 does not work yet!!
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3405
        "(Tools::Inspector2 notNil and:[UserPreferences current useInspector2])" false ifTrue:[
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3406
            inspectorClass := Tools::Inspector2.
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3407
        ] ifFalse:[
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3408
            inspectorClass := aValue inspectorClass.
6496bc257aaf class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 12735
diff changeset
  3409
        ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3410
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3411
    inspectorClass isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3412
        inspectorClass := InspectorView
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3413
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3414
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3415
    ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3416
        addInspectorOn:aValue 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3417
        inspectorClass:inspectorClass 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3418
        suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3419
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3420
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3421
addInspectorOn:aValue inspectorClass:inspectorClass suppressPseudoSlots:suppressPseudoSlots
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3422
    |view resultString|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3423
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3424
    view := inspectorClass new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3425
    view suppressPseudoSlots:suppressPseudoSlots.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3426
    view inspect:aValue.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3427
    "/ v allowFollow:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3428
    aValue isBehavior ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3429
        resultString := aValue name
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3430
    ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3431
        resultString := aValue classNameWithArticle
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
    self addWindow:view named:('Inspecting: ' , resultString).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3434
    ^ view
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3435
!
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
addMyWorkspace
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3438
    |ws f|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3439
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3440
    self 
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3441
        addWindow:(ws := self createWorkspaceView)
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3442
        named:'My Workspace'
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3443
        asFirst:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3444
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3445
    f := Filename homeDirectory / 'MyWorkspace.wsp'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3446
    f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3447
        f := Filename homeDirectory / '.smalltalk' / 'MyWorkspace.wsp'.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3448
        f exists ifFalse:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3449
            f := 'MyWorkspace.wsp' asFilename 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3450
        ]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3451
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3452
    f exists ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3453
        self loadFile:f label:'My Workspace'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3454
    ] ifFalse:[
16261
37d84328738a #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 16260
diff changeset
  3455
        ws defaultFileNameForFileDialog: f pathName.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3456
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3457
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3458
    "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
  3459
    "Modified: / 05-07-2011 / 15:39:08 / cg"
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3460
!
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
addNamespaceInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3463
    |ns|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3464
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3465
    ns := Dialog requestNameSpace:'Namespace' initialAnswer:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3466
    ns isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3467
    ^ self addNamespaceInspectorFor:(Smalltalk at:ns asSymbol)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3468
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3469
    "Created: / 29-05-2007 / 19:10:50 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3470
!
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
addNamespaceInspectorFor:aNameSpaceOrSharedPool
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3473
    |v label|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3474
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3475
    SmalltalkInspectorView isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3476
        self error:'Missing class: "SmalltalkInspectorView"'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3477
        ^ nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3478
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3479
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3480
    v := self 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3481
            addInspectorOn:aNameSpaceOrSharedPool 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3482
            inspectorClass:SmalltalkInspectorView 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3483
            suppressPseudoSlots:true.
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
    v fieldListLabel:'Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3486
    aNameSpaceOrSharedPool == Smalltalk ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3487
        label := 'Smalltalk (Globals)'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3488
    ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3489
        aNameSpaceOrSharedPool isSharedPool ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3490
            label := aNameSpaceOrSharedPool name,' (SharedPool)'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3491
        ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3492
            label := aNameSpaceOrSharedPool name,' (Namespace)'
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
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3495
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3496
    self 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3497
        renameWorkspace:(self selectedWorkspaceIndexHolder value) 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3498
        to:label.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3499
    ^ v
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3500
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3501
    "Created: / 29-05-2007 / 19:08:45 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3502
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3503
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3504
addSQLWorkspace
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3505
    |page view |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3506
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3507
    page := (Smalltalk at:#'SQL::WorkspacePage') new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3508
    view := ApplicationSubView new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3509
    view client:page spec:#windowSpec.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3510
    self addWindow:view named:'SQL Workspace %1'.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3511
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3512
    "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
  3513
!
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3514
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3515
addSelectionToSnippets
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3516
    |selection snippetsBaseName snippetsName nr snippetsDictionary|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3517
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3518
    selection := (self selectedWorkspacesTextView selection ? '') asString.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3519
    selection isEmpty ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3520
        Dialog information:(resources string:'Nothing Selected').
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3521
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3522
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3523
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3524
    snippetsBaseName := Dialog request:(resources string:'Name of Snippet:').
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3525
    snippetsBaseName isNil ifTrue:[
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3526
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3527
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3528
    snippetsBaseName isEmpty ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3529
        snippetsBaseName := Time now asString.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3530
    ].
14830
ae72eee69f1c class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14818
diff changeset
  3531
    snippetsDictionary := Workspace snippets.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3532
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3533
    snippetsName := snippetsBaseName.
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3534
    (snippetsDictionary includesKey:snippetsName) ifTrue:[
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3535
        (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
  3536
        ifFalse:[
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3537
            [snippetsDictionary includesKey:snippetsName] whileTrue:[
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3538
                nr := (nr ? 1) + 1.
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3539
                snippetsName := (snippetsBaseName,'(%1)') bindWith:nr
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3540
            ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3541
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3542
    ].
13500
0128772ce63d ouch - sniplet is a type;
Claus Gittinger <cg@exept.de>
parents: 13432
diff changeset
  3543
    snippetsDictionary at:snippetsName put:selection
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3544
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3545
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3546
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3547
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3548
addSharedPool
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3549
    |allPools poolToAdd|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3550
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3551
    allPools := SharedPool allSubclasses collect:[:p | p name].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3552
    allPools removeAll:(poolsConsideredInDoIts ? #()).
9671
a441167cbacd changed: #addSharedPool
Claus Gittinger <cg@exept.de>
parents: 9653
diff changeset
  3553
    allPools sort.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3554
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3555
    poolToAdd := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3556
                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
  3557
                fromList:allPools
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3558
                lines:15.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3559
    poolToAdd isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3560
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3561
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3562
    poolsConsideredInDoIts isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3563
        poolsConsideredInDoIts := (Set new).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3564
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3565
    poolsConsideredInDoIts add:poolToAdd.
11481
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3566
    workspaces do:[:eachWs |    
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3567
        |ws|
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3568
        ws := self workspaceViewOfView:eachWs.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3569
        ws notNil ifTrue:[
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3570
            ws poolsConsideredInDoIts:poolsConsideredInDoIts.
d0a2a73ed69d added: #selectedWorkspaceIsTextView
Stefan Vogel <sv@exept.de>
parents: 11480
diff changeset
  3571
        ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3572
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3573
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3574
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3575
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3576
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3577
addSharedPoolInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3578
    |pool|
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
    pool := Dialog requestSharedPool:'SharedPool' title:nil initialAnswer:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3581
    pool isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3582
    ^ self addNamespaceInspectorFor:(Smalltalk at:pool asSymbol)
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3583
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3584
    "Created: / 29-05-2007 / 19:10:50 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3585
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3586
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3587
addStopWatch
16485
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3588
    |v clockViewClass clock|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3589
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3590
    v := View new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3591
    v viewBackground:Color white.
16485
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3592
    "/ avoid making stx:libwidg3 a prerequisite. 
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3593
    Smalltalk loadPackage:#'stx:libwidg3'. "/ ClockView package
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3594
    clockViewClass := Smalltalk at:#ClockView.
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3595
        
8ed4c3714c75 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16290
diff changeset
  3596
    clock := clockViewClass in:v.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3597
    clock beStopWatch.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3598
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3599
    clock 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3600
        origin:[ 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3601
            |ext|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3602
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3603
            ext := (v height) min:(v width).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3604
            (v extent - ext) // 2
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3605
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3606
        extent:[        
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3607
            |ext|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3608
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3609
            ext := (v height) min:(v width).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3610
            ext @ ext
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3611
        ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3612
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3613
    self addWindow:v named:'StopWatch%1' tabIcon:(ToolbarIconLibrary clock13x13Icon).
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3614
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3615
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3616
addTeaTimer
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3617
    "you think that is a useless gimmick ?
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3618
     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
  3619
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3620
    |l dt tEnd dur answer confirmed confirmButton|
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3621
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3622
    dt := LastTeaWaitTime ? (3*60).
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3623
    answer := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3624
                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
  3625
                initialAnswer:(TimeDuration seconds:dt) printString.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3626
    answer isEmptyOrNil ifTrue:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3627
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3628
    "/ allow 3 formats:
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3629
    "/  hh:mm:ss       -> endTime
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3630
    "/  nnn s          -> x seconds
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3631
    "/  nnn m          -> x minutes
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3632
    "/  nnn h          -> x hours
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3633
    "/  nnn            -> seconds
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
    tEnd := Time readFromString:answer onError:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3636
    tEnd isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3637
        dur := TimeDuration readFromString:answer onError:nil.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3638
        dur isNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3639
            dt := Number readFromString:answer onError:[^ self].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3640
            LastTeaWaitTime := dt.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3641
            tEnd := Timestamp now addSeconds:dt.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3642
        ] ifFalse:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3643
            dt := dur asSeconds.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3644
            tEnd := Timestamp now + dur.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3645
        ].                
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3646
    ] ifFalse:[
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3647
        tEnd < Time now ifTrue:[
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3648
            (Dialog confirm:'Tomorrow ?') ifFalse:[^ self].
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3649
            tEnd := tEnd asTimestamp addDays:1.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3650
            dt := tEnd - Timestamp now.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3651
        ] ifFalse:[
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3652
            dt := tEnd - Time now.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3653
            tEnd := tEnd asTimestamp.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3654
        ].
8763
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
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3657
    l := Label new.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3658
    l sizeFixed:true.
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3659
    l label:'Waiting... [', dt printString, ']'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3660
    l viewBackground:Color red.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3661
    confirmButton := (Button label:'OK') action:[ confirmed := true. confirmButton beInvisible. ].
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3662
    confirmButton beInvisible.
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3663
    l add:confirmButton.
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3664
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3665
    self addWindow:l named:'TeaTimer%1' tabIcon:(ToolbarIconLibrary clock13x13Icon).
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3666
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3667
    [
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3668
        Error handle:[ 
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3669
            self error:'check this, please'.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3670
            #intentionallyLeftBlank
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3671
        ] do:[
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3672
            |remaining wg waitTime|
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3673
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3674
            waitTime := TimeDuration fromSeconds:1.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3675
            confirmed := false.
11480
2297d5c64763 changed:
Stefan Vogel <sv@exept.de>
parents: 11235
diff changeset
  3676
            [Timestamp now < tEnd ] whileTrue:[
14368
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3677
                remaining := (tEnd - Timestamp now) roundTo:waitTime.
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3678
                l label:'Waiting... [', remaining printString, ']'.
28b6912793b5 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14358
diff changeset
  3679
                Delay waitFor:waitTime.
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3680
            ].
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3681
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3682
            l label:'TEA is ready !!'.
12735
44e8ea95cd2f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12699
diff changeset
  3683
            self window topView raiseDeiconified.
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3684
            "/ could have been removed in the meantime....
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3685
            (wg := confirmButton windowGroup) notNil ifTrue:[
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3686
                confirmButton beVisible.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3687
                wg repairDamage.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3688
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3689
                [ confirmed ] whileFalse:[
12735
44e8ea95cd2f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12699
diff changeset
  3690
                    self window topView raiseDeiconified.
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3691
                    3 timesRepeat:[ l beep. Delay waitForSeconds:0.4 ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3692
                    Delay waitForSeconds:5.
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3693
                ].
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3694
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3695
                l viewBackground:Color green.
9569
e090ccd7a651 changed: #addTeaTimer
Claus Gittinger <cg@exept.de>
parents: 9381
diff changeset
  3696
            ].
8763
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3697
        ]
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3698
    ] fork.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3699
9632
9d8ae77bc7d2 +autofetchSelection
Claus Gittinger <cg@exept.de>
parents: 9616
diff changeset
  3700
    "Modified: / 16-11-2010 / 14:54:05 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3701
    "Modified (comment): / 05-07-2011 / 14:30:48 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3702
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3703
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3704
addTerminal
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3705
    | v termView |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3706
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3707
    (OperatingSystem isUNIXlike 
14457
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3708
            "/ 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
  3709
            and:[UserPreferences current useXTermViewIfAvailable 
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3710
            and:[XTermView notNil 
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  3711
            and:[XTermView isAvailable]]]) ifTrue:[
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3712
        v := termView := XTermView new
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3713
    ] ifFalse:[
14457
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3714
        VT100TerminalView isNil ifTrue:[
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3715
            Dialog warn:('Missing class: ' , 'VT100TerminalView' allBold).
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3716
            AbortOperationRequest raise 
75bcb6c122a7 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14446
diff changeset
  3717
        ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3718
        v := (HVScrollableView for:VT100TerminalView).
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3719
        termView := v scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3720
        v autoHideScrollBars:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3721
        v horizontalMini:true.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3722
        "/ 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
  3723
        "/ do it later (after adding to myself)
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3724
"/        termView startShellIn: Filename currentDirectory asString.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3725
    ].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3726
14804
3cd896cf9959 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14747
diff changeset
  3727
    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
  3728
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3729
    termView shellTerminateAction:[ termView cr; nextPutLine:'*** shell terminated ***' allBold; cr.].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3730
    termView startShellIn: Filename currentDirectory asString.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3731
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3732
    "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
  3733
    "Modified: / 05-07-2011 / 14:42:39 / cg"
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3734
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3735
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3736
addWebBrowser
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3737
    |view browser|
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3738
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3739
    browser := Tools::WebBrowserPage new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3740
    browser toolBarVisibleHolder value:false.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3741
    view := ApplicationSubView new.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3742
    view client:browser spec:#windowSpec.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  3743
    self addWindow:view named:'Web Browser %1'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3744
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3745
    "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
  3746
    "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
  3747
    "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
  3748
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3749
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3750
addWorkspaceVariable
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3751
    |name selectedWorkspacesTextView selection|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3752
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3753
    selectedWorkspacesTextView := self selectedWorkspacesTextView.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3754
    selectedWorkspacesTextView notNil ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3755
        selection := selectedWorkspacesTextView selection.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3756
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3757
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3758
    name := Dialog 
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3759
                request:'Name of new Workspace Variable:'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3760
                initialAnswer:(selection ? '') asString string
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3761
                okLabel:'Add'
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3762
                title:'Enter Variable Name'.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3763
    name size == 0 ifTrue:[
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3764
        ^ self
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3765
    ].
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3766
    Workspace addWorkspaceVariable:name.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3767
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3768
    "Modified: / 24-11-2006 / 12:44:16 / cg"
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3769
!
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3770
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3771
addWorkspaceVariableInspector
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3772
    |v|
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3773
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3774
    v := self addInspectorOn:(Workspace workspaceVariables) basic:false suppressPseudoSlots:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3775
    v dereferenceValueHolders:true.
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3776
    v fieldListLabel:'Name'.
9085
Claus Gittinger <cg@exept.de>
parents: 9059
diff changeset
  3777
    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Workspace Variables'.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3778
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3779
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3780
menuAddBookmarkTo: folder
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3781
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3782
    | ws file |
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3783
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3784
    ws := self selectedWorkspace scrolledView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3785
    ws isTextView ifTrue:[
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3786
        file := ws defaultFileNameForFileDialog.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3787
        file ifNotNil:[folder add: (Bookmark forFile: file)].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3788
        folder model save.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3789
    ] ifFalse:[
11480
2297d5c64763 changed:
Stefan Vogel <sv@exept.de>
parents: 11235
diff changeset
  3790
        self shouldImplement
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3791
    ]
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3792
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3793
    "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
  3794
! !
22ea00721dff time parsing fix
Claus Gittinger <cg@exept.de>
parents: 8709
diff changeset
  3795
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3796
!WorkspaceApplication methodsFor:'menu-actions-editing'!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3797
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3798
babelFishTranslate:fromToModeString
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3799
    "translate the selected text and paste it after the selection.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3800
     This is now obsolete, as that web service no longer exists (sigh)"
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3801
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3802
    SOAP::BabelFishClient isNil ifTrue:[
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3803
        Dialog information:'Sorry the SOAP-BabelFish translation-client is not available'.
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3804
        ^ self.
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3805
    ].
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3806
    self selectedWorkspace babelFishTranslate:fromToModeString
9653
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3807
182914cebad5 changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 9635
diff changeset
  3808
    "Modified: / 01-12-2010 / 12:24:34 / cg"
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3809
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3810
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3811
changesBrowserOnText
11713
3073bed82974 changed: #changesBrowserOnText
Claus Gittinger <cg@exept.de>
parents: 11654
diff changeset
  3812
    (UserPreferences current changeSetBrowserClass) 
7831
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3813
        openOn:(ChangeSet fromStream:self selectedWorkspacesTextView contentsAsString readStream)
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3814
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3815
    "Created: / 27-08-2007 / 10:57:30 / cg"
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3816
!
afaba61f009f +changeList on text
Claus Gittinger <cg@exept.de>
parents: 7825
diff changeset
  3817
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3818
editBookmarks
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3819
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3820
    BookmarkListEditor new
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3821
        bookmarkList: self bookmarks;
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3822
        open.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3823
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3824
    "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
  3825
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  3826
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3827
editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3828
    self selectedWorkspace editModeInsert
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3829
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3830
    "Created: / 22-01-2011 / 11:51:12 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3831
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3832
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3833
editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3834
    self selectedWorkspace editModeInsertAndSelect
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3835
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3836
    "Created: / 22-01-2011 / 11:52:52 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3837
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3838
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3839
editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3840
    self selectedWorkspace editModeOverwrite
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3841
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3842
    "Created: / 22-01-2011 / 11:52:15 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3843
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  3844
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3845
fileInText
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3846
    "filein the selected workspace's contents as if read from a file"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3847
5261
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3848
    self selectedWorkspacesTextView contentsAsString readStream fileIn
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3849
!
Claus Gittinger <cg@exept.de>
parents: 5196
diff changeset
  3850
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3851
filterText
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3852
    "a filterblock is asked for, which is applied to the
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3853
     selected line range.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3854
     Each line for which the filter evaluats to false is removed"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3855
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3856
    |template filterBlock newList oldList answer nDeleted deletedLines
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3857
     prevLine nextLine line|
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3858
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3859
    template := self class filterTemplate.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3860
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3861
    filterBlock := self askForFilterBlock:'Filter block (to remove lines):'
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3862
                        template:template
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3863
                        rememberIn:#LastFilterBlockString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3864
    filterBlock isNil ifTrue:[^ self].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3865
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3866
    oldList := self selectedWorkspacesTextView list.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3867
    newList := StringCollection new.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3868
    deletedLines := OrderedCollection new.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3869
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3870
    oldList notEmptyOrNil ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3871
        line := nil.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3872
        nextLine := oldList at: 1.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3873
        1 to: oldList size do:[:lineNr |
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3874
            prevLine := line.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3875
            line := nextLine.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3876
            nextLine := oldList at: lineNr + 1 ifAbsent: nil.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3877
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3878
            (filterBlock 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3879
                value:(line ? '') 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3880
                value: lineNr 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3881
                value: (prevLine ? '')  
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3882
                value: (nextLine ? '') 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3883
            ) ifTrue: [
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3884
                newList add: line
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3885
            ] ifFalse:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3886
                deletedLines add: line.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3887
            ]
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3888
        ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3889
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3890
        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
  3891
    ].
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3892
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3893
    nDeleted := deletedLines size.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3894
    nDeleted == 0 ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3895
        self information:'No lines were deleted.'.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3896
        ^ self
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3897
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3898
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3899
    answer := OptionBox 
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3900
                request:(resources 
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3901
                        string:'%1 lines remain (%2 deleted). Change text ?'
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3902
                        with:newList size
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3903
                        with:nDeleted)
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3904
                buttonLabels:#( 'Cancel' 'No, Show Deleted' 'Yes, but Show Deleted' 'Yes')
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3905
                values:#(nil false yesAndShow true)
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3906
                default:true.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3907
    answer isNil ifTrue:[^ self].
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3908
    (answer ~~ true) ifTrue:[
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3909
        TextBox openOn:(deletedLines asStringCollection) title:'Filtered lines'.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3910
        (answer == false) ifTrue:[
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3911
            ^ self.
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3912
        ].
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3913
    ].
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3914
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3915
    self selectedWorkspacesTextView list:newList.
11496
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3916
6d48914856b8 added: #compareTextAgainst
Claus Gittinger <cg@exept.de>
parents: 11483
diff changeset
  3917
    "Modified: / 04-05-2012 / 16:03:32 / cg"
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3918
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3919
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3920
generateText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3921
    "a generatorblock is asked for, which is evaluated to generate
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3922
     lines onto an output stream.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3923
     The generated text is inserted (or replaces the current selection)"
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3924
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3925
    |template generatorBlock oldText outStream|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3926
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3927
    template := self class generatorTemplate.
13917
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
    generatorBlock := self askForFilterBlock:'Generator block (to insert text):'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3930
                        template:template
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3931
                        rememberIn:#LastGeneratorBlockString.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3932
    generatorBlock isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3933
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3934
    oldText := self selectedWorkspacesTextView selection.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3935
    outStream := '' writeStream.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3936
    generatorBlock
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3937
                value:outStream
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3938
                value:oldText.
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
    self selectedWorkspacesTextView pasteOrReplace:(outStream contents).
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3941
!
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3942
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3943
googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3944
    self selectedWorkspacesTextView googleSpellingSuggestion
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3945
!
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3946
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3947
indent
9810
fd0cc2c4930d changed:
Stefan Vogel <sv@exept.de>
parents: 9747
diff changeset
  3948
    self selectedWorkspacesTextView indentBy4.
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3949
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3950
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3951
pasteLastDoIt
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3952
    |s|
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3953
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3954
    s := self lastDoItsString.
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3955
    s notNil ifTrue:[
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3956
        self paste:s
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  3957
    ]
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3958
!
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  3959
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3960
processText
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3961
    "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
  3962
     Each line is replaced by the corresponding output of the processing block"
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
    |template filterBlock newList oldList answer nChanged changedLines flags|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3965
17054
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3966
    template := self class textProcessorTemplate.
2296be3ff58f #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 17035
diff changeset
  3967
13917
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3968
    filterBlock := self askForFilterBlock:'Processing block:'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3969
                        template:template
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3970
                        rememberIn:#LastProcessingBlockString.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3971
    filterBlock isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3972
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3973
    oldList := self selectedWorkspacesTextView list.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3974
    oldList := oldList collect:[:lineOrNil | lineOrNil ? ''].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3975
    newList := oldList collect:[:line | |newLine|
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3976
                newLine := line.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3977
                Error handle:[:ex |
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3978
                ] do:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3979
                    newLine := filterBlock value:line
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3980
                ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3981
                newLine
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3982
               ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3983
    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
  3984
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3985
    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
  3986
    flags := flags select:[:flag | flag].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3987
    nChanged := flags size.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3988
    nChanged == 0 ifTrue:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3989
        self information:'No lines were changed.'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3990
        ^ self
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3991
    ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3992
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3993
    answer := Dialog confirmWithCancel:(resources 
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3994
                        string:'%1 lines changed. Change text ?'
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3995
                        with:nChanged)
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3996
                labels:#( 'Cancel' 'No, Show Changed' 'Yes').
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3997
    answer isNil ifTrue:[^ self].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3998
    answer ifFalse:[
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  3999
        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
  4000
        changedLines := changedLines collect:[:i | (newList at:i)].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4001
        TextBox openOn:(changedLines asStringCollection) title:'Changed lines'.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4002
        ^ self.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4003
    ].
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4004
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4005
    self selectedWorkspacesTextView list:newList.
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4006
!
2e1f7f77627e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13914
diff changeset
  4007
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  4008
undent
9810
fd0cc2c4930d changed:
Stefan Vogel <sv@exept.de>
parents: 9747
diff changeset
  4009
    self selectedWorkspacesTextView undentBy4.
4790
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  4010
! !
2fb9c342be6f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4602
diff changeset
  4011
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4012
!WorkspaceApplication methodsFor:'menu-dynamic'!
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4013
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4014
bookmarkMenu
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4015
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4016
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4017
    | menu item |
10283
04a0fd35630e changed: #bookmarkMenu
Claus Gittinger <cg@exept.de>
parents: 10277
diff changeset
  4018
04a0fd35630e changed: #bookmarkMenu
Claus Gittinger <cg@exept.de>
parents: 10277
diff changeset
  4019
    menu := self bookmarks asMenuUsingBuilder: (BookmarkMenuBuilder new resources:resources).
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4020
    menu hasItems ifTrue:[menu addSeparator].
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4021
13432
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4022
    item := MenuItem 
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4023
                label:(resources string:'Add Bookmark')
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4024
                itemValue:#addBookmark
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4025
                enabled:[self canAddBookmark].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4026
    menu addItem: item.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4027
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4028
    menu addSeparator.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4029
    
13432
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4030
    item := MenuItem 
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4031
                label:(resources string:'Edit Bookmarks')
1f561d84a826 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13413
diff changeset
  4032
                itemValue:#editBookmarks.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4033
    menu addItem: item.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4034
    ^menu
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4035
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4036
    "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
  4037
    "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
  4038
    "Modified: / 09-09-2012 / 13:25:48 / cg"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4039
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4040
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4041
editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4042
    ^ self class editModeInfoLabelMenu
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4043
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4044
    "Created: / 22-01-2011 / 11:50:35 / cg"
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4045
!
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4046
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4047
languageListMenuSlice
16057
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4048
    "dynamicall generate a slice containing the available
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4049
     programming languages"
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4050
     
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4051
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4052
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4053
    |m allLanguages |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4054
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4055
    allLanguages := OrderedCollection new.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4056
    ProgrammingLanguage allDo:[:eachLanguage |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4057
        eachLanguage isSmalltalk ifFalse:[
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4058
            allLanguages add:eachLanguage
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4059
        ]
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4060
    ].
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4061
    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
  4062
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4063
    m := Menu new.
13914
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4064
    m addItem:((MenuItem 
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4065
                label:'Text'
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4066
                choice: #syntaxHolder
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4067
                choiceValue:nil)
13914
052e6eae550d class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13906
diff changeset
  4068
                itemValue:#syntaxChangedByUser).
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4069
    m addItem:((MenuItem
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4070
                label:'Smalltalk'
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4071
                choice:#syntaxHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4072
                choiceValue:SmalltalkLanguage instance)
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4073
                translateLabel:false;
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4074
                enabled: self canChangeLanguageHolder).
9341
aa3c5825ec98 refactored to allow redefinition of defaultSyntax
Claus Gittinger <cg@exept.de>
parents: 9304
diff changeset
  4075
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4076
"/    allLanguages notEmpty ifTrue:[
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4077
"/        m addItem:(MenuItem separator).
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4078
9304
6d9d835a55bf changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9301
diff changeset
  4079
        allLanguages do:[:eachLanguage |
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4080
            "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
  4081
             evaluation (most of then do, but some may not -
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4082
             such as Java)"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4083
            (eachLanguage isJava not 
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4084
                "/ 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
  4085
                "/ but we have to define evaluatorClass to return GroovyEvaluator
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4086
                "/ 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
  4087
                "/ We may need something like evaluatorClassForInspector/Debugger.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4088
                and:[eachLanguage evaluatorClass notNil
16057
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4089
                and:[true "eachLanguage evaluatorClass canUnderstand: #evaluate:in:receiver:notifying:logged:ifFail:"]
eb19b75d3b87 #DOCUMENTATION
Claus Gittinger <cg@exept.de>
parents: 15890
diff changeset
  4090
            ]) 
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4091
            ifTrue:[
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4092
                m addItem:((MenuItem
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4093
                            label:(eachLanguage name)
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4094
                            choice:#syntaxHolder
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4095
                            choiceValue:eachLanguage)
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4096
                            translateLabel:false;
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4097
                            enabled: self canChangeLanguageHolder).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4098
            ].
9304
6d9d835a55bf changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 9301
diff changeset
  4099
        ].
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4100
"/    ].
9300
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4101
    ^ m
11235
9a0429235c45 changed: #languageListMenuSlice
Claus Gittinger <cg@exept.de>
parents: 10786
diff changeset
  4102
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4103
    "Modified: / 04-02-2012 / 11:52:07 / cg"
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4104
    "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
  4105
!
07364a10a823 syntax to choose from is fetched via ProgramminLanguage list;
Claus Gittinger <cg@exept.de>
parents: 9166
diff changeset
  4106
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4107
makeRecentDoItsMenuFor:aSelector
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4108
    <resource: #programMenu >
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4109
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4110
    |doIts m cmdLabelLen|
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
    cmdLabelLen := 40.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4113
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4114
    doIts := Workspace doItHistory.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4115
    doIts size > 0 ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4116
        m := Menu new.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4117
        doIts do:[:doItEntry |
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4118
            |lines label item|
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4119
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4120
            lines := doItEntry withoutLeadingSeparators asStringCollection.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4121
            label := lines first.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4122
            (label size > cmdLabelLen) ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4123
                label := (label contractTo:cmdLabelLen)
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4124
            ]. 
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4125
            (lines size > 1) ifTrue:[
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4126
                label := label , ' [...]'
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4127
            ].
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4128
            label := '''' , label , ''''.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4129
14594
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4130
            item := MenuItem label:label itemValue:aSelector argument:doItEntry.
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4131
            m addItem:item.
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4132
        ].
11787
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4133
        m addSeparator.
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4134
        m addItem: (MenuItem new 
14594
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4135
                    label: (resources string:'Clear History') 
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4136
                    itemValue: #clearHistory
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4137
                    translateLabel:false;
5c29d5fd8235 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14457
diff changeset
  4138
                    activeHelpKey: #historyEmptyMenu ).
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4139
   ].
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4140
   ^ m
11787
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4141
68372dae1567 menuitem protocol
Claus Gittinger <cg@exept.de>
parents: 11728
diff changeset
  4142
    "Modified: / 09-09-2012 / 13:25:30 / cg"
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4143
!
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4144
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4145
namespaceInfoLabelMenu
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4146
    |m allNamespaces|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4147
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4148
    allNamespaces := NameSpace allNameSpaces asNewOrderedCollection.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4149
    allNamespaces sort:[:a :b | a name < b name].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4150
    allNamespaces remove:Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4151
    allNamespaces addFirst:Smalltalk.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4152
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4153
    m := Menu new.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4154
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4155
    allNamespaces do:[:eachNameSpace |
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4156
        m addItem:((MenuItem 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4157
                    label:(eachNameSpace name) 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4158
                    choice: #namespaceHolder
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4159
                    choiceValue:eachNameSpace)
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4160
                    translateLabel:false;
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4161
                    itemValue:#namespaceChangedByUser).
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4162
        eachNameSpace == Smalltalk ifTrue:[
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4163
            m addSeparator
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4164
        ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4165
    ].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4166
    ^ m
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4167
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4168
14635
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4169
namespaceInfoLabelMenuHolder
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4170
    ^ [self namespaceInfoLabelMenu]
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4171
!
bed940a94253 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14594
diff changeset
  4172
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4173
pasteRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4174
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4175
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4176
    ^ self recentDoItsMenuFor:#'paste:'
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4177
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4178
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4179
recentDoItsMenuFor:aSelector
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4180
    <resource: #programMenu >
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4181
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4182
    ^ [
8350
642a6e1afcac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8342
diff changeset
  4183
        self makeRecentDoItsMenuFor:aSelector
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4184
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4185
!
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4186
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4187
redoRecentDoItMenu
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4188
    <resource: #programMenu >
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4189
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4190
    ^ self recentDoItsMenuFor:#'pasteAndExecute:'
4136
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4191
! !
6af9b93453c3 doIt history
Claus Gittinger <cg@exept.de>
parents: 4099
diff changeset
  4192
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4193
!WorkspaceApplication methodsFor:'private'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4194
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4195
askIfAnyModified:question yesButton:yesButtonText
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4196
    |someModifiedWorkspace index label|
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4197
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4198
    someModifiedWorkspace := workspaces detect:[:aView | self isModifiedWorkspace:aView]
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4199
                                        ifNone:nil.
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4200
    someModifiedWorkspace isNil ifTrue:[^ true].
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4201
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4202
    index := workspaces indexOf:someModifiedWorkspace.
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4203
    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
  4204
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4205
    (Dialog 
14818
c76a3a590773 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14804
diff changeset
  4206
        confirm:(resources stringWithCRs:question with:label)
6636
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  4207
        yesLabel:(resources string:yesButtonText)
0df4d1386e30 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6508
diff changeset
  4208
        noLabel:(resources string:'Cancel'))
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4209
    ifTrue:[
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4210
        "/ reset modified flag so question is asked only once
6045
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4211
        workspaces 
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4212
            select:[:aView | (self isModifiedWorkspace:aView)]
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4213
            thenDo:[:eachModifiedTextView |
7662
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4214
                        eachModifiedTextView 
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4215
                                perform:#modified: with:false
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4216
                                ifNotUnderstood:[].
6045
3589c863290a *** empty log message ***
ca
parents: 6022
diff changeset
  4217
                    ].
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4218
        ^ true
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4219
    ].
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4220
    ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4221
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4222
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4223
compilerClassForSyntaxName:syntax
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4224
    syntax == #Smalltalk ifTrue:[
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4225
        ^ Compiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4226
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4227
    syntax == #JavaScript ifTrue:[
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4228
        ^ JavaScriptCompiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4229
    ].
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4230
    ^ Compiler
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4231
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4232
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4233
compilerClassOf:aWorkspace
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4234
    |compilerClass|
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4235
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4236
    [    
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4237
        "/ 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
  4238
        compilerClass := aWorkspace compilerClass. 
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4239
    ] on:MessageNotUnderstood do:[].
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4240
    ^ compilerClass
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4241
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4242
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4243
createEvaluationWorkspace
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4244
    |ws l b box resultView environmentView panel workspaceVariables timeLabel|
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4245
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4246
    workspaceVariables := Workspace workspaceVariables.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4247
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4248
    panel := VariableVerticalPanel new.
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4249
    panel showHandle:true.
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4250
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4251
      box := View new.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4252
      l := Label new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4253
      l label:(resources string:'Eval:').
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4254
      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
  4255
      l adjust:#left.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4256
      box add:l.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4257
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4258
      ws := HVScrollableView for:Workspace.
7662
9ad6030ecba2 care for eval workspace
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  4259
      ws scrolledView name:#'Workspace'.  
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4260
      ws autoDefineVariables:#workspace.
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4261
      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
  4262
      box add:ws.
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4263
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4264
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4265
      b label:'DoIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4266
      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
  4267
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4268
      b action:[ws doIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4269
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4270
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4271
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4272
      b label:'InspectIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4273
      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
  4274
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4275
      b action:[ws inspectIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4276
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4277
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4278
      b := Button new.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4279
      b label:'BrowseIt'.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4280
      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
  4281
      b adjust:#left.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4282
      b action:[ws browseIt].
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4283
      box add:b.
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4284
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4285
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4286
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4287
      box := View new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4288
      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
  4289
      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
  4290
      resultView := HVScrollableView for:TextCollector.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4291
      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
  4292
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4293
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4294
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4295
      box := View new.
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4296
      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
  4297
      environmentView := DictionaryInspectorView new.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4298
      environmentView suppressPseudoSlots:true.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4299
      environmentView inspect:workspaceVariables.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4300
      environmentView dereferenceValueHolders:true.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4301
      environmentView fieldListLabel:'Variable'.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4302
      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
  4303
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4304
    panel add:box.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4305
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4306
"/     self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Eval'.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4307
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4308
    ws doItAction:[:theCode |
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4309
        |t result resultString|
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4310
8292
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4311
        t := TimeDuration toRun:[
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4312
            result := ws executeDoIt:theCode.
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4313
        ].
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4314
        timeLabel label:(resources string:'Exec. Time: %1' with:t printString).
d4d4520832b0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 8286
diff changeset
  4315
6752
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4316
        resultString := [
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4317
                            result storeString
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4318
                        ] on:Error do:[
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4319
                            result printString
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4320
                        ].  
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4321
                        
a05ea7328388 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6699
diff changeset
  4322
        resultView showCR:resultString.
17014
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4323
        Workspace rememberResultAsWorkspaceVariable:result.
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4324
        environmentView doUpdate.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4325
        result.
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4326
    ].
6865
c69e5225b03b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6817
diff changeset
  4327
    panel relativeCorners:#(0.4 0.6 1.0).
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4328
    ^ panel
7541
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4329
957ae975e391 handles in the eval-workspace
Claus Gittinger <cg@exept.de>
parents: 7537
diff changeset
  4330
    "Modified: / 24-11-2006 / 11:06:33 / cg"
6699
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4331
!
d8eaa3937354 eval buffer
Claus Gittinger <cg@exept.de>
parents: 6636
diff changeset
  4332
5295
e3c5a7b20d9d refactored (added abstract superclass)
Claus Gittinger <cg@exept.de>
parents: 5262
diff changeset
  4333
createWorkspace
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4334
    |ws|
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4335
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4336
    ws := self createWorkspaceView.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4337
    ws autoDefineVariables:self autoDefineVariables value.
7931
99ce6134cbca sharedPool access in doIts
Claus Gittinger <cg@exept.de>
parents: 7877
diff changeset
  4338
    ws poolsConsideredInDoIts:poolsConsideredInDoIts.
5547
65af7af97085 initial value of #autoDefine was not set correctly
Claus Gittinger <cg@exept.de>
parents: 5490
diff changeset
  4339
    ^ ws
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4340
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4341
    "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
  4342
    "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
  4343
!
e35a94b5c2a0 multiple tabs
Claus Gittinger <cg@exept.de>
parents: 3191
diff changeset
  4344
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4345
createWorkspaceView
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4346
    |ws language|
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4347
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4348
    ws := self class createWorkspaceView.
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4349
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4350
    ws codeAspect: SyntaxHighlighter codeAspectExpression.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4351
    ws acceptAction:[:code | self menuSave ].
15294
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 respondsTo:#languageHolder:) ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4354
"/        ws languageHolder:self syntaxHolder
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4355
"/    ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4356
    language := self syntaxHolder value ? Smalltalk programmingLanguage.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4357
    language notNil ifTrue:[
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4358
        ws compilerClass:(language evaluatorClass).
13581
75759c16ab7f class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13500
diff changeset
  4359
        ws editedLanguage:language.
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4360
    ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4361
    ^ ws
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4362
11615
f9dfb7daa5e4 corrected switching languages between tabs
Claus Gittinger <cg@exept.de>
parents: 11612
diff changeset
  4363
    "Modified: / 19-07-2012 / 16:39:15 / cg"
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4364
    "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
  4365
!
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4366
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4367
createWorkspaceViewForText
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4368
    "creates a language unaware workspace"
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4369
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4370
    |ws|
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4371
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4372
    ws := self class createWorkspaceView.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4373
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4374
    ws acceptAction:[:code | self menuSave ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4375
"/    (ws respondsTo:#languageHolder:) ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4376
"/        ws languageHolder:nil
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4377
"/    ].
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4378
    ws compilerClass:(Smalltalk programmingLanguage).
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4379
    ws editedLanguage:nil.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4380
    ws codeAspect:nil.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4381
    ^ ws
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4382
!
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4383
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4384
isModifiedWorkspace:aView 
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4385
    |view|
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4386
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4387
    aView isNil ifTrue:[
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4388
        ^ false
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4389
    ].
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4390
    view := self workspaceViewOfView:aView.
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4391
    (view isNil 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4392
        or:[ view modified not 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4393
        or:[ view contentsWasSaved 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4394
        or:[ view contents withoutSeparators isEmpty ]]]) 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4395
    ifTrue:[ 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4396
        ^ false 
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4397
    ].
4031
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4398
    ^ true
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4399
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4400
    "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
  4401
    "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
  4402
!
4ace4ff5fbbd look for unsaved text in ANY workspace
Claus Gittinger <cg@exept.de>
parents: 3845
diff changeset
  4403
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4404
lastDoItsString
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4405
    |history|
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  4406
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4407
    history := Workspace doItHistory.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4408
    history size > 0 ifFalse:[
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4409
        self selectedWorkspacesTextView flash.
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4410
        ^ nil
3198
1c34cd12b80b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3196
diff changeset
  4411
    ].
4267
bc454d3f6ca5 more convenient functions
Claus Gittinger <cg@exept.de>
parents: 4208
diff changeset
  4412
    ^ history first
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4413
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4414
14724
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4415
syntaxFromEvaluatorClass:aClass
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4416
    "knowing the evaluator class, determine the syntax highlighter class"
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4417
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4418
    aClass notNil ifTrue:[
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4419
        ProgrammingLanguage allDo:[:lang | 
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4420
            lang evaluatorClass = aClass ifTrue:[
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4421
                ^ lang
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4422
            ]
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4423
        ].
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4424
    ].
14724
74a5e633ef41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 14635
diff changeset
  4425
    "Unknown language - should not happen :-)"
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4426
    ^ nil
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4427
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4428
    "Created: / 26-04-2012 / 12:59:32 / cg"
5852
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4429
!
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4430
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4431
workspaceSelectionChanged
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4432
    "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
  4433
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4434
    |compilerClass selectedWorkspace selectedWorkspaceApp |
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4435
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4436
    "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
  4437
729c4b42a98e syntax setting
Claus Gittinger <cg@exept.de>
parents: 5846
diff changeset
  4438
    super workspaceSelectionChanged.
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4439
5855
a91fbf8b707c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5852
diff changeset
  4440
    selectedWorkspace := self selectedWorkspace.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4441
    selectedWorkspaceApp  := self selectedWorkspaceApplication.
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4442
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4443
    (selectedWorkspace notNil and:[selectedWorkspace isScrollWrapper]) ifTrue:[
9746
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4444
        selectedWorkspace := selectedWorkspace scrolledView
d7c05875edc0 initial language setting fixed
Claus Gittinger <cg@exept.de>
parents: 9745
diff changeset
  4445
    ].
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4446
13906
e13d8ad35a46 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13901
diff changeset
  4447
    compilerClass := self compilerClassOf: selectedWorkspaceApp ? selectedWorkspace.
13852
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4448
    self canChangeLanguageHolder value:
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4449
        (selectedWorkspaceApp ? selectedWorkspace respondsTo: #compilerClass:).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4450
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4451
    self syntaxHolder value:(self syntaxFromEvaluatorClass:compilerClass).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4452
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4453
    (selectedWorkspace notNil and:[ selectedWorkspace scrolledView isTextView or:[selectedWorkspaceApp notNil] ]) ifTrue:[
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  4454
        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
  4455
        self cursorLineHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorLineHolder ifNotUnderstood:nil ).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4456
        self cursorColHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#cursorColHolder ifNotUnderstood:nil ).
5ce291ab3c61 merged in jv's chenges
Claus Gittinger <cg@exept.de>
parents: 13759
diff changeset
  4457
        self modeLabelHolder valueHolder:( selectedWorkspaceApp ? selectedWorkspace perform:#modeLabelHolder ifNotUnderstood:nil ).
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4458
    ] ifFalse:[
15817
f6046130309e class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15816
diff changeset
  4459
        self cursorLineAndColumnLabelHolder valueHolder:nil.
9695
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4460
        self cursorLineHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4461
        self cursorColHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4462
        self modeLabelHolder valueHolder:nil.
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4463
    ].
87621736e6e9 line, col, mode features.
Claus Gittinger <cg@exept.de>
parents: 9676
diff changeset
  4464
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4465
    "Update toolbar"
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4466
    (selectedWorkspaceApp notNil 
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4467
    and:[ (selectedWorkspaceApp class respondsTo: #toolBarSpec) ]) ifTrue:[
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4468
        "/ client provides one
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4469
        self toolBarView client: selectedWorkspaceApp spec: #toolBarSpec
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4470
    ] ifFalse:[
15816
64d953f953a1 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15737
diff changeset
  4471
        "/ I provide it
15409
cfc502624aeb class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15392
diff changeset
  4472
        self toolBarView client: self spec: #toolBarSpec builder: builder.
10169
79d341054c76 merged in Jan's changes;
Claus Gittinger <cg@exept.de>
parents: 9810
diff changeset
  4473
    ]
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4474
! !
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4475
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4476
!WorkspaceApplication methodsFor:'special startup'!
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4477
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4478
openSystemWorkspace
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4479
    "create the tabs for the initial welcome system workspace"
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4480
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4481
    |path needRemove font|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4482
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4483
    needRemove := true.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4484
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4485
    self allButOpen.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4486
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4487
    (self builder componentAt:'NoteBook')
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4488
        destroyTabAction:[:tabIndex| self removeWorkspace:tabIndex].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4489
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4490
    self window extent:640@400.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4491
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4492
    path := (Smalltalk getSystemFileName:'README') ?  '../../README'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4493
    path := path asFilename.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4494
    path isReadable ifTrue:[
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4495
        self addWindow:(self createWorkspaceViewForText) named:'README' asFirst:false.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4496
        self loadFile:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4497
        self removeWorkspace:1.  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4498
        self renameWorkspace:1 to:'LICENCE README'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4499
        needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4500
    ].
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
"/    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
  4503
"/    path asFilename exists ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4504
"/        self addWindow:(licenceView := HVScrollableView for:HTMLDocumentView) named:'License' asFirst:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4505
"/        licenceView homeDocument:'../../doc/online/english/LICENCE_STX.html'.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4506
"/        licenceView updateLabelFlag:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4507
"/        needRemove ifTrue:[self removeWorkspace:1].  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4508
"/        needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4509
"/    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4510
16290
a31aeee6a2ec #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 16261
diff changeset
  4511
    device platformName == #X11 ifTrue:[
17014
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4512
"/        font := Font family:'DejaVuSansMono' face:'medium' style:'roman' size:16 encoding:'iso10646-1'.
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4513
"/        font := font onDevice:device ifAbsent:nil.
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4514
        font isNil ifTrue:[    
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4515
            font := Font family:'FreeMono' face:'regular' style:'roman' size:16 encoding:'iso10646-1'.
16966
49bf0a7d03c4 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16957
diff changeset
  4516
            font := font onDevice:device ifAbsent:nil.
16967
a93d9f64f049 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 16966
diff changeset
  4517
            font isNil ifTrue:[    
17014
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4518
                font := Font family:'unifont' face:'medium' style:'roman' size:16 encoding:'iso10646-1'.
16957
8560b20adf63 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16485
diff changeset
  4519
                font := font onDevice:device ifAbsent:nil.
8560b20adf63 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16485
diff changeset
  4520
                font isNil ifTrue:[    
17014
08cc582a57e8 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 16967
diff changeset
  4521
                    font := Font family:'arial' face:'medium' style:'roman' size:12 encoding:'iso10646-1'.
16957
8560b20adf63 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16485
diff changeset
  4522
                    font := font onDevice:device ifAbsent:nil.
8560b20adf63 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16485
diff changeset
  4523
                ].
8560b20adf63 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 16485
diff changeset
  4524
            ].
14747
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
    ] ifFalse:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4527
        "/ 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
  4528
        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
  4529
        font := font onDevice:device ifAbsent:nil.
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4530
    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4531
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4532
    #(  "/ file                     resourceKey             title                       forcedEncoding  type
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4533
        ('Hello_utf8.wsp'           HELLO_UTF_FILE          'Hello'                     #'utf8'         #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4534
        ('Welcome.wsp'              WELCOME_FILE            'This Release'              nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4535
"/        ('Setup.wsp'                SETUP_FILE              'Setup'                     nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4536
        ('Keyboard.wsp'             KEYBOARD_FILE           'Keyboard'                  nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4537
"/        ('GettingStarted.wsp'       GETTING_STARTED_FILE    'Getting Started'           nil             #text)
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4538
        ('../../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
  4539
        ('../../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
  4540
    "/ if these are present, show them.
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4541
        ('Private.wsp'              PRIVATE_FILE            'Private Workspace'         nil             #code)
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4542
        ('MyWorkspace.wsp'          MYWORKSPACE_FILE        'My Workspace'              nil             #code)
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4543
        ('PackageLoading.wsp'       PACKAGELOADING_FILE     'Packages'                  nil             #code)
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4544
    ) do:[:tuple |
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4545
        |file resKey title forcedEncoding type pane encoding htmlView|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4546
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4547
        file := tuple at:1.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4548
        resKey := tuple at:2.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4549
        file := self resources string:resKey default:file.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4550
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4551
        title := tuple at:3.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4552
        forcedEncoding := tuple at:4.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4553
        type := tuple at:5.
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
        path := Smalltalk getSystemFileName:file.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4556
        (path notNil and:[path asFilename isReadable]) ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4557
            type == #html ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4558
                self addWindow:(htmlView := HVScrollableView for:HTMLDocumentView) named:title asFirst:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4559
                htmlView homeDocument:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4560
                htmlView infoHolder:self infoLabelHolder.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4561
                htmlView updateTopViewsTitleFlag:false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4562
            ] ifFalse:[
15294
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4563
                type == #code ifTrue:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4564
                    self addWindow:(pane := self createWorkspaceView) named:title asFirst:false.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4565
                ] ifFalse:[
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4566
                    self addWindow:(pane := self createWorkspaceViewForText) named:title asFirst:false.
4bd3f000c743 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15273
diff changeset
  4567
                ].
14747
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4568
                forcedEncoding notNil ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4569
                    encoding := forcedEncoding.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4570
                    font notNil ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4571
                        pane font:font.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4572
                    ]
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4573
                ] ifFalse:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4574
                    encoding := CharacterEncoder guessEncodingOfFile:path.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4575
                    (encoding == #'iso8859-1' or:[encoding == #'ascii']) ifTrue:[
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4576
                        encoding := nil
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
                ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4579
                self loadFile:path encoding:encoding label:title.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4580
            ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4581
            needRemove ifTrue:[self removeWorkspace:1].  "/ the original Workspace
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4582
            needRemove := false.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4583
        ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4584
    ].
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4585
    self openWindow.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4586
    self selectedWorkspaceIndexHolder value:2.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4587
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4588
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4589
     |ws b|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4590
     ws := self openSystemWorkspace.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4591
     ws addMyWorkspace.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4592
     ws selectedWorkspaceIndexHolder value:(ws workspaces size).
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4593
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4594
     ws selectedWorkspace 
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4595
        add:(b := Button label:'DoIt' action:[ws doIt. b destroy])
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4596
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4597
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4598
     |ws b|
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4599
     ws := self new.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4600
     ws open. 
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4601
     ws selectedWorkspace contents:'Tools::NewSystemBrowser open'; selectAll.
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4602
    "
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4603
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4604
    "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
  4605
    "Modified: / 05-07-2011 / 15:34:40 / cg"
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4606
! !
f00c8f1bac55 class: WorkspaceApplication
Stefan Vogel <sv@exept.de>
parents: 14746
diff changeset
  4607
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4608
!WorkspaceApplication methodsFor:'user actions'!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4609
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4610
infoVisibilityChanged
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4611
    super infoVisibilityChanged.
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4612
    UserPreferences current infoVisibleInWorkspace:(self infoVisibleHolder value)
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4613
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4614
    "Created: / 14-07-2007 / 16:46:58 / cg"
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4615
!
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4616
13643
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4617
namespaceChangedByUser
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4618
    "remember as default for next new workspace"
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4619
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4620
    LastNamespace := self namespaceHolder value.
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4621
!
38d9fae397cd class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 13585
diff changeset
  4622
11483
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4623
syntaxChangedByUser
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4624
    "remember as default for next new workspace"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4625
    LastLanguage := self syntaxHolder value.
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4626
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4627
    "Created: / 26-04-2012 / 12:31:04 / cg"
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4628
!
5f545a7d153a fixed language related valueholder handling
Claus Gittinger <cg@exept.de>
parents: 11481
diff changeset
  4629
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4630
toolBarVisibilityChanged
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4631
    super toolBarVisibilityChanged.
8499
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  4632
    UserPreferences current toolbarVisibleInWorkspace:(self toolBarVisibleHolder value).
b13954af77b0 support an edit-ops-toolbar
Claus Gittinger <cg@exept.de>
parents: 8492
diff changeset
  4633
    UserPreferences current editToolbarVisibleInWorkspace:(self editToolBarVisibleHolder value).
7825
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4634
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4635
    "Created: / 14-07-2007 / 16:45:31 / cg"
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4636
! !
a1ab35cf516e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7802
diff changeset
  4637
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4638
!WorkspaceApplication class methodsFor:'documentation'!
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4639
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4640
version
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4641
    ^ '$Header$'
10318
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4642
!
9997d8ffc928 added: #openMyWorkspace_new
sr
parents: 10317
diff changeset
  4643
9059
3ed3d94ea9b7 added: #openSettingsDialog
Claus Gittinger <cg@exept.de>
parents: 8792
diff changeset
  4644
version_CVS
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4645
    ^ '$Header$'
10394
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4646
!
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4647
17390
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  4648
version_HG
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  4649
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  4650
    ^ '$Changeset: <not expanded> $'
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  4651
!
ce68ee978f93 WorkspaceApplication: Show shortcuts in edit menu
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 17219
diff changeset
  4652
10394
402cb432bd94 - per-tool preference for CodeView2
vrany
parents: 10318
diff changeset
  4653
version_SVN
15737
5f5dd0d93690 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 15608
diff changeset
  4654
    ^ '$Id$'
3154
859688212191 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4655
! !
12340
8332590c5a41 class: WorkspaceApplication
Claus Gittinger <cg@exept.de>
parents: 12032
diff changeset
  4656