Smalltalk.st
branchjv
changeset 17966 8b5df02e171f
parent 17960 23f7bba9741b
child 17971 cd3a53fb927c
--- a/Smalltalk.st	Fri Sep 07 13:46:06 2012 +0100
+++ b/Smalltalk.st	Fri Sep 07 17:24:32 2012 +0100
@@ -1058,7 +1058,6 @@
     "Created: 20.6.1997 / 16:58:28 / cg"
 ! !
 
-
 !Smalltalk class methodsFor:'browsing'!
 
 browseAllCallsOn:aSelectorSymbol
@@ -2084,7 +2083,6 @@
     ]
 ! !
 
-
 !Smalltalk class methodsFor:'message control'!
 
 silentLoading
@@ -5041,6 +5039,30 @@
     "Created: 17.10.1997 / 13:52:19 / cg"
 !
 
+recursiveInstallAutoloadedClassesFrom:aTopDirectory
+    "scan all packages and install all classes found there as
+     autoloaded. This takes some time ..."
+
+    |dirsConsulted|
+
+    dirsConsulted := Set new.
+
+    self
+        recursiveInstallAutoloadedClassesFrom:aTopDirectory
+        rememberIn:dirsConsulted
+        maxLevels:15
+        noAutoload:false
+        packageTop:nil
+        showSplashInLevels:-1.
+
+
+    "
+     Smalltalk recursiveInstallAutoloadedClassesFrom:'..\..\..\cg\private\euler'
+    "
+
+    "Created: / 31-07-2012 / 15:27:40 / cg"
+!
+
 recursiveInstallAutoloadedClassesFrom:aDirectory rememberIn:dirsConsulted maxLevels:maxLevels noAutoload:noAutoloadIn packageTop:packageTopPath
     "read all abbrev.stc files from and under aDirectory
      and install autoloaded classes.
@@ -5073,46 +5095,48 @@
 
     maxLevels == 0 ifTrue:[
 "/        'Smalltalk [warning]: max directory nesting reached.' infoPrintCR.
-	^ self
+        ^ self
     ].
 
     dir := aDirectory asFilename.
     dirName := dir pathName.
 
     (dirsConsulted includes:dirName) ifTrue:[
-	^ self
+        ^ self
     ].
     dirsConsulted add:dirName.
 
     (dir / 'NOPACKAGES') exists ifTrue:[
-	^ self.
+        ^ self.
     ].
     (dir / 'NOSUBAUTOLOAD') exists ifTrue:[
-	^ self.
+        ^ self.
     ].
 
     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.
+        ].
     ].
 
     ((dir / 'loadAll') exists or:[(dir / 'abbrev.stc') exists]) ifTrue:[
-	KnownPackages isNil ifTrue:[
-	    KnownPackages := Set new.
-	].
-	pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
-	KnownPackages add:pkgName
+        packageTopPath notNil ifTrue:[
+            KnownPackages isNil ifTrue:[
+                KnownPackages := Set new.
+            ].
+            pkgName := dirName copyFrom:(packageTopPath asFilename pathName) size + 1 + 1.
+            KnownPackages add:pkgName
+        ].
     ].
 
     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)).
     ].
 
     "/
@@ -5120,64 +5144,64 @@
     "/ below; however, still traverse the directories to find packages ...
     "/
     noAutoloadHere ifFalse:[
-	[
-	    self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
-	] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
+        [
+            self installAutoloadedClassesFromAbbrevFile:(dir / 'abbrev.stc').
+        ] on:FileStream openErrorSignal do:[:ex| "ignore this file"].
     ].
 
     [
-	directoryContents := dir directoryContents asSet.   "asSet to speed up remove"
+        directoryContents := dir directoryContents asSet.   "asSet to speed up remove"
     ] on:FileStream openErrorSignal do:[:ex|
-	"non-accessable directory: we are done"
-	^ self
+        "non-accessable directory: we are done"
+        ^ self
     ].
 
     directoryContents removeAllFoundIn:#(
-			    'objbc'
-			    'objvc'
-			    'doc'
-			    'CVS'
-			    'bitmaps'
-			    'resources'
-			    'source'
-			    'not_delivered'
-			    'not_ported'
-			).
+                            'objbc'
+                            'objvc'
+                            '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.
-	]
+        |f|
+
+        f := dir / eachFilenameString.
+        f isDirectory ifTrue:[
+             self
+                recursiveInstallAutoloadedClassesFrom:f
+                rememberIn:dirsConsulted
+                maxLevels:maxLevels-1
+                noAutoload:noAutoloadHere
+                packageTop:packageTopPath
+                showSplashInLevels:showSplashInLevels - 1.
+        ]
     ].
 
     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)).
     ].
 
     "
      Smalltalk installAutoloadedClasses
     "
 
-    "Modified: / 29-07-2011 / 20:40:51 / cg"
+    "Modified: / 31-07-2012 / 15:26:54 / cg"
 !
 
 replaceReferencesTo:anObject with:newRef
@@ -7791,13 +7815,13 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Smalltalk.st 10837 2012-08-16 23:23:48Z vranyj1 $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.992 2012/07/31 14:00:53 cg Exp $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.991 2012/07/18 17:09:50 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.992 2012/07/31 14:00:53 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10837 2012-08-16 23:23:48Z vranyj1 $'
+    ^ '$ Id: Smalltalk.st 10648 2011-06-23 15:55:10Z vranyj1  $'
 ! !