BeeProjectDefinitionWriter.st
branchjv
changeset 3921 243f926d6101
child 3922 ae8879b8ba67
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BeeProjectDefinitionWriter.st	Mon Nov 02 20:30:10 2015 +0000
@@ -0,0 +1,94 @@
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+"{ Package: 'stx:libbasic3' }"
+
+"{ NameSpace: Smalltalk }"
+
+BeeProjectWriter subclass:#BeeProjectDefinitionWriter
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Kernel-Classes-Support'
+!
+
+!BeeProjectDefinitionWriter class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2006 by eXept Software AG
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+    A writer to write Smalltalk/X package in Bee Smalltalk format (.prj). Usage:
+
+    BeeProjectDefinitionWriter fileOut: 'jv:calipel/s' to: '/tmp/jv-calipel-s.prj'
+
+    [author:]
+        Jan Vrany <jan.vrany@fit.cvut.cz>
+
+    [instance variables:]
+
+    [class variables:]
+
+    [see also:]
+
+"
+! !
+
+!BeeProjectDefinitionWriter methodsFor:'source writing'!
+
+fileOutClasses: classes on: stream
+
+    classes do:[:class |  
+        stream nextPutAll: 'project addClass: '; nextPutAll: class name storeString; nextPutAll: '.'; cr.
+    ]
+
+    "Modified: / 02-11-2015 / 19:14:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+fileOutExtensions:methods on: stream
+
+    "Modified: / 02-11-2015 / 19:15:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+fileOutHeaderOn:aStream
+
+    aStream nextPutAll:(
+'"
+        __________________________________________________
+        @VM Project 1.0
+        __________________________________________________
+"
+
+| project |
+project := SimpleSmalltalkProject new 
+        name: ''%(NAME)'';
+        version: ''%(VERSION)'';
+        description: ''%(DESCRIPTION)'';
+        author: ''%(AUTHOR)'';
+        yourself.
+
+' bindWithArguments: self mappings)
+
+    "Modified: / 02-11-2015 / 19:16:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+