Class.st
changeset 12509 0a69e1d87ba3
parent 12507 41ac4792b598
child 12517 41a810c685de
--- a/Class.st	Fri Nov 06 11:23:52 2009 +0100
+++ b/Class.st	Fri Nov 06 11:51:12 2009 +0100
@@ -4586,7 +4586,7 @@
 sourceStreamFor:source
     "return an open stream on a sourcefile, nil if that is not available"
 
-    |owner sourceStream mgr validated guessedFileName sep mod dir|
+    |owner sourceStream sourceCodeManager validated guessedFileName sep mod dir|
 
     (owner := self owningClass) notNil ifTrue:[^ owner sourceStreamFor:source].
     validated := false.
@@ -4596,7 +4596,7 @@
     "/ or TryLocalSourceFirst is true,
     "/ look in standard places first
     "/
-    ((mgr := self sourceCodeManager) isNil
+    ((sourceCodeManager := self sourceCodeManager) isNil
     or:[TryLocalSourceFirst == true]) ifTrue:[
         sourceStream := self localSourceStreamFor:source.
     ].
@@ -4608,13 +4608,14 @@
         "/ if that one does not know about the source, look in
         "/ standard places
 
-        mgr notNil ifTrue:[
+        sourceCodeManager notNil ifTrue:[
             classFilename ~= source ifTrue:[
                 sep := self package indexOfAny:'/\:'.
                 sep ~~ 0 ifTrue:[
                     mod := package copyTo:sep - 1.
                     dir := package copyFrom:sep + 1.
-                    sourceStream := mgr streamForClass:nil fileName:source revision:nil directory:dir module:mod cache:true.
+self halt.
+                    sourceStream := sourceCodeManager streamForClass:nil fileName:source revision:(self binaryRevision) directory:dir module:mod cache:true.
                 ].
             ].
             sourceStream isNil ifTrue:[
@@ -4622,7 +4623,7 @@
                     guessedFileName := (Smalltalk fileNameForClass:self) , '.st'.
                 ].
                 source asFilename baseName = classFilename asFilename baseName ifTrue:[
-                    sourceStream := mgr getSourceStreamFor:self.
+                    sourceStream := sourceCodeManager getSourceStreamFor:self.
                 ]
             ].
             sourceStream notNil ifTrue:[
@@ -4719,7 +4720,7 @@
 
 validateSourceStream:aStream
     "check if aStream really contains my source.
-     This is done by checking the version methods return value
+     This is done by checking the version method's return value
      against the version string as contained in the version method.
      This helps to detect mangled source code."
 
@@ -5021,9 +5022,9 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.560 2009-11-05 23:19:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.561 2009-11-06 10:51:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.560 2009-11-05 23:19:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.561 2009-11-06 10:51:12 cg Exp $'
 ! !