Let's say I want to see how "copy" is implemented in the Dictionary class. Currently I use the system browser and manually traverse the inheritance hierarchy (bottom up) until I find the class that implements the given message. Is there a one-liner for the workspace, that would open the system browser at the right location?
4 Answers
( SomeClass whichClassIncludesSelector: #initialize ) browse
That will browse the class that implements the message #initialize.

- 20,267
- 14
- 135
- 196

- 96
- 2
Personally, I just type the #selector in a workspace, highlight it, and hit alt+m to pull up all implementors of the message. Much faster than typing all that code.

- 547
- 2
- 5
(SomeClass>>#someSelector) browse
works as well in my Pharo image.
works as well in my Pharo image. And since you want to find a class first, you can combine it with previous example..
((SomeSubclass whichClassIncludesSelector: #someSelector)>>#someSelector) browse
to directly go to given method.

- 1,037
- 5
- 8
If you are using OmniBrowser, you can use the contextual menu Implementors in Hierarchy... to only browse the implementors of a selector in the hierarchy of the Dictionary
.
OmniBrowser also provides an Inheritance Browser. Select any implementation of #copy
and click on the Inheritance
button in the toolbar. It will show you a hierarchical view of all implementors of #copy
.

- 8,754
- 23
- 46