Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.677.mcz ==================== Summary ==================== Name: Tools-topa.677 Author: topa Time: 2 March 2016, 1:16:14.883018 am UUID: 00c00648-196c-4ecf-a540-50ac9d92c4b0 Ancestors: Tools-topa.676 pull up toggleBreakOnEntry and robustify things against missing compiled methods =============== Diff against Tools-topa.676 =============== Item was changed: ----- Method: Browser>>messageHelpFor: (in category 'message list') ----- messageHelpFor: aSelector "Show the first n lines of the sources code of the message behind aSelector." | source formatted iconHelp | Preferences balloonHelpInMessageLists ifFalse: [^ nil]. + source := (self selectedClassOrMetaClass compiledMethodAt: aSelector ifAbsent: [^ nil]) getSource. - source := (self selectedClassOrMetaClass >> aSelector) getSource. source lineCount > 5 ifTrue: [ | sourceLines | sourceLines := (source asString lines copyFrom: 1 to: 5) asOrderedCollection. sourceLines add: ' [...]'. source := sourceLines joinSeparatedBy: Character cr]. formatted := SHTextStylerST80 new classOrMetaClass: self selectedClassOrMetaClass; styledTextFor: source asText. iconHelp := (self messageIconHelpFor: aSelector) ifNotEmpty: [:t | t , Character cr, Character cr]. ^ iconHelp asText append: formatted; yourself! Item was removed: - ----- Method: Browser>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName]. - self changed: #messageList! Item was added: + ----- Method: CodeHolder>>toggleBreakOnEntry (in category 'breakpoints') ----- + toggleBreakOnEntry + "Install or uninstall a halt-on-entry breakpoint" + + | selectedMethod | + self selectedClassOrMetaClass ifNil: [ ^self]. + selectedMethod := self selectedClassOrMetaClass + compiledMethodAt: self selectedMessageName + ifAbsent: [^ self]. + selectedMethod hasBreakpoint + ifTrue: + [BreakpointManager unInstall: selectedMethod] + ifFalse: + [BreakpointManager + installInClass: self selectedClassOrMetaClass + selector: self selectedMessageName]. + self changed: #messageList! Item was removed: - ----- Method: Debugger>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName].! Item was removed: - ----- Method: MessageSet>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName]. - self changed: #messageList! |
Free forum by Nabble | Edit this page |