FileBrowser.st
changeset 2640 49fe3af4260d
parent 2639 880abd0f62d0
child 2665 3601bc8c5ae2
--- a/FileBrowser.st	Tue Mar 21 12:03:58 2000 +0100
+++ b/FileBrowser.st	Tue Mar 21 12:06:14 2000 +0100
@@ -1869,47 +1869,47 @@
                     ObjectFileLoader loadObjectFile:p.
                     Class addInfoRecord:('fileIn ' , fileName) 
                 ]
+            ] ifFalse:[ (path hasSuffix:'cls') ifTrue:[
+                "/ loading a binary class file
+                aStream := path readStream.
+                aStream notNil ifTrue:[
+                    bos := BinaryObjectStorage onOld:aStream.
+                    Class nameSpaceQuerySignal 
+                        answer:Smalltalk
+                        do:[
+                            bos next.
+                        ].
+                    bos close
+                ]
             ] ifFalse:[
-                (path hasSuffix:'cls') ifTrue:[
+                ((path hasSuffix:'class')
+                or:[(path hasSuffix:'cla')]) ifTrue:[
+                    "/ loading a java class file
+                    JavaClassReader notNil ifTrue:[
+                        JavaClassReader loadFile:(path pathName)
+                    ]
+                ] ifFalse:[ (path hasSuffix:'sif') ifTrue:[
+                    "/ loading a sif (smalltalk interchange format) file
+                    SmalltalkInterchangeFileManager newForFileIn
+                        fileName: path pathName;
+                        fileIn.
+                ] ifFalse:[
+                    "/ loading a regular (chunk) or xml source file
                     aStream := path readStream.
                     aStream notNil ifTrue:[
-                        bos := BinaryObjectStorage onOld:aStream.
-                        Class nameSpaceQuerySignal 
-                            answer:Smalltalk
-                            do:[
-                                bos next.
+                        [
+                            Class withoutUpdatingChangesDo:[
+                                wasLazy := Compiler compileLazy:lazy.
+                                aStream fileIn.
                             ].
-                        bos close
-                    ]
-                ] ifFalse:[
-                    ((path hasSuffix:'class')
-                    or:[(path hasSuffix:'cla')]) ifTrue:[
-                        JavaClassReader notNil ifTrue:[
-                            JavaClassReader loadFile:(path pathName)
-                        ]
-                    ] ifFalse:[
-                        (path hasSuffix:'sif') ifTrue:[
-                            SmalltalkInterchangeFileManager newForFileIn
-                                fileName: path pathName;
-                                fileIn.
-                        ] ifFalse:[
-                            aStream := path readStream.
-                            aStream notNil ifTrue:[
-                                [
-                                    Class withoutUpdatingChangesDo:[
-                                        wasLazy := Compiler compileLazy:lazy.
-                                        aStream fileIn.
-                                    ].
-                                    Class addInfoRecord:('fileIn ' , fileName) 
-                                ] valueNowOrOnUnwindDo:[
-                                    Compiler compileLazy:wasLazy.
-                                    aStream close
-                                ]
-                            ]
+                            Class addInfoRecord:('fileIn ' , fileName) 
+                        ] valueNowOrOnUnwindDo:[
+                            Compiler compileLazy:wasLazy.
+                            aStream close
                         ]
                     ]
-                ]
-            ]
+                ]]
+            ]]
         ].
         currentFileInFileName := prevCurrentFileName
     ]
@@ -7072,5 +7072,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.367 2000-03-21 11:03:58 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.368 2000-03-21 11:06:14 cg Exp $'
 ! !