[squeak-dev] The Trunk: Tools-mt.1129.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Feb 9 13:00:46 UTC 2022


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

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

Name: Tools-mt.1129
Author: mt
Time: 9 February 2022, 2:00:43.820754 pm
UUID: fc1e3163-b722-5645-8f0c-b4bf03ef2b6e
Ancestors: Tools-ct.1128

Minor code cleanup. Makes the addition of ui-theme specific text attributes to illustrate "deprecation" of an artifact (e.g., class/method) re-usable via extension on Text.

=============== Diff against Tools-ct.1128 ===============

Item was removed:
- ----- Method: CodeHolder>>defaultAnnotationPaneHeight (in category 'annotation') -----
- defaultAnnotationPaneHeight
- 	"Answer the receiver's preferred default height for new annotation panes."
- 
- 	^ Preferences parameterAt: #defaultAnnotationPaneHeight ifAbsentPut: [25]!

Item was removed:
- ----- Method: CodeHolder>>defaultButtonPaneHeight (in category 'annotation') -----
- defaultButtonPaneHeight
- 	"Answer the user's preferred default height for new button panes."
- 
- 	^ Preferences parameterAt: #defaultButtonPaneHeight ifAbsentPut: [25]!

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

Item was added:
+ ----- Method: Text>>addAttributesForDeprecation (in category '*Tools-attributes') -----
+ addAttributesForDeprecation
+ 	"Add text attributes to the receiver so that clients will recognize the underlying artifact (e.g., class or method) as deprecated."
+ 	
+ 	((UserInterfaceTheme current get: #deprecatedMessageAttributes for: #CodeHolder)
+ 		ifNil: [{TextColor gray. TextEmphasis struckOut}])
+ 			do: [:textAttribute | self addAttribute: textAttribute].!



More information about the Squeak-dev mailing list