AbstractFileBrowser.st
changeset 5491 755cec01b183
parent 5478 46c1513c975f
child 5528 54e3fbee2822
--- a/AbstractFileBrowser.st	Fri Feb 06 18:56:34 2004 +0100
+++ b/AbstractFileBrowser.st	Fri Feb 06 19:03:38 2004 +0100
@@ -5314,9 +5314,8 @@
     |aStream wasLazy notifyString|
 
     fileName type == #regular ifTrue:[
-
         (ObjectFileLoader notNil
-        and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[
+         and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[
             AbortOperationRequest catch:[
                 |p|
 
@@ -5351,10 +5350,10 @@
             ]
         ] ifFalse:[
             ((fileName hasSuffix:'class')
-            or:[(fileName hasSuffix:'cla')]) ifTrue:[
+             or:[(fileName hasSuffix:'cla')]) ifTrue:[
                 "/ loading a java class file
                 JavaClassReader notNil ifTrue:[
-                    JavaClassReader loadFile:(fileName pathName)
+                    JavaClassReader loadFile:fileName
                 ]
             ] ifFalse:[ (fileName hasSuffix:'sif') ifTrue:[
                 "/ loading a sif (smalltalk interchange format) file
@@ -5370,21 +5369,19 @@
                 ]
             ] ifFalse:[
                 "/ loading a regular (chunk) or xml source file
-                aStream := fileName readStreamOrNil.
-                aStream notNil ifTrue:[
-                    Error handle:[ : ex |
-                        Dialog warn:'Error on file in: ', ex errorString.
-                    ] do:[
-                        [
-                            Class withoutUpdatingChangesDo:[
-                                wasLazy := Compiler compileLazy:lazy.
-                                aStream fileIn.
-                            ].
-                            Class addInfoRecord:('fileIn ' , fileName asString) 
-                        ] ensure:[
-                            Compiler compileLazy:wasLazy.
-                            aStream close
-                        ]
+                Error handle:[ : ex |
+                    Dialog warn:'Error on file in: ', ex errorString.
+                ] do:[
+                    aStream := fileName readStream.
+                    [
+                        Class withoutUpdatingChangesDo:[
+                            wasLazy := Compiler compileLazy:lazy.
+                            aStream fileIn.
+                        ].
+                        Class addInfoRecord:('fileIn ' , fileName asString) 
+                    ] ensure:[
+                        Compiler compileLazy:wasLazy.
+                        aStream close
                     ]
                 ]
             ]]]
@@ -6458,5 +6455,5 @@
 !AbstractFileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.201 2004-02-03 14:43:31 penk Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.202 2004-02-06 18:02:42 stefan Exp $'
 ! !