--- a/DebugView.st Sat Nov 17 11:56:58 2001 +0100
+++ b/DebugView.st Sat Nov 17 12:36:07 2001 +0100
@@ -4477,110 +4477,9 @@
"user wants some code to be recompiled - must unwind stack since everything above
and including selected method cannot be continued."
- ^ self codeAccept:someCode unwind:true
-!
-
-codeAccept:someCode unwind:doUnwind
- "user wants some code to be recompiled - must unwind stack since everything above
- and including selected method cannot be continued."
-
- "
- actually, this is not true, since the active methods will still be
- executed correctly - however, the code shown in the debugger is no
- longer in sync (showing the new code) with the executed code.
- Therefore, we hide those contexts to avoid confusion ....
- If you dont like this behavior, remove the 'inspecting ifFalse:' check below"
-
- "walk up context chain and find highest context which is either the selected context,
- or - if its a block-context - whose home is the selected context"
-
- |con top sel implementorClass method newMethod category|
-
-
- codeView withWaitCursorDo:[
- "
- find the method-home context for this one
- "
- con := selectedContext.
- top := con.
- [con notNil] whileTrue:[
- (con methodHome == selectedContext) ifTrue:[
- top := con
- ].
- con := con sender
- ].
- "
- use class&selector to find the method for the compilation
- and compile.
- "
- sel := selectedContext selector.
- implementorClass := selectedContext methodClass.
- implementorClass notNil ifTrue:[
- method := implementorClass compiledMethodAt:sel.
- category := method category
- ] ifFalse:[
- implementorClass := selectedContext receiver class.
- implementorClass ~~ Object ifTrue:[
- implementorClass := Dialog
- request:'Accept in which class:'
- initialAnswer:implementorClass name
- list:(implementorClass withAllSuperclasses collect:[:each| each name]).
- implementorClass size == 0 ifTrue:[
- ^ self "/ cancelled
- ].
- implementorClass := Smalltalk at:implementorClass asSymbol.
- implementorClass isNil ifTrue:[
- Dialog warn:'no such class'.
- ^ self "/ cancelled
- ].
- ].
- category := '* As yet uncategorized *'.
- ].
-
- "/
- "/ provide the classes nameSpace on a query;
- "/ in case we accept while in another nameSpace context,
- "/ (but for a class which is somewhere else)
- "/
- Class updateChangeFileQuerySignal answer:true
- do:[
- Class updateChangeListQuerySignal answer:true
- do:[
- Class nameSpaceQuerySignal
- answer:(implementorClass nameSpace)
- do:[
- newMethod := implementorClass compilerClass
- compile:someCode
- forClass:implementorClass
- inCategory:category
- notifying:codeView.
- ].
- ].
- ].
-
- inspecting ifFalse:[
- "
- if it worked, remove everything up to and including top
- from context chain
- "
- (newMethod notNil and:[newMethod ~~ #Error]) ifTrue:[
- codeView modified:false.
-
- doUnwind ifTrue:[
- self setContext:(top sender).
-
- "
- continue/step is no longer possible
- "
- canContinue := false.
- exitAction := #return.
- ].
- self showSelection:1.
- ].
- ].
- ].
-
- "Modified: / 15.11.2001 / 17:07:29 / cg"
+ ^ self codeAccept:someCode unwind:true onCancel:nil
+
+ "Modified: / 17.11.2001 / 12:24:37 / cg"
!
codeAccept:someCode unwind:doUnwind onCancel:cancelAction
@@ -5143,6 +5042,6 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.298 2001-11-16 17:20:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.299 2001-11-17 11:36:07 cg Exp $'
! !
DebugView initialize!