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

Marcel Taeumel marcel.taeumel at hpi.de
Wed Feb 9 16:51:03 UTC 2022


Done.
Am 09.02.2022 15:20:04 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
Hi Marcel,

should we provide these layout constants via 60Deprecated? I see some packages on GitHub depending on them, and I would not be surprised if I would have used them myself somewhere. :-)

Best,
Christoph
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
Gesendet: Mittwoch, 9. Februar 2022 14:00:46
An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
Betreff: [squeak-dev] The Trunk: Tools-mt.1129.mcz
 
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1129.mcz [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].!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220209/63e66659/attachment.html>


More information about the Squeak-dev mailing list