[squeak-dev] The Trunk: Morphic-mt.2068.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jan 18 16:08:32 UTC 2023
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2068.mcz
==================== Summary ====================
Name: Morphic-mt.2068
Author: mt
Time: 18 January 2023, 5:08:29.148866 pm
UUID: 47a1cafa-a98a-bb42-9d8e-77b062dc6d4f
Ancestors: Morphic-mt.2067
*** Debugger Refactoring - Step 3 of 2 ***
Remove and/or deprecate the old interface.
=============== Diff against Morphic-mt.2067 ===============
Item was removed:
- Debugger subclass: #MorphicDebugger
- instanceVariableNames: 'errorWasInUIProcess'
- classVariableNames: ''
- poolDictionaries: ''
- category: 'Morphic-Support'!
Item was removed:
- ----- Method: MorphicDebugger class>>openOn:context:label:contents:fullView: (in category 'opening') -----
- openOn: processToDebug context: context label: title contents: contentsStringOrNil fullView: full
-
- | debugger uiBlock |
- debugger := self new
- process: processToDebug context: context;
- errorWasInUIProcess: (Project current spawnNewProcessIfThisIsUI: processToDebug).
-
- uiBlock := [
- full
- ifTrue: [debugger openFullNoSuspendLabel: title]
- ifFalse: [debugger openNotifierNoSuspendContents: contentsStringOrNil label: title].
-
- "Try layouting the debugger tool at least once to avoid freeze."
- debugger topView ifNotNil: [:window |
- "There are way too many #fullBounds sends. Layout errors might already have happened."
- window allMorphsDo: [:m | (m hasProperty: #errorOnLayout) ifTrue: [self error: 'Layout error']].
- window world doLayout. "Not safely!!"].
- "Try drawing the debugger tool at least once to avoid freeze."
- debugger topView ifNotNil: [:window | window world displayWorld. "Not safely!!"].
- ].
-
- "Schedule debugging in a deferred UI message if necessary. Note that only the ui process should execute ui code."
- (Project current uiProcess isActiveProcess not or: [processToDebug isActiveProcess])
- ifFalse: uiBlock
- ifTrue: [ | event |
- self flag: #discuss. "mt: We need to preserve the currentEvent for #openToolsAttachedToMouseCursor ..."
- event := self currentEvent.
- Project current addDeferredUIMessage: [event becomeActiveDuring: uiBlock]].
-
- processToDebug suspend.
-
- "Get here only if active process is not the process-to-debug. So in tests, use a helper process if you want to access this return value."
- ^ debugger!
Item was removed:
- ----- Method: MorphicDebugger>>errorWasInUIProcess (in category 'accessing') -----
- errorWasInUIProcess
-
- ^ errorWasInUIProcess!
Item was removed:
- ----- Method: MorphicDebugger>>errorWasInUIProcess: (in category 'accessing') -----
- errorWasInUIProcess: boolean
-
- errorWasInUIProcess := boolean!
Item was removed:
- ----- Method: MorphicDebugger>>initialize (in category 'initialize') -----
- initialize
-
- super initialize.
-
- errorWasInUIProcess := false.!
Item was removed:
- ----- Method: MorphicDebugger>>openFullFromNotifier: (in category 'initialize') -----
- openFullFromNotifier: notifierWindow
- "Create, schedule and answer a full debugger with the given label. Do not terminate the current active process."
-
- super openFullFromNotifier: notifierWindow.
-
- notifierWindow delete.
-
- ^ ToolBuilder default
- open: self
- label: notifierWindow label!
Item was removed:
- ----- Method: MorphicDebugger>>openFullNoSuspendLabel: (in category 'initialize') -----
- openFullNoSuspendLabel: aString
- "Create, schedule and answer a full debugger with the given label. Do not terminate the current active process."
-
- super openFullNoSuspendLabel: aString.
-
- ^ ToolBuilder default
- open: self
- label: aString!
Item was removed:
- ----- Method: MorphicDebugger>>openNotifierNoSuspendContents:label: (in category 'initialize') -----
- openNotifierNoSuspendContents: msgString label: label
-
- | builder spec |
- super openNotifierNoSuspendContents: msgString label: label.
-
- builder := ToolBuilder default.
- spec := self buildNotifierWith: builder label: label message: msgString.
-
- ^ ToolBuilder default open: spec!
Item was removed:
- ----- Method: MorphicDebugger>>resumeProcess: (in category 'private') -----
- resumeProcess: processToResume
-
- processToResume isTerminated ifFalse: [
- errorWasInUIProcess ifTrue: [Project current uiProcess: processToResume].
- processToResume resume.
- errorWasInUIProcess ifTrue: [Processor terminateActive]].!
Item was removed:
- ----- Method: MorphicDebugger>>windowIsClosing (in category 'initialize') -----
- windowIsClosing
- "Keep track of last debugger extent."
-
- interruptedProcess ifNil: [ ^ self ].
-
- SavedExtent ifNotNil:
- [ self dependents
- detect:
- [ : each | each isWindowForModel: self ]
- ifFound:
- [ : topWindow | | isDebuggerNotNotifier |
- isDebuggerNotNotifier := self dependents anySatisfy:
- [ : each | each isTextView ].
- isDebuggerNotNotifier ifTrue: [
- SavedExtent := (topWindow extent / RealEstateAgent scaleFactor) rounded ] ]
- ifNone: [ "do nothing" ] ].
-
- super windowIsClosing.!
Item was removed:
- ----- Method: MorphicProject>>debuggerClass (in category 'scheduling & debugging') -----
- debuggerClass
-
- ^ Smalltalk classNamed: #MorphicDebugger!
Item was changed:
----- Method: MorphicProject>>spawnNewProcessIfThisIsUI: (in category 'active process') -----
spawnNewProcessIfThisIsUI: suspendedProcess
"Initialize a UI process if needed. Answer true if suspendedProcess was interrupted
from a UI process."
self uiProcess == suspendedProcess ifTrue: [
self spawnNewProcess.
+ suspendedProcess setUiProcessFlag.
^true
].
"Ensure that the UI process is running."
self uiProcess
ifNil: [self spawnNewProcess]
ifNotNil: [:p | p isSuspended ifTrue: [
self restoreDisplay.
self uiProcess resume]].
^false "no new process was created"
!
Item was removed:
- ----- Method: MorphicProject>>syntaxError: (in category 'scheduling & debugging') -----
- syntaxError: aSyntaxErrorNotification
-
- | compilerProcess errorWasInUIProcess debugger |
- debugger := (super syntaxError: aSyntaxErrorNotification) model debugger.
-
- compilerProcess := Processor activeProcess.
- errorWasInUIProcess := self spawnNewProcessIfThisIsUI: compilerProcess.
-
- debugger errorWasInUIProcess: errorWasInUIProcess.
- compilerProcess suspend.!
More information about the Squeak-dev
mailing list
|