[squeak-dev] The Trunk: Tools-nice.305.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 2 19:42:26 UTC 2011


Nicolas Cellier uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-nice.305.mcz

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

Name: Tools-nice.305
Author: nice
Time: 2 April 2011, 9:41:26.838 pm
UUID: 9e3c6b7c-7e5f-485b-b625-47f8d2345edd
Ancestors: Tools-nice.304, Tools-eem.304

Merge

=============== Diff against Tools-nice.304 ===============

Item was changed:
  ----- Method: Debugger>>browseMessages (in category 'context stack menu') -----
  browseMessages
  	"Present a menu of all messages sent by the currently selected message.
  	Open a message set browser of all implementors of the message chosen.
  	Do nothing if no message is chosen."
  
  	contextStackIndex = 0 ifTrue: [^ self].
+ 	self withSelectorAndMessagesIn: self selectedContext method
- 	self withSelectorAndMessagesIn: currentCompiledMethod
  		evaluate: [:selector| self systemNavigation browseAllImplementorsOf: selector]!

Item was changed:
  ----- Method: Debugger>>browseSendersOfMessages (in category 'context stack menu') -----
  browseSendersOfMessages
  	"Present a menu of the currently selected message, as well as all
  	messages sent by it.  Open a message set browser of all senders
  	of the message chosen."
  
  	contextStackIndex = 0 ifTrue: [^ self].
+ 	self withSelectorAndMessagesIn: self selectedContext method
- 	self withSelectorAndMessagesIn: currentCompiledMethod
  		evaluate: [:selector| self systemNavigation browseAllCallsOn: selector]!

Item was changed:
  ----- Method: Debugger>>contents:notifying: (in category 'accessing') -----
  contents: aText notifying: aController
  	"The retrieved information has changed and its source must now be updated.
  	 In this case, the retrieved information is the method of the selected context."
  	| result selector classOfMethod category h ctxt newMethod |
  	contextStackIndex = 0 ifTrue:
  		[^false].
  	self selectedContext isExecutingBlock ifTrue:
  		[h := self selectedContext activeHome.
  		 h ifNil:
  			[self inform: 'Method for block not found on stack, can''t edit and continue'.
  			 ^false].
  		 (self confirm: 'I will have to revert to the method from\which this block originated.  Is that OK?' withCRs) ifFalse:
  			[^false].
  		self resetContext: h.
+ 		"N.B. Only reset the contents if the compilation succeeds.  If contents are reset
+ 		 when compilation fails both compiler error message and modifications are lost."
+ 		(result := self contents: aText notifying: aController) ifTrue:
+ 			[self contentsChanged].
- 		result := self contents: aText notifying: aController.
- 		self contentsChanged.
  		^result].
  
  	classOfMethod := self selectedClass.
  	category := self selectedMessageCategoryName.
  	selector := self selectedClass newParser parseSelector: aText.
  	(selector == self selectedMessageName
  	 or: [(self selectedMessageName beginsWith: 'DoIt')
  		and: [selector numArgs = self selectedMessageName numArgs]]) ifFalse:
  		[self inform: 'can''t change selector'.
  		 ^false].
  	selector := classOfMethod
  				compile: aText
  				classified: category
  				notifying: aController.
  	selector ifNil: [^false]. "compile cancelled"
  	contents := aText.
  	newMethod := classOfMethod compiledMethodAt: selector.
  	newMethod isQuick ifTrue:
  		[self down.
  		 self selectedContext jump: (self selectedContext previousPc - self selectedContext pc)].
  	ctxt := interruptedProcess popTo: self selectedContext.
  	ctxt == self selectedContext
  		ifFalse:
  			[self inform: 'Method saved, but current context unchanged\because of unwind error. Click OK to see error' withCRs]
  		ifTrue:
  			[newMethod isQuick ifFalse:
  				[interruptedProcess
  					restartTopWith: newMethod;
  				 	stepToSendOrReturn].
  			contextVariablesInspector object: nil].
  	self resetContext: ctxt.
  	Smalltalk isMorphic ifTrue:
  		[World
  			addAlarm: #changed:
  			withArguments: #(contentsSelection)
  			for: self
  			at: (Time millisecondClockValue + 200)].
  	^true!




More information about the Squeak-dev mailing list