#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Mon, 30 May 2016 18:18:57 +0200
changeset 19911 0b24a97a0bb7
parent 19910 723e42b5ad3d
child 19912 ca84ec5f80a7
child 19913 df79a7806174
#DOCUMENTATION by cg class: Smalltalk comment/format in: #installAutoloadedClassesFrom: #installAutoloadedClassesFromAbbrevFile: #installAutoloadedClassesFromStream:
Smalltalk.st
--- a/Smalltalk.st	Mon May 30 17:40:31 2016 +0200
+++ b/Smalltalk.st	Mon May 30 18:18:57 2016 +0200
@@ -5373,20 +5373,21 @@
     f isNil ifTrue:[f := self getPackageFileName:anAbbrevFilePath].
 
     f notNil ifTrue:[
-	f := f asFilename.
-	f isDirectory ifTrue:[
-	    f := f construct:'abbrev.stc'
-	].
-	[
-	    s := f readStream.
-	    self installAutoloadedClassesFromStream:s.
-	    s close.
-	] on:FileStream openErrorSignal
-	do:[:ex| "do nothing"].
+        f := f asFilename.
+        f isDirectory ifTrue:[
+            f := f construct:'abbrev.stc'
+        ].
+        [
+            s := f readStream.
+            self installAutoloadedClassesFromStream:s.
+            s close.
+        ] on:FileStream openErrorSignal
+        do:[:ex| "do nothing"].
     ]
 
     "
      Smalltalk installAutoloadedClassesFrom:'include/abbrev.stc'
+     Smalltalk installAutoloadedClassesFrom:'../../goodies/communication/abbrev.stc'
     "
 
     "Modified: / 5.11.1998 / 15:10:51 / cg"
@@ -5394,9 +5395,13 @@
 
 installAutoloadedClassesFromAbbrevFile:aFilename
     aFilename readingFileDo:[:abbrevStream |
-	self installAutoloadedClassesFromStream:abbrevStream.
+        self installAutoloadedClassesFromStream:abbrevStream.
     ]
 
+    "
+     self installAutoloadedClassesFromAbbrevFile:('../../goodies/communication/abbrev.stc' asFilename)
+    "
+    
     "Created: / 29-07-2011 / 20:39:21 / cg"
 !
 
@@ -5409,71 +5414,71 @@
     |s2 l abbrevFileName info clsName cls abbrev package cat numClassInstVars words w|
 
     anAbbrevFileStream isFileStream ifTrue:[
-	abbrevFileName := anAbbrevFileStream pathName.
-	info := 'declared from: ', abbrevFileName.
+        abbrevFileName := anAbbrevFileStream pathName.
+        info := 'declared from: ', abbrevFileName.
     ].
 
     "/ yes, create any required nameSpace, without asking user.
     Class createNameSpaceQuerySignal answer:true do:[
 
-	[anAbbrevFileStream atEnd] whileFalse:[
-	    l := anAbbrevFileStream nextLine withoutSeparators.
-	    "Skip empty lines and comments"
-	    (l notEmpty and:[l first ~= $#]) ifTrue:[
-		"/ must do it manually, caring for quoted strings.
+        [anAbbrevFileStream atEnd] whileFalse:[
+            l := anAbbrevFileStream nextLine withoutSeparators.
+            "Skip empty lines and comments"
+            (l notEmpty and:[l first ~= $#]) ifTrue:[
+                "/ must do it manually, caring for quoted strings.
 "/                words := line asCollectionOfWords.
 
-		words := OrderedCollection new.
-		s2 := l readStream.
-		[s2 atEnd] whileFalse:[
-		    s2 skipSeparators.
-		    s2 peek == $' ifTrue:[
-			s2 next.
-			w := s2 upTo:$'.
-			s2 skipSeparators.
-		    ] ifFalse:[
-			w := s2 upToSeparator
-		    ].
-		    words add:w
-		].
-		words size < 3 ifTrue:[
-		    'Smalltalk [warning]: bad abbrev entry' errorPrint.
-		    anAbbrevFileStream isFileStream ifTrue:[
-			' (in ''' errorPrint.
-			anAbbrevFileStream pathName errorPrint.
-			''')' errorPrint
-		    ].
-		    ': ' errorPrint. l errorPrintCR
-		] ifFalse:[
-		    clsName := (words at:1) asSymbol.
-		    abbrev := (words at:2).
-		    package := (words at:3) asSymbol.
-		    cat := words at:4 ifAbsent:nil.
-		    numClassInstVars := words at:5 ifAbsent:'0'.
-		    numClassInstVars := Integer readFrom:numClassInstVars onError:[0].
-
-		    (cat size == 0) ifTrue:[
-			cat := 'autoloaded'
-		    ].
-
-		    "/ on the fly, update the abbreviations
-		    self setFilename:abbrev forClass:clsName package:package.
-
-		    "/ '  autoloaded: ' print. clsName print. ' in ' print. cat printCR.
-
-		    cls := self
-			installAutoloadedClassNamed:clsName
-			category:cat
-			package:package
-			revision:nil
-			numClassInstVars:numClassInstVars.
+                words := OrderedCollection new.
+                s2 := l readStream.
+                [s2 atEnd] whileFalse:[
+                    s2 skipSeparators.
+                    s2 peek == $' ifTrue:[
+                        s2 next.
+                        w := s2 upTo:$'.
+                        s2 skipSeparators.
+                    ] ifFalse:[
+                        w := s2 upToSeparator
+                    ].
+                    words add:w
+                ].
+                words size < 3 ifTrue:[
+                    'Smalltalk [warning]: bad abbrev entry' errorPrint.
+                    anAbbrevFileStream isFileStream ifTrue:[
+                        ' (in ''' errorPrint.
+                        anAbbrevFileStream pathName errorPrint.
+                        ''')' errorPrint
+                    ].
+                    ': ' errorPrint. l errorPrintCR
+                ] ifFalse:[
+                    clsName := (words at:1) asSymbol.
+                    abbrev := (words at:2).
+                    package := (words at:3) asSymbol.
+                    cat := words at:4 ifAbsent:nil.
+                    numClassInstVars := words at:5 ifAbsent:'0'.
+                    numClassInstVars := Integer readFrom:numClassInstVars onError:[0].
+
+                    (cat size == 0) ifTrue:[
+                        cat := 'autoloaded'
+                    ].
+
+                    "/ on the fly, update the abbreviations
+                    self setFilename:abbrev forClass:clsName package:package.
+
+                    "/ '  autoloaded: ' print. clsName print. ' in ' print. cat printCR.
+
+                    cls := self
+                        installAutoloadedClassNamed:clsName
+                        category:cat
+                        package:package
+                        revision:nil
+                        numClassInstVars:numClassInstVars.
 
 "/                    info notNil ifTrue:[
 "/                        cls setComment:info.
 "/                    ].
-		]
-	    ]
-	]
+                ]
+            ]
+        ]
     ]
 !