The Inbox: Tools-ct.923.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Tools-ct.923.mcz

commits-2
A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-ct.923.mcz

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

Name: Tools-ct.923
Author: ct
Time: 7 December 2019, 4:42:14.945219 pm
UUID: 011debad-5545-ed47-b9b8-6118d0c2c79d
Ancestors: Tools-mt.922

Display deprecated classes gray and struck-out as selectors are.

=============== Diff against Tools-mt.922 ===============

Item was changed:
  ----- Method: Browser>>classList (in category 'class list') -----
  classList
 
+ ^ (self class listClassesHierarchically
- ^ self class listClassesHierarchically
  ifTrue: [self hierarchicalClassList]
+ ifFalse: [self defaultClassList])
+ collect: [:each | self formattedClassLabel: each]!
- ifFalse: [self defaultClassList].!

Item was changed:
  ----- Method: ClassCommentVersionsBrowser class>>browseCommentOf: (in category 'instance creation') -----
  browseCommentOf: class
  Cursor read showWhile:
  [| changeList |
  changeList := self new scanVersionsOf: class.
+ changeList ifNil: [^ self inform: 'No versions available'].
+ self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
- changeList ifNil: [^ self inform: 'No versions available'].
- self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
  !

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel: (in category 'message list') -----
+ formattedClassLabel: aString
+
+ ^ self
+ formattedClassLabel: aString
+ inClass: (self environment at: aString withBlanksTrimmed asSymbol)!

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel:inClass: (in category 'message list') -----
+ formattedClassLabel: aString inClass: aClass
+
+ ^ aClass isDeprecated
+ ifFalse: [aString]
+ ifTrue: [self formattedDeprecatedLabel: aString]!

Item was added:
+ ----- Method: CodeHolder>>formattedDeprecatedLabel: (in category 'message list') -----
+ formattedDeprecatedLabel: aString
+
+ ^ aString asText
+ addAllAttributes: (self userInterfaceTheme deprecatedMessageAttributes
+ ifNil: [{TextColor gray. TextEmphasis struckOut}]);
+ yourself!

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


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.923.mcz

marcel.taeumel
Hi Christoph,

nice idea, but given the (often hidden) complexity of our browsers, -1 for the 5.3 release. Also, such classes are in Deprecated categories and thus easy to distinguish in all kinds of browsers.

Best,
Marcel

Am 07.12.2019 16:42:27 schrieb [hidden email] <[hidden email]>:

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

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

Name: Tools-ct.923
Author: ct
Time: 7 December 2019, 4:42:14.945219 pm
UUID: 011debad-5545-ed47-b9b8-6118d0c2c79d
Ancestors: Tools-mt.922

Display deprecated classes gray and struck-out as selectors are.

=============== Diff against Tools-mt.922 ===============

Item was changed:
----- Method: Browser>>classList (in category 'class list') -----
classList

+ ^ (self class listClassesHierarchically
- ^ self class listClassesHierarchically
ifTrue: [self hierarchicalClassList]
+ ifFalse: [self defaultClassList])
+ collect: [:each | self formattedClassLabel: each]!
- ifFalse: [self defaultClassList].!

Item was changed:
----- Method: ClassCommentVersionsBrowser class>>browseCommentOf: (in category 'instance creation') -----
browseCommentOf: class
Cursor read showWhile:
[| changeList |
changeList := self new scanVersionsOf: class.
+ changeList ifNil: [^ self inform: 'No versions available'].
+ self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
- changeList ifNil: [^ self inform: 'No versions available'].
- self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
!

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel: (in category 'message list') -----
+ formattedClassLabel: aString
+
+ ^ self
+ formattedClassLabel: aString
+ inClass: (self environment at: aString withBlanksTrimmed asSymbol)!

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel:inClass: (in category 'message list') -----
+ formattedClassLabel: aString inClass: aClass
+
+ ^ aClass isDeprecated
+ ifFalse: [aString]
+ ifTrue: [self formattedDeprecatedLabel: aString]!

Item was added:
+ ----- Method: CodeHolder>>formattedDeprecatedLabel: (in category 'message list') -----
+ formattedDeprecatedLabel: aString
+
+ ^ aString asText
+ addAllAttributes: (self userInterfaceTheme deprecatedMessageAttributes
+ ifNil: [{TextColor gray. TextEmphasis struckOut}]);
+ yourself!

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]].

