Restrict querying for senders to a certain package
I know there's SOUL. But perhaps Pharo can do the following without any additional packages: How can I restrict searches for senders and implementers to a certain category? L开发者_Go百科ike: I want to see all senders of compile: in OmniBrowser.
More generally, how would you go and find the spot where compilation is invoked from OmniBrowser? (I roughly remember that some special code text pane was responsible for the compiler invocation, but forgot the details.)
- There is a detailed description of doing what you ask for in Pharo by Example, Chapter 14.4.
- Depending on the browsing context this is the method
accept:notifying:
ofOBClassDefinition
orOBMethodDefinition
.
It is easy. Pharo comes with what it is called the Refactoring Browser, which has a lot of stuff, not only refactors. To do what you want, do:
- Go to the OmniBrowser package, select any category you want from OmniBrowser
- Right button -> Refactoring Scope -> category
That will open a new windows with all the classes of that scope (a particular category in this case). Then, if you search for senders for example, it will be only in that scope.
Cheers
精彩评论