SmalltalkChunkFileSourceWriter.st
branchjv
changeset 17966 8b5df02e171f
parent 17964 fb0bbcbb6f83
child 17976 50c2416f962a
--- a/SmalltalkChunkFileSourceWriter.st	Fri Sep 07 13:46:06 2012 +0100
+++ b/SmalltalkChunkFileSourceWriter.st	Fri Sep 07 17:24:32 2012 +0100
@@ -34,6 +34,58 @@
 "
 ! !
 
+!SmalltalkChunkFileSourceWriter class methodsFor:'utilities - source code'!
+
+methodTemplate
+    "return a method definition template string"
+
+    |s|
+
+    s := TextStream on:''.
+    s nextPutAll:
+'message selector and argument names
+    "comment stating purpose of this message"
+
+    |temporaries|
+
+    statement.
+    statement.
+
+    "
+     optional: comment giving example use
+    "
+'.
+    s cr.
+    s emphasis:(UserPreferences current commentEmphasisAndColor).
+    s nextPutAll:
+'"
+ change the above template into real code;
+ remove this comment.
+ Then `accept'' either via the menu 
+ or via the keyboard (usually CMD-A).
+
+ You do not need this template; you can also
+ select any existing methods code, change it,
+ and finally `accept''. The method will then be
+ installed under the selector as defined in the
+ actual text - no matter which method is selected
+ in the browser.
+
+ Or clear this text, type in the method from scratch
+ and install it with `accept''.
+"
+'.
+    ^ s contents
+!
+
+versionMethodTemplateForCVS
+    "careful to avoid expansion by cvs here!!"
+
+    ^ ('version\    ^ ''$' , 'Header$''') withCRs
+
+    "Created: / 21-08-2012 / 11:52:27 / cg"
+! !
+
 !SmalltalkChunkFileSourceWriter methodsFor:'source writing'!
 
 fileOut:aClass on:outStreamArg withTimeStamp:stampIt withInitialize:initIt withDefinition:withDefinition methodFilter:methodFilter encoder:encoderOrNil
@@ -522,9 +574,9 @@
 !SmalltalkChunkFileSourceWriter class methodsFor:'documentation'!
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.15 2011/09/29 12:56:36 cg Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/SmalltalkChunkFileSourceWriter.st,v 1.16 2012/08/21 17:48:17 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: SmalltalkChunkFileSourceWriter.st 10842 2012-09-07 10:49:18Z vranyj1 $'
+    ^ '$Id: SmalltalkChunkFileSourceWriter.st 10844 2012-09-07 16:24:32Z vranyj1 $'
 ! !