Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also collect class side methods #623

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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