added:
authorfm
Tue, 20 Oct 2009 11:26:02 +0200
changeset 2225 b59ab739d43c
parent 2224 8b7ecd4af276
child 2226 eab85424d4ff
added: #loadPackageWithId:fromRepositoryAsAutoloaded: #sourceCodeManagerForPackage:
AbstractSourceCodeManager.st
--- a/AbstractSourceCodeManager.st	Tue Oct 20 10:42:00 2009 +0200
+++ b/AbstractSourceCodeManager.st	Tue Oct 20 11:26:02 2009 +0200
@@ -1260,6 +1260,20 @@
     ^ #'version'
 !
 
+sourceCodeManagerForPackage: packageId
+
+    |module|
+
+    "/ see if there is a package-specific manager
+    packageId notNil ifTrue:[
+        module := packageId upTo:$:.
+        self availableManagers do:[:mgr |
+            (mgr isResponsibleForModule:module) ifTrue:[^ mgr ].
+        ]
+    ].
+    ^ Smalltalk at:#SourceCodeManager
+!
+
 versionMethodTemplateForRuby
     ^ self versionMethodTemplateForRubyFor:(self nameOfVersionMethodInClasses)
 
@@ -1649,6 +1663,11 @@
     "Modified: / 23-08-2006 / 14:10:45 / cg"
 !
 
+loadPackageWithId: aPackageId fromRepositoryAsAutoloaded: doLoadAsAutoloaded
+
+    "Should be redefined by sub classes"
+!
+
 streamForFile:fileName revision:revision directory:packageDir module:moduleDir 
     ^ self
         streamForClass:nil
@@ -1684,7 +1703,7 @@
      self ensureDollarsInVersionMethod:'foo ^ ''hello'' ' 
      self ensureDollarsInVersionMethod:'foo ^ ''§hello§'' ' 
      self ensureDollarsInVersionMethod:'foo ^ ''   hello   '' '    
-     self ensureDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.226 2009-10-20 08:42:00 cg Exp $'' '      
+     self ensureDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.227 2009-10-20 09:26:02 fm Exp $'' '      
     -- errors:
      self ensureDollarsInVersionMethod:'foo ^ ''$Head'' '    
      self ensureDollarsInVersionMethod:'foo ^ ''Header$'' '    
@@ -1729,7 +1748,7 @@
 
      self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' '  
      self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''   hello   '' '
-     self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.226 2009-10-20 08:42:00 cg Exp $'' '    
+     self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.227 2009-10-20 09:26:02 fm Exp $'' '    
 
     -- errors:
      self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '  
@@ -1747,7 +1766,7 @@
     ^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
 
     "
-        self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.226 2009-10-20 08:42:00 cg Exp $'' '           
+        self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.227 2009-10-20 09:26:02 fm Exp $'' '           
         self ensureNoDollarsInVersionMethod:'foo ^ ''$Head'' '                
         self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' '             
         self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '    
@@ -2718,11 +2737,11 @@
 !AbstractSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.226 2009-10-20 08:42:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.227 2009-10-20 09:26:02 fm Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.226 2009-10-20 08:42:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.227 2009-10-20 09:26:02 fm Exp $'
 ! !
 
 AbstractSourceCodeManager initialize!