Skip to content

Commit

Permalink
Merge pull request #623 from vonbecmann/614-expression-finder-didnt-f…
Browse files Browse the repository at this point in the history
…ind-expression

also collect class side methods
  • Loading branch information
MarcusDenker authored Nov 23, 2023
2 parents 699bdf2 + fe9f234 commit 1a7f3d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Take a look on ReCriticEngine for some automation ideas. Also take a look at Com
StRewriterRenrakuApplier class >> obtainCritiquesOfAllMethodsForRules: ruleHolderCollection [

| methods |
methods := (self packageOrganizer packages flatCollect: #classes) flatCollect: #methods.
methods := (self packageOrganizer packages flatCollect: #classes)
flatCollect: [ :each | each methods , each class methods ].
^ self obtainCritiquesOf: methods forRules: ruleHolderCollection
]
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ StRewriterExpressionFinderPresenter >> searchExpressionOnAllClasses [
| dialogWindow methods ruleHolder critiques |
dialogWindow := scopeSelectorPresenter openDialog.
dialogWindow okAction: [
methods := scopeSelectorPresenter selectedClasses flatCollectAsSet: [ :each | each methods ].
methods := scopeSelectorPresenter selectedClasses flatCollectAsSet: [ :each | each methods, each class methods ].
ruleHolder := StRewriterRuleHolder lhs: patternCodePresenter lhs rhs: ''.
critiques := StRewriterRenrakuApplier obtainCritiquesOf: methods forRules: { ruleHolder }.
(StRewriterOccurrencesBrowserPresenter critiques: critiques) open ]
Expand Down

0 comments on commit 1a7f3d8

Please sign in to comment.