<div dir="ltr"><div dir="ltr">Am Mo., 22. Juli 2019 um 11:45 Uhr schrieb <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Not sure about "self environment" vs. "aClass environment" because tools will usually create a system navigation with the correct environment set.<br>
<br></blockquote><div><br></div><div>An environment can have bindings to classes in other environments (via imports). When the imported name is different from the original class's name, then the binding in the importing environment will be an Alias and not the original Binding object. Then the SystemNavigation's environment could give you the Alias, while theClass environment will always give you the Binding. Does it make a difference to allCallsOn:fromBehaviors:sorted:?</div><div><br></div><div>The lower paragraph about sharedPools in either case only iterates the classes "owned" by the particular environment, so I think both the old code and the new code will not necessarily find all references to a class as a pool dictionary.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
=============== Diff against System-mt.1072 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SystemNavigation>>allCallsOnClass: (in category 'query') -----<br>
+ allCallsOnClass: aBehaviorOrBinding<br>
- allCallsOnClass: aBehavior<br>
        "Answer a sorted collection of all the methods that refer to aBehavior."<br>
<br>
+       | binding thisClass result |<br>
+       binding := aBehaviorOrBinding isBehavior<br>
+               ifTrue: [self environment bindingOf: aBehaviorOrBinding theNonMetaClass name]<br>
+               ifFalse: [aBehaviorOrBinding].<br>
+       thisClass := binding value.<br>
+       <br>
-       | theClass result |<br>
-       theClass := aBehavior theNonMetaClass.<br>
        result := self <br>
+               allCallsOn: binding<br>
-               allCallsOn: (theClass environment bindingOf: theClass name)<br>
                fromBehaviors: self allBehaviors<br>
                sorted: false.<br>
+ <br>
+       self environment allClassesDo: [:otherClass |<br>
+               (otherClass sharedPools includes: thisClass) ifTrue: [<br>
+                       result add: (ClassReference class: otherClass) ] ].<br>
+       <br>
+       ^ result sort!<br>
-       theClass environment allClassesDo: [ :class |<br>
-               (class sharedPools includes: theClass) ifTrue: [<br>
-                       result add: (ClassReference class: class) ] ].<br>
-       ^result sort!<br>
<br>
Item was changed:<br>
  ----- Method: SystemNavigation>>browseAllCallsOnClass: (in category 'browse') -----<br>
+ browseAllCallsOnClass: aBehaviorOrBinding<br>
- browseAllCallsOnClass: aBehavior<br>
        "Create and schedule a message browser on each method that refers to aBehavior."<br>
        "self default browseAllCallsOnClass: Array"<br>
<br>
        | behaviorName |<br>
+       behaviorName := aBehaviorOrBinding isBehavior<br>
+               ifTrue: [aBehaviorOrBinding theNonMetaClass name]<br>
+               ifFalse: [aBehaviorOrBinding key].<br>
-       behaviorName := aBehavior theNonMetaClass name.<br>
        self<br>
+               browseMessageList: [ self allCallsOnClass: aBehaviorOrBinding ]<br>
-               browseMessageList: [ self allCallsOnClass: aBehavior ]<br>
                name: 'Users of ', behaviorName<br>
                autoSelect: behaviorName!<br>
<br>
<br>
</blockquote></div></div>