menu changed to use checkboxes
authorClaus Gittinger <cg@exept.de>
Fri, 27 Jul 2012 15:14:10 +0200
changeset 11694 464f62536f09
parent 11693 367eaa0e1ead
child 11695 e860f7929812
menu changed to use checkboxes
DebugView.st
--- a/DebugView.st	Fri Jul 27 14:47:40 2012 +0200
+++ b/DebugView.st	Fri Jul 27 15:14:10 2012 +0200
@@ -805,28 +805,18 @@
                   label: '-'
                 )
                (MenuItem
-                  label: 'Show Verbose WalkBack'
-                  itemValue: toggleVerboseWalkback
+                  label: 'Show Dense WalkBack'
+                  itemValue: showingDenseWalkback:
                   translateLabel: true
-                  isVisible: showingDenseWalkback
-                )
-               (MenuItem
-                  label: 'Show Dense WalkBack'
-                  itemValue: toggleVerboseWalkback
-                  translateLabel: true
-                  isVisible: showingVerboseWalkback
-                )
-               (MenuItem
-                  label: 'Show Support Code (Implementation of Enumerations, Exceptions etc.)'
-                  itemValue: showSupportCode
-                  translateLabel: true
-                  isVisible: notShowingSupportCode
+                  hideMenuOnActivated: false
+                  indication: showingDenseWalkback
                 )
                (MenuItem
                   label: 'Hide Support Code (Implementation of Enumerations, Exceptions etc.)'
-                  itemValue: hideSupportCode
+                  itemValue: hideSupportCode:
                   translateLabel: true
-                  isVisible: showingSupportCode
+                  hideMenuOnActivated: false
+                  indication: hideSupportCode
                 )
                (MenuItem
                   label: '-'
@@ -835,6 +825,7 @@
                   label: 'Raise Debugger when Entering'
                   itemValue: autoRaiseView:
                   translateLabel: true
+                  hideMenuOnActivated: false
                   indication: autoRaiseView
                 )
                (MenuItem
@@ -1232,8 +1223,6 @@
         nil
         nil
       )
-
-    "Modified: / 23-07-2012 / 12:41:03 / cg"
 ! !
 
 !DebugView class methodsFor:'misc'!
@@ -4771,12 +4760,18 @@
 !
 
 hideSupportCode
-    hideSupportCode := true.
-    self redisplayBacktrace.
+    ^ hideSupportCode
 
     "Created: / 10-06-2012 / 21:27:02 / cg"
 !
 
+hideSupportCode:aBoolean
+    hideSupportCode := aBoolean.
+    self redisplayBacktrace.
+
+    "Created: / 27-07-2012 / 14:55:09 / cg"
+!
+
 inspectContext
     "launch an inspector on the currently selected context"
 
