DebugView.st
changeset 16960 1495d95f87a1
parent 16958 aad23f6aa046
child 16961 64ff32c6309b
--- a/DebugView.st	Fri Oct 14 15:14:18 2016 +0200
+++ b/DebugView.st	Fri Oct 14 15:14:29 2016 +0200
@@ -3028,45 +3028,45 @@
     |m|
 
     withConfirmation ifTrue:[
-	self checkIfCodeIsReallyModified ifTrue:[
-	    (self confirm:('Code modified - exit anyway ?'))
-	    ifFalse:[
-		^ self
-	    ]
-	]
+        self checkIfCodeIsReallyModified ifTrue:[
+            (self confirm:('Code was modified.\\Exit anyway ?'))
+            ifFalse:[
+                ^ self
+            ]
+        ]
     ].
 
     self autoUpdateOff.
 
     (m := contextView middleButtonMenu) notNil ifTrue:[m hide].
     inspecting ifFalse:[
-	"I am running on top of a process, abort or continue it"
-
-	windowGroup notNil ifTrue:[
-	    windowGroup setProcess:nil.
-	].
-	self uncacheMyself.
-
-	"/
-	"/ catch invalid return;
-	"/ this happens, when my process has somehow died (quickterminate)
-	"/ and I am a leftOver view, which gets terminated via the launchers
-	"/ #destroy-window function.
-	"/
-	Context cannotReturnSignal handle:[:ex |
-	    'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR.
-	    self uncacheMyself.
-	    Debugger newDebugger.
-	    ex return.
-	] do:[
-	    AbortOperationRequest isHandled ifTrue:[
-		self doAbort.
-	    ] ifFalse:[
-		self doContinue
-	    ]
-	].
-	"/ We don't reach this point normally
-	'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR.
+        "I am running on top of a process, abort or continue it"
+
+        windowGroup notNil ifTrue:[
+            windowGroup setProcess:nil.
+        ].
+        self uncacheMyself.
+
+        "/
+        "/ catch invalid return;
+        "/ this happens, when my process has somehow died (quickterminate)
+        "/ and I am a leftOver view, which gets terminated via the launchers
+        "/ #destroy-window function.
+        "/
+        Context cannotReturnSignal handle:[:ex |
+            'DebugView [info]: OOPS - non regular debugView closing(1)' infoPrintCR.
+            self uncacheMyself.
+            Debugger newDebugger.
+            ex return.
+        ] do:[
+            AbortOperationRequest isHandled ifTrue:[
+                self doAbort.
+            ] ifFalse:[
+                self doContinue
+            ]
+        ].
+        "/ We don't reach this point normally
+        'DebugView [info]: OOPS - non regular debugView closing(2)' infoPrintCR.
     ].
 
     Debugger newDebugger.
@@ -4876,41 +4876,12 @@
      from whatever the process is doing, but does not terminate it."
 
     self checkIfCodeIsReallyModified ifTrue:[
-	(self confirm:('Code modified - abort anyway ?'))
-	ifFalse:[
-	    ^ self
-	]
-    ].
-
-    inspecting ifTrue:[
-	inspectedProcess isDead ifTrue:[
-	    self showTerminated.
-	    ^ self
-	].
-	(AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[
-	    self showError:'** the process does not handle the abort signal **'
-	] ifTrue:[
-	    self interruptProcessWith:[AbortOperationRequest raise].
-	].
-	^ self
-    ].
-
-    steppedContext := wrapperContext := nil.
-    haveControl := false.
-    exitAction := #abort.
-
-    "exit private event-loop"
-    catchBlock notNil ifTrue:[
-	abortButton turnOff.
-	catchBlock value.
-
-	"/ not reached
-	'DebugView [warning]: abort failed' errorPrintCR.
-    ].
-
-    ^ self.
-
-    "Modified: / 17.11.2001 / 22:53:22 / cg"
+        (self confirm:('Code was modified.\\Abort anyway ?'))
+        ifFalse:[
+            ^ self
+        ]
+    ].
+    ^ self doAbortWithoutConfirmation
 !
 
 doAbortAll
@@ -4956,6 +4927,42 @@
     "Modified: / 17.11.2001 / 22:53:22 / cg"
 !
 
+doAbortWithoutConfirmation
+    "abort - send Object>>abortSignal, which is usually caught
+     at save places (for example: in the event loop) and returns back
+     from whatever the process is doing, but does not terminate it."
+
+    inspecting ifTrue:[
+        inspectedProcess isDead ifTrue:[
+            self showTerminated.
+            ^ self
+        ].
+        (AbortOperationRequest isHandledIn:inspectedProcess suspendedContext) ifFalse:[
+            self showError:'** the process does not handle the abort signal **'
+        ] ifTrue:[
+            self interruptProcessWith:[AbortOperationRequest raise].
+        ].
+        ^ self
+    ].
+
+    steppedContext := wrapperContext := nil.
+    haveControl := false.
+    exitAction := #abort.
+
+    "exit private event-loop"
+    catchBlock notNil ifTrue:[
+        abortButton turnOff.
+        catchBlock value.
+
+        "/ not reached
+        'DebugView [warning]: abort failed' errorPrintCR.
+    ].
+
+    ^ self.
+
+    "Modified: / 17.11.2001 / 22:53:22 / cg"
+!
+
 doChangeProcessPriority
     "ask for and change the process's priority"
 
@@ -8261,6 +8268,8 @@
 "/                self showError:ex description.
 "/                ex proceed.
 "/            ] do:[
+                device isNil ifTrue:[^ self].
+                
                 device
                     dispatchModalWhile:[
                         Processor activeProcess state:#debug.
@@ -8769,9 +8778,9 @@
      Redefined here, to answer true, if exclusice Debugger, which cannot handle popup boxes"
 
     (exclusive or:[windowGroup isNil]) ifTrue:[
-	^ true
-    ].
-    ^ super confirm:aString.
+        ^ true
+    ].
+    ^ super confirm:(resources stringWithCRs:aString).
 !
 
 doShowSelection:lineNr