Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.304.mcz
==================== Summary ====================
Name: Tools-eem.304 Author: eem Time: 31 March 2011, 6:29:51.619 pm UUID: bf2886ee-1f33-47ad-9025-c7253c619dd8 Ancestors: Tools-nice.303
Debugger: - use the selectedContext's method when browsing senders and implementors. - do not discard changes if the compilation of an edited method fails when in a block.
=============== Diff against Tools-nice.303 ===============
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!
packages@lists.squeakfoundation.org