Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.854.mcz
==================== Summary ====================
Name: Tools-mt.854
Author: mt
Time: 22 July 2019, 11:06:46.775271 am
UUID: 9f30ae3b-a6ae-43f7-ae0b-3bf3e300b85c
Ancestors: Tools-mt.853
For class-ref search, use the tool's environment to find the relevant class binding. Do not rely on the class's original environment.
This shouldn't make any difference at the moment but maybe in the future if somebody decides to make the identity of class bindings important. See:
Lookupkey >> #literalEqual:
ClassBinding >> #literalEqual:
Also see TextEditor >> #referencesToIt, which also uses the tool's (there: "model") environment.
=============== Diff against Tools-mt.853 ===============
Item was changed:
----- Method: ObjectExplorer>>browseClassRefs (in category 'menus - actions') -----
browseClassRefs
+ self selectedClass ifNotNil: [:cls |
+ cls isTrait ifFalse: [
+ self systemNavigation browseAllCallsOn: (self environment bindingOf: cls theNonMetaClass name)]]!
- (self selectedClass notNil and: [self selectedClass isTrait not])
- ifTrue: [self systemNavigation browseAllCallsOnClass: self selectedClass theNonMetaClass].!
Item was changed:
----- Method: StringHolder>>browseClassRefs (in category '*Tools-traits') -----
browseClassRefs
+ self selectedClass ifNotNil: [:cls |
+ cls isTrait ifFalse: [
+ self systemNavigation browseAllCallsOn: (self environment bindingOf: cls theNonMetaClass name)]]
- | cls |
- cls := self selectedClass.
- (cls notNil and: [cls isTrait not])
- ifTrue: [self systemNavigation browseAllCallsOnClass: cls theNonMetaClass]
!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1072.mcz
==================== Summary ====================
Name: System-mt.1072
Author: mt
Time: 22 July 2019, 11:01:13.380271 am
UUID: da465e06-a24c-4ef2-9ecd-3c78c14fcd87
Ancestors: System-mt.1071
Fixes regression in class-ref search to not yield methods that send only symbols of class names. For class symbols, use regular senders search with a symbol (i.e., #allCallsOn:).
=============== Diff against System-mt.1071 ===============
Item was changed:
----- Method: SystemNavigation>>allCallsOnClass: (in category 'query') -----
allCallsOnClass: aBehavior
"Answer a sorted collection of all the methods that refer to aBehavior."
| theClass result |
theClass := aBehavior theNonMetaClass.
result := self
+ allCallsOn: (theClass environment bindingOf: theClass name)
- allCallsOn: theClass name
fromBehaviors: self allBehaviors
sorted: false.
theClass environment allClassesDo: [ :class |
(class sharedPools includes: theClass) ifTrue: [
result add: (ClassReference class: class) ] ].
^result sort!
Marcel Taeumel uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-mt.75.mcz
==================== Summary ====================
Name: Environments-mt.75
Author: mt
Time: 22 July 2019, 10:02:11.8399 am
UUID: 3e91a5a9-61c6-426d-8797-ca99a2fe8422
Ancestors: Environments-mt.74
Addition to Collections-mt.845.
=============== Diff against Environments-mt.74 ===============
Item was removed:
- ----- Method: Binding>>allLiteralsDo: (in category 'literals') -----
- allLiteralsDo: aBlock
-
- "I am a literal."
- aBlock value: self.
-
- self key allLiteralsDo: aBlock.
- self value allLiteralsDo: aBlock.!
Item was removed:
- ----- Method: Global>>literalEqual: (in category 'literals') -----
- literalEqual: other
- "Globals are only equal to themselves, since another global with the same
- name could have a different value in the future."
-
- ^ self == other!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.845.mcz
==================== Summary ====================
Name: Collections-mt.845
Author: mt
Time: 22 July 2019, 10:01:05.9849 am
UUID: f3187206-088a-4183-ae97-52fdb06b88cf
Ancestors: Collections-dtl.844
During all-literals enumeration, do not decend into association values.
Users want to find the tokens they typed, not what the system generated or somehow stored. In particular, there is no need to look into class variables for literals. :-)
=============== Diff against Collections-dtl.844 ===============
Item was removed:
- ----- Method: Association>>allLiteralsDo: (in category 'literals') -----
- allLiteralsDo: aBlock
- "This strategy origins from a former implementation of CompiledMethod >> #hasLiteralThorough: as well as AdditionalMethodState >> #hasLiteralSuchThat:."
-
- "I am a literal."
- aBlock value: self.
-
- "All my components are literals."
- self key allLiteralsDo: aBlock.
- self value allLiteralsDo: aBlock.!
Item was removed:
- ----- Method: Association>>literalEqual: (in category 'literals') -----
- literalEqual: otherLiteral
- "Answer true if the receiver and otherLiteral represent the same literal.
- Variable bindings are literally equals only if identical.
- This is how variable sharing works, by preserving identity and changing only the value."
- ^self == otherLiteral!
Item was added:
+ ----- Method: LookupKey>>allLiteralsDo: (in category 'literals') -----
+ allLiteralsDo: aBlock
+ "Treat myself or my key as literal. Do not treat any value (i.e., in Association or Binding) as literal to avoid decending too thoroughly. As a consequence, for example, classes have to be resolved to their class bindings or class names before using them as input in this interface."
+
+ aBlock value: self.
+ self key allLiteralsDo: aBlock.!
Item was added:
+ ----- Method: LookupKey>>literalEqual: (in category 'literals') -----
+ literalEqual: otherLiteral
+ "Answer true if the receiver and otherLiteral represent the same literal.
+
+ By default, all lookup keys (such as variable bindings) are literally equal only if identical. This is how variable sharing works, by preserving identity and changing only the value.
+
+ Override if you want to be more flexible such as in class bindings."
+
+ ^ self == otherLiteral!