- do not fileout extensionVersion for project definition classes.
- common method to fileout extensions
--- a/AbstractSourceCodeManager.st Mon Jan 30 17:19:14 2012 +0000
+++ b/AbstractSourceCodeManager.st Thu Feb 02 16:09:32 2012 +0000
@@ -2386,6 +2386,67 @@
"
!
+fileOutSourceCodeExtensions: extensions package: package on: stream
+ "File out extension methods for given package on stream.
+ Not programming-language safe - can handle smalltalk methods.
+
+ NOTE: method body taken from
+ SourceCodeManagerUtilities>>checkinExtensionMethods:forPackage:withInfo:
+ CVS revision 1.240
+ "
+
+ | methodsSortedByName defClass |
+
+ self withSourceRewriteHandlerDo:[
+ stream nextPutAll:'"{ Package: '''.
+ stream nextPutAll:package asString.
+ stream nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
+
+"/ s nextPutAll:(Smalltalk timeStamp).
+"/ s nextPutChunkSeparator.
+"/ s cr; cr.
+
+ "/ sort them by name (to avoid conflict due to CVS merge)
+ methodsSortedByName := extensions asOrderedCollection.
+ methodsSortedByName sort:[:a :b |
+ |clsA clsB|
+
+ clsA := a mclass name.
+ clsB := b mclass name.
+ clsA < clsB ifTrue:[
+ true
+ ] ifFalse:[
+ clsA > clsB ifTrue:[
+ false
+ ] ifFalse:[
+ a selector < b selector
+ ]
+ ]
+ ].
+ methodsSortedByName do:[:aMethod |
+ self assert: aMethod package = package.
+ self assert: aMethod programmingLanguage isSmalltalk.
+ aMethod mclass fileOutMethod:aMethod on:stream.
+ stream cr.
+ ].
+
+ defClass := ProjectDefinition definitionClassForPackage:package.
+ defClass notNil ifTrue:[
+ "/ make sure, an extensionVersion_XXX method is included...
+ "/ (notice: no need to support a secondary backward compatible non-manager related version method here)
+ (methodsSortedByName contains:[:aMethod | aMethod selector == self nameOfVersionMethodForExtensions]) ifFalse:[
+ stream nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
+ stream cr.
+ stream nextChunkPut:
+ (self versionMethodTemplateForSmalltalkFor:(self nameOfVersionMethodForExtensions)).
+ stream space; nextPutChunkSeparator.
+ ].
+ ].
+ ].
+
+ "Created: / 02-02-2012 / 15:30:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
fileOutSourceCodeOf:aClass on:aStream
self withSourceRewriteHandlerDo:[
@@ -2397,13 +2458,24 @@
withTimeStamp:withTimeStamp withInitialize:withInitialize withDefinition:withDefinition
methodFilter:methodFilter
+ | filter |
+ "JV@2012-02-02: Do not fileout extensionVersion methods, that one is filed out
+ when extensions are filed out."
+ (aClass inheritsFrom: ProjectDefinition) ifTrue:[
+ filter := [:m| (methodFilter value: m) and:[m selector ~~ self nameOfVersionMethodForExtensions] ]
+ ] ifFalse:[
+ filter := methodFilter.
+ ].
+
self withSourceRewriteHandlerDo:[
aClass fileOutOn:aStream
withTimeStamp:withTimeStamp
withInitialize:withInitialize
withDefinition:withDefinition
- methodFilter:methodFilter
+ methodFilter:filter.
].
+
+ "Modified: / 02-02-2012 / 15:53:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
getExistingContainersInModule:aModule directory:aPackage
@@ -3538,7 +3610,7 @@
!AbstractSourceCodeManager class methodsFor:'documentation'!
version
- ^ '$Id: AbstractSourceCodeManager.st 1872 2012-01-30 17:19:14Z vranyj1 $'
+ ^ '$Id: AbstractSourceCodeManager.st 1874 2012-02-02 16:09:32Z vranyj1 $'
!
version_CVS
@@ -3546,7 +3618,7 @@
!
version_SVN
- ^ '$Id: AbstractSourceCodeManager.st 1872 2012-01-30 17:19:14Z vranyj1 $'
+ ^ '$Id: AbstractSourceCodeManager.st 1874 2012-02-02 16:09:32Z vranyj1 $'
! !
AbstractSourceCodeManager initialize!
--- a/SourceCodeManagerUtilities.st Mon Jan 30 17:19:14 2012 +0000
+++ b/SourceCodeManagerUtilities.st Thu Feb 02 16:09:32 2012 +0000
@@ -1427,8 +1427,7 @@
"checkin a projects extensions into the source repository.
If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
- |logMessage checkinInfo mgr pri resources module directory containerFileName s
- methodSource methodsSortedByName defClass|
+ |logMessage checkinInfo mgr pri module directory containerFileName methodSource|
resources := self classResources.
@@ -1472,53 +1471,8 @@
Processor activeProcess
withPriority:pri-1 to:pri
do:[
- s := '' writeStream.
-
- s nextPutAll:'"{ Package: '''.
- s nextPutAll:aPackageID asString.
- s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
-
-"/ s nextPutAll:(Smalltalk timeStamp).
-"/ s nextPutChunkSeparator.
-"/ s cr; cr.
-
- "/ sort them by name (to avoid conflict due to CVS merge)
- methodsSortedByName := aCollectionOfMethods asOrderedCollection.
- methodsSortedByName sort:[:a :b |
- |clsA clsB|
-
- clsA := a mclass name.
- clsB := b mclass name.
- clsA < clsB ifTrue:[
- true
- ] ifFalse:[
- clsA > clsB ifTrue:[
- false
- ] ifFalse:[
- a selector < b selector
- ]
- ]
- ].
- methodsSortedByName do:[:aMethod |
- aMethod mclass fileOutMethod:aMethod on:s.
- s cr.
- ].
-
- defClass := ProjectDefinition definitionClassForPackage:aPackageID.
- defClass notNil ifTrue:[
- "/ make sure, an extensionVersion_XXX method is included...
- "/ (notice: no need to support a secondary backward compatible non-manager related version method here)
- (methodsSortedByName contains:[:aMethod | aMethod selector == mgr nameOfVersionMethodForExtensions]) ifFalse:[
- s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
- s cr.
- s nextChunkPut:
- (mgr versionMethodTemplateForSmalltalkFor:(mgr nameOfVersionMethodForExtensions)).
- s space; nextPutChunkSeparator.
- ].
- ].
-
- methodSource := s contents.
-
+ methodSource := String streamContents: [:s|mgr fileOutSourceCodeExtensions: aCollectionOfMethods package: aPackageID on: s]
+.
UserInformation handle:[:ex |
Transcript showCR:ex description.
ex proceed.
@@ -1555,6 +1509,7 @@
^ true
"Modified: / 29-12-2011 / 14:32:11 / cg"
+ "Modified: / 02-02-2012 / 15:32:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
@@ -4370,7 +4325,7 @@
!SourceCodeManagerUtilities class methodsFor:'documentation'!
version
- ^ '$Id: SourceCodeManagerUtilities.st 1872 2012-01-30 17:19:14Z vranyj1 $'
+ ^ '$Id: SourceCodeManagerUtilities.st 1874 2012-02-02 16:09:32Z vranyj1 $'
!
version_CVS
@@ -4378,5 +4333,5 @@
!
version_SVN
- ^ '$Id: SourceCodeManagerUtilities.st 1872 2012-01-30 17:19:14Z vranyj1 $'
+ ^ '$Id: SourceCodeManagerUtilities.st 1874 2012-02-02 16:09:32Z vranyj1 $'
! !
--- a/extensions.st Mon Jan 30 17:19:14 2012 +0000
+++ b/extensions.st Thu Feb 02 16:09:32 2012 +0000
@@ -1,6 +1,4 @@
-"{ Package: 'stx:libbasic3' }"
-
-!
+"{ Package: 'stx:libbasic3' }"!
!UserPreferences methodsFor:'accessing-history manager'!
@@ -14,6 +12,7 @@
"Modified (Format): / 30-06-2011 / 17:07:33 / cg"
"Modified (Comment): / 30-06-2011 / 17:09:24 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerModificationLimit
@@ -26,6 +25,7 @@
"Created: / 04-10-2008 / 11:55:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (Comment): / 30-06-2011 / 17:25:09 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerModificationLimit: sec
@@ -38,6 +38,7 @@
"Created: / 04-10-2008 / 11:56:23 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (Comment): / 30-06-2011 / 17:25:13 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerSignature
@@ -51,6 +52,7 @@
"Modified: / 08-07-2011 / 10:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 04-08-2011 / 17:24:21 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerSignature: aString
@@ -63,6 +65,7 @@
"Created: / 04-10-2008 / 11:54:53 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (Comment): / 30-06-2011 / 17:25:31 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerSignatures
@@ -80,6 +83,7 @@
"Modified: / 22-08-2009 / 11:00:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (Comment): / 30-06-2011 / 17:27:14 / cg"
! !
+
!UserPreferences methodsFor:'accessing-history manager'!
historyManagerSignatures: aDictionary
@@ -92,6 +96,7 @@
"Created: / 04-10-2008 / 11:52:58 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified (Comment): / 30-06-2011 / 17:26:48 / cg"
! !
+
!UserPreferences methodsFor:'accessing-scm'!
managerPerMatchingModuleDefinitions
@@ -108,6 +113,7 @@
"Created: / 09-07-2011 / 13:33:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+
!UserPreferences methodsFor:'accessing-scm'!
managerPerMatchingModuleDefinitions: defs
@@ -120,3 +126,9 @@
"Created: / 09-07-2011 / 13:35:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+
+!stx_libbasic3 class methodsFor:'documentation'!
+
+extensionsVersion_SVN
+ ^ '$Id: extensions.st 1874 2012-02-02 16:09:32Z vranyj1 $'
+! !
\ No newline at end of file