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

Move methods from Manifest #606

Merged
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
8 changes: 8 additions & 0 deletions src/NewTools-CodeCritiques/ClassDescription.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'ClassDescription' }

{ #category : '*NewTools-CodeCritiques' }
ClassDescription >> criticNameOn: aStream [
"This behavior may be folded later by changing the name of this method or using another one."

aStream << self name << ' (' << self package name << ')'
]
14 changes: 14 additions & 0 deletions src/NewTools-CodeCritiques/CompiledMethod.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Extension { #name : 'CompiledMethod' }

{ #category : '*NewTools-CodeCritiques' }
CompiledMethod >> criticNameOn: aStream [
"This behavior may be folded later by changing the name of this method or using another one."

aStream
<< self methodClass name
<< '>>#'
<< self selector
<< ' ('
<< self methodClass package name
<< ')'
]
8 changes: 8 additions & 0 deletions src/NewTools-CodeCritiques/RPackage.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'RPackage' }

{ #category : '*NewTools-CodeCritiques' }
RPackage >> criticNameOn: aStream [
"This behavior may be folded later by changing the name of this method or using another one."

aStream << self packageName
]
38 changes: 17 additions & 21 deletions src/NewTools-CodeCritiques/StCritiqueBrowserPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -143,32 +143,28 @@ StCritiqueBrowserPresenter >> allRules [

{ #category : 'private' }
StCritiqueBrowserPresenter >> applyRules [

| packageCount nbPackage process rules |
rules := self allRules.
nbPackage := rbEnvironment packages size.
packageCount := 0.
self updateTree.
process := [ rbEnvironment packages
do: [ :package |
| windowTitle |
packageCount := packageCount + 1.
windowTitle := String
streamContents: [ :s |
s << 'run rules on ' << package packageName << ' ('
<< packageCount asString << '/' << nbPackage asString << ')' ].
self setTitle: windowTitle.
checker
runRules: rules
onPackage: package
withoutTestCase: removeTestCase ].
checker rule: rules.
self setTitle: self defaultTitle.
cache packages: rbEnvironment.
cache initCache.
self rules: (self allRules select: [ :r | self hasBrokenRules: r]).
self rulesModel refresh.
self rebuildLayout.
self updateTree. ] newProcess.
process := [
rbEnvironment packages do: [ :package |
| windowTitle |
packageCount := packageCount + 1.
windowTitle := String streamContents: [ :s |
s << 'run rules on ' << package name << ' (' << packageCount asString << '/' << nbPackage asString << ')' ].
self setTitle: windowTitle.
checker runRules: rules onPackage: package withoutTestCase: removeTestCase ].
checker rule: rules.
self setTitle: self defaultTitle.
cache packages: rbEnvironment.
cache initCache.
self rules: (self allRules select: [ :r | self hasBrokenRules: r ]).
self rulesModel refresh.
self rebuildLayout.
self updateTree ] newProcess.
process name: 'SmallLint'.
process resume
]
Expand Down
Loading