AbstractSourceCodeManager.st
changeset 1594 25b2a84fc356
parent 1550 7cb65943ecab
child 1663 12a85dc6e7ef
--- a/AbstractSourceCodeManager.st	Fri Aug 18 19:26:45 2006 +0200
+++ b/AbstractSourceCodeManager.st	Mon Aug 21 10:07:37 2006 +0200
@@ -1242,6 +1242,30 @@
     "Modified: 8.9.1997 / 00:21:27 / cg"
 !
 
+getMostRecentSourceStreamForFile:aFileName inPackage:aPackage
+    "given a filename, return an open stream to its most recent contents
+     (not knowing anything about its version).
+     Used when autoloading extensions or to compare a classes source with the most
+     recent found in the repostitory."
+
+    |directory module s |
+
+    module := aPackage asPackageId module.
+    directory := aPackage asPackageId directory.
+
+    s := self 
+        streamForClass:nil
+        fileName:aFileName 
+        revision:#newest 
+        directory:directory 
+        module:module
+        cache:true.
+    ^ s.
+
+    "Created: 12.10.1996 / 17:22:54 / cg"
+    "Modified: 8.9.1997 / 00:21:27 / cg"
+!
+
 getSourceStreamFor:aClass
     "extract a classes source code and return an open readStream on it.
      The classes source code is extracted using the revision and the sourceCodeInfo,
@@ -2150,7 +2174,7 @@
 !AbstractSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.184 2006-08-18 10:31:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.185 2006-08-21 08:07:37 cg Exp $'
 ! !
 
 AbstractSourceCodeManager initialize!