pharo-wiki icon indicating copy to clipboard operation
pharo-wiki copied to clipboard

Snippet: Get all classes accessing a variable

Open jecisc opened this issue 5 years ago • 0 comments

Today I was doing a lot of changes on some variables in a deep hierarchy.

Current Pharo tools allow developers to find accesses to a variable in a class but not in a hierarchy so I had to make this snippet:

origin := AbstractWidgetPresenter.
variableName := #borderColor.
(origin slots detect: [ :e | e name = variableName ]) usingMethods collect: #methodClass as: Set

I guess it could fit into the Cool Snippet section.

jecisc avatar Jun 06 '19 15:06 jecisc