[Pkg] The Trunk: Tools-mt.922.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 29 10:45:09 UTC 2019


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.922.mcz

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

Name: Tools-mt.922
Author: mt
Time: 29 November 2019, 11:45:06.040061 am
UUID: 2a67c032-4bcf-334d-898e-862aeafd93af
Ancestors: Tools-mt.921

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]].
  	
  	formattedLabel := aString asText.
  	
  	(self userInterfaceTheme deprecatedMessageAttributes ifNil: [{TextColor gray. TextEmphasis struckOut}]) do: [:textAttribute |
  		formattedLabel addAttribute: textAttribute].
  
  	^ formattedLabel.!



More information about the Packages mailing list