+ ^ self formattedDeprecatedLabel: aString!
- formattedLabel := aString asText.
-
- (self userInterfaceTheme deprecatedMessageAttributes ifNil: [{TextColor gray. TextEmphasis struckOut}]) do: [:textAttribute |
- formattedLabel addAttribute: textAttribute].
-
- ^ formattedLabel.!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Tools-ct.923.mcz

Christoph Thiede

Hi Marcel,


no problem if these commits are not moved to Trunk until next year! Just wanted to clean up my local changes :-)


Also, such classes are in Deprecated categories and thus easy to distinguish in all kinds of browsers.

You mean hints like the window title in inheritance browsers?


Okay, this is a hint, but actually, I would prefer a visible highlight.
Also yes, all deprecated Trunk classes are in deprecation packages, but sometimes I like to override #isDeprecated in other projects to quickly note a class as deprecated, without the overhead of creating a separate "MyProject-Deprecated" package.

By the way, as you can see in the screenshot above: I forget that several other #classList implementations such as in hierarchy browser, test runner or selector browser would also need to be updated. Yes, the complexity of our browsers :) Maybe it would be a good idea to add a new #formattedClassList that wraps #classList and performs the formatting on it.

Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Sonntag, 8. Dezember 2019 15:46:29
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Tools-ct.923.mcz
 
Hi Christoph,

nice idea, but given the (often hidden) complexity of our browsers, -1 for the 5.3 release. Also, such classes are in Deprecated categories and thus easy to distinguish in all kinds of browsers.

Best,
Marcel

Am 07.12.2019 16:42:27 schrieb [hidden email] <[hidden email]>:

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

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

Name: Tools-ct.923
Author: ct
Time: 7 December 2019, 4:42:14.945219 pm
UUID: 011debad-5545-ed47-b9b8-6118d0c2c79d
Ancestors: Tools-mt.922

Display deprecated classes gray and struck-out as selectors are.

=============== Diff against Tools-mt.922 ===============

Item was changed:
----- Method: Browser>>classList (in category 'class list') -----
classList

+ ^ (self class listClassesHierarchically
- ^ self class listClassesHierarchically
ifTrue: [self hierarchicalClassList]
+ ifFalse: [self defaultClassList])
+ collect: [:each | self formattedClassLabel: each]!
- ifFalse: [self defaultClassList].!

Item was changed:
----- Method: ClassCommentVersionsBrowser class>>browseCommentOf: (in category 'instance creation') -----
browseCommentOf: class
Cursor read showWhile:
[| changeList |
changeList := self new scanVersionsOf: class.
+ changeList ifNil: [^ self inform: 'No versions available'].
+ self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
- changeList ifNil: [^ self inform: 'No versions available'].
- self open: changeList name: 'Recent versions of ',class name,'''s comments' multiSelect: false ]
!

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel: (in category 'message list') -----
+ formattedClassLabel: aString
+
+ ^ self
+ formattedClassLabel: aString
+ inClass: (self environment at: aString withBlanksTrimmed asSymbol)!

Item was added:
+ ----- Method: CodeHolder>>formattedClassLabel:inClass: (in category 'message list') -----
+ formattedClassLabel: aString inClass: aClass
+
+ ^ aClass isDeprecated
+ ifFalse: [aString]
+ ifTrue: [self formattedDeprecatedLabel: aString]!

Item was added:
+ ----- Method: CodeHolder>>formattedDeprecatedLabel: (in category 'message list') -----
+ formattedDeprecatedLabel: aString
+
+ ^ aString asText
+ addAllAttributes: (self userInterfaceTheme deprecatedMessageAttributes
+ ifNil: [{TextColor gray. TextEmphasis struckOut}]);
+ yourself!

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]].

+ ^ self formattedDeprecatedLabel: aString!
- formattedLabel := aString asText.
-
- (self userInterfaceTheme deprecatedMessageAttributes ifNil: [{TextColor gray. TextEmphasis struckOut}]) do: [:textAttribute |
- formattedLabel addAttribute: textAttribute].
-
- ^ formattedLabel.!





pastedImage.png (119K) Download Attachment
Carpe Squeak!