--- a/SmalltalkChunkFileSourceWriter.st Wed Sep 05 00:27:33 2012 +0100
+++ b/SmalltalkChunkFileSourceWriter.st Fri Sep 07 11:49:18 2012 +0100
@@ -422,15 +422,34 @@
].
!
-fileOutMethods: methods on: stream
+fileOutMethods: extensions on: stream
+ | methodsSortedByName |
+
+ "/ sort them by name (to avoid conflict due to CVS merge)
+ methodsSortedByName := extensions asOrderedCollection.
+ methodsSortedByName sort:[:a :b |
+ |clsA clsB|
- methods do:
- [:method| |cat source privacy|
+ clsA := a mclass name.
+ clsB := b mclass name.
+ clsA < clsB ifTrue:[
+ true
+ ] ifFalse:[
+ clsA > clsB ifTrue:[
+ false
+ ] ifFalse:[
+ a selector < b selector
+ ]
+ ]
+ ].
+ methodsSortedByName do:[:method |
+ | privacy cat |
+ self assert: method programmingLanguage isSmalltalk.
stream nextPutChunkSeparator.
"JV@2012-09-05: Support for filing out Java extension methods"
method mclass isJavaClass ifTrue:[
- stream nextPutAll: 'JAVA '.
+ stream nextPutAll: 'JAVA'.
(method mclass name tokensBasedOn:$/) do:[:each|
stream space; nextPutAll: each
]
@@ -444,7 +463,6 @@
] ifFalse:[
stream nextPutAll:' methodsFor:'.
].
-
cat := method category ? ''.
stream nextPutAll:cat asString storeString.
stream nextPutChunkSeparator; cr; cr.
@@ -453,19 +471,21 @@
stream space.
stream nextPutChunkSeparator.
- stream cr]
+ stream cr.
+ stream cr.
+ ].
"Created: / 30-12-2009 / 18:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-fileOutPackageDefinition:pkg on:aStream
+fileOutPackageDefinition:pkg on:stream
(pkg notNil and:[ pkg ~= PackageId noProjectID ]) ifTrue:[
- aStream nextPutAll:'"{ Package: '''.
- aStream nextPutAll:pkg asString.
- aStream
- nextPutAll:''' }"'; cr; cr;
- nextPut:$!!; cr; cr
+ stream nextPutAll:'"{ Package: '''.
+ stream nextPutAll:pkg asString.
+ stream nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
]
+
+ "Modified: / 07-09-2012 / 11:19:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
generateHeaderWithCopyrightOn:outStream
@@ -506,5 +526,5 @@
!
version_SVN
- ^ '$Id: SmalltalkChunkFileSourceWriter.st 10841 2012-09-04 23:27:33Z vranyj1 $'
+ ^ '$Id: SmalltalkChunkFileSourceWriter.st 10842 2012-09-07 10:49:18Z vranyj1 $'
! !