Time: 29 November 2019, 11:45:06.040061 am
Due to recurrent requests, add an #ifNil-check for the class argument in the label-formatting methods of all code holders. Still, also document the situation in a flag comment. At least, this makes this method more robust for the upcoming release. :-)
=============== Diff against Tools-mt.921 ===============
Item was changed:
----- Method: CodeHolder>>formattedLabel:forSelector:inClass: (in category 'message list') -----
formattedLabel: aString forSelector: aSymbol inClass: aClass
+ "Show deprecated messages differently so that users recognize them quickly to avoid them. This is a performance critical method in the user interface."
- "Show deprecated messages differently so that users recognize them quickly to avoid them."
| formattedLabel |
+ self flag: #investigate. "mt: aClass must never be nil!! Faulty tools should override this call themselves or fix the caller site."
+ aClass ifNil: [^ aString].
(aSymbol = #Definition or: [aSymbol = #Comment])
ifTrue: [aClass isDeprecated
ifFalse: [^ aString]]
ifFalse: [(aClass isDeprecated or: [(aClass compiledMethodAt: aSymbol ifAbsent: [^ aString]) isDeprecated])
ifFalse: [^ aString]].