moved source-file access code into class
authorClaus Gittinger <cg@exept.de>
Fri, 10 Nov 1995 21:27:54 +0100
changeset 522 198bf04a3aa4
parent 521 70533ec40482
child 523 27e13690f124
moved source-file access code into class
Method.st
--- a/Method.st	Fri Nov 10 17:46:49 1995 +0100
+++ b/Method.st	Fri Nov 10 21:27:54 1995 +0100
@@ -23,7 +23,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Method.st,v 1.53 1995-11-04 21:10:19 cg Exp $
+$Header: /cvs/stx/stx/libbasic/Method.st,v 1.54 1995-11-10 20:27:54 cg Exp $
 '!
 
 !Method class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Method.st,v 1.53 1995-11-04 21:10:19 cg Exp $
+$Header: /cvs/stx/stx/libbasic/Method.st,v 1.54 1995-11-10 20:27:54 cg Exp $
 "
 !
 
@@ -256,44 +256,8 @@
 		w := self who.
 		w notNil ifTrue:[
 		    myClass := w at:1.
+		    aStream := myClass sourceStream.
 		].
-
-		"/      
-		"/ hard case - there is no source file for this class
-		"/ (neither in the source-dir-path, nor in the current directory).
-		"/      
-		self dynamic ifTrue:[
-		    "/      
-		    "/ we look if my binary is from a dynamically loaded module,
-		    "/ and, if so, look in the modules directory for the
-		    "/ source file.
-		    "/      
-		    myClass notNil ifTrue:[
-			ObjectFileLoader notNil ifTrue:[
-			    ObjectFileLoader loadedObjectHandlesDo:[:h |
-				|f|
-
-				(h classes includes:myClass) ifTrue:[
-				    f := h pathName.
-				    f := f asFilename directory.
-				    f := f construct:source.
-				    f exists ifTrue:[
-					aStream := f readStream.
-				    ].
-				]
-			    ].
-			].
-		    ]
-		].
-
-		aStream isNil ifTrue:[
-		    "/ mhmh - still no source file.
-		    "/ If there is a SourceCodeManager, ask it to aquire the
-		    "/ the source for my class, and return an open stream on it. 
-		    SourceCodeManager notNil ifTrue:[
-			aStream := SourceCodeManager sourceStreamFor:myClass.
-		    ]
-		]
 	    ]
 	].