<div dir="ltr">Nice.<div><br></div><div>Best,</div><div>Karl <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 7:16 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A new version of Tools was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Tools-pre.659.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox/Tools-pre.659.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Tools-pre.659<br>
Author: pre<br>
Time: 8 December 2015, 7:16:41.034 pm<br>
UUID: a7cb3cba-074b-46a6-8a83-fada58007b25<br>
Ancestors: Tools-eem.658<br>
<br>
This adds balloon help texts to the message list of the standard browser to explain the symbols shown in front of message names.<br>
<br>
=============== Diff against Tools-eem.658 ===============<br>
<br>
Item was changed:<br>
----- Method: Browser>>messageHelpAt: (in category 'message list') -----<br>
messageHelpAt: anIndex<br>
"Show the first n lines of the sources code of the selected message."<br>
<br>
+ | source formatted |<br>
- | source formatted lineCount |<br>
Preferences balloonHelpInMessageLists ifFalse: [^ nil].<br>
self messageList size < anIndex ifTrue: [^ nil].<br>
<br>
source := (self selectedClassOrMetaClass >> (self messageList at: anIndex)) getSource.<br>
+ source lineCount > 5 ifTrue: [<br>
+ | sourceLines |<br>
+ sourceLines := (source asString lines copyFrom: 1 to: 5) asOrderedCollection.<br>
+ sourceLines add: ' [...]'.<br>
+ source := sourceLines joinSeparatedBy: Character cr].<br>
+<br>
formatted := SHTextStylerST80 new<br>
classOrMetaClass: self selectedClassOrMetaClass;<br>
styledTextFor: source asText.<br>
-<br>
- lineCount := 0.<br>
- source doWithIndex: [:char :index |<br>
- char = Character cr ifTrue: [lineCount := lineCount + 1].<br>
- lineCount > 10 ifTrue: [<br>
- formatted := formatted copyFrom: 1 to: index-1.<br>
- formatted append: ' [...]'.<br>
- ^ formatted]].<br>
<br>
+ ^ (Text newFrom: ((self messageIconHelpAt: anIndex) ifNotEmpty: [:t | t , Character cr, Character cr]))<br>
+ append: formatted;<br>
+ yourself!<br>
- ^ formatted!<br>
<br>
Item was added:<br>
+ ----- Method: Browser>>messageIconHelpAt: (in category 'message list') -----<br>
+ messageIconHelpAt: anIndex<br>
+<br>
+ self class showMessageIcons<br>
+ ifFalse: [^ nil].<br>
+<br>
+ ^ ToolIconHelp iconHelpNamed: (ToolIcons<br>
+ iconForClass: self selectedClassOrMetaClass<br>
+ selector: (self messageList at: anIndex))!<br>
<br>
Item was added:<br>
+ Object subclass: #ToolIconHelp<br>
+ instanceVariableNames: ''<br>
+ classVariableNames: 'HelpTexts'<br>
+ poolDictionaries: ''<br>
+ category: 'Tools-Base'!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>abstract (in category 'as yet unclassified') -----<br>
+ abstract<br>
+<br>
+ ^ 'This method is abstract.' !<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>arrowDown (in category 'as yet unclassified') -----<br>
+ arrowDown<br>
+<br>
+ ^ 'This method is overriden by another method.'!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>arrowUp (in category 'as yet unclassified') -----<br>
+ arrowUp<br>
+<br>
+ ^ 'This method overrides a super method.'!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>arrowUpAndDown (in category 'as yet unclassified') -----<br>
+ arrowUpAndDown<br>
+<br>
+ ^ 'This method overrides and is overridden by other methods.'!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>blank (in category 'as yet unclassified') -----<br>
+ blank<br>
+<br>
+ ^ ''!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>breakpoint (in category 'as yet unclassified') -----<br>
+ breakpoint<br>
+<br>
+ ^ 'This method contains a breakpoint.'!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>flag (in category 'as yet unclassified') -----<br>
+ flag<br>
+<br>
+ ^ 'This method needs attention of some kind.' !<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>helpTexts (in category 'as yet unclassified') -----<br>
+ helpTexts<br>
+<br>
+ ^ HelpTexts ifNil: [HelpTexts := IdentityDictionary new]!<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>iconHelpNamed: (in category 'as yet unclassified') -----<br>
+ iconHelpNamed: aSymbol<br>
+<br>
+ (self respondsTo: aSymbol)<br>
+ ifTrue: [^self helpTexts at: aSymbol ifAbsentPut: [self perform: aSymbol]]<br>
+ ifFalse: [^ '']<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>no (in category 'as yet unclassified') -----<br>
+ no<br>
+<br>
+ ^ 'This method should not be implemented.' !<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>notOverridden (in category 'as yet unclassified') -----<br>
+ notOverridden<br>
+<br>
+ ^ 'This method is abstract and has not been overridden.' !<br>
<br>
Item was added:<br>
+ ----- Method: ToolIconHelp class>>primitive (in category 'as yet unclassified') -----<br>
+ primitive<br>
+<br>
+ ^ 'This method implements a primitive.'!<br>
<br>
<br>
</blockquote></div><br></div>