67 "return a method definition template string" |
67 "return a method definition template string" |
68 |
68 |
69 |s| |
69 |s| |
70 |
70 |
71 self obsoleteMethodWarning:'use codeGenerator'. |
71 self obsoleteMethodWarning:'use codeGenerator'. |
72 s := (TextStream ? WriteStream) on:''. |
72 ^ SmalltalkLanguage instance methodTemplate. |
73 s nextPutAll: |
73 |
74 'message "selector and argument names" |
74 "/ s := (TextStream ? WriteStream) on:''. |
75 "comment stating purpose of this message" |
75 "/ s nextPutAll: |
76 |
76 "/'message "selector and argument names" |
77 |temporaries| |
77 "/ "comment stating purpose of this message" |
78 |
78 "/ |
79 "statement." |
79 "/ |temporaries| |
80 "statement." |
80 "/ |
81 |
81 "/ "statement." |
82 " |
82 "/ "statement." |
83 optional: comment giving example use |
83 "/ |
84 " |
84 "/ " |
85 '. |
85 "/ optional: comment giving example use |
86 s cr. |
86 "/ " |
87 s emphasis:(UserPreferences current commentEmphasisAndColor). |
87 "/'. |
88 s nextPutAll: |
88 "/ s cr. |
89 '" |
89 "/ s emphasis:(UserPreferences current commentEmphasisAndColor). |
90 change the above template into real code; |
90 "/ s nextPutAll: |
91 remove this comment. |
91 "/'" |
92 Then `accept'' either via the menu |
92 "/ change the above template into real code; |
93 or via the keyboard (usually CMD-A). |
93 "/ remove this comment. |
94 |
94 "/ Then `accept'' either via the menu |
95 You do not need this template; you can also |
95 "/ or via the keyboard (usually CMD-A). |
96 select any existing methods code, change it, |
96 "/ |
97 and finally `accept''. The method will then be |
97 "/ You do not need this template; you can also |
98 installed under the selector as defined in the |
98 "/ select any existing methods code, change it, |
99 actual text - no matter which method is selected |
99 "/ and finally `accept''. The method will then be |
100 in the browser. |
100 "/ installed under the selector as defined in the |
101 |
101 "/ actual text - no matter which method is selected |
102 Or clear this text, type in the method from scratch |
102 "/ in the browser. |
103 and install it with `accept''. |
103 "/ |
104 |
104 "/ Or clear this text, type in the method from scratch |
105 If you don''t like this method template to appear, |
105 "/ and install it with `accept''. |
106 disable it either via the global or browser''s settings dialog, |
106 "/ |
107 or by evaluating: |
107 "/ If you don''t like this method template to appear, |
108 UserPreferences current showMethodTemplate:false |
108 "/ disable it either via the global or browser''s settings dialog, |
109 " |
109 "/ or by evaluating: |
110 '. |
110 "/ UserPreferences current showMethodTemplate:false |
111 ^ s contents |
111 "/" |
|
112 "/'. |
|
113 "/ ^ s contents |
|
114 |
|
115 "Modified: / 18-11-2016 / 01:36:39 / cg" |
112 ! |
116 ! |
113 |
117 |
114 methodTemplateForDocumentation |
118 methodTemplateForDocumentation |
115 <resource: #obsolete> |
119 <resource: #obsolete> |
116 "return a method definition template string" |
120 "return a method definition template string" |
117 |
121 |
118 |s| |
122 |s| |
119 |
123 |
120 self obsoleteMethodWarning:'use codeGenerator'. |
124 self obsoleteMethodWarning:'use codeGenerator'. |
121 s := (TextStream ? WriteStream) on:''. |
125 ^ SmalltalkLanguage instance methodTemplateForDocumentation. |
122 s nextPutAll: |
126 |
123 'documentation |
127 "/ s := (TextStream ? WriteStream) on:''. |
124 '. |
128 "/ s nextPutAll: |
125 s emphasis:(UserPreferences current commentEmphasisAndColor). |
129 "/'documentation |
126 s nextPutAll:( |
130 "/'. |
127 '" |
131 "/ s emphasis:(UserPreferences current commentEmphasisAndColor). |
128 comment describing this class. |
132 "/ s nextPutAll:( |
129 you can disable the generation of this template by evaluating: |
133 "/'" |
130 UserPreferences current showMethodTemplate:false |
134 "/ comment describing this class. |
131 |
135 "/ you can disable the generation of this template by evaluating: |
132 [instance variables:] |
136 "/ UserPreferences current showMethodTemplate:false |
133 describe instance variables |
137 "/ |
134 [class variables:] |
138 "/ [instance variables:] |
135 describe class variables |
139 "/ describe instance variables |
136 [see also:] |
140 "/ [class variables:] |
137 |
141 "/ describe class variables |
138 [author:] |
142 "/ [see also:] |
139 %1 |
143 "/ |
140 " |
144 "/ [author:] |
141 ' bindWith:(OperatingSystem getFullUserName)). |
145 "/ %1 |
142 ^ s contents |
146 "/" |
|
147 "/' bindWith:(OperatingSystem getFullUserName)). |
|
148 "/ ^ s contents |
|
149 |
|
150 "Modified: / 18-11-2016 / 01:37:41 / cg" |
143 ! |
151 ! |
144 |
152 |
145 versionMethodTemplateForCVS |
153 versionMethodTemplateForCVS |
146 <resource: #obsolete> |
154 <resource: #obsolete> |
147 "careful to avoid expansion by cvs here!!" |
155 "careful to avoid expansion by cvs here!!" |