Tools__CodeView2.st
changeset 10293 7dec857f35f6
parent 10290 a8251e59c37b
child 10312 5b281e46f943
--- a/Tools__CodeView2.st	Fri Jul 08 13:31:59 2011 +0200
+++ b/Tools__CodeView2.st	Fri Jul 08 13:39:25 2011 +0200
@@ -143,6 +143,46 @@
 
 !CodeView2 class methodsFor:'menu specs'!
 
+debugMenu
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:Tools::CodeView2 andSelector:#editMenu_stxStyle
+     (Menu new fromLiteralArrayEncoding:(Tools::CodeView2 editMenu_stxStyle)) startUp
+    "
+
+    <resource: #menu>
+
+    ^ 
+     #(Menu
+              (
+               (MenuItem
+                  label: 'Inspect '
+                  itemValue: inspectView
+                  translateLabel: true
+                )
+               (MenuItem
+                  label: 'Inspect Syntax Elements'
+                  itemValue: inspectSyntaxElements
+                  translateLabel: true
+                )
+               (MenuItem
+                  label: 'Inspect selected selector'
+                  itemValue: inspectSelectedSelector
+                  translateLabel: true
+                )
+               )
+              nil
+              nil
+            )
+
+    "Created: / 08-07-2011 / 13:36:02 / cg"
+!
+
 editMenu
     "This resource specification was automatically generated
      by the MenuEditor of ST/X."
@@ -409,43 +449,11 @@
             shortcutKey: Shift
           )
          (MenuItem
-            label: 'Show Gutter'
-            nameKey: ShowGutter
-            translateLabel: true
-            indication: showGutterChannel
-          )
-         (MenuItem
             label: 'Services'
             translateLabel: true
             submenuChannel: servicesMenu
           )
          (MenuItem
-            label: 'Debug'
-            translateLabel: true
-            submenu: 
-           (Menu
-              (
-               (MenuItem
-                  label: 'Inspect '
-                  itemValue: inspectView
-                  translateLabel: true
-                )
-               (MenuItem
-                  label: 'Inspect Syntax Elements'
-                  itemValue: inspectSyntaxElements
-                  translateLabel: true
-                )
-               (MenuItem
-                  label: 'Inspect selected selector'
-                  itemValue: inspectSelectedSelector
-                  translateLabel: true
-                )
-               )
-              nil
-              nil
-            )
-          )
-         (MenuItem
             label: '-'
           )
          (MenuItem
@@ -1355,14 +1363,14 @@
 !CodeView2 methodsFor:'menus-dynamic'!
 
 editMenu
-
     | editMenu superEditMenu moreMenu moreMenuItem showGutterItem |
+
     editMenu := self class editMenu decodeAsLiteralArray.
     superEditMenu := textView superEditMenu.
     moreMenu := superEditMenu subMenuAt: superEditMenu numberOfItems.
     moreMenuItem := editMenu menuItemLabeled: 'More'.
     showGutterItem := editMenu atNameKey: #ShowGutter.
-    showGutterItem indication: showGutterChannel.
+    showGutterItem notNil ifTrue:[ showGutterItem indication: showGutterChannel ].
     moreMenuItem submenu: moreMenu asMenu.
     editMenu findGuiResourcesIn: self.
     ^editMenu
@@ -1371,6 +1379,7 @@
     "Modified: / 25-12-2007 / 19:50:53 / janfrog"
     "Modified: / 18-10-2008 / 20:31:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 23-06-2010 / 19:13:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-07-2011 / 13:35:31 / cg"
 !
 
 implementorsMenu
@@ -1497,18 +1506,37 @@
 !
 
 servicesMenu
-
-    | menu |
+    |menu item anyService|
+
     menu := Menu new.
-    services do:
-        [ :service | | item |
-        item := MenuItem label: service label.
-        item indication:
-            ((AspectAdaptor forAspect: #enabled) subject: service).
-        menu addItem: item].
-    ^menu
+
+    item := MenuItem label:(resources string:'Show Gutter').
+    item indication:(self showGutterChannel).
+    menu addItem:item.
+    menu addSeparator.
+
+    anyService := false.
+    services do:[:service | 
+        |item|
+
+        item := MenuItem label:(resources string:service label).
+        item indication:((AspectAdaptor forAspect:#enabled) subject:service).
+        menu addItem:item.
+        anyService := true.
+    ].
+
+    anyService ifTrue:[
+        menu addSeparator.
+    ].
+
+    item := MenuItem label:(resources string:'Debug').
+    item submenuChannel:[ self class debugMenu ].
+    menu addItem:item.
+
+    ^ menu
 
     "Created: / 07-03-2010 / 14:03:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-07-2011 / 13:38:50 / cg"
 ! !
 
 !CodeView2 methodsFor:'private'!
@@ -2627,8 +2655,12 @@
 
 !CodeView2 class methodsFor:'documentation'!
 
+version
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.8 2011-07-08 11:39:25 cg Exp $'
+!
+
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.7 2011-07-08 11:31:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.8 2011-07-08 11:39:25 cg Exp $'
 !
 
 version_SVN