The Inbox: Protocols-jr.66.mcz

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

The Inbox: Protocols-jr.66.mcz

commits-2
A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-jr.66.mcz

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

Name: Protocols-jr.66
Author: jr
Time: 10 August 2019, 10:52:44.688208 pm
UUID: d24c7b8e-2920-0a46-9a93-e89755df5ad4
Ancestors: Protocols-jr.65

Quick fix to highlight messages implemented in the browsed class of a Lexicon again

=============== Diff against Protocols-jr.65 ===============

Item was added:
+ ----- Method: Lexicon>>formattedLabel:forSelector:inClass: (in category 'message list') -----
+ formattedLabel: aString forSelector: aSymbol inClass: aClass
+ "Highlight messages implemented in the targetClass in bold print."
+
+ | formattedLabel |
+ formattedLabel := super formattedLabel: aString forSelector: aSymbol inClass: aClass.
+ aClass = targetClass ifTrue:
+ [formattedLabel := formattedLabel asText.
+ (self userInterfaceTheme ownMessageAttributes ifNil: [{TextEmphasis bold}]) do: [:textAttribute |
+ formattedLabel addAttribute: textAttribute]].
+
+ ^ formattedLabel.!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Protocols-jr.66.mcz

Jakob Reschke
The message list items in ProtocolBrowser and subclasses are Texts that were displayed directly until the formatted message list changes came in in CodeHolder. Now that this is overrridden by the formatting, ProtocolBrowser and friends should be refactored to rely on the formatting methods instead. Also, this makes it possibile to finally use MethodReferences (with a custom stringVersion) there.

I might attempt this later, but not today...


Am Sa., 10. Aug. 2019 um 22:53 Uhr schrieb <[hidden email]>:
A new version of Protocols was added to project The Inbox:
http://source.squeak.org/inbox/Protocols-jr.66.mcz

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

Name: Protocols-jr.66
Author: jr
Time: 10 August 2019, 10:52:44.688208 pm
UUID: d24c7b8e-2920-0a46-9a93-e89755df5ad4
Ancestors: Protocols-jr.65

Quick fix to highlight messages implemented in the browsed class of a Lexicon again

=============== Diff against Protocols-jr.65 ===============

Item was added:
+ ----- Method: Lexicon>>formattedLabel:forSelector:inClass: (in category 'message list') -----
+ formattedLabel: aString forSelector: aSymbol inClass: aClass
+       "Highlight messages implemented in the targetClass in bold print."
+       
+       | formattedLabel |
+       formattedLabel := super formattedLabel: aString forSelector: aSymbol inClass: aClass.
+       aClass = targetClass ifTrue:
+               [formattedLabel := formattedLabel asText.
+               (self userInterfaceTheme ownMessageAttributes ifNil: [{TextEmphasis bold}]) do: [:textAttribute |
+                       formattedLabel addAttribute: textAttribute]].
+
+       ^ formattedLabel.!