#REFACTORING by cg
class: SmalltalkChunkFileSourceWriter
changed:
#methodTemplate
#methodTemplateForDocumentation
obsolete code removed
--- a/SmalltalkChunkFileSourceWriter.st Wed Nov 16 23:16:14 2016 +0100
+++ b/SmalltalkChunkFileSourceWriter.st Fri Nov 18 01:38:41 2016 +0100
@@ -69,46 +69,50 @@
|s|
self obsoleteMethodWarning:'use codeGenerator'.
- s := (TextStream ? WriteStream) on:''.
- s nextPutAll:
-'message "selector and argument names"
- "comment stating purpose of this message"
-
- |temporaries|
-
- "statement."
- "statement."
+ ^ SmalltalkLanguage instance methodTemplate.
- "
- 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).
+"/ s := (TextStream ? WriteStream) 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''.
+"/
+"/ If you don''t like this method template to appear,
+"/ disable it either via the global or browser''s settings dialog,
+"/ or by evaluating:
+"/ UserPreferences current showMethodTemplate:false
+"/"
+"/'.
+"/ ^ s contents
- 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''.
-
- If you don''t like this method template to appear,
- disable it either via the global or browser''s settings dialog,
- or by evaluating:
- UserPreferences current showMethodTemplate:false
-"
-'.
- ^ s contents
+ "Modified: / 18-11-2016 / 01:36:39 / cg"
!
methodTemplateForDocumentation
@@ -118,28 +122,32 @@
|s|
self obsoleteMethodWarning:'use codeGenerator'.
- s := (TextStream ? WriteStream) on:''.
- s nextPutAll:
-'documentation
-'.
- s emphasis:(UserPreferences current commentEmphasisAndColor).
- s nextPutAll:(
-'"
- comment describing this class.
- you can disable the generation of this template by evaluating:
- UserPreferences current showMethodTemplate:false
+ ^ SmalltalkLanguage instance methodTemplateForDocumentation.
- [instance variables:]
- describe instance variables
- [class variables:]
- describe class variables
- [see also:]
-
- [author:]
- %1
-"
-' bindWith:(OperatingSystem getFullUserName)).
- ^ s contents
+"/ s := (TextStream ? WriteStream) on:''.
+"/ s nextPutAll:
+"/'documentation
+"/'.
+"/ s emphasis:(UserPreferences current commentEmphasisAndColor).
+"/ s nextPutAll:(
+"/'"
+"/ comment describing this class.
+"/ you can disable the generation of this template by evaluating:
+"/ UserPreferences current showMethodTemplate:false
+"/
+"/ [instance variables:]
+"/ describe instance variables
+"/ [class variables:]
+"/ describe class variables
+"/ [see also:]
+"/
+"/ [author:]
+"/ %1
+"/"
+"/' bindWith:(OperatingSystem getFullUserName)).
+"/ ^ s contents
+
+ "Modified: / 18-11-2016 / 01:37:41 / cg"
!
versionMethodTemplateForCVS