The Trunk: Tools-topa.675.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-topa.675.mcz

commits-2
Tobias Pape uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-topa.675.mcz

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

Name: Tools-topa.675
Author: topa
Time: 23 February 2016, 7:12:21.413883 pm
UUID: 9c94666a-8b9c-47bc-b432-0dc66d2c4c02
Ancestors: Tools-mt.674

Fix debuggers popping up when having #showMessageIcons disabled. Thanks to Stephane Rollandin.

(Tiny refactoring along the way)

=============== Diff against Tools-mt.674 ===============

Item was changed:
  ----- Method: Browser>>messageHelpAt: (in category 'message list') -----
  messageHelpAt: anIndex
  "Show the first n lines of the sources code of the selected message."
 
+ | source formatted iconHelp |
- | source formatted |
  Preferences balloonHelpInMessageLists ifFalse: [^ nil].
  self messageList size < anIndex ifTrue: [^ nil].
 
  source := (self selectedClassOrMetaClass >> (self messageList at: anIndex)) 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 messageIconHelpAt: anIndex) ifNotEmpty: [:t |
+ t , Character cr, Character cr].
+ ^ iconHelp asText
-
- ^ (Text newFrom: ((self messageIconHelpAt: anIndex) ifNotEmpty: [:t | t , Character cr, Character cr]))
  append: formatted;
  yourself!

Item was changed:
  ----- Method: Browser>>messageIconHelpAt: (in category 'message list') -----
  messageIconHelpAt: anIndex
 
+ self class showMessageIcons ifFalse: [^ String empty].
- self class showMessageIcons
- ifFalse: [^ nil].
 
  ^ ToolIconHelp iconHelpNamed: (ToolIcons
  iconForClass: self selectedClassOrMetaClass
  selector: (self messageList at: anIndex))!

Item was changed:
  ----- Method: ToolIconHelp class>>iconHelpNamed: (in category 'as yet unclassified') -----
  iconHelpNamed: aSymbol
 
+ ^ (self respondsTo: aSymbol)
+ ifTrue: [self helpTexts at: aSymbol ifAbsentPut: [self perform: aSymbol]]
+ ifFalse: [String empty]
- (self respondsTo: aSymbol)
- ifTrue: [^self helpTexts at: aSymbol ifAbsentPut: [self perform: aSymbol]]
- ifFalse: [^ '']
  !