# HG changeset patch # User Jan Vrany # Date 1446535155 0 # Node ID ae8879b8ba67b6f29e464f77bad8fe81158c5381 # Parent 243f926d6101fa0769cfaa73c51d522a1fc0b82f Refactored and improved support for writing Bee packages. Added support to write both, .stp and .prj files. diff -r 243f926d6101 -r ae8879b8ba67 BeeProjectDefinitionWriter.st --- a/BeeProjectDefinitionWriter.st Mon Nov 02 20:30:10 2015 +0000 +++ b/BeeProjectDefinitionWriter.st Tue Nov 03 07:19:15 2015 +0000 @@ -60,14 +60,34 @@ classes do:[:class | stream nextPutAll: 'project addClass: '; nextPutAll: class name storeString; nextPutAll: '.'; cr. - ] + ]. + stream cr. - "Modified: / 02-11-2015 / 19:14:00 / Jan Vrany " + "Modified: / 03-11-2015 / 07:05:42 / Jan Vrany " ! fileOutExtensions:methods on: stream - "Modified: / 02-11-2015 / 19:15:07 / Jan Vrany " + stream nextPutAll: '#('; cr. + methods do:[:method | + stream nextPut:''''; + nextPutAll: method mclass name; + nextPutAll: '>>'; + nextPutAll: method seelctore; + nextPut:''''; + cr. + ]. + stream nextPutAll: ') do: [:string | project addMethod: string].' + + "Modified: / 03-11-2015 / 07:07:56 / Jan Vrany " +! + +fileOutFooterOn:aStream + aStream cr. + aStream cr. + aStream nextPutAll: '^ project'. + + "Created: / 03-11-2015 / 23:05:53 / Jan Vrany " ! fileOutHeaderOn:aStream @@ -92,3 +112,10 @@ "Modified: / 02-11-2015 / 19:16:31 / Jan Vrany " ! ! +!BeeProjectDefinitionWriter class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + diff -r 243f926d6101 -r ae8879b8ba67 BeeProjectWriter.st --- a/BeeProjectWriter.st Mon Nov 02 20:30:10 2015 +0000 +++ b/BeeProjectWriter.st Tue Nov 03 07:19:15 2015 +0000 @@ -36,6 +36,17 @@ " ! ! +!BeeProjectWriter class methodsFor:'private'! + +basenameForPackage:pkg + | pkgdef | + + pkgdef := ProjectDefinition definitionClassForPackage: pkg. + ^ pkgdef name. + + "Created: / 03-11-2015 / 07:15:00 / Jan Vrany " +! ! + !BeeProjectWriter class methodsFor:'queries'! isAbstract @@ -48,6 +59,22 @@ !BeeProjectWriter class methodsFor:'simple API'! +fileOut: pkg in: directory + "File out Bee package (definition - .prj and source - .stp) in + given directory." + + | basename prjFilename stpFilename | + + basename := self basenameForPackage: pkg. + prjFilename := directory asFilename / (basename , '.prj'). + stpFilename := directory asFilename / (basename , '.stp'). + + BeeProjectDefinitionWriter fileOut: pkg to: prjFilename. + BeeProjectSourceWriter fileOut: pkg to: stpFilename. + + "Created: / 03-11-2015 / 07:14:51 / Jan Vrany " +! + fileOut:packageId on:stream self new fileOut:packageId on:stream @@ -116,9 +143,10 @@ self fileOutHeaderOn:aStream. self fileOutClasses: classesToFileout on: aStream. self fileOutExtensions: methodsToFileOut on: aStream. + self fileOutFooterOn: aStream. "Created: / 14-04-2015 / 13:42:17 / Jan Vrany " - "Modified: / 02-11-2015 / 19:06:02 / Jan Vrany " + "Modified: / 03-11-2015 / 23:05:16 / Jan Vrany " ! fileOutClasses:arg1 on:arg2 @@ -133,6 +161,11 @@ ^ self subclassResponsibility ! +fileOutFooterOn:aStresm + + "Created: / 03-11-2015 / 23:05:16 / Jan Vrany " +! + fileOutHeaderOn:arg "raise an error: must be redefined in concrete subclass(es)" diff -r 243f926d6101 -r ae8879b8ba67 ChangeDeltaInformation.st --- a/ChangeDeltaInformation.st Mon Nov 02 20:30:10 2015 +0000 +++ b/ChangeDeltaInformation.st Tue Nov 03 07:19:15 2015 +0000 @@ -228,6 +228,11 @@ version_CVS ^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.4 2014-12-11 20:47:41 cg Exp $' +! + +version_HG + + ^ '$Changeset: $' ! !