#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Mon, 16 May 2016 23:56:06 +0200
changeset 16611 961f3a9075f8
parent 16610 0eaa2a36a085
child 16612 7ef54262119a
#UI_ENHANCEMENT by cg class: DebugView changed: #withOptionToIgnoreException:do:
DebugView.st
--- a/DebugView.st	Mon May 16 13:29:34 2016 +0200
+++ b/DebugView.st	Mon May 16 23:56:06 2016 +0200
@@ -1849,16 +1849,37 @@
                                     model:ignoreForEverHolder).
                 ].    
             ] do:[
-                |answer|
-
-                answer := Dialog 
-                            confirm:(self resources 
+                |answer canRemove labels actions|
+
+                "/ cannot remove halts or coded breakpoints.
+                canRemove := haltingMethod isMethodWithBreakpoints or:[ haltingMethod isBreakpointed ].
+                labels := #('Ignore' 'Remove Breakpoint' 'Debug' ).
+                actions := #(ignore remove debug).
+                canRemove ifFalse:[
+                    labels := #('Ignore' 'Debug' ).
+                    actions := #(ignore debug).
+                ].    
+
+                answer := OptionBox
+                            choose:(self resources 
                                         stringWithCRs:'%1\%2\\%3'
                                         with:whatError
                                         with:descr
                                         with:where)
-                            yesLabel:(resources string:'Debug')
-                            noLabel:(resources string:'Ignore').
+                            label:whatError 
+                            image:nil 
+                            labels:(resources array:labels)
+                            values:actions 
+                            default:#ignore 
+                            onCancel:#ignore.
+"/                answer := Dialog
+"/                            confirm:(self resources 
+"/                                        stringWithCRs:'%1\%2\\%3'
+"/                                        with:whatError
+"/                                        with:descr
+"/                                        with:where)
+"/                            yesLabel:(resources string:'Debug')
+"/                            noLabel:(resources string:'Ignore').
                 
                 (ignoreForSomeTimeHolder value or:[ignoreForEverHolder value]) ifTrue:[
                     self
@@ -1870,7 +1891,16 @@
                         orIfCalledFromMethod:nil.
                 ].
 
-                answer ifTrue:[
+                answer == #remove ifTrue:[
+                    haltingMethod isMethodWithBreakpoints ifTrue:[
+                        haltingMethod disableBreakpointInLine:lineNrOfHalt
+                    ] ifFalse:[
+                        haltingMethod isBreakpointed ifTrue:[
+                            haltingMethod clearBreakPoint
+                        ].    
+                    ].    
+                ].
+                answer ~~ #debug ifTrue:[
                     ex reject.
                 ]
             ]