[squeak-dev] The Trunk: Morphic-mt.953.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 1 09:51:54 UTC 2015


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

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

Name: Morphic-mt.953
Author: mt
Time: 1 May 2015, 11:51:15.58 am
UUID: 20ca3687-6855-9d48-aa9a-efbc4a201aa4
Ancestors: Morphic-mt.952

Text editor hooks modified to be more descriptive on model side. And to not confuse Tweak.

=============== Diff against Morphic-mt.952 ===============

Item was changed:
  ----- Method: TextEditor>>debugIt (in category 'do-its') -----
  debugIt
  
  	| receiver context |
  	self lineSelectAndEmptyCheck: [^self].
  
+ 	(model respondsTo: #debugExpression:)
+ 		ifTrue: [^ model perform: #debugExpression: with: self selection].
- 	(model respondsTo: #debugIt:)
- 		ifTrue: [^ model perform: #debugIt: 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: [:method |
  		self debug: method receiver: receiver in: context].!

Item was changed:
  ----- Method: TextEditor>>evaluateSelectionAndDo: (in category 'do-its') -----
  evaluateSelectionAndDo: aBlock
  	"Treat the current selection as an expression; evaluate it and invoke aBlock with the result."
  	| result rcvr ctxt |
  	self lineSelectAndEmptyCheck: [^ nil].
  
+ 	(model respondsTo: #evaluateExpression:) ifTrue: [
+ 		^ aBlock value: (model perform: #evaluateExpression: with: self selection)].
- 	(model respondsTo: #evaluate:) ifTrue: [
- 		^ aBlock value: (model perform: #evaluate: with: self selection)].
  
  	(model respondsTo: #doItReceiver) 
  		ifTrue: [ rcvr := model doItReceiver.
  				ctxt := model doItContext]
  		ifFalse: [rcvr := ctxt := nil].
  	result := [
  		rcvr class evaluatorClass new 
  			evaluate: self selectionAsStream
  			in: ctxt
  			to: rcvr
  			notifying: self
  			ifFail: [morph flash. ^ nil]
  			logged: true.
  	] 
  		on: OutOfScopeNotification 
  		do: [ :ex | ex resume: true].
  		
+ 	(model respondsTo: #expressionEvaluated:result:) ifTrue: [
+ 		model perform: #expressionEvaluated:result: with: self selection with: result].
- 	(model respondsTo: #evaluated:result:) ifTrue: [
- 		model perform: #evaluated:result: with: self selection with: result].
  		
  	^aBlock value: result!



More information about the Squeak-dev mailing list