[Pharo-project] Finding all places where a class is instantiated?
renggli at gmail.com
Sun Jan 15 17:46:58 CET 2012
Depends on how you use your classes.
If you have have a finite set of constructor methods you can use
'Refactor > Search code...' with something like this:
matches: 'PluggableButtonMorph on: `@.arg1' do: [ :node :answer | node ];
matches: 'PluggableButtonMorph on: `@.arg1 getState: `@.arg2 action:
`@.arg3' do: [ :node :answer | node ];
Of course, if you put all your constructor methods into a distinct
protocol, you could automate the creation of the searcher.
On 15 January 2012 17:28, Stefan Marr <smalltalk at stefan-marr.de> wrote:
> When refactoring code, I frequently try to find all places where a class is instantiated.
> Is there anything in the image which would work a bit more precise than a search for the class name in the finder?
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> Phone: +32 2 629 2974
> Fax: +32 2 629 3525
More information about the Pharo-project