added:7 methods
authorClaus Gittinger <cg@exept.de>
Fri, 09 Oct 2009 19:08:36 +0200
changeset 2199 de36b3873c5b
parent 2198 24cbf780471b
child 2200 b9e1551c5a0d
added:7 methods refactored version method template generation
AbstractSourceCodeManager.st
--- a/AbstractSourceCodeManager.st	Fri Oct 09 19:08:15 2009 +0200
+++ b/AbstractSourceCodeManager.st	Fri Oct 09 19:08:36 2009 +0200
@@ -144,6 +144,10 @@
     "Created: / 09-11-2006 / 15:25:17 / cg"
 !
 
+repositoryInfoPerModule:info
+    "/ ignore here
+!
+
 repositoryName
     "return the name of the repository.
      Since this is an abstract class, return nil (i.e. none)"
@@ -1209,6 +1213,12 @@
 
 !AbstractSourceCodeManager class methodsFor:'queries'!
 
+isExperimental
+    ^ false
+
+    "Created: / 16-08-2006 / 11:22:47 / cg"
+!
+
 isResponsibleForModule:module
     ^ self repositoryInfoPerModule keys includes:module
 
@@ -1223,8 +1233,42 @@
         or:[selector startsWith: 'version_']
 !
 
+nameOfVersionMethodForExtensions
+    ^ #'extensionsVersion'
+!
+
 nameOfVersionMethodInClasses
     ^ #'version'
+!
+
+versionMethodTemplateForRuby
+    ^ self versionMethodTemplateForRubyFor:(self nameOfVersionMethodInClasses)
+
+    "
+     CVSSourceCodeManager versionMethodTemplateForRuby
+    "
+!
+
+versionMethodTemplateForRubyFor:aSelector
+    ^
+'def self.',aSelector,'()
+    return "$' , 'Header' , '$"
+end'
+!
+
+versionMethodTemplateForSmalltalk
+    ^ self versionMethodTemplateForSmalltalkFor:(self nameOfVersionMethodInClasses)
+
+    "
+     CVSSourceCodeManager versionMethodTemplateForSmalltalk
+    "
+!
+
+versionMethodTemplateForSmalltalkFor:aSelector
+    ^
+aSelector,'
+    ^ ''$', 'Header' , '$''
+'
 ! !
 
 !AbstractSourceCodeManager class methodsFor:'source code access'!
@@ -1621,7 +1665,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.221 2009-10-09 13:28:09 fm Exp $'' '      
+     self ensureDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '      
     -- errors:
      self ensureDollarsInVersionMethod:'foo ^ ''$Head'' '    
      self ensureDollarsInVersionMethod:'foo ^ ''Header$'' '    
@@ -1666,7 +1710,7 @@
 
      self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''hello'' '  
      self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''   hello   '' '
-     self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.221 2009-10-09 13:28:09 fm Exp $'' '    
+     self ensureKeywordExpansionWith: $$ inVersionMethod: 'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '    
 
     -- errors:
      self ensureKeywordExpansionWith: $§ inVersionMethod: 'foo ^ ''§Head'' '  
@@ -1684,7 +1728,7 @@
     ^ self ensureKeywordExpansionWith: $§ inVersionMethod:versionString.
 
     "
-        self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.221 2009-10-09 13:28:09 fm Exp $'' '           
+        self ensureNoDollarsInVersionMethod:'foo ^ ''$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'' '           
         self ensureNoDollarsInVersionMethod:'foo ^ ''$Head'' '                
         self ensureNoDollarsInVersionMethod:'foo ^ ''Header$'' '             
         self ensureNoDollarsInVersionMethod:'foo ^ ''§Header§'' '    
@@ -2634,10 +2678,10 @@
     "Created: / 16-08-2006 / 10:58:27 / cg"
 !
 
-isExperimental
+isSVN
     ^ false
 
-    "Created: / 16-08-2006 / 11:22:47 / cg"
+    "Created: / 16-08-2006 / 10:58:27 / cg"
 !
 
 isSmallTeam
@@ -2655,11 +2699,11 @@
 !AbstractSourceCodeManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.221 2009-10-09 13:28:09 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.221 2009-10-09 13:28:09 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.222 2009-10-09 17:08:36 cg Exp $'
 ! !
 
 AbstractSourceCodeManager initialize!