tim Rowledge uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tpr.1125.mcz
==================== Summary ====================
Name: System-tpr.1125
Author: tpr
Time: 26 November 2019, 12:41:51.836859 pm
UUID: dd0aed77-eb3e-4d57-b1c9-3f6fbb5d9674
Ancestors: System-mt.1124
Improve MessageBrowser labelling a bit; see changes in Tools-tpr.919
=============== Diff against System-mt.1124 ===============
Item was changed:
----- Method: SystemNavigation>>headingAndAutoselectForLiteral:do: (in category 'private') -----
headingAndAutoselectForLiteral: aLiteral do: binaryBlock
"Evaluate binaryBlock with either Users of ... or Senders of ... plus the auto-select string for the given literal. aLiteral can be a Symbol, a VariableBinding or an arbitrary object."
| autoSelect |
^ aLiteral isSymbol
ifTrue:
[ binaryBlock
value: 'Senders of ' , aLiteral
+ value: aLiteral ]
- value: (aLiteral keywords ifEmpty: [aLiteral] ifNotEmpty: [:keys | keys first]) ]
ifFalse:
[ autoSelect := aLiteral isVariableBinding
ifTrue: [ aLiteral key ]
ifFalse: [ aLiteral printString ].
binaryBlock
value: 'Users of ' , autoSelect
value: autoSelect ]!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-jr.894.mcz
==================== Summary ====================
Name: Tools-jr.894
Author: jr
Time: 21 September 2019, 11:33:52.065709 am
UUID: 7230df17-e4e8-a945-b028-d534271ded3b
Ancestors: Tools-jr.893
Fix error in help balloons for class comments in MessageSet
Also add code to support the other special items: class definition, hierarchy. The text extraction expressions come from MessageSet>>selectedMessage.
Add fallback nil check in messageHelpForMethod:.
=============== Diff against Tools-jr.893 ===============
Item was changed:
----- Method: CodeHolder>>messageHelpForMethod: (in category 'message list') -----
messageHelpForMethod: aMethod
"Answer the formatted help text for a method."
"Show the first n lines of the source code of the method."
+ | source formatted |
+ aMethod ifNil: [^ nil].
- | source formatted lineCount |
source := aMethod getSource.
formatted := (Smalltalk classNamed: #SHTextStylerST80)
ifNil: [ source asText ]
ifNotNil: [ :textStylerClass |
textStylerClass new
classOrMetaClass: aMethod methodClass;
styledTextFor: source asText ].
+ ^ self messageHelpTruncated: formatted!
-
- lineCount := 0.
- source doWithIndex: [:char :index |
- char = Character cr ifTrue: [lineCount := lineCount + 1].
- lineCount > 10 ifTrue: [
- formatted := formatted copyFrom: 1 to: index-1.
- formatted append: ' [...]'.
- ^ formatted]].
-
- ^ formatted!
Item was added:
+ ----- Method: CodeHolder>>messageHelpTruncated: (in category 'message list') -----
+ messageHelpTruncated: aText
+ "Show only the first n lines of the text."
+ | formatted lineCount |
+ formatted := aText.
+ lineCount := 0.
+ aText doWithIndex: [:char :index |
+ char = Character cr ifTrue: [lineCount := lineCount + 1].
+ lineCount > 10 ifTrue: [
+ formatted := formatted copyFrom: 1 to: index-1.
+ formatted append: ' [...]'.
+ ^ formatted]].
+ ^ formatted!
Item was added:
+ ----- Method: MessageSet>>isClassDefinition: (in category 'message list') -----
+ isClassDefinition: messageListItemOrSymbol
+ "Answer whether this item from the message list (or its extracted selector) indicates a
+ class definition."
+ ^ messageListItemOrSymbol selector = #Definition!
Item was added:
+ ----- Method: MessageSet>>isComment: (in category 'message list') -----
+ isComment: messageListItemOrSymbol
+ "Answer whether this item from the message list (or its extracted selector) indicates a
+ class comment."
+ ^ messageListItemOrSymbol selector = #Comment!
Item was added:
+ ----- Method: MessageSet>>isHierarchy: (in category 'message list') -----
+ isHierarchy: messageListItemOrSymbol
+ "Answer whether this item from the message list (or its extracted selector) indicates a
+ class hierarchy."
+ ^ messageListItemOrSymbol selector = #Hierarchy!
Item was changed:
----- Method: MessageSet>>messageHelpAt: (in category 'message list') -----
messageHelpAt: anIndex
"Show the first n lines of the sources code of the selected message."
| reference |
Preferences balloonHelpInMessageLists ifFalse: [^ nil].
self messageList size < anIndex ifTrue: [^ nil].
reference := self messageList at: anIndex.
reference isValid ifFalse: [^ nil].
+ (self isComment: reference) ifTrue: [^ self messageHelpForComment: reference].
+ (self isClassDefinition: reference) ifTrue: [^ self messageHelpForClassDefinition: reference].
+ (self isHierarchy: reference) ifTrue: [^ self messageHelpForClassHierarchy: reference].
^ self messageHelpForMethod: reference compiledMethod!
Item was added:
+ ----- Method: MessageSet>>messageHelpForClassDefinition: (in category 'message list') -----
+ messageHelpForClassDefinition: aMethodReference
+ "Answer the formatted help text for a class definition."
+ ^ aMethodReference setClassAndSelectorIn: [:class :sel | class definition]!
Item was added:
+ ----- Method: MessageSet>>messageHelpForClassHierarchy: (in category 'message list') -----
+ messageHelpForClassHierarchy: aMethodReference
+ "Answer the formatted help text for a class hierarchy."
+ "Show the first n lines of the class hierarchy."
+ | source |
+ source := aMethodReference setClassAndSelectorIn: [:class :sel | class printHierarchy].
+ ^ self messageHelpTruncated: source asText!
Item was added:
+ ----- Method: MessageSet>>messageHelpForComment: (in category 'message list') -----
+ messageHelpForComment: aMethodReference
+ "Answer the formatted help text for a class comment."
+ "Show the first n lines of the class comment."
+ | source |
+ source := aMethodReference setClassAndSelectorIn: [:class :sel | class comment].
+ ^ self messageHelpTruncated: source asText!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-jr.893.mcz
==================== Summary ====================
Name: Tools-jr.893
Author: jr
Time: 20 September 2019, 9:37:14.292454 pm
UUID: ff30360f-3e9b-d449-a2ee-a7644407fe27
Ancestors: Tools-mt.892
Allow to remove all selected methods from current ChangeSet in MessageTrace.
Previously, only the viewed message was removed.
=============== Diff against Tools-mt.892 ===============
Item was added:
+ ----- Method: MessageTrace>>removeFromCurrentChanges (in category '*Tools') -----
+ removeFromCurrentChanges
+ "Tell the changes mgr to forget that the selected messages were changed."
+
+ self selectedMessages do: [:each |
+ each setClassAndSelectorIn: [:class :selector |
+ ChangeSet current removeSelectorChanges: selector class: class]].
+ self changed: #annotation!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-jr.1593.mcz
==================== Summary ====================
Name: Morphic-jr.1593
Author: jr
Time: 24 November 2019, 4:09:46.350968 pm
UUID: a31f6451-b4c4-8549-b955-db51806e2477
Ancestors: Morphic-mt.1592
Backported From: Morphic-jr.1593
Make class list in "explain" output easier to consume.
"... in these classes: an OrderedCollection(...)" is not really human-friendly.
Now it prints Squeak array syntax {A . B . C}, which is still technical, but handy to copy&paste to methods or workspaces if needed.
=============== Diff against Morphic-mt.1592 ===============
Item was changed:
----- Method: TextEditor>>explainAnySel: (in category 'explain') -----
explainAnySel: symbol
"Is this any message selector?"
| list reply |
list := self systemNavigation allClassesImplementing: symbol.
list size = 0 ifTrue: [^nil].
list size < 12
+ ifTrue: [reply := ' is a message selector which is defined in these classes: ' , list asArray printString]
- ifTrue: [reply := ' is a message selector which is defined in these classes ' , list printString]
ifFalse: [reply := ' is a message selector which is defined in many classes'].
^'"' , symbol , reply , '."' , '\' withCRs, 'SystemNavigation new browseAllImplementorsOf: #' , symbol!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-jr.245.mcz
==================== Summary ====================
Name: ST80-jr.245
Author: jr
Time: 24 November 2019, 4:13:20.610968 pm
UUID: c21afa71-82ce-c94a-a0fd-dfcd010d49c9
Ancestors: ST80-mt.244
Make class list in "explain" output easier to consume.
"... in these classes: an OrderedCollection(...)" is not really human-friendly.
Now it prints Squeak array syntax {A . B . C}, which is still technical, but handy to copy&paste to methods or workspaces if needed.
=============== Diff against ST80-mt.244 ===============
Item was changed:
----- Method: ParagraphEditor>>explainAnySel: (in category 'explain') -----
explainAnySel: symbol
"Is this any message selector?"
| list reply |
list := self systemNavigation allClassesImplementing: symbol.
list size = 0 ifTrue: [^nil].
list size < 12
+ ifTrue: [reply := ' is a message selector which is defined in these classes: ' , list asArray printString]
- ifTrue: [reply := ' is a message selector which is defined in these classes ' , list printString]
ifFalse: [reply := ' is a message selector which is defined in many classes'].
^'"' , symbol , reply , '."' , '\' withCRs, 'SystemNavigation new browseAllImplementorsOf: #' , symbol!