@@ -4797,7 +4792,6 @@
     exclusive ifTrue:[
         items := #(
                     ('Show More WalkBack'               showMore                )
-                    ('Show Verbose WalkBack'            showVerboseWalkback     )
                     ('-'                                                        )
                     ('Add Breakpoint'                   addBreakpoint           )
                     ('Remove Breakpoint'                removeBreakpoint        )
@@ -4807,7 +4801,6 @@
     ] ifFalse:[
         items := #(
                     ('Show More WalkBack'               showMore                )
-                    ('Show Verbose WalkBack'            showVerboseWalkback     )
                     ('-'                                                        )
                     ('Skip'                             skip                    )
                     ('Step Out'                         skipForReturn           )
@@ -4873,11 +4866,6 @@
                 receiver:self
                 for:contextView.
 
-    verboseBacktrace ifTrue:[
-        m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack').
-        m selectorAt:#showVerboseWalkback put:#showDenseWalkback
-    ].
-
     inspecting ifTrue:[
         m notNil ifTrue:[
             m disableAll:#(doTraceStep removeBreakpoint browseImplementingClass browseReceiversClass
@@ -4889,7 +4877,7 @@
 
     ^ m.
 
-    "Modified: / 25-07-2012 / 19:15:27 / cg"
+    "Modified: / 27-07-2012 / 15:01:20 / cg"
 !
 
 notShowingSupportCode
@@ -4975,19 +4963,6 @@
     "Created: / 17-07-2012 / 12:52:10 / cg"
 !
 
-showDenseWalkback
-    |m|
-
-    m := contextView middleButtonMenu.
-    verboseBacktrace := false.
-    m labelAt:#showDenseWalkback put:(resources string:'Show Verbose WalkBack').
-    m selectorAt:#showDenseWalkback put:#showVerboseWalkback.
-    self redisplayBacktrace.
-
-    "Created: / 17.11.2001 / 20:08:08 / cg"
-    "Modified: / 17.11.2001 / 22:39:48 / cg"
-!
-
 showFullWalkback
     "double the number of contexts shown"
 
@@ -5017,26 +4992,19 @@
     "Created: / 10-06-2012 / 21:27:53 / cg"
 !
 
-showVerboseWalkback
-    |m|
-
-    verboseBacktrace := true.
-    m := contextView middleButtonMenu.
-    m labelAt:#showVerboseWalkback put:(resources string:'Show Dense WalkBack').
-    m selectorAt:#showVerboseWalkback put:#showDenseWalkback.
-
-    self redisplayBacktrace.
-
-    "Created: / 17.11.2001 / 20:07:57 / cg"
-    "Modified: / 17.11.2001 / 22:39:41 / cg"
-!
-
 showingDenseWalkback
     ^ verboseBacktrace == false.
 
     "Created: / 17.11.2001 / 20:13:53 / cg"
 !
 
+showingDenseWalkback:aBoolean
+    verboseBacktrace := aBoolean not.
+    self redisplayBacktrace.
+
+    "Created: / 27-07-2012 / 14:58:00 / cg"
+!
+
 showingSupportCode
     ^ hideSupportCode == false.
 
@@ -5103,13 +5071,9 @@
 !
 
 toggleVerboseWalkback
-    verboseBacktrace ifFalse:[
-        self showVerboseWalkback
-    ] ifTrue:[
-        self showDenseWalkback
-    ].
-
-    "Modified: / 17.11.2001 / 20:07:45 / cg"
+    self showingDenseWalkback:(self showingDenseWalkback not)
+
+    "Modified: / 27-07-2012 / 15:00:15 / cg"
 !
 
 updateMenuItems
@@ -6170,21 +6134,25 @@
 !DebugView methodsFor:'private-context handling'!
 
 contextListEntryFor:aContext
-    |s|
-
-    aContext selector == #doIt ifTrue:[
-        aContext receiver isNil ifTrue:[
-            ^ 'doIt' allBold
-        ]
-    ].
-
-    s := Text streamContents:[:s | aContext printOn:s ].
-    RememberedCallChain notNil ifTrue:[
-        (RememberedCallChain includesIdentical:aContext) ifTrue:[
-            s := s colorizeAllWith:(Color red).
-        ].
-    ].
-    ^ s
+    ^ Error
+        handle:[:ex | '???' ]
+        do:[
+            |s|
+
+            aContext selector == #doIt ifTrue:[
+                aContext receiver isNil ifTrue:[
+                    s := 'doIt' allBold
+                ]
+            ].
+
+            s := Text streamContents:[:s | aContext printOn:s ].
+            RememberedCallChain notNil ifTrue:[
+                (RememberedCallChain includesIdentical:aContext) ifTrue:[
+                    s := s colorizeAllWith:(Color red).
+                ].
+            ].
+            s
+        ].
 
     "Created: / 21-05-2007 / 13:30:24 / cg"
 !
@@ -6348,11 +6316,7 @@
                     (MoreDebuggingDetail == true) ifTrue:[
                         nm := (((ObjectMemory addressOf:con) printStringRadix:16) , ' ' , con printString).
                     ] ifFalse:[
-                        Error
-                            handle:[:ex | nm := '???' ]
-                            do:[
-                                nm := self contextListEntryFor:con.
-                            ].
+                        nm := self contextListEntryFor:con.
                     ].
                     text add:nm.
                     count := count + 1.
@@ -6493,7 +6457,7 @@
     ^ true
 
     "Created: / 14-12-1995 / 19:10:31 / cg"
-    "Modified: / 25-07-2012 / 19:15:01 / cg"
+    "Modified: / 27-07-2012 / 15:10:53 / cg"
 !
 
 setContextSkippingInterruptContexts:aContext
@@ -8023,11 +7987,11 @@
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.550 2012-07-27 12:47:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.551 2012-07-27 13:14:10 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.550 2012-07-27 12:47:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.551 2012-07-27 13:14:10 cg Exp $'
 !
 
 version_SVN