--- a/Tools__CodeView2.st Mon Mar 05 12:33:37 2018 +0000
+++ b/Tools__CodeView2.st Mon Mar 05 17:45:03 2018 +0000
@@ -230,18 +230,20 @@
<resource: #menu>
- ^
+ ^
#(Menu
(
(MenuItem
label: 'Implementors...'
itemValue: browseImplementorsOfIt
+ isVisible: hasLanguageToolbox
submenuChannel: implementorsMenu
shortcutKey: ImplementorsOfIt
)
(MenuItem
label: 'Senders...'
itemValue: browseSendersOfIt
+ isVisible: hasLanguageToolbox
submenuChannel: sendersMenu
shortcutKey: SendersOfIt
)
@@ -253,96 +255,117 @@
)
(MenuItem
label: '-'
+ isVisible: hasLanguage
)
(MenuItem
+ enabled: canAccept
label: 'Accept'
itemValue: accept
+ isVisible: isNotReadOnly
shortcutKey: Accept
- enabled: canAccept
)
(MenuItem
label: '-'
+ isVisible: isNotReadOnly
)
(MenuItem
+ enabled: canCut
label: 'Cut'
itemValue: cut
+ isVisible: isNotReadOnly
shortcutKey: Cut
- enabled: canCut
)
(MenuItem
+ enabled: hasSelectionForCopy
label: 'Copy'
itemValue: copySelection
+ isVisible: true
shortcutKey: Copy
- enabled: hasSelectionForCopy
)
(MenuItem
+ enabled: isNotReadOnly
label: 'Paste'
itemValue: pasteOrReplace
+ isVisible: isNotReadOnly
shortcutKey: Paste
- enabled: isNotReadOnly
)
(MenuItem
label: '-'
+ isVisible: isNotReadOnly
)
(MenuItem
+ enabled: hasUndoAction
label: 'Undo'
itemValue: undo
+ isVisible: isNotReadOnly
shortcutKey: Undo
- enabled: hasUndoAction
)
(MenuItem
+ enabled: hasRedoAction
label: 'Redo'
itemValue: redo
+ isVisible: isNotReadOnly
shortcutKey: Redo
- enabled: hasRedoAction
)
(MenuItem
label: '-'
+ isVisible: true
)
(MenuItem
label: 'Do it'
itemValue: doIt
+ isVisible: true
shortcutKey: DoIt
)
(MenuItem
label: 'Print it'
itemValue: printIt
+ isVisible: true
shortcutKey: PrintIt
)
(MenuItem
label: 'Inspect it'
itemValue: inspectIt
+ isVisible: true
shortcutKey: InspectIt
)
(MenuItem
label: 'Profile it'
itemValue: profileIt
+ isVisible: true
shortcutKey: InspectIt
)
(MenuItem
label: '-'
+ isVisible: true
)
(MenuItem
label: 'Show Gutter'
nameKey: ShowGutter
+ isVisible: true
indication: showGutterChannel
)
(MenuItem
label: 'More'
nameKey: More
+ isVisible: true
)
(MenuItem
label: 'Services'
+ isVisible: true
submenuChannel: servicesMenu
)
(MenuItem
label: 'Debug'
+ isVisible: true
submenuChannel: debugMenu
)
)
nil
nil
)
+
+ "Modified: / 06-02-2018 / 20:09:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
editMenu_stxStyle
@@ -364,106 +387,105 @@
#(Menu
(
(MenuItem
+ enabled: hasUndoAction
label: 'Undo'
itemValue: undo
- translateLabel: true
+ isVisible: isNotReadOnly
shortcutKey: Undo
- enabled: hasUndoAction
)
(MenuItem
+ enabled: canDoAgain
label: 'Again'
itemValue: again
- translateLabel: true
+ isVisible: true
shortcutKey: Again
- enabled: canDoAgain
)
(MenuItem
label: '-'
+ isVisible: true
)
(MenuItem
+ enabled: canCut
label: 'Cut'
itemValue: cut
- translateLabel: true
+ isVisible: isNotReadOnly
shortcutKey: Cut
- enabled: canCut
)
(MenuItem
+ enabled: hasSelectionForCopy
label: 'Copy'
itemValue: copySelection
- translateLabel: true
+ isVisible: true
shortcutKey: Copy
- enabled: hasSelectionForCopy
)
(MenuItem
label: 'Paste'
itemValue: pasteOrReplace
- translateLabel: true
+ isVisible: isNotReadOnly
shortcutKey: Paste
- enabled: isNotReadOnly
)
(MenuItem
label: '-'
+ isVisible: true
)
(MenuItem
label: 'DoIt'
itemValue: doIt
- translateLabel: true
+ isVisible: true
shortcutKey: DoIt
)
(MenuItem
label: 'PrintIt'
itemValue: printIt
- translateLabel: true
+ isVisible: true
shortcutKey: PrintIt
)
(MenuItem
label: 'InspectIt'
itemValue: inspectIt
- translateLabel: true
+ isVisible: true
shortcutKey: InspectIt
)
(MenuItem
label: '-'
+ isVisible: true
)
(MenuItem
+ enabled: canAccept
label: 'Accept'
itemValue: accept
- translateLabel: true
+ isVisible: isNotReadOnly
shortcutKey: Accept
- enabled: canAccept
)
(MenuItem
label: '-'
- isVisible: false
+ isVisible: isNotReadOnly
)
(MenuItem
label: 'Refactor'
nameKey: refactor
- translateLabel: true
isVisible: false
shortcutKey: Shift
)
(MenuItem
label: 'Services'
- translateLabel: true
isVisible: false
submenuChannel: servicesMenu
)
(MenuItem
label: '='
+ isVisible: true
)
(MenuItem
label: 'More'
nameKey: More
- translateLabel: true
+ isVisible: true
shortcutKey: Ctrl
)
)
nil
nil
)
-
- "Modified: / 02-03-2012 / 19:53:19 / cg"
! !
!CodeView2 methodsFor:'accessing'!
--- a/Tools__NewSystemBrowser.st Mon Mar 05 12:33:37 2018 +0000
+++ b/Tools__NewSystemBrowser.st Mon Mar 05 17:45:03 2018 +0000
@@ -23786,43 +23786,9 @@
!NewSystemBrowser methodsFor:'binding access'!
menuFor:key
- "Sent by the builder to ask for an application provided
- holder for a menu. The argument, `key`, comes from an UI-spec
- for a widgets #menu property.
- Here, a corresponding message is sent to myself,
- which ought to be defined in the application subclass.
- Alternatively, a subclass may redefine this method, to provide
- holders from a Dictionary or whatever.
- Typically, a menu or a menu-holding valueHolder is returned there."
-
| menu |
- key isNil ifTrue:[ self error:'nil menu key' ].
-
- "/ Ask myself first...
- (thisContext isRecursive not and:[ self respondsTo: key ]) ifTrue:[
- menu := self perform: key
- ] ifFalse:[
- "/ Ask my class...
- (self class respondsTo: key) ifTrue:[
- menu := self class perform: key
- ] ifFalse:[
- "/ Ask masterApplication if any...
- masterApplication notNil ifTrue:[
- menu masterApplication menuFor: key
- ].
- ].
- ].
-
- "/ If the provided menu is a menu spec, create Menu from it...
- menu isArray ifTrue:[
- menu := Menu decodeFromLiteralArray: menu.
- ].
-"/ ^ menu.
-"/ ============== Above should be later on moved to ApplicationModel =========
-"/ ============== and here replace by super menuFor: key =====================
-"/ ===========================================================================
-
+ menu := super menuFor: key.
thisContext isRecursive ifFalse:[
self menuExtendersFor: key do:[:each |
self perform: each with: menu
@@ -23832,7 +23798,7 @@
^ menu
"Modified: / 18-06-1998 / 20:33:56 / cg"
- "Modified (comment): / 27-08-2014 / 00:26:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 06-02-2018 / 20:35:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!NewSystemBrowser methodsFor:'change & update'!