*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Sun, 07 Dec 2008 11:37:31 +0100
changeset 11391 529c3e286e9c
parent 11390 f0f1b0711272
child 11392 8c606db1cd2f
*** empty log message ***
Smalltalk.st
--- a/Smalltalk.st	Wed Dec 03 17:41:28 2008 +0100
+++ b/Smalltalk.st	Sun Dec 07 11:37:31 2008 +0100
@@ -3921,7 +3921,8 @@
                 rememberIn:dirsConsulted
                 maxLevels:15
                 noAutoload:false
-                packageTop:aPath.
+                packageTop:aPath
+                showSplashInLevels:2.
         ]
     ].
     p size == 0 ifTrue:[
@@ -3932,7 +3933,8 @@
                 rememberIn:dirsConsulted
                 maxLevels:15
                 noAutoload:false
-                packageTop:'../../..'.
+                packageTop:'../../..'
+                showSplashInLevels:2.
         ].
     ].
     self splashInfo:nil.
@@ -4138,46 +4140,67 @@
      (however, the directories are searched for packages)
      If a file called NOPACKAGES is found, no further searching is done in that directory or below."
 
+    self
+        recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted 
+        maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath
+        showSplashInLevels:0.
+
+    "
+     Smalltalk installAutoloadedClasses
+    "
+
+    "Modified: / 17-08-2006 / 16:48:43 / cg"
+!
+
+recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted 
+maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath
+showSplashInLevels:showSplashInLevels
+    "read all abbrev.stc files from and under aDirectory
+     and install autoloaded classes.
+     If a file called NOAUTOLOAD is found, no classes there and below are installed as autoloaded
+     (however, the directories are searched for packages)
+     If a file called NOPACKAGES is found, no further searching is done in that directory or below."
+
     |abbrevStream dir noAutoloadHere dirName pkgName directoryContents|
 
     maxLevels == 0 ifTrue:[
 "/        'Smalltalk [warning]: max directory nesting reached.' infoPrintCR.
-	^ self
+        ^ self
     ].
 
     dir := aDirectory asFilename.
 
     (dirsConsulted includes:dir pathName) ifTrue:[
-	^ self
+        ^ self
     ].
     dirsConsulted add:dir pathName.
 
     (dir construct:'NOPACKAGES') exists ifTrue:[
-	^ self.
+        ^ self.
     ].
     (dir construct:'NOSUBAUTOLOAD') exists ifTrue:[
-	^ self.
+        ^ self.
     ].
     noAutoloadHere := noAutoloadIn.
     noAutoloadHere ifFalse:[
-	(dir construct:'NOAUTOLOAD') exists ifTrue:[
-	    noAutoloadHere := true.
-	].
+        (dir construct:'NOAUTOLOAD') exists ifTrue:[
+            noAutoloadHere := true.
+        ].
     ] ifTrue:[
-	(dir construct:'AUTOLOAD') exists ifTrue:[
-	    noAutoloadHere := false.
-	].
+        (dir construct:'AUTOLOAD') exists ifTrue:[
+            noAutoloadHere := false.
+        ].
     ].
 
     ((dir construct:'loadAll') exists
     or:[(dir construct:'abbrev.stc') exists
     or:[(dir construct:(dir baseName , '.prj')) exists]]) ifTrue:[
-	KnownPackages isNil ifTrue:[
-	    KnownPackages := Set new.
-	].
-	dirName := dir pathName.
-	pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
-	KnownPackages add:pkgName
+        KnownPackages isNil ifTrue:[
+            KnownPackages := Set new.
+        ].
+        dirName := dir pathName.
+        pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
+        KnownPackages add:pkgName
     ].
 
     "/
@@ -4185,54 +4208,59 @@
     "/ below; however, still traverse the directories to find packages ...
     "/
     noAutoloadHere ifFalse:[
-	[
-	    abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
-	    self installAutoloadedClassesFromStream:abbrevStream.
-	    abbrevStream close.
-	] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
+        [
+            showSplashInLevels > 0 ifTrue:[
+                self splashInfo:('Smalltalk [info]: installing autoloaded classes found under "',dir pathName,'"...').
+            ].
+
+            abbrevStream := (dir construct:'abbrev.stc') asFilename readStream.
+            self installAutoloadedClassesFromStream:abbrevStream.
+            abbrevStream close.
+        ] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
     ].
 
     [
-	directoryContents := dir directoryContents.
+        directoryContents := dir directoryContents.
     ] on:FileStream openErrorSignal do:[:ex|
-	"non-accessable directory: we are done"
-	^ self
+        "non-accessable directory: we are done"
+        ^ self
     ].
 
     directoryContents do:[:aFilename |
-	|f|
-
-	(#(
-	    'objbc'
-	    'doc'
-	    'CVS'
-	    'bitmaps'
-	    'resources'
-	    'source'
-	    'not_delivered'
-	    'not_ported'
-	) includes:aFilename) ifFalse:[
-	    ((dir baseName ~= 'stx')
-	    or:[
-		(#(
-		    'configurations'
-		    'include'
-		    'rules'
-		    'stc'
-		    'support'
-		) includes:aFilename) not])
-	    ifTrue:[
-		f := dir construct:aFilename.
-		f isDirectory ifTrue:[
-		     self
-			recursiveInstallAutoloadedClassesFrom:f
-			rememberIn:dirsConsulted
-			maxLevels:maxLevels-1
-			noAutoload:noAutoloadHere
-			packageTop:packageTopPath.
-		]
-	    ]
-	].
+        |f|
+
+        (#(
+            'objbc'
+            'doc'
+            'CVS'
+            'bitmaps'
+            'resources'
+            'source'
+            'not_delivered'
+            'not_ported'
+        ) includes:aFilename) ifFalse:[
+            ((dir baseName ~= 'stx')
+            or:[
+                (#(
+                    'configurations'
+                    'include'
+                    'rules'
+                    'stc'
+                    'support'
+                ) includes:aFilename) not])
+            ifTrue:[
+                f := dir construct:aFilename.
+                f isDirectory ifTrue:[
+                     self
+                        recursiveInstallAutoloadedClassesFrom:f
+                        rememberIn:dirsConsulted
+                        maxLevels:maxLevels-1
+                        noAutoload:noAutoloadHere
+                        packageTop:packageTopPath
+                        showSplashInLevels:showSplashInLevels - 1.
+                ]
+            ]
+        ].
     ].
 
     "
@@ -7176,5 +7204,5 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.863 2008-12-03 13:43:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.864 2008-12-07 10:37:31 cg Exp $'
 ! !