[squeak-dev] The Trunk: Protocols-nice.72.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 5 20:29:22 UTC 2020

Nicolas Cellier uploaded a new version of Protocols to project The Trunk:

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

Name: Protocols-nice.72
Author: nice
Time: 5 March 2020, 9:29:20.612782 pm
UUID: 3cbd652f-bf8a-4957-b67d-01e4b1155318
Ancestors: Protocols-mt.69, Protocols-nice.49, Protocols-jr.71

Merge a few inbox contributions

Protocols-nice.49, Protocols-jr.71

	No use to send '-- all --' asSymbol, since it is already interned.

You can test this with 
Symbol findInterned: '-- all --' .
'-- all --' asSymbol chasePointers.

Display test result icons for tests inherited from abstract test superclasses.

Try it by browsing protocol (p) of any subclass of ClassTestCase or MCRepositoryTest.

Evaluate do-its in Lexicon from the point of view of the browsed class, not the class of the currently selected method.

This allows you to use pools or class variables from subclasses while writing code that you will later accept into the browsed class (instead of replacing the method in the selectedClass).

	Fix the 'follow' button for inherited methods.

=============== Diff against Protocols-mt.69 ===============

Item was changed:
  ----- Method: Lexicon>>doItReceiver (in category 'model glue') -----
  	"This class's classPool has been jimmied to be the classPool of the class being browsed. A doIt in the code pane will let the user see the value of the class variables.  Here, if the receiver is affiliated with a specific instance, we give give that primacy"
+ 	^ self targetObject ifNil: [self targetClass]!
- 	^ self targetObject ifNil: [self selectedClass]!

Item was changed:
  ----- Method: Lexicon>>messageIconAt: (in category 'message list') -----
  messageIconAt: anIndex
  	Browser showMessageIcons
  		ifFalse: [^ nil].
  	self class parse: (self messageList at: anIndex) toClassAndSelector:
  		[:class :selector |
  		^ ToolIcons iconNamed: (ToolIcons
+ 			iconForClass: targetClass
- 			iconForClass: class
  			selector: selector)].
  	^ nil!

Item was changed:
  ----- Method: Lexicon>>selectImplementedMessageAndEvaluate: (in category 'selection') -----
  selectImplementedMessageAndEvaluate: aBlock
  	"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector.  If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any.  In this variant, only selectors "
  	| selector method messages |
  	(selector := self selectedMessageName) ifNil: [^ self].
  	method := (self selectedClassOrMetaClass ifNil: [^ self])
+ 		lookupSelector: selector.
- 		compiledMethodAt: selector
- 		ifAbsent: [].
  	(method isNil or: [(messages := method messages) size = 0])
  		 ifTrue: [^ aBlock value: selector].
  	(messages size = 1 and: [messages includes: selector])
  			[^ aBlock value: selector].  "If only one item, there is no choice"
  	messages := messages select: [:aSelector | currentVocabulary includesSelector: aSelector forInstance: self targetObject ofClass: targetClass limitClass: limitClass].
  	self systemNavigation 
  		showMenuOf: messages
  		withFirstItem: selector
  		ifChosenDo: aBlock!

Item was changed:
  ----- Method: Vocabulary>>allCategoryName (in category 'queries') -----
  	"Answer the name by which the 'all' category is known.  This is redundant with two other things, including ClassOrganizer allCategory, at the moment -- should be cleaned up someday."
+ 	^ #'-- all --'!
- 	^ '-- all --' asSymbol!

More information about the Squeak-dev mailing list