#REFACTORING by exept
class: Smalltalk class
changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels:
Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
--- a/Smalltalk.st Tue Jul 09 20:50:05 2019 +0200
+++ b/Smalltalk.st Tue Jul 09 20:55:17 2019 +0200
@@ -6162,36 +6162,36 @@
dirName := dir physicalPathName. "take care of symbolic links"
(dirsConsulted includes:dirName) ifTrue:[
- ^ self
+ ^ self
].
(dir / 'NOPACKAGES') exists ifTrue:[
- ^ self.
+ ^ self.
].
(dir / 'NOSUBAUTOLOAD') exists ifTrue:[
- ^ self.
+ ^ self.
].
maxLevels == 0 ifTrue:[
- Transcript showCR:('Autoload: max directory nesting reached in %1' bindWith:dir pathName).
- ^ self
+ Transcript showCR:'Autoload: max directory nesting reached in %1' with:dir pathName.
+ ^ self
].
dirsConsulted add:dirName.
noAutoloadHere := noAutoloadIn.
noAutoloadHere ifFalse:[
- (dir / 'NOAUTOLOAD') exists ifTrue:[
- noAutoloadHere := true.
- ].
+ (dir / 'NOAUTOLOAD') exists ifTrue:[
+ noAutoloadHere := true.
+ ].
] ifTrue:[
- (dir / 'AUTOLOAD') exists ifTrue:[
- noAutoloadHere := false.
- ].
+ (dir / 'AUTOLOAD') exists ifTrue:[
+ noAutoloadHere := false.
+ ].
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes found under "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"/
@@ -6200,74 +6200,74 @@
"/
haveAbbrevDotSTC := false.
noAutoloadHere ifFalse:[
- [
- self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
- haveAbbrevDotSTC := true.
- ] on:FileStream openErrorSignal
- do:[:ex|
- "ignore this file"
- ].
+ [
+ self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
+ haveAbbrevDotSTC := true.
+ ] on:FileStream openErrorSignal
+ do:[:ex|
+ "ignore this file"
+ ].
].
[
- directoryContents := dir directoryContents.
+ directoryContents := dir directoryContents.
] on:FileStream openErrorSignal do:[:ex|
- "non-accessible directory: we are done"
- ^ self
+ "non-accessible directory: we are done"
+ ^ self
].
directoryContents := directoryContents select:[:fn | (fn startsWith:'.') not] as:Set.
directoryContents removeAllFoundIn:#(
- 'objbc' 'objvc' 'objmingw'
- 'doc'
- 'CVS'
- 'bitmaps'
- 'resources'
- 'source'
- 'not_delivered'
- 'not_ported'
- ).
+ 'objbc' 'objvc' 'objmingw'
+ 'doc'
+ 'CVS'
+ 'bitmaps'
+ 'resources'
+ 'source'
+ 'not_delivered'
+ 'not_ported'
+ ).
dir baseName = 'stx' ifTrue:[
- directoryContents removeAllFoundIn:#(
- 'configurations'
- 'include'
- 'rules'
- 'stc'
- 'support'
- ).
+ directoryContents removeAllFoundIn:#(
+ 'configurations'
+ 'include'
+ 'rules'
+ 'stc'
+ 'support'
+ ).
].
directoryContents do:[:eachFilenameString |
- |f|
-
- f := dir / eachFilenameString.
- f isDirectory ifTrue:[
- self
- recursiveInstallAutoloadedClassesFrom:f
- rememberIn:dirsConsulted
- maxLevels:maxLevels-1
- noAutoload:noAutoloadHere
- packageTop:packageTopPath
- showSplashInLevels:showSplashInLevels - 1.
- ] ifFalse:[
- (noAutoloadHere not and:[haveAbbrevDotSTC not]) ifTrue:[
- f suffix = 'st' ifTrue:[
- [
- self installAutoloadedClassFromSourceFile:f.
- f directory baseName = 'libbasic' ifTrue:[self halt].
- ] on:FileStream openErrorSignal do:[:ex|
- "ignore this file, but write a warning"
- Transcript showCR:('Autoload: cannot install %1. (%2)' bindWith:f pathName with:ex description).
- ].
- ]
- ].
- ]
+ |f|
+
+ f := dir / eachFilenameString.
+ f isDirectory ifTrue:[
+ self
+ recursiveInstallAutoloadedClassesFrom:f
+ rememberIn:dirsConsulted
+ maxLevels:maxLevels-1
+ noAutoload:noAutoloadHere
+ packageTop:packageTopPath
+ showSplashInLevels:showSplashInLevels - 1.
+ ] ifFalse:[
+ (noAutoloadHere not and:[haveAbbrevDotSTC not]) ifTrue:[
+ f suffix = 'st' ifTrue:[
+ [
+ self installAutoloadedClassFromSourceFile:f.
+ f directory baseName = 'libbasic' ifTrue:[self halt].
+ ] on:FileStream openErrorSignal do:[:ex|
+ "ignore this file, but write a warning"
+ Transcript showCR:('Autoload: cannot install %1. (%2)' bindWith:f pathName with:ex description).
+ ].
+ ]
+ ].
+ ]
].
showSplashInLevels >= 0 ifTrue:[
- self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
- bindWith:(dirName contractAtBeginningTo:35)).
+ self showSplashMessage:('Smalltalk [info]: installing autoloaded classes from "%1"...'
+ bindWith:(dirName contractAtBeginningTo:35)).
].
"