[squeak-dev] The Trunk: Morphic-ct.1978.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 30 14:19:23 UTC 2022


Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1978.mcz

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

Name: Morphic-ct.1978
Author: ct
Time: 30 April 2022, 4:19:14.956924 pm
UUID: cc487d75-d97c-8440-a198-83b5e57123ed
Ancestors: Morphic-mt.1977

Adds optional model hook #debugExpression:requestor: to TextEditor, allowing models to pass the original requestor to the compiler. Complements Morphic-ct.1893 (#evaluateExpression:requestor:).

=============== Diff against Morphic-mt.1977 ===============

Item was changed:
  ----- Method: TextEditor>>debugIt (in category 'do-its') -----
  debugIt
  
  	| receiver context helperProcess |
  	self lineSelectAndEmptyCheck: [^self].
+ 	
+ 	(model respondsTo: #debugExpression:requestor:)
+ 		ifTrue: [^ model perform: #debugExpression:requestor: with: self selection with: self].
- 
  	(model respondsTo: #debugExpression:)
  		ifTrue: [^ model perform: #debugExpression: with: self selection].
+ 	
- 
  	receiver := (model respondsTo: #doItReceiver) 
  		ifTrue: [model doItReceiver]
  		ifFalse: [nil].
  		
  	context := (model respondsTo: #doItContext) 
  		ifTrue: [model doItContext]
  		ifFalse: [nil].
  
  	(self compileSelectionFor: receiver in: context) ifNotNil: [:doItMethod |
  		helperProcess := context
  			ifNil: [self assert: doItMethod selector = #DoIt.
  				Process forMethod: doItMethod receiver: receiver]
  			ifNotNil: [self assert: doItMethod selector = #DoItIn:.
  				Process forMethod: doItMethod receiver: receiver arguments: {context}].
+ 		helperProcess debugWithTitle: 'Debug it' translated].!
- 		helperProcess debugWithTitle: 'Debug it'].!



More information about the Squeak-dev mailing list