[squeak-dev] The Inbox: Tools-mt.856.mcz

Rein, Patrick Patrick.Rein at hpi.de
Wed Jul 24 14:59:46 UTC 2019


+1, thanks for adding this Marcel!

I think this could improve long-term code quality as it becomes clearer which methods are only there for compatibility reasons and should actually not be used actively. :)

Bests
Patrick
________________________________________
From: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> on behalf of Taeumel, Marcel
Sent: Wednesday, July 24, 2019 1:21:57 PM
To: JOHN SARKELA via Squeak-dev
Subject: Re: [squeak-dev] The Inbox: Tools-mt.856.mcz

If we want this in Trunk, I would also add support to all UI themes.

[cid:4e740fc8-3b77-4069-9304-6385f48d7d00]

Best,
Marcel

Am 24.07.2019 13:18:51 schrieb commits at source.squeak.org <commits at source.squeak.org>:

A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-mt.856.mcz

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

Name: Tools-mt.856
Author: mt
Time: 24 July 2019, 1:18:41.968109 pm
UUID: 49d7ca18-63b6-4870-acaf-a44ec7c91b84
Ancestors: Tools-mt.855

In the system browser's message list, show deprecated methods gray and struck-out when all message are listed.

=============== Diff against Tools-mt.855 ===============

Item was changed:
----- Method: Browser>>messageList (in category 'message list') -----
messageList
+ "Answer an Array of the message selectors of the currently selected message category. If no category is selected or the '-- all --' category is selected, return all method selectors. Make deprecated messages look gray and struck-out."
+
- "Answer an Array of the message selectors of the currently selected message category, provided that the messageCategoryListIndex is in proper range. Otherwise, answer an empty Array If messageCategoryListIndex is found to be larger than the number of categories (it happens!!), it is reset to zero."
- | sel |
- (sel := self messageCategoryListSelection) ifNil:
- [
- ^ self classOrMetaClassOrganizer
- ifNil: [Array new]
- ifNotNil: [self classOrMetaClassOrganizer allMethodSelectors]
- "^ Array new"
- ].

+ ^ (self selectedMessageCategoryName isNil or: [self selectedMessageCategoryName = ClassOrganizer allCategory])
+ ifTrue: [
+ self classOrMetaClassOrganizer
+ ifNil: [Array new]
+ ifNotNil: [:organizer | organizer allMethodSelectors collect: [:ea |
+ | method |
+ ea = #messageList ifTrue: [ea] ifFalse: [
+ method := self selectedClassOrMetaClass compiledMethodAt: ea.
+ ((method hasLiteral: #deprecated scanForSpecial: false)
+ or: [method hasLiteral: #deprecated: scanForSpecial: false])
+ ifTrue: [ea asText
+ addAttribute: (TextColor color: Color gray);
+ addAttribute: TextEmphasis struckOut;
+ yourself]
+ ifFalse: [ea]]]]]
+ ifFalse: [
+ (self classOrMetaClassOrganizer listAtCategoryNamed: self selectedMessageCategoryName)
+ ifNil: [Array new]]!
- ^ sel = ClassOrganizer allCategory
- ifTrue:
- [self classOrMetaClassOrganizer
- ifNil: [Array new]
- ifNotNil: [self classOrMetaClassOrganizer allMethodSelectors]]
- ifFalse:
- [(self classOrMetaClassOrganizer listAtCategoryNamed: self selectedMessageCategoryName )
- ifNil: [selectedMessageCategoryName := nil. Array new]]!




More information about the Squeak-dev mailing list