[squeak-dev] The Trunk: ST80-mt.287.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 18 15:54:25 UTC 2023


Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.287.mcz

==================== Summary ====================

Name: ST80-mt.287
Author: mt
Time: 18 January 2023, 4:54:25.043866 pm
UUID: f905ea43-810a-6446-a8dd-c481defa2aa1
Ancestors: ST80-mt.286

*** Debugger Refactoring - Step 1 of 2 ***

Complements System-mt.1382

=============== Diff against ST80-mt.286 ===============

Item was added:
+ ----- Method: MVCProject>>openDebuggerWindow: (in category 'scheduling & debugging') -----
+ openDebuggerWindow: windowOrModel
+ 
+ 	"Open the window in a way that allows for the current controller to remain active."
+ 	| window |
+ 	window := (windowOrModel isKindOf: View)
+ 		ifTrue: [windowOrModel]
+ 		ifFalse: [self uiManager toolBuilder build: windowOrModel].
+ 	window controller openNoTerminate.
+ 
+ 	"Try redrawing the UI at least once to avoid freeze."
+ 	self restoreDisplay. "Not safely!!"!

Item was added:
+ ----- Method: MVCProject>>prepareProcessForDebugger: (in category 'scheduling & debugging') -----
+ prepareProcessForDebugger: processToDebug
+ 	"Keep track of the controller if it matches. Also note the current cursor."
+ 
+ 	self world activeControllerProcess == processToDebug ifTrue: [		
+ 		processToDebug st80InterruptedController: self world activeController].
+ 
+ 	processToDebug st80SavedCursor: Cursor currentCursor.
+ 	
+ 	super prepareProcessForDebugger: processToDebug.!

Item was added:
+ ----- Method: MVCProject>>resumeProcessSafely: (in category 'scheduling & debugging') -----
+ resumeProcessSafely: aProcess
+ 	"We only want a single controller process running in MVC. Hopefully, #activeControler:andProcess: takes care of terminating the currently active one."
+ 
+ 	aProcess st80SavedCursor show.
+ 	aProcess st80SavedCursor: nil.
+ 
+ 	ScheduledControllers
+ 		activeController: aProcess st80InterruptedController
+ 		andProcess: aProcess.
+ 
+ 	aProcess st80InterruptedController: nil.!

Item was added:
+ ----- Method: MVCProject>>suspendProcessSafely: (in category 'scheduling & debugging') -----
+ suspendProcessSafely: processToDebug
+ 	"Overwritten to activate the controller process for the debugger window.
+ 	See #openDebuggerWindow:."
+ 	
+ 	| controlManager uiProcess wasActive |
+ 	controlManager := self world.	
+ 	uiProcess := controlManager activeControllerProcess.
+ 	wasActive := controlManager inActiveControllerProcess.
+ 	
+ 	"If we are in a helper process, #openNoTerminate WILL NOT activate
+ 	the	debugger's controller. Example: user-interrupt request (cmd+dot).
+ 	See #openDebuggerWindow:."
+ 	(uiProcess == processToDebug and: [wasActive not])
+ 		ifTrue: [[controlManager searchForActiveController] fork].
+ 
+ 	"Be sure to suspend the process we want to debug now. We must do
+ 	this as late as possible in case it is the active process."
+ 	processToDebug suspend.
+ 		
+ 	"If we are NOT in a helper process, #openNoTerminate WILL NOT
+ 	terminate the active controller's process. See #openDebuggerWindow:."
+ 	(uiProcess ~~ processToDebug and: [wasActive])
+ 		ifTrue: [Processor terminateActive].!

Item was added:
+ ----- Method: Process>>st80InterruptedController (in category '*ST80-debugging support') -----
+ st80InterruptedController
+ 
+ 	^ self environmentAt: #st80InterruptedController ifAbsent: nil!

Item was added:
+ ----- Method: Process>>st80InterruptedController: (in category '*ST80-debugging support') -----
+ st80InterruptedController: aController
+ 
+ 	^ self environmentAt: #st80InterruptedController put: aController!

Item was added:
+ ----- Method: Process>>st80SavedCursor (in category '*ST80-debugging support') -----
+ st80SavedCursor
+ 
+ 	^ self environmentAt: #st80SavedCursor ifAbsent: [Cursor normal]!

Item was added:
+ ----- Method: Process>>st80SavedCursor: (in category '*ST80-debugging support') -----
+ st80SavedCursor: aCursor
+ 
+ 	^ self environmentAt: #st80SavedCursor put: aCursor!



More information about the Squeak-dev mailing list