The Trunk: Morphic-mt.1741.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1741.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1741.mcz

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

Name: Morphic-mt.1741
Author: mt
Time: 15 March 2021, 11:23:13.100586 am
UUID: 2e5a5c44-9fab-6d41-ba67-e94d99da9a07
Ancestors: Morphic-mt.1740

Complements Kernel-mt.1381

Fixes for debugger invocation during code simulation. See  http://forum.world.st/Please-try-out-Fixes-for-debugger-invocation-during-code-simulation-td5127684.html

=============== Diff against Morphic-mt.1740 ===============

Item was added:
+ ----- Method: DialogWindow>>browseInvocation (in category 'running') -----
+ browseInvocation
+ "Browse the first meaningful invocation method of the receiver."
+
+ self exclusive: false.
+
+ (thisContext findContextSuchThat: self invocationContextPredicate) method browse.!

Item was changed:
  ----- Method: DialogWindow>>debugInvocation (in category 'running') -----
  debugInvocation
+ "Bring up a debugger on the active process, displaying the invocation of the receiver. Strip off irrelevant stack frames that are an implementation detail of the invocation."
 
+ self exclusive: false.
+
+ ^ Processor
+ debugContextThat: self invocationContextPredicate
+ title: 'Dialog invocation' translated
+ full: true!
- Processor activeProcess
- debug: self findInvocationContext
- title: 'Dialog invocation'!

Item was removed:
- ----- Method: DialogWindow>>exploreInvocation (in category 'running') -----
- exploreInvocation
-
- self exclusive: false.
- (self findInvocationContext stack collect: #method)
- explore!

Item was removed:
- ----- Method: DialogWindow>>findInvocationContext (in category 'running') -----
- findInvocationContext
-
- | context |
- context := thisContext.
- [context method selector = #getUserResponse and: [context isMethodContext]]
- whileFalse: [context := context sender].
- ^ context!

Item was added:
+ ----- Method: DialogWindow>>invocationContextPredicate (in category 'private') -----
+ invocationContextPredicate
+
+ | searchPhase hiddenCategories |
+ self flag: #todo. "ct: Currently, this might cut away a few contexts too much when a dialog window is opened from Morphic code (e.g., SystemWindow>>relabel) directly. With the introduction of UserNotifications, however, this problem will be solved because there will be always an external context between the client and the receiver. See http://forum.world.st/Discussion-Warning-vs-Halt-or-quot-Why-is-a-warning-a-notification-quot-td5106457.html#a5106605 and others."
+
+ searchPhase := true.
+ hiddenCategories := #('Morphic-Windows' 'ToolBuilder-Kernel' 'ToolBuilder-Morphic' 'ToolBuilder-Morphic-Tools').
+ ^ [:ctx |
+ searchPhase
+ ifTrue: [ "search invocation context"
+ (ctx isMethodContext and: [ctx method selector = #getUserResponse])
+ ifTrue: [searchPhase := false].
+ false]
+ ifFalse: [ "filter out irrelevant contexts"
+ (hiddenCategories includes: ctx receiver class category) not]]!

Item was changed:
  ----- Method: DialogWindow>>offerDialogMenu (in category 'running') -----
  offerDialogMenu
 
  | menu |
  menu := MenuMorph new defaultTarget: self.
  menu
  add: (exclusive == true ifTrue: ['<yes>'] ifFalse: ['<no>']), 'be modally exclusive' translated
  action: #toggleExclusive;
  addLine;
+ add: 'browse invocation' translated
+ action: #browseInvocation;
+ add: 'debug invocation' translated
- add: 'explore dialog invocation' translated
- action: #exploreInvocation;
- add: 'debug dialog invocation' translated
  action: #debugInvocation.
 
  menu popUpEvent: self currentEvent in: self world.
 
  [menu isInWorld] whileTrue: [self world doOneSubCycle].
  self exclusive ifTrue: [self activeHand newMouseFocus: self